cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/4.2 to 320e3a4
Date Fri, 05 Jul 2013 14:59:14 GMT
Updated Branches:
  refs/heads/4.2 3c69e3e2f -> 320e3a42a


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/320e3a42
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/320e3a42
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/320e3a42

Branch: refs/heads/4.2
Commit: 320e3a42a8156f14f5f727122658be15fcad0f80
Parents: 3c69e3e
Author: Pranav Saxena <psbits@gmail.com>
Authored: Fri Jul 5 20:28:39 2013 +0530
Committer: Pranav Saxena <psbits@gmail.com>
Committed: Fri Jul 5 20:28:39 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/320e3a42/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 310fbb6..b73eba1 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,13 @@
               $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 +139,6 @@
               $icmpFields.hide();
               $icmpFields.parent().find('label.error').hide();
               $protocolFields.hide().removeClass('required');
-              if ($(this).val() == 'all'){
-                $portFields.attr('disabled', 'disabled');
-                $portFields.hide();
-              }
             }
           });
 


Mime
View raw message