X-Git-Url: http://cgit.babelmonkeys.de/?p=adhocweb.git;a=blobdiff_plain;f=js%2Fadhoc.js;h=51932499f7a099ac94a96f8daa20d78f4509d1c9;hp=a4e157426e902b90590e7aee04868e9a1747acc7;hb=3a1e752b5d9120ffd6def0a5e17e2cf536209854;hpb=4e887e124f7a110c86adea837cd6bfc421d4fc40 diff --git a/js/adhoc.js b/js/adhoc.js index a4e1574..5193249 100644 --- a/js/adhoc.js +++ b/js/adhoc.js @@ -1,3 +1,9 @@ +// adhocweb +// Copyright (c) 2010-2013 Florian Zeitz +// +// This project is MIT licensed. +// Please see the COPYING file for more information. + /* * Implementation of ECMA Script 5 like bind from: * https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind @@ -169,9 +175,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)