git://git.onelab.eu
/
unfold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d384e4b
)
query_editor plugin fix autocomplete with datatables pagination, search in objects...
author
Loic Baron
<loic.baron@lip6.fr>
Wed, 16 Oct 2013 13:42:15 +0000
(15:42 +0200)
committer
Loic Baron
<loic.baron@lip6.fr>
Wed, 16 Oct 2013 13:42:15 +0000
(15:42 +0200)
plugins/query_editor/static/js/query_editor.js
patch
|
blob
|
history
diff --git
a/plugins/query_editor/static/js/query_editor.js
b/plugins/query_editor/static/js/query_editor.js
index
7338b69
..
17b9bf7
100644
(file)
--- a/
plugins/query_editor/static/js/query_editor.js
+++ b/
plugins/query_editor/static/js/query_editor.js
@@
-92,6
+92,7
@@
// { 'sWidth': '8px', 'aTargets': [ 4 ] } // XXX NB OF COLS
// ]
});
// { '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() {
// 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.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
source: value,
selectFirst: true,
minLength: 0, // allows to browse items with no value typed in