Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -103,11 +103,6 @@ 103 103 }); 104 104 }); 105 105 } 106 - if($('mybutton')) { 107 - Event.observe($('mybutton'), "click", function() { 108 - location.href = $('myinput').value; 109 - }); 110 - } 111 111 }); // end of doc observe 112 112 })(); 113 113 {code} ... ... @@ -143,6 +143,43 @@ 143 143 144 144 * Check out the example for custom information at [Custom Information Example>DevGuide.AjaxSuggestCustomExample] 145 145 141 +1.1.1 Suggest Users or Groups from the wiki 142 + 143 +Local or global users and groups from the wiki can be suggested using the **uorgsuggest.vm** template. 144 + 145 +Example: 146 + 147 +$xwiki.jsx.use("$doc.fullName")## 148 + 149 +<input name="userInput" id="userInput" value="" type="text"/> 150 + 151 +Here is the code that made this happen: 152 + 153 +{code} 154 +... 155 +<input name="userInput" id="userInput" value="" type="text"/> 156 +... 157 +{code} 158 + 159 +{code} 160 +(function(){ 161 + document.observe('dom:loaded', function () { 162 + if($('userInput')) { 163 + Event.observe($('userInput'), "focus", function() { 164 + new XWiki.widgets.Suggest(this, { 165 + script: '$xwiki.getURL("${doc.fullName}", "view")?xpage=uorgsuggest&classname=XWiki.XWikiUsers&wiki=local&uorg=user&', 166 + varname: "input", 167 + seps: " ,|", 168 + delay : 200, 169 + timeout: 5000, 170 + offsety: 13 171 + }); 172 + }); 173 + } 174 + }); // end of doc observe 175 +})(); 176 +{code} 177 + 146 146 1.1 Javascript parameters for the *ajaxsuggest* class 147 147 148 148 {table}