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