incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: refs/heads/ui-multiple-vlan-ranges - Multiple vlans: fixes
Date Wed, 13 Feb 2013 23:40:19 GMT
Updated Branches:
  refs/heads/ui-multiple-vlan-ranges ef792d646 -> 77fb6c1c6


Multiple vlans: fixes

-Fix even/odd styling

-Fix typo causing 'start' fields to be blank

-Make sure input start/end are blank on add


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

Branch: refs/heads/ui-multiple-vlan-ranges
Commit: 77fb6c1c67915a6f9c012bdc3c01b24778fc30b6
Parents: ef792d6
Author: Brian Federle <brian.federle@citrix.com>
Authored: Wed Feb 13 15:40:07 2013 -0800
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Wed Feb 13 15:40:07 2013 -0800

----------------------------------------------------------------------
 ui/scripts/ui-custom/zoneWizard.js |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/77fb6c1c/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 076a7e5..2c80456 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -770,19 +770,21 @@
       var addVlan = function(options) {
         var evenOdd = function() {
           cloudStack.evenOdd($container, '.field[rel=vlanRange]:visible', {
-            even: function($elem) { $elem.addClass('even') },
-            odd: function($elem) { $elem.addClass('odd') }
+            even: function($elem) { $elem.removeClass('odd'); $elem.addClass('even'); },
+            odd: function($elem) { $elem.removeClass('even'); $elem.addClass('odd'); }
           });
         };
 
-        var $vlanClone = $vlanRangeFirst.clone()
-          .insertAfter($container.find('.field[rel=vlanRange]:visible').filter(':last'));
-        var $remove = $hide.clone()
-          .appendTo($vlanClone);
+        var $vlanClone = $vlanRangeFirst.clone();
+        var $remove = $hide.clone();
+
+        $vlanClone.find('input').val('');
+        $vlanClone.insertAfter($container.find('.field[rel=vlanRange]:visible').filter(':last'));
+        $remove.appendTo($vlanClone);
 
         if (options) {
           if (options.start)
-            $vlanClone.find('inpunt:first').val(options.start);
+            $vlanClone.find('input:first').val(options.start);
 
           if (options.end)
             $vlanClone.find('input:last').val(options.end);
@@ -790,6 +792,7 @@
 
         $remove.click(function() {
           $vlanClone.remove();
+
           evenOdd();
         });
 


Mime
View raw message