X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquery_editor%2Fstatic%2Fjs%2Fquery_editor.js;h=985881818ffbe9b0d39150f52c2c0ad5263d87d9;hb=4a99831db81024d5d25869d4c475d381fd39f75a;hp=8b739f02ef5918fbc1c6a4bc9500467a4af68c9b;hpb=955af6c084ef3469a6eea5680e79240fb9910afd;p=unfold.git
diff --git a/plugins/query_editor/static/js/query_editor.js b/plugins/query_editor/static/js/query_editor.js
index 8b739f02..98588181 100644
--- a/plugins/query_editor/static/js/query_editor.js
+++ b/plugins/query_editor/static/js/query_editor.js
@@ -56,7 +56,7 @@
// XXX Why isn't it done statically ?
var nCloneTh = document.createElement( 'th' );
var nCloneTd = document.createElement( 'td' );
- nCloneTd.innerHTML = "";
+ nCloneTd.innerHTML = "";
//nCloneTd.innerHTML = '';
nCloneTh.innerHTML = 'Info';
nCloneTd.className = "center";
@@ -72,35 +72,37 @@
// We are currently using a DataTable display, but another browsing component could be better
//jQuery('#'+this.options.plugin_uuid+'-table').dataTable...
var metaTable = this.elmt('table').dataTable({
- bFilter : false,
- bPaginate : false,
- bInfo : false,
- sScrollX : '100%', // Horizontal scrolling
- sScrollY : '200px',
- //bJQueryUI : true, // Use jQuery UI
- bProcessing : true, // Loading
- aaSorting : [[ 1, "asc" ]], // sort by column fields on load
- aoColumnDefs: [
- { 'bSortable': false, 'aTargets': [ 0 ]},
- { 'sWidth': '8px', 'aTargets': [ 0 ] },
- { 'sWidth': '8px', 'aTargets': [ 4 ] } // XXX NB OF COLS
- ]
+// Thierry : I'm turning off all the dataTables options for now, so that
+// the table displays more properly again, might need more tuning though
+// bFilter : false,
+// bPaginate : false,
+// bInfo : false,
+// sScrollX : '100%', // Horizontal scrolling
+// sScrollY : '200px',
+// //bJQueryUI : true, // Use jQuery UI
+// bProcessing : true, // Loading
+// aaSorting : [[ 1, "asc" ]], // sort by column fields on load
+// aoColumnDefs: [
+// { 'bSortable': false, 'aTargets': [ 0 ]},
+// { 'sWidth': '8px', 'aTargets': [ 0 ] },
+// { 'sWidth': '8px', 'aTargets': [ 4 ] } // XXX NB OF COLS
+// ]
});
// Actions on the newly added fields
this.elmt('table tbody td span').on('click', function() {
var nTr = this.parentNode.parentNode;
// use jQuery UI instead of images to keep a common UI
- // class="ui-icon treeclick ui-icon-triangle-1-s tree-minus"
- // East oriented Triangle class="ui-icon-triangle-1-e"
- // South oriented Triangle class="ui-icon-triangle-1-s"
+ // class="glyphicon glyphicon-chevron-down treeclick tree-minus"
+ // East oriented Triangle class="glyphicon-chevron-right"
+ // South oriented Triangle class="glyphicon-chevron-down"
- if (this.className=="ui-icon ui-icon-triangle-1-e") {
- this.removeClass("ui-icon-triangle-1-e").addClass("ui-icon-triangle-1-s");
+ if (this.hasClass("glyphicon-chevron-right")) {
+ this.removeClass("glyphicon-chevron-right").addClass("glyphicon-chevron-down");
// XXX ??????
metaTable.fnOpen(nTr, this.fnFormatDetails(metaTable, nTr, self.options.plugin_uuid+'_div'), 'details' );
} else {
- this.removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-e");
+ this.removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-right");
metaTable.fnClose(nTr);
}
});
@@ -169,7 +171,6 @@
on_field_added: function(field)
{
- console.log("on_field_added : "+field);
this.check_field(field);
},
@@ -190,7 +191,7 @@
//console.log(record);
availableTags = this.availableTags;
jQuery.each(record,function(key,value){
- value = get_value(value);
+ value = unfold.get_value(value);
if(!availableTags.hasOwnProperty(key)){availableTags[key]=new Array();}
//availableTags[key].push(value);
var currentArray = availableTags[key];
@@ -292,7 +293,7 @@
var availableTags={};
jQuery.each (rows, function(index, obj) {
jQuery.each(obj,function(key,value){
- value = get_value(value);
+ value = unfold.get_value(value);
if(!availableTags.hasOwnProperty(key)){availableTags[key]=new Array();}
//availableTags[key].push(value);
var currentArray=availableTags[key];