airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata-php-gateway git commit: fixing bug
Date Mon, 22 May 2017 20:46:18 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 5f132fff4 -> 12afc69a5


fixing bug


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/12afc69a
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/12afc69a
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/12afc69a

Branch: refs/heads/develop
Commit: 12afc69a56f56e582d949f05a438b2b1fc543766
Parents: 5f132ff
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon May 22 16:46:15 2017 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon May 22 16:46:15 2017 -0400

----------------------------------------------------------------------
 .../partials/experiment-queue-block.blade.php   | 35 ++++++++++----------
 1 file changed, 17 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/12afc69a/app/views/partials/experiment-queue-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-queue-block.blade.php b/app/views/partials/experiment-queue-block.blade.php
index aa07755..d0eb005 100644
--- a/app/views/partials/experiment-queue-block.blade.php
+++ b/app/views/partials/experiment-queue-block.blade.php
@@ -243,26 +243,25 @@
                 var nodeCount=$("#node-count");
                 var cpuCount=$("#cpu-count");
 
+                cpuCount.keyup(function(){
+                    var cpuCountVal = parseInt(cpuCount.val());
+                    if(cpuCountVal > 0){
+                        nodeCount.val(Math.ceil(cpuCountVal/cpusPerNode));
+                    }
+                });
+                nodeCount.keyup(function(){
+                    var nodeCountVal = parseInt(nodeCount.val());
+                    if(nodeCountVal > 0){
+                        cpuCount.val(nodeCountVal*cpusPerNode);
+                    }
+                });
+
                 if(cpusPerNode > 0){
-                    cpuCount.keyup(function(){
-                        var cpuCountVal = parseInt(cpuCount.val());
-                        if(cpuCountVal > 0){
-                            nodeCount.val(Math.ceil(cpuCountVal/cpusPerNode));
-                        }
-                    });
-                    nodeCount.keyup(function(){
-                        var nodeCountVal = parseInt(nodeCount.val());
-                        if(nodeCountVal > 0){
-                            cpuCount.val(nodeCountVal*cpusPerNode);
-                        }
-                    });
+                    cpuCount.on('keyup');
+                    nodeCount.on('keyup');
                 }else{
-                    cpuCount.keyup(function(){
-                        return true;
-                    });
-                    nodeCount.keyup(function(){
-                        return true;
-                    });
+                    cpuCount.off('keyup');
+                    nodeCount.off('keyup');
                 }
             }
         }


Mime
View raw message