Changeset 17220
- Timestamp:
- 08/08/08 00:01:08 (5 months ago)
- Location:
- lang/actionscript/todoshare
- Files:
-
- 1 added
- 2 modified
-
TodoJS.html (modified) (1 diff)
-
js/findForm.js (added)
-
suggest.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/todoshare/TodoJS.html
r17177 r17220 11 11 <script> 12 12 // JavaScript 13 funciont findForm(form) { 14 15 } 13 16 function onLoad() { 14 elem($("body"), [ 15 event, "=">" , todo 16 ]); 17 } 18 function event (p) { 19 elem(p, 20 [ 21 [suggest, query ] 17 var _={$:_}; 22 18 23 ] 24 ); 19 20 vaf fe=findForm({ 21 category: "Event", 22 content: bindSuggest($("event"),$("eventS")) 23 }); 24 fe.watch(function (res) { 25 setEventRes(res); 26 }); 27 var ftTmpl={ 28 category: "Todo", 29 content: bindSuggest($("todo"),$("todoS")) 30 }; 31 vaf ft=findForm(ftTmpl); 32 fe.watch(function (res) { 33 ftTmpl.id=["in",res]; 34 ft.refresh(); 35 }); 36 ft.watch(function (res) { 37 setTodoRes(res); 38 }); 39 40 41 42 /*progn( 43 [get1, ], 44 [_.id], 45 ["FINDVALUES", _ , "=>" ]}, 46 [getMany, ], 47 ["setRes", _] 48 );*/ 25 49 } 26 50 </script> 27 51 </head> 28 52 <body id=body onLoad="onLoad()"> 29 <input type= 53 <input id=event type=text><BR><div class=suggest id=eventS></div> 54 => 55 <input id=todo type=text><BR><div class=suggest id=todoS></div> 30 56 <HR> 31 57 <a href="./">Home</a><BR> -
lang/actionscript/todoshare/suggest.js
r17177 r17220 12 12 13 13 Modified by hoge1e3 14 14 option may contain ajaxAction 15 ajaxAction:: pre:String -> maxResult:Int -> act:([String] -> Unit) -> Unit 16 where 17 pre: value of textbox 18 maxResult: the max number of results. 19 act: The callback when end search, passing array of results. 20 15 21 16 22 -------------------------------------------------------- … … 49 55 50 56 if (arguments[3]) this.setOptions(arguments[3]); 51 // option may contain ajaxAction 52 // ajaxAction:: String -> maxResult:Int -> ([String] -> Unit) -> Unit 57 53 58 // ajaxArg!=null => ajaxAction(ajaxArg) == candidateList 54 59 this.ajaxArg=null;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)