root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / network-wizard.js @ 6bd1416f
History | View | Annotate | Download (1.5 kB)
1 |
ui.wizard.network = { |
---|---|
2 |
elemID: undefined, |
3 |
btns: {
|
4 |
cancel: undefined, |
5 |
create: undefined, |
6 |
close: undefined, |
7 |
new_network: undefined |
8 |
} |
9 |
} |
10 |
|
11 |
|
12 |
|
13 |
$(document).ready(function(){ |
14 |
|
15 |
ui.wizard.network.elemID = '#network-wizard';
|
16 |
ui.wizard.network.btns.new_network = $(ui.wizard.network.elemID);
|
17 |
ui.wizard.network.btns.close = ui.wizard.network.btns.new_network.find('.close');
|
18 |
ui.wizard.network.btns.cancel = ui.wizard.network.btns.new_network.find('.bottom .nav.prev');
|
19 |
ui.wizard.network.btns.create = ui.wizard.network.btns.new_network.find('.bottom .nav.next');
|
20 |
|
21 |
|
22 |
// create network
|
23 |
// checkbox: basic reaction on click (checked, unchecked)
|
24 |
$('.network_options .check').click(function(e){ |
25 |
e.preventDefault(); |
26 |
|
27 |
ui.change_checkbox_state(this);
|
28 |
$(this).parents('li').siblings().find('ul.subnet_options').parent('li').toggle(); |
29 |
|
30 |
}); |
31 |
|
32 |
$('.network_options .radio_btn').click(function(e){ |
33 |
e.preventDefault(); |
34 |
|
35 |
// an einai radiobtn epetrpse na einai ena anameno k kane oti prepei an exw manual mesa
|
36 |
|
37 |
var state = $(this).find('span'); |
38 |
if(state.hasClass('snf-radio-unchecked')) { |
39 |
ui.check_one_radiobtn(this);
|
40 |
ui.change_radiobutton_state(this);
|
41 |
|
42 |
if($(this).hasClass('manual')) { |
43 |
$(this).siblings('.manual_sub').toggle(); |
44 |
} |
45 |
else {
|
46 |
$(this).closest('li').siblings().find('.manual_sub').hide(); |
47 |
} |
48 |
} |
49 |
|
50 |
}) |
51 |
}) |