You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/07/09 22:45:54 UTC
[12/50] [abbrv] git commit: updated refs/heads/ui-ucs to 9334dab
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/2d630197
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2d630197
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2d630197
Branch: refs/heads/ui-ucs
Commit: 2d6301970e4071a9b2f06c88acba49670b15d8fe
Parents: 70f33ef
Author: Pranav Saxena <ps...@gmail.com>
Authored: Fri Jul 5 18:19:07 2013 +0530
Committer: Pranav Saxena <ps...@gmail.com>
Committed: Fri Jul 5 18:19:07 2013 +0530
----------------------------------------------------------------------
ui/scripts/vpc.js | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d630197/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 7cbf63a..940620b 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -106,7 +106,8 @@
return name != 'protocolnumber' &&
name != 'icmptype' &&
name != 'icmpcode' &&
- name != 'cidrlist';
+ name != 'cidrlist' &&
+ name != 'number' ;
});
$portFields = $inputs.filter(function() {
var name = $(this).attr('rel');
@@ -125,18 +126,21 @@
$icmpFields.hide();
$portFields.show();
$protocolFields.show();
+ $portFields.show();
} else if ($(this).val() == 'icmp') {
$icmpFields.show();
$protocolFields.hide();
$portFields.hide();
- } else {
+ }
+ else if ($(this).val() == 'all') {
+ $portFields.hide();
+ }
+
+ else {
$otherFields.show();
$icmpFields.hide();
$protocolFields.hide();
- if ($(this).val() == 'all') {
- $portFields.hide();
- }
}
} else {
//
@@ -179,6 +183,7 @@
$icmpFields.hide();
$otherFields.hide();
$protocolFields.show().addClass('required');
+ $portFields.show();
} else if ($(this).val() == 'icmp') {
$icmpFields.show();
$icmpFields.attr('disabled', false);
@@ -186,7 +191,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);
@@ -194,10 +205,6 @@
$icmpFields.hide();
$icmpFields.parent().find('label.error').hide();
$protocolFields.hide().removeClass('required');
- if ($(this).val() == 'all'){
- $portFields.attr('disabled', 'disabled');
- $portFields.hide();
- }
}
}
});