Wiki source code of Search Suggest - Simple A
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 | {{html}} | ||
| 6 | HTML test with icons : <br /> | ||
| 7 | |||
| 8 | <input type="text" style="width:178px" disabled="disabled"> | ||
| 9 | <div class="suggestItems" style="position:relative;margin-bottom:10px;width:178px;"><ul class="xlist suggestList" id=""><li class="xitem"><a href="#"><div class="suggestItem xitemcontainer"><div class="suggestItemName"><img class="itemImage" src="/xwiki/resources/icons/silk/tag_yellow.gif" style="margin-right:5px;"><span><span class="highlight">Ha</span>mster</span></div><div class="suggestItemValue hidden">Hamster</div></div></a></li><li class="xitem"><a href="#"><div class="suggestItem xitemcontainer"><div class="suggestItemName"><img class="itemImage" src="/xwiki/resources/icons/silk/tag_yellow.gif" style="margin-right:5px;"><span><span class="highlight">Ha</span>re</span></div><div class="suggestItemValue hidden">Hare</div></div></a></li><li class="xitem xhighlight"><a href="#"><div class="suggestItem xitemcontainer"><div class="suggestItemName"><img class="itemImage" src="/xwiki/resources/icons/silk/tag_yellow.gif" style="margin-right:5px;"><span>W<span class="highlight">ha</span>le</span></div><div class="suggestItemValue hidden">Whale</div></div></a></li></ul></div> | ||
| 10 | {{/html}} | ||
| 11 | |||
| 12 | {{velocity}} | ||
| 13 | {{html wiki=true}} | ||
| 14 | **Try editing tags down there** or search for a user here : <input name="userInput" id="userInput" value="" type="text" style="width:300px"/> | ||
| 15 | {{html}} | ||
| 16 | <script type="text/javascript"> | ||
| 17 | (function(){ | ||
| 18 | document.observe('dom:loaded', function () { | ||
| 19 | if($('userInput')) { | ||
| 20 | Event.observe($('userInput'), "focus", function() { | ||
| 21 | new ajaxSuggest(this, { | ||
| 22 | script: '$xwiki.getURL("${doc.fullName}", "view")?xpage=uorgsuggest&classname=XWiki.XWikiUsers&wiki=global&uorg=user&', | ||
| 23 | varname: "input", | ||
| 24 | seps: " ,|", | ||
| 25 | delay : 200, | ||
| 26 | timeout: 5000, | ||
| 27 | }); | ||
| 28 | }); | ||
| 29 | } | ||
| 30 | }); // end of doc observe | ||
| 31 | })(); | ||
| 32 | </script> | ||
| 33 | {{/html}} | ||
| 34 | {{/html}} | ||
| 35 | {{/velocity}} |