-
-
Save natecavanaugh/5628413 to your computer and use it in GitHub Desktop.
Revisions
-
natecavanaugh revised this gist
May 22, 2013 . 1 changed file with 5 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,13 @@ AUI().use("autocomplete", "autocomplete-highlighters", "aui-io-request", function (A) { A.one('#<portlet:namespace/>academyName').plug(A.Plugin.AutoComplete, { resultHighlighter: 'phraseMatch', resultListLocator: 'orgs', resultTextLocator: 'name', queryDelimiter: ',', minQueryLength: 3, source: function(query) { var queryUrl = '<%=searchUrl%>&<portlet:namespace />keywords=' + query + '&<portlet:namespace/>types=' + types; var request = A.io.request( queryUrl, { data: { @@ -20,16 +17,14 @@ AUI().use("autocomplete", "autocomplete-highlighters", function (A) { sync: true, dataType: 'json', method: 'POST' on: { success: function(event, id, obj) { console.log("SUCCESS"); callback(this.get('responseData')); } } } ); } }); }); -
longfalcon created this gist
May 22, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ AUI().use("autocomplete", "autocomplete-highlighters", function (A) { A.one('#<portlet:namespace/>academyName').plug(A.Plugin.AutoComplete, { resultHighlighter: 'phraseMatch', resultListLocator: 'orgs', resultTextLocator: 'name', queryDelimiter: ',', minQueryLength: 3, source: function(query) { var queryUrl = '<%=searchUrl%>&<portlet:namespace />keywords=' + query + '&<portlet:namespace/>types=' + types; var request = AUI().io( queryUrl, { data: { keywords: query, types: types }, sync: true, dataType: 'json', method: 'POST' /*on: { success: function(event, id, obj) { console.log("SUCCESS"); callback(obj.responseText); } }*/ } ); console.log("SUCCESS"); return request.responseText; } }); });