Wiki source code of Search Suggest - Simple B
Last modified by Vincent Massol on 2024/11/19 16:13
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity output=false}} | ||
| 2 | $xwiki.ssx.use($doc.fullName) | ||
| 3 | {{/velocity}} | ||
| 4 | |||
| 5 | |||
| 6 | {{velocity}} | ||
| 7 | {{html wiki=true}} | ||
| 8 | **Try editing tags down there** or search for a user here : <input name="userInput" id="userInput" value="" type="text" style="width:300px"/> | ||
| 9 | {{html}} | ||
| 10 | <script type="text/javascript"> | ||
| 11 | (function(){ | ||
| 12 | document.observe('dom:loaded', function () { | ||
| 13 | if($('userInput')) { | ||
| 14 | Event.observe($('userInput'), "focus", function() { | ||
| 15 | new ajaxSuggest(this, { | ||
| 16 | script: '$xwiki.getURL("${doc.fullName}", "view")?xpage=uorgsuggest&classname=XWiki.XWikiUsers&wiki=global&uorg=user&', | ||
| 17 | varname: "input", | ||
| 18 | seps: " ,|", | ||
| 19 | delay : 200, | ||
| 20 | timeout: 5000, | ||
| 21 | }); | ||
| 22 | }); | ||
| 23 | } | ||
| 24 | }); // end of doc observe | ||
| 25 | })(); | ||
| 26 | </script> | ||
| 27 | {{/html}} | ||
| 28 | {{/html}} | ||
| 29 | {{/velocity}} |