X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquery_editor%2Fstatic%2Fjs%2Fquery_editor.js;h=68d0265a388d2448f99a25abdf27c33e2bfa5e06;hb=c79b3c894ec8a08686ae4978e5375c15ec6f2cbf;hp=7338b69b157cd31bd861538ff32719bfdceed32b;hpb=d384e4b10bf9ba67f610bef72cf0e5b2dd747baf;p=myslice.git diff --git a/plugins/query_editor/static/js/query_editor.js b/plugins/query_editor/static/js/query_editor.js index 7338b69b..68d0265a 100644 --- a/plugins/query_editor/static/js/query_editor.js +++ b/plugins/query_editor/static/js/query_editor.js @@ -35,7 +35,7 @@ // XXX This should be handled by manifold manifold.raise_event(self.options.query_uuid, FILTER_REMOVED, [key, op]); } - } + }; }, init: function(options, element) { @@ -92,6 +92,7 @@ // { 'sWidth': '8px', 'aTargets': [ 4 ] } // XXX NB OF COLS // ] }); + this.table = metaTable; // Actions on the newly added fields this.elmt('table tbody td span').on('click', function() { @@ -279,7 +280,10 @@ jQuery.each(availableTags, function(key, value){ value.sort(); - jQuery("#"+domid+"__field__"+key).autocomplete({ + // using dataTables's $ to search also in nodes that are not currently displayed + var element = self.table.$("#"+domid+"__field__"+key); + + element.autocomplete({ source: value, selectFirst: true, minLength: 0, // allows to browse items with no value typed in