You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/07/05 17:07:57 UTC

git commit: updated refs/heads/master-6-17-stable to 8b9c157

Updated Branches:
  refs/heads/master-6-17-stable cb939eee9 -> 8b9c15731


CLOUDSTACK-3333: Start port and end port disabled for protocolnumber


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8b9c1573
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8b9c1573
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8b9c1573

Branch: refs/heads/master-6-17-stable
Commit: 8b9c157312d40c9a3d822e84b1e87e15dfd35cd0
Parents: cb939ee
Author: Pranav Saxena <ps...@gmail.com>
Authored: Fri Jul 5 20:37:18 2013 +0530
Committer: Pranav Saxena <ps...@gmail.com>
Committed: Fri Jul 5 20:37:18 2013 +0530

----------------------------------------------------------------------
 ui/scripts/vpc.js | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b9c1573/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 85ddb52..bb493d1 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -95,7 +95,8 @@
               return name != 'protocolnumber' &&
                      name != 'icmptype' &&
                      name != 'icmpcode' &&
-                     name != 'cidrlist';
+                     name != 'cidrlist' &&
+                     name != 'number' ;
             });
             var $portFields = $inputs.filter(function() {
               var name = $(this).attr('name');
@@ -116,6 +117,7 @@
               $icmpFields.hide();
               $otherFields.hide();
               $protocolFields.show().addClass('required');
+              $portFields.show();
             } else if ($(this).val() == 'icmp') {
               $icmpFields.show();
               $icmpFields.attr('disabled', false);
@@ -123,7 +125,12 @@
               $otherFields.attr('disabled', 'disabled');
               $otherFields.hide();
               $otherFields.parent().find('label.error').hide();
-            } else {
+            } 
+            else if ($(this).val() == 'all'){
+                $portFields.attr('disabled', 'disabled');
+                $portFields.hide();
+              }
+           else {
               $otherFields.show();
               $otherFields.parent().find('label.error').hide();
               $otherFields.attr('disabled', false);
@@ -131,10 +138,6 @@
               $icmpFields.hide();
               $icmpFields.parent().find('label.error').hide();
               $protocolFields.hide().removeClass('required');
-              if ($(this).val() == 'all'){
-                $portFields.attr('disabled', 'disabled');
-                $portFields.hide();
-              }
             }
           });