From: Florian Zeitz Date: Sat, 25 Dec 2010 23:22:34 +0000 (+0100) Subject: if-Statement -> &&-Operator "magic X-Git-Url: https://cgit.babelmonkeys.de/?a=commitdiff_plain;h=813071fb6508e35f97a9893ac7f50b11c59431d3;p=adhocweb.git if-Statement -> &&-Operator "magic --- diff --git a/js/adhoc.js b/js/adhoc.js index 574c5a6..68b14c9 100644 --- a/js/adhoc.js +++ b/js/adhoc.js @@ -148,10 +148,7 @@ var Adhoc = { if (status == "executing") { for (kind in kinds) { input = $("").click(function() { - if (kind == 'prev') - Adhoc.executeCommand(kind, false, function(e) { Adhoc.displayResult(elem, e) }); - else - Adhoc.executeCommand(kind, Adhoc.serializeToDataform('form'), function(e) { Adhoc.displayResult(elem, e) }); + Adhoc.executeCommand(kind, (kind != 'prev') && Adhoc.serializeToDataform('form'), function(e) { Adhoc.displayResult(elem, e) }); }); if ($(result).find('actions ' + kind).length > 0) input.removeAttr("disabled");