Changeset 17220

Show
Ignore:
Timestamp:
08/08/08 00:01:08 (5 months ago)
Author:
hoge1e3
Message:

汎用補完フォームfindform頓挫中

Location:
lang/actionscript/todoshare
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/todoshare/TodoJS.html

    r17177 r17220  
    1111<script>  
    1212// JavaScript 
     13funciont findForm(form) { 
     14    
     15} 
    1316function onLoad() { 
    14    elem($("body"), [ 
    15       event, "=">" , todo 
    16    ]); 
    17 } 
    18 function event (p) { 
    19    elem(p, 
    20      [  
    21        [suggest, query ] 
     17   var _={$:_}; 
    2218    
    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  );*/ 
    2549} 
    2650</script> 
    2751</head> 
    2852<body id=body onLoad="onLoad()"> 
    29 <input type= 
     53<input id=event type=text><BR><div class=suggest id=eventS></div> 
     54=&gt; 
     55<input id=todo type=text><BR><div class=suggest id=todoS></div> 
    3056<HR> 
    3157<a href="./">Home</a><BR> 
  • lang/actionscript/todoshare/suggest.js

    r17177 r17220  
    1212  
    1313Modified 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                 
    1521 
    1622-------------------------------------------------------- 
     
    4955 
    5056    if (arguments[3]) this.setOptions(arguments[3]); 
    51     // option may contain ajaxAction  
    52     // ajaxAction:: String -> maxResult:Int -> ([String] -> Unit) -> Unit  
     57     
    5358    // ajaxArg!=null => ajaxAction(ajaxArg) == candidateList 
    5459    this.ajaxArg=null;