Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / network-wizard.js @ 3f284f50

History | View | Annotate | Download (1.4 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
    $('.network_options .check').click(function(e){
24
    e.preventDefault();
25

    
26
    ui.change_checkbox_state(this);
27
    $(this).parents('li').siblings().find('ul.subnet_options').parent('li').toggle();
28

    
29
    });
30

    
31
    $('.network_options .radio_btn').click(function(e){
32
        e.preventDefault();
33

    
34
        var state = $(this).find('span');
35
        if(state.hasClass('snf-radio-unchecked')) {
36
            ui.check_one_radiobtn(this);
37
            ui.change_radiobutton_state(this);
38

    
39
            if($(this).hasClass('manual')) {
40
                $(this).siblings('.manual_sub').toggle();
41
            }
42
            else {
43
                $(this).closest('li').siblings().find('.manual_sub').hide();
44
            }
45
        }
46
       
47
    })
48
})