Revision 4c5e78b5

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/wizard-carousel.js
3 3
	indicate_step: function(step) {
4 4
		$('.wizard .top .sub-menu[data-step]').hide();
5 5
		$('.wizard .top .sub-menu[data-step='+step+']').fadeIn();
6
		$('.nums').children().removeClass('current');
7
		$('.nums').children().find('a:contains("'+ui.wizard.current_step+'")').parent('li').addClass('current');
8 6
	},
9 7

  
10 8
}
......
64 62
	else if (this.current_step == this.total_items ) {
65 63
		self.next.find('span').html(self.submit_text);
66 64
	}
65
	$('.nums').children('li').removeClass('current');
66
	$('.nums li:nth-child('+self.current_step+')').addClass('current');
67
}
68

  
69
Carousel.prototype.alterSubMenu = function () {
70
	$('.wizard .top .sub-menu[data-step]').hide();
71
	$('.wizard .top .sub-menu[data-step='+this.current_step+']').fadeIn();
67 72
}
68 73

  
69 74
Carousel.prototype.resetForm = function () {
......
86 91
Carousel.prototype.move = function () {
87 92
	var percentage = -(this.current_step-1)/this.total_items*100+'%';
88 93
	this.container.stop().animate({ 'left': percentage }, this.speed);
94
	this.alterNav();
95
	this.alterSubMenu();
89 96
}
90 97

  
91 98
// if is_clicked is true, -duh- something has been clicked
......
100 107
			self.submitForm();			
101 108
		}
102 109
	}
103
	self.alterNav();
104 110
} 
105 111

  
106 112
// if is_clicked is true, -duh- something has been clicked
......
115 121
			self.resetForm();			
116 122
		}
117 123
	}
118
	self.alterNav();
119 124
} 
120 125

  
121 126
Carousel.prototype.initEvents = function () {
122 127
	var self = this;
123 128
	this.setDimensions();
124
	this.alterNavText();
125 129

  
126 130
	this.next.click(function(e){
127 131
		e.preventDefault();

Also available in: Unified diff