+// 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
if (status === "executing") {
var controls = $("<div class='actions'/>");
for (kind in kinds) {
- var input = $("<input type='button' disabled='disabled' class='btn' value='" + kinds[kind] + "'/>").click(function() {
- self.executeCommand(kind, (kind != 'prev') && self.serializeToDataform('form'), function(e) { self.displayResult(e) });
- }).appendTo(controls);
+ var input;
+ (function (type) {
+ input = $("<input type='button' disabled='disabled' class='btn' value='" + kinds[type] + "'/>").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)