]> cgit.babelmonkeys.de Git - adhocweb.git/blobdiff - js/adhoc.js
if-Statement -> &&-Operator "magic
[adhocweb.git] / js / adhoc.js
index 574c5a65fb24949b4e052ea71640669afceaffba..68b14c9efa073bf295435f5076492d9e68aa7c43 100644 (file)
@@ -148,10 +148,7 @@ var Adhoc = {
         if (status == "executing") {
             for (kind in kinds) {
                 input = $("<input type='button' disabled='disabled' value='" + kinds[kind] + "'/>").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");