Revision a70fb308 ui/static/synnefo.js

b/ui/static/synnefo.js
98 98
  };
99 99
}
100 100

  
101
function update_confirmations(action_type){
101
function update_confirmations() {
102 102
    // hide all confirm boxes to begin with
103 103
    $('#machines-pane div.confirm_single').hide();
104 104
    $('#machines-pane div.confirm_multiple').hide();
105
    var action_type = [];
105 106
    // standard view only
106 107
    if ($.cookie("view") == '0') {
107 108
        for (var i=0;i<pending_actions.length;i++){
108 109
            // show single confirms
110
            if (pending_actions[i][0] == reboot) {
111
                action_type = 'reboot';
112
            } else if (pending_actions[i][0] == shutdown) {
113
                action_type = 'shutdown';
114
            } else if (pending_actions[i][0] == start) {
115
                action_type = 'start';
116
            } else if (pending_actions[i][0] == console) {
117
                action_type = 'console';
118
            } else {
119
                action_type = 'destroy';
120
            }
109 121
            $("#machines-pane div.machine-container#" + pending_actions[i][1] +
110
              " div." + action_type +
111
              " .confirm_single").show();
122
            " div.actions div." + action_type + " div.confirm_single").show();
112 123
        }
113 124
    }
114 125

  

Also available in: Unified diff