Revision 9422d033

b/ui/templates/networks.html
567 567
// add selected machines to network
568 568
$("#add-server-add").live('click', function() {
569 569
    var selections = $("#add-machines-wizard :checkbox:checked");
570
    var networkID = $("#add-machines-wizard p").text();
571
    var serverIDs = [];
572
    $.each(selections, function(i, selection) {
573
        serverIDs.push(selection.name);
574
    });
575
    $(this).text('');
576
    add_server_to_network(networkID, serverIDs);
577
    $(this).html('<img src="static/icons/indicators/medium/horizontal-progress.gif"></img>');
570
    // if there are no selections simply close the wizard
571
    if (selections.length == 0 ) {
572
        $("a#add-machines-overlay").overlay().close();
573
    }
574
    // if there are servers selected make the proper call
575
    else {
576
        var networkID = $("#add-machines-wizard p").text();
577
        var serverIDs = [];
578
        $.each(selections, function(i, selection) {
579
            serverIDs.push(selection.name);
580
        });
581
        $(this).text('');
582
        add_server_to_network(networkID, serverIDs);
583
        $(this).html('<img src="static/icons/indicators/medium/horizontal-progress.gif"></img>');
584
    }
578 585
    return false;
579 586
});
580 587

  
......
694 701
    return false;
695 702
});
696 703

  
697
var test = [];
698 704
// update the networks list
699 705
function update_networks_view(servers_data, networks_data){
700 706
    /*

Also available in: Unified diff