You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2014/12/16 18:37:09 UTC

[23/50] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js
index a9d8d27..c1c4117 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js
@@ -32,25 +32,15 @@ nf.Search = (function () {
                 reset: function () {
                     this.term = null;
                 },
-                _response: function (content) {
-                    if (!this.options.disabled && content) {
-                        this._suggest(content);
-                        this._trigger('open');
-                    } else {
-                        this.close();
-                    }
-                    this.pending--;
-                    if (!this.pending) {
-                        this.element.removeClass('ui-autocomplete-loading');
-                    }
-                },
                 _resizeMenu: function () {
                     var ul = this.menu.element;
                     ul.width(399);
                 },
                 _renderMenu: function (ul, items) {
                     var self = this;
-                    var searchResults = items.searchResultsDTO;
+                    
+                    // the object that holds the search results is normalized into a single element array
+                    var searchResults = items[0];
 
                     // show all processors
                     if (!nf.Common.isEmpty(searchResults.processorResults)) {
@@ -118,12 +108,13 @@ nf.Search = (function () {
                     $.each(match.matches, function (i, match) {
                         itemContent.append($('<div class="search-match"></div>').text(match));
                     });
-                    return $('<li></li>').data('item.autocomplete', match).append(itemContent).appendTo(ul);
+                    return $('<li></li>').data('ui-autocomplete-item', match).append(itemContent).appendTo(ul);
                 }
             });
 
             // configure the search field
             $('#search-field').zIndex(1250).searchAutocomplete({
+                appendTo: '#search-flow-results',
                 position: {
                     my: 'right top',
                     at: 'right bottom',