mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
Bug #4570: Fix confirm dialog for RoleVM actions
This commit is contained in:
parent
503ea65c89
commit
a7bcf7d3a3
@ -478,6 +478,7 @@ define(function(require) {
|
||||
//before running the action.
|
||||
$(document).on("click", '.confirm_button', function() {
|
||||
var dialogInstance = _getDialogInstance(CONFIRM_DIALOG_ID)
|
||||
dialogInstance.reset();
|
||||
$('#' + CONFIRM_DIALOG_ID).data('buttonAction', $(this).attr('href'));
|
||||
$('#' + CONFIRM_DIALOG_ID).data('buttonTab', $(this).parents('.tab').attr('id'));
|
||||
dialogInstance.show();
|
||||
|
@ -45,7 +45,7 @@ define(function(require) {
|
||||
return selected_nodes;
|
||||
}
|
||||
|
||||
function roleVMElements() {
|
||||
function roleVMElements(opts) {
|
||||
var selected_nodes = [];
|
||||
|
||||
var dataTable = $('table[id^=datatable_vms]', '#'+TAB_ID+' #'+ROLES_PANEL_ID);
|
||||
@ -54,6 +54,16 @@ define(function(require) {
|
||||
selected_nodes.push($(this).val());
|
||||
});
|
||||
|
||||
if (opts && opts.names){
|
||||
var pairs = [];
|
||||
|
||||
$.each(selected_nodes, function(){
|
||||
pairs.push({id: this, name: OpenNebulaVM.getName(this)});
|
||||
});
|
||||
|
||||
return pairs;
|
||||
}
|
||||
|
||||
return selected_nodes;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ define(function(require) {
|
||||
$('#confirm_proceed', dialog).val(actionId);
|
||||
$('#confirm_tip', dialog).text(tip);
|
||||
|
||||
if(button.text) {
|
||||
if(button && button.text) {
|
||||
$('.subheader', dialog).html(button.text);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user