X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fhazelnut%2Fstatic%2Fjs%2Fhazelnut.js;h=48c8aaa0fff32c4eb114535c3a15b727d889e5e5;hb=90d67c0586ebd5c4233a378b918d643ae152ae56;hp=c572d6a92467396d7c9f80dedfa9046fe8aced67;hpb=65788a3e513e2ad271a49a5e56811e4ffd090fb4;p=unfold.git diff --git a/plugins/hazelnut/static/js/hazelnut.js b/plugins/hazelnut/static/js/hazelnut.js index c572d6a9..48c8aaa0 100644 --- a/plugins/hazelnut/static/js/hazelnut.js +++ b/plugins/hazelnut/static/js/hazelnut.js @@ -8,7 +8,7 @@ // TEMP var debug=false; - debug=true +// debug=true var Hazelnut = Plugin.extend({ @@ -260,7 +260,7 @@ var checkbox_id = this.flat_id(this.id('checkbox', key_value)); checkbox_id = '#' + checkbox_id; var element = $(checkbox_id, this.table.fnGetNodes()); -// messages.debug("set_checkbox checked=" + checked + " id=" + checkbox_id + " matches=" + element.length); + if (debug) messages.debug("set_checkbox checked=" + checked + " id=" + checkbox_id + " matches=" + element.length); element.attr('checked', checked); }, @@ -305,11 +305,12 @@ { if (this.received_all_query) { // if the 'all' query has been dealt with already we may turn on the checkbox + if (debug) messages.debug("turning on checkbox for record "+record[this.key]); this.set_checkbox(record, true); } else { // otherwise we need to remember that and do it later on + if (debug) messages.debug ("Remembering record to check " + record[this.key]); this.buffered_records_to_check.push(record); - console.log ("Remembering record to check " + record); } }, @@ -374,6 +375,7 @@ /* ... and check the ones specified in the resource list */ $.each(this.buffered_records_to_check, function(i, record) { + if (debug) messages.debug ("delayed turning on checkbox " + i + " record= " + record); self.set_checkbox(record, true); });