Revision 62462e34 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 | ||
---|---|---|
106 | 106 |
|
107 | 107 |
// when the button "next" is pressed show the next step (if there is a next step) |
108 | 108 |
ui.wizard.btns.next.click(function(e){ |
109 |
e.preventDefault(); |
|
109 |
// e.preventDefault();
|
|
110 | 110 |
go_next(); |
111 | 111 |
}) |
112 | 112 |
|
113 | 113 |
// when the button "previous" is pressed show the previous step (if there is a previous step) |
114 | 114 |
ui.wizard.btns.previous.click(function(e){ |
115 |
e.preventDefault(); |
|
115 |
// e.preventDefault();
|
|
116 | 116 |
go_prev(); |
117 | 117 |
}); |
118 | 118 |
|
119 |
// ui.wizard.btns.next.focusout(function(e) { |
|
120 |
// if(ui.wizard.current_step!=ui.wizard.total_step) { |
|
121 |
// $(this).removeClass('active'); |
|
122 |
// go_next(); |
|
123 |
// } |
|
124 |
// }); |
|
125 |
|
|
126 |
// ui.wizard.btns.previous.focusout(function(e) { |
|
127 |
// if(ui.wizard.current_step!=1) { |
|
128 |
// $(this).removeClass('active'); |
|
129 |
// go_prev(); |
|
130 |
// } |
|
131 |
// }); |
|
132 |
|
|
133 | 119 |
function go_next() { |
134 | 120 |
console.log('you clicked next!') |
135 | 121 |
ui.wizard.set_container_height(); |
... | ... | |
216 | 202 |
}, |
217 | 203 |
|
218 | 204 |
close: function(bottom_area, main_area, total_area) { |
205 |
console.log('tha kleisw') |
|
219 | 206 |
$(bottom_area).hide(); |
220 | 207 |
$(main_area).slideUp(); |
221 | 208 |
$(total_area).slideUp(); |
... | ... | |
254 | 241 |
|
255 | 242 |
expand_area: function() { |
256 | 243 |
ui.wizard.btns.expand_down.click(function(e){ |
257 |
e.preventDefault(); |
|
258 |
ui.expand_arrow(ui.wizard.btns.expand_down);
|
|
244 |
// e.preventDefault();
|
|
245 |
ui.expandArrow(ui.wizard.btns.expand_down);
|
|
259 | 246 |
ui.wizard.btns.expand_down.parents('div.advanced-conf-step').find('.advanced-conf-options').stop().slideToggle(); |
260 | 247 |
}) |
261 | 248 |
}, |
... | ... | |
265 | 252 |
|
266 | 253 |
$(document).ready(function(){ |
267 | 254 |
|
255 |
$('#vm-wizard').find('a').click(function(e) { |
|
256 |
e.preventDefault(); |
|
257 |
}); |
|
258 |
|
|
268 | 259 |
ui.wizard.current_step =1; |
269 | 260 |
ui.wizard.current_position =0; |
270 | 261 |
|
... | ... | |
272 | 263 |
ui.wizard.btns.previous = $('.bottom').find('.nav.prev'); |
273 | 264 |
ui.wizard.btns.next = $('.bottom').find('.nav.next'); |
274 | 265 |
ui.wizard.btns.expand_down =$('.adv-main').find('.expand-link'); |
275 |
|
|
276 |
$('.wizard .nums').click(function(e){ |
|
277 |
e.preventDefault(); |
|
278 |
}) |
|
279 |
|
|
266 |
ui.wizard.btns.close =$('#vm-wizard').find('.close'); |
|
280 | 267 |
ui.wizard.initialize_relocation(); |
281 | 268 |
ui.wizard.move_to_step(); |
282 | 269 |
ui.wizard.set_movement_tags(); |
283 | 270 |
ui.wizard.expand_area(); |
284 | 271 |
|
272 |
ui.wizard.btns.close.click(function(e) { |
|
273 |
ui.wizard.close('.bottom', '#vm-wizard', '.overlay-area') |
|
274 |
}); |
|
275 |
|
|
285 | 276 |
$('.step-1 .os li:last').find('.btn-col a').focusout(function(e) { |
286 |
e.preventDefault(); |
|
287 | 277 |
$('.nav.next').focus(); |
288 | 278 |
$('.nav.next').addClass('active'); |
289 | 279 |
}); |
... | ... | |
294 | 284 |
}); |
295 | 285 |
|
296 | 286 |
$('.nav.previous').focusout(function(e){ |
297 |
e.preventDefault(); |
|
298 |
$(this).addClass('active'); |
|
287 |
// $(this).addClass('active'); |
|
299 | 288 |
$(this).removeClass('active'); |
300 | 289 |
|
301 | 290 |
}); |
302 | 291 |
|
303 | 292 |
|
304 | 293 |
$('.sub-menu[data-step=2] li:last').find('a').focusout(function(e) { |
305 |
e.preventDefault(); |
|
306 | 294 |
$('.step-2').find('.dropdown a:first').focus(); |
307 | 295 |
|
308 |
}) |
|
296 |
});
|
|
309 | 297 |
|
310 | 298 |
$('.os .name-col').focus(function(e){ |
311 | 299 |
$(this).parents('li').addClass('hover'); |
312 |
}) |
|
300 |
}); |
|
301 |
|
|
313 | 302 |
$('.os .name-col').focusout(function(e){ |
314 | 303 |
$(this).parents('li').removeClass('hover'); |
315 |
}) |
|
316 |
|
|
304 |
}); |
|
305 |
|
|
306 |
|
|
307 |
$('.checkbox .check').click(function(e) { |
|
308 |
e.stopPropagation(); |
|
309 |
|
|
310 |
if($(this).closest('.checkbox').hasClass('has-more')) { |
|
311 |
$(this).parent().next('.more').slideToggle(); |
|
312 |
} |
|
313 |
}) |
|
314 |
|
|
315 |
|
|
317 | 316 |
|
318 | 317 |
}); |
Also available in: Unified diff