X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;fp=plugins%2Fhazelnut%2Fstatic%2Fjs%2Fhazelnut.js;h=30c727b76a0ffd35f2beb30e231808c8137f1e7d;hp=7c042b188de2492cd3e6447fa90eb3bec1d5e686;hb=c025814eadebf386f556f9af571d3f04e2124a80;hpb=641432a9373ea5466ab8fd1cc7114950660b609f diff --git a/plugins/hazelnut/static/js/hazelnut.js b/plugins/querytable/static/js/querytable.js similarity index 93% rename from plugins/hazelnut/static/js/hazelnut.js rename to plugins/querytable/static/js/querytable.js index 7c042b18..30c727b7 100644 --- a/plugins/hazelnut/static/js/hazelnut.js +++ b/plugins/querytable/static/js/querytable.js @@ -9,7 +9,7 @@ var debug=false; // debug=true - var Hazelnut = Plugin.extend({ + var QueryTable = Plugin.extend({ init: function(options, element) { @@ -36,7 +36,7 @@ this.elmt().on('show', this, this.on_show); // Unbind all events using namespacing // TODO in destructor - // $(window).unbind('Hazelnut'); + // $(window).unbind('QueryTable'); var query = manifold.query_store.find_analyzed_query(this.options.query_uuid); this.method = query.object; @@ -64,9 +64,9 @@ /* temp disabled... useful ? -- jordan $(this).each(function(i,elt) { if (jQuery(elt).hasClass('dataTables')) { - var myDiv=jQuery('#hazelnut-' + this.id).parent(); + var myDiv=jQuery('#querytable-' + this.id).parent(); if(myDiv.height()==0) { - var oTable=$('#hazelnut-' + this.id).dataTable(); + var oTable=$('#querytable-' + this.id).dataTable(); oTable.fnDraw(); } } @@ -96,7 +96,7 @@ // WARNING: this one causes tables in a 'tabs' that are not exposed at the time this is run to show up empty // sScrollX: '100%', /* Horizontal scrolling */ bProcessing: true, /* Loading */ - fnDrawCallback: function() { self._hazelnut_draw_callback.call(self); } + fnDrawCallback: function() { self._querytable_draw_callback.call(self); } // XXX use $.proxy here ! }; // the intention here is that options.datatables_options as coming from the python object take precedence @@ -131,7 +131,7 @@ /* No filtering if the table does not match */ if (oSettings.nTable.id != self.options.plugin_uuid + '__table') return true; - return self._hazelnut_filter.call(self, oSettings, aData, iDataIndex); + return self._querytable_filter.call(self, oSettings, aData, iDataIndex); }); /* Processing hidden_columns */ @@ -156,7 +156,7 @@ var result=""; // Prefix id with plugin_uuid result += "