X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fstatic%2Fjs%2Fplugin.js;fp=manifold%2Fstatic%2Fjs%2Fplugin.js;h=24d41129aea7c105c03874aba02950a591c85ce4;hb=91dec1137db6f3b461ab40542f06b5fa93a2efa5;hp=4530b518beb9efada7349025eea0cbfeba3c89a7;hpb=5401c1b857fae502f5b49ce869ea943d8607e2bf;p=myslice.git diff --git a/manifold/static/js/plugin.js b/manifold/static/js/plugin.js index 4530b518..24d41129 100644 --- a/manifold/static/js/plugin.js +++ b/manifold/static/js/plugin.js @@ -20,6 +20,13 @@ $.plugin = function(name, object) { }; }; +// set to either +// * false or undefined or none : no debug +// * true : trace all event calls +// * [ 'in_progress', 'query_done' ] : would only trace to these events +var plugin_debug=false; +plugin_debug = [ 'in_progress', 'query_done' ]; + var Plugin = Class.extend({ init: function(options, element) { @@ -42,35 +49,52 @@ var Plugin = Class.extend({ return (typeof this.on_filter_added === 'function'); }, + // do we need to log API calls ? + _is_in : function (obj, arr) { + for(var i=0; i