From: Florian Zeitz Date: Tue, 20 Dec 2011 21:26:13 +0000 (+0100) Subject: Fix Prev button X-Git-Url: https://git.babelmonkeys.de/?a=commitdiff_plain;h=e55b23864a9911c15d930b43ed9afe1df5943bf7;p=adhocweb.git Fix Prev button --- diff --git a/js/adhoc.js b/js/adhoc.js index 3f2ae2b..7e2ba52 100644 --- a/js/adhoc.js +++ b/js/adhoc.js @@ -162,9 +162,11 @@ var Adhoc = { }); if (status === "executing") { for (kind in kinds) { - input = $("").click(function() { - self.executeCommand(kind, (kind != 'prev') && self.serializeToDataform('form'), function(e) { self.displayResult(elem, e) }); - }); + (function(type) { + input = $("").click(function() { + self.executeCommand(type, (type!= 'prev') && self.serializeToDataform('form'), function(e) { self.displayResult(elem, e) }); + }); + })(kind); if ($(result).find('actions ' + kind).length > 0) input.removeAttr("disabled"); $(elem).append(input);