From 87bfedccdb91e2ff7cfb165e989e5259c155b513 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Thu, 2 Aug 2012 20:29:58 +0200 Subject: [PATCH] Fix all buttons performing the "complete" action --- js/adhoc.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/adhoc.js b/js/adhoc.js index a4e1574..cbe2752 100644 --- a/js/adhoc.js +++ b/js/adhoc.js @@ -169,9 +169,12 @@ Adhoc.prototype = { if (status === "executing") { var controls = $("
"); for (kind in kinds) { - var input = $("").click(function() { - self.executeCommand(kind, (kind != 'prev') && self.serializeToDataform('form'), function(e) { self.displayResult(e) }); - }).appendTo(controls); + var input; + (function (type) { + input = $("").click(function() { + self.executeCommand(type, (type != 'prev') && self.serializeToDataform('form'), function(e) { self.displayResult(e) }); + }).appendTo(controls); + })(kind); if (actions.find(kind).length > 0) input.removeAttr("disabled"); if (actions.attr("execute") == kind) -- 2.39.2