You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/10/11 23:09:43 UTC

git commit: CS-16344: cloudstack UI - multiEdit widget - remove isOptional property, isDisabled property from field level since they are supposed to be on field.range level.

Updated Branches:
  refs/heads/master fde4fee5d -> e73cbfe6a


CS-16344: cloudstack UI - multiEdit widget - remove isOptional property, isDisabled property from field level since they are supposed to be on field.range level.


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

Branch: refs/heads/master
Commit: e73cbfe6a90d66f725f813a3d0bdbf668a4938b1
Parents: fde4fee
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Sep 14 15:26:41 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Oct 11 14:07:03 2012 -0700

----------------------------------------------------------------------
 ui/scripts/ui/widgets/multiEdit.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e73cbfe6/ui/scripts/ui/widgets/multiEdit.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/multiEdit.js b/ui/scripts/ui/widgets/multiEdit.js
index e4fc026..de0264a 100644
--- a/ui/scripts/ui/widgets/multiEdit.js
+++ b/ui/scripts/ui/widgets/multiEdit.js
@@ -769,14 +769,14 @@
         if (field.range) {
           var $range = $('<div>').addClass('range').appendTo($td);
 
-          $(field.range).each(function() {
+          $(field.range).each(function() {  //e.g. field.range = ['privateport', 'privateendport'];
             var $input = $('<input>')
                   .attr({
                     name: this,
                     type: 'text'
                   })
-                  .addClass(!field.isOptional ? 'required' : null)
-                  .attr('disabled', field.isDisabled ? 'disabled' : false)
+                  //.addClass(!field.isOptional ? 'required' : null)          //field.range[0] might be required while field.range[1] is optional (e.g. private start port is required while private end port is optional), so "isOptional" property should be on field.range level instead of field level.
+                  //.attr('disabled', field.isDisabled ? 'disabled' : false)  //field.range[0] might be enabled while field.range[1] is disabled  (e.g. private start port is enabled while private end port is disabled),  so "isDisabled" property should be on field.range level instead of field level.
                   .appendTo(
                     $('<div>').addClass('range-item').appendTo($range)
                   );