incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [6/6] git commit: refs/heads/ui-multiple-vlan-ranges - Add even/odd appearance to each vlan field
Date Wed, 13 Feb 2013 23:18:02 GMT
Updated Branches:
  refs/heads/ui-multiple-vlan-ranges [created] ef792d646


Add even/odd appearance to each vlan field


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

Branch: refs/heads/ui-multiple-vlan-ranges
Commit: ef792d646a13b67cd20ae9f18ec355537788edae
Parents: 588b452
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Feb 12 14:44:58 2013 -0800
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Wed Feb 13 15:16:14 2013 -0800

----------------------------------------------------------------------
 ui/scripts/ui-custom/zoneWizard.js |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ef792d64/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 43fa625..076a7e5 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -768,15 +768,21 @@
       // Multiple Vlan Ranges functionality
       //
       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') }
+          });
+        };
+
         var $vlanClone = $vlanRangeFirst.clone()
           .insertAfter($container.find('.field[rel=vlanRange]:visible').filter(':last'));
-
         var $remove = $hide.clone()
           .appendTo($vlanClone);
 
         if (options) {
           if (options.start)
-            $vlanClone.find('input:first').val(options.start);
+            $vlanClone.find('inpunt:first').val(options.start);
 
           if (options.end)
             $vlanClone.find('input:last').val(options.end);
@@ -784,7 +790,10 @@
 
         $remove.click(function() {
           $vlanClone.remove();
+          evenOdd();
         });
+
+        evenOdd();
       };
 
       $expand.insertAfter($container.find('form [rel=vlanRange]')).click(function() {


Mime
View raw message