commit adcfc98642351d26eaea3e001d8bb422c70c676a
Author: Athina Bekakou <athinabek@grnet.gr>
Date:   Fri Oct 18 09:57:06 2013 +0300

    new ui: extend wizard functionality
    
    The updated functionalities are related with the
    selection of flavor (vm-wizard: step 2).

diff --git a/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/vm-wizard.js b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/vm-wizard.js
index 8061c16..37ebeed 100644
--- a/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/vm-wizard.js
+++ b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/vm-wizard.js
@@ -21,6 +21,21 @@ ui.wizard = {
 			} else if ($(elem).hasClass('large')) {
 				return 'large';
 			}
+		},
+
+
+		pickResources: function(resource) {
+			$('.flavor .with-flavor a:not(.' + resource + ')').removeClass('current');
+			$('.flavor .with-flavor a.' + resource + '').addClass('current');
+		},
+
+		hideNext: function() {
+			if(ui.wizard.current_step == 2 && $('.flavor a.disabled').hasClass('small')) {
+				return true;
+			}
+			else {
+				return false;
+			}
 		}
 	},
 	network: {},
@@ -178,6 +193,8 @@ ui.wizard = {
 		} else if (ui.wizard.current_step == ui.wizard.total_step) {
 			ui.wizard.btns.previous.find('span').html('PREVIOUS');
 			ui.wizard.btns.next.find('span').html('CREATE');
+		} else if (ui.wizard.vm.hideNext()){
+			ui.wizard.btns.next.hide();
 		} else {
 			ui.wizard.btns.previous.find('span').html('PREVIOUS');
 			ui.wizard.btns.next.find('span').html('NEXT');
@@ -242,10 +259,6 @@ ui.wizard = {
 		$('.os').find('.'+$('#vm-wizard .top .sub-menu[data-step=1] .preselected').data('img-type')).show();
 	},
 
-	pickResources: function(resource) {
-		$('.flavor .with-flavor a:not(.' + resource + ')').removeClass('current');
-		$('.flavor .with-flavor a.' + resource + '').addClass('current');
-	},
 
 	showImageCategory: function(imagesCategory) {
 		$(imagesCategory).closest('.sub-menu').find('.current').removeClass('current');
@@ -295,19 +308,25 @@ Various functions for vm creation wizard
 
 
 	/* step-2: Select flavor */
-	disabledElems = $('.flavor a.disabled');
-	disabledElemsNum = $('.flavor a.disabled').length;
-	
+	var disabledElems = $('.flavor a.disabled');
+	var disabledElemsNum = $('.flavor a.disabled').length;
 	if(disabledElemsNum>0) {
+		var size;
 		for(i=0; i<disabledElemsNum; i++) {
-			$('.wizard .sub-menu[data-step=2]').find('a[data-size=' + ui.wizard.vm.getSize(disabledElems.get(i)) + ']').removeClass('current').addClass('disabled');
+			size = ui.wizard.vm.getSize(disabledElems.get(i));
+			$('.wizard .sub-menu[data-step=2]').find('a[data-size=' + size + ']').removeClass('current').addClass('disabled');
+			$('#vm-wizard .flavor').find('.'+size).removeClass('current preselected');
+			if(size == 'small') {
+				$('#vm-wizard .flavor .vm-storage-selection a').removeClass('current preselected');
+
+			}
 		}
 	}
 	$('.wizard .sub-menu a[data-size]:not(.disabled)').on("click", function(e) {
 		// e.preventDefault();
 		$(this).parents('.sub-menu').find('a').removeClass('current');
 		$(this).addClass('current');
-		ui.wizard.pickResources($(this).data('size'));
+		ui.wizard.vm.pickResources($(this).data('size'));
 	});
 
 	$('.wizard .flavor .options:not(".vm-storage-selection") a:not(.disabled)').click(function(e) {
diff --git a/snf-cyclades-app/synnefo/ui/new_ui/ui/sass/_common.scss b/snf-cyclades-app/synnefo/ui/new_ui/ui/sass/_common.scss
index 25532bc..28b9abd 100644
--- a/snf-cyclades-app/synnefo/ui/new_ui/ui/sass/_common.scss
+++ b/snf-cyclades-app/synnefo/ui/new_ui/ui/sass/_common.scss
@@ -401,6 +401,9 @@ body {
 			    color:$secondary-color;
 			}
 		}
+		.sb-search-submit {
+			width: 40px;
+		}
 	}
 
 	.view-type {
diff --git a/snf-cyclades-app/synnefo/ui/new_ui/ui/stylesheets/app.css b/snf-cyclades-app/synnefo/ui/new_ui/ui/stylesheets/app.css
index d7d477f..53cbbef 100644
--- a/snf-cyclades-app/synnefo/ui/new_ui/ui/stylesheets/app.css
+++ b/snf-cyclades-app/synnefo/ui/new_ui/ui/stylesheets/app.css
@@ -7264,50 +7264,54 @@ body {
 .actions-bar #sb-search .sb-search-input::-webkit-input-placeholder {
   color: #30c79e;
 }
-/* line 406, ../sass/_common.scss */
+/* line 404, ../sass/_common.scss */
+.actions-bar #sb-search .sb-search-submit {
+  width: 40px;
+}
+/* line 409, ../sass/_common.scss */
 .actions-bar .view-type {
   display: inline-block;
   position: absolute;
   right: 15px;
   top: 0px;
 }
-/* line 411, ../sass/_common.scss */
+/* line 414, ../sass/_common.scss */
 .actions-bar .view-type .current {
   color: #30c79e;
 }
-/* line 414, ../sass/_common.scss */
+/* line 417, ../sass/_common.scss */
 .actions-bar .view-type .snf-list {
   margin-right: 4px;
   font-size: 24px;
   line-height: 50px;
   vertical-align: middle;
 }
-/* line 420, ../sass/_common.scss */
+/* line 423, ../sass/_common.scss */
 .actions-bar .view-type .snf-layout {
   font-size: 25px;
   line-height: 50px;
   vertical-align: middle;
 }
 
-/* line 428, ../sass/_common.scss */
+/* line 431, ../sass/_common.scss */
 .new-btn {
   position: absolute;
   left: 15px;
   bottom: 0;
   height: 50px;
 }
-/* line 435, ../sass/_common.scss */
+/* line 438, ../sass/_common.scss */
 .new-btn a span {
   font-size: 1.25em;
 }
 
 /* Icons Navigation ----------------------------------------------- */
-/* line 443, ../sass/_common.scss */
+/* line 446, ../sass/_common.scss */
 .icons-nav {
   margin: 0;
   padding: 0;
 }
-/* line 445, ../sass/_common.scss */
+/* line 448, ../sass/_common.scss */
 .icons-nav li {
   display: inline-block;
   margin: 0 5px;
@@ -7318,24 +7322,24 @@ body {
   text-align: center;
   overflow: hidden;
 }
-/* line 454, ../sass/_common.scss */
+/* line 457, ../sass/_common.scss */
 .icons-nav li a {
   color: #1a1a1a;
 }
-/* line 456, ../sass/_common.scss */
+/* line 459, ../sass/_common.scss */
 .icons-nav li a:hover, .icons-nav li a.current {
   color: #30c79e;
 }
 
 /* Top info  ----------------------------------------------- */
-/* line 469, ../sass/_common.scss */
+/* line 472, ../sass/_common.scss */
 .top-info {
   padding: 50px 100px;
   position: relative;
   z-index: 10;
   display: none;
 }
-/* line 474, ../sass/_common.scss */
+/* line 477, ../sass/_common.scss */
 .top-info .close {
   position: absolute;
   right: 15px;
@@ -7348,31 +7352,31 @@ body {
   overflow: hidden;
 }
 
-/* line 483, ../sass/_common.scss */
+/* line 486, ../sass/_common.scss */
 .info.error {
   background: #ff5c58;
   color: #fff;
 }
 
-/* line 489, ../sass/_common.scss */
+/* line 492, ../sass/_common.scss */
 .info.alert {
   background: #30c79e;
   color: #fff;
 }
 
-/* line 494, ../sass/_common.scss */
+/* line 497, ../sass/_common.scss */
 .info.warning {
   background: #919194;
   color: #fff;
 }
 
-/* line 499, ../sass/_common.scss */
+/* line 502, ../sass/_common.scss */
 .info.success {
   background: #00a551;
   color: #fff;
 }
 
-/* line 504, ../sass/_common.scss */
+/* line 507, ../sass/_common.scss */
 .border-bottom-style1 {
   padding-bottom: 20px;
   margin-bottom: 20px;
@@ -7380,7 +7384,7 @@ body {
 }
 
 /* Progress Bar ----------------------------------------------- */
-/* line 513, ../sass/_common.scss */
+/* line 516, ../sass/_common.scss */
 .progress-bar {
   position: fixed;
   bottom: 0;
@@ -7391,53 +7395,53 @@ body {
   padding: 20px 0 20px 310px;
   color: #919194;
 }
-/* line 522, ../sass/_common.scss */
+/* line 525, ../sass/_common.scss */
 .progress-bar span.counter {
   display: inline-block;
   margin-right: 20px;
   float: left;
 }
-/* line 527, ../sass/_common.scss */
+/* line 530, ../sass/_common.scss */
 .progress-bar div.progress-wrap {
   display: inline-block;
   float: left;
   width: 40%;
   margin-right: 60px;
 }
-/* line 532, ../sass/_common.scss */
+/* line 535, ../sass/_common.scss */
 .progress-bar div.progress-wrap .progress {
   position: relative;
   top: 2px;
 }
-/* line 537, ../sass/_common.scss */
+/* line 540, ../sass/_common.scss */
 .progress-bar span.more {
   display: inline-block;
 }
 
 /* Responive ------------------------------------------------ */
 @media only screen and (max-width: 768px) {
-  /* line 548, ../sass/_common.scss */
+  /* line 551, ../sass/_common.scss */
   body {
     padding-top: 0;
   }
 
-  /* line 551, ../sass/_common.scss */
+  /* line 554, ../sass/_common.scss */
   .header, .actions-bar {
     position: static;
     z-index: auto;
   }
 
-  /* line 555, ../sass/_common.scss */
+  /* line 558, ../sass/_common.scss */
   .actions-bar {
     top: 160px;
   }
 
-  /* line 558, ../sass/_common.scss */
+  /* line 561, ../sass/_common.scss */
   .header {
     height: 120px;
     line-height: 50px;
   }
-  /* line 561, ../sass/_common.scss */
+  /* line 564, ../sass/_common.scss */
   .header .icons-nav {
     position: static;
   }
diff --git a/snf-cyclades-app/synnefo/ui/new_ui/ui/vm_list.html b/snf-cyclades-app/synnefo/ui/new_ui/ui/vm_list.html
index 40aad03..78582fc 100644
--- a/snf-cyclades-app/synnefo/ui/new_ui/ui/vm_list.html
+++ b/snf-cyclades-app/synnefo/ui/new_ui/ui/vm_list.html
@@ -322,7 +322,7 @@ Confirm that the options you have selected are correct</p>
 													</div>
 												</div>
 												<ul class="options with-flavor">
-													<li><a href="" class="small current preselected" data-help="help text for 1">1</a></li>
+													<li><a href="" class="small current preselected " data-help="help text for 1">1</a></li>
 													<li><a href="" class="medium" data-help="help text for 2">2</a></li>
 													<li><a href="" class="large disabled" data-help="help text for 3">3</a></li>
 													<li><a href="" class="disabled" data-help="help text for 4">4</a></li>
@@ -383,7 +383,7 @@ Confirm that the options you have selected are correct</p>
 													<li><a href="" class="small current preselected">10</a></li>
 													<li><a href="" class="medium">20</a></li>
 													<li><a href="" class="large">30</a></li>
-													<li><a href="" class="disabled">40</a></li>
+													<li><a href="">40</a></li>
 												</ul>
 											</div>
 										</li>
