]> git.babelmonkeys.de Git - adhocweb.git/commitdiff
if-Statement -> &&-Operator "magic
authorFlorian Zeitz <florob@babelmonkeys.de>
Sat, 25 Dec 2010 23:22:34 +0000 (00:22 +0100)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sat, 25 Dec 2010 23:22:34 +0000 (00:22 +0100)
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");