mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Fix reset button
This commit is contained in:
parent
56e32a19a3
commit
7b58b70443
File diff suppressed because one or more lines are too long
@ -588,7 +588,7 @@ function setupCreateAclDialog(){
|
||||
|
||||
var acl_json = { "acl" : acl_string };
|
||||
Sunstone.runAction("Acl.create",acl_json);
|
||||
$create_acl_dialog.foundation('reveal', 'close');
|
||||
$create_acl_dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -449,7 +449,7 @@ function setupCreateClusterDialog(){
|
||||
// If it is successfull we refresh the list.
|
||||
Sunstone.runAction("Cluster.create",cluster_json);
|
||||
|
||||
$create_cluster_dialog.foundation('reveal', 'close')
|
||||
$create_cluster_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@ -472,7 +472,7 @@ function popUpCreateClusterDialog(){
|
||||
|
||||
if ($create_cluster_dialog)
|
||||
{
|
||||
$create_cluster_dialog.remove();
|
||||
$create_cluster_dialog.html("");
|
||||
dialogs_context.append('<div title=\"'+tr("Create cluster")+'\" id="create_cluster_dialog"></div>');
|
||||
}
|
||||
|
||||
@ -504,7 +504,7 @@ function popUpUpdateClusterDialog(){
|
||||
|
||||
if (dialog)
|
||||
{
|
||||
dialog.remove();
|
||||
dialog.html("");
|
||||
dialogs_context.append('<div id="create_cluster_dialog"></div>');
|
||||
}
|
||||
|
||||
@ -702,7 +702,7 @@ function fillPopPup(request,response){
|
||||
}
|
||||
}
|
||||
|
||||
$create_cluster_dialog.foundation('reveal', 'close')
|
||||
$create_cluster_dialog.trigger('close')
|
||||
|
||||
Sunstone.runAction('Cluster.list');
|
||||
|
||||
|
@ -254,7 +254,7 @@ function setupUpdatePassword() {
|
||||
}
|
||||
|
||||
Sunstone.runAction("UserSettings.passwd",[-1],pw);
|
||||
$('#settings_update_password',dialogs_context).foundation('reveal', 'close')
|
||||
$('#settings_update_password',dialogs_context).trigger('close')
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -939,7 +939,7 @@ function setupCreateDatastoreDialog(){
|
||||
|
||||
Sunstone.runAction("Datastore.create",ds_obj);
|
||||
|
||||
$create_datastore_dialog.foundation('reveal', 'close')
|
||||
$create_datastore_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -959,13 +959,13 @@ function setupCreateDatastoreDialog(){
|
||||
"cluster_id" : cluster_id
|
||||
};
|
||||
Sunstone.runAction("Datastore.create",ds_obj);
|
||||
$create_datastore_dialog.foundation('reveal', 'close')
|
||||
$create_datastore_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#wizard_ds_reset_button').click(function(){
|
||||
$create_datastore_dialog.foundation('reveal', 'close');
|
||||
$create_datastore_dialog.remove();
|
||||
$create_datastore_dialog.trigger('close');
|
||||
$create_datastore_dialog.html("");
|
||||
setupCreateDatastoreDialog();
|
||||
|
||||
window.ds_wizard_is_not_first="false";
|
||||
@ -974,8 +974,8 @@ function setupCreateDatastoreDialog(){
|
||||
});
|
||||
|
||||
$('#advanced_ds_reset_button').click(function(){
|
||||
$create_datastore_dialog.foundation('reveal', 'close');
|
||||
$create_datastore_dialog.remove();
|
||||
$create_datastore_dialog.trigger('close');
|
||||
$create_datastore_dialog.html("");
|
||||
setupCreateDatastoreDialog();
|
||||
|
||||
window.ds_wizard_is_not_first="false";
|
||||
|
@ -702,7 +702,7 @@ function setupCreateFileDialog(){
|
||||
|
||||
//Inform complete upload, destroy upload dialog, refresh file list
|
||||
|
||||
$('div#pb_dialog').foundation('reveal', 'close')
|
||||
$('div#pb_dialog').trigger('close')
|
||||
return false;
|
||||
},
|
||||
onCancel: function(id, fileName){
|
||||
@ -758,7 +758,7 @@ function setupCreateFileDialog(){
|
||||
Sunstone.runAction("File.create", file_obj);
|
||||
};
|
||||
|
||||
$create_file_dialog.foundation('reveal', 'close')
|
||||
$create_file_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -778,7 +778,7 @@ function setupCreateFileDialog(){
|
||||
"ds_id" : ds_id
|
||||
};
|
||||
Sunstone.runAction("File.create",file_obj);
|
||||
$create_file_dialog.foundation('reveal', 'close')
|
||||
$create_file_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -781,8 +781,8 @@ function setup_add_rp_dialog(group){
|
||||
}
|
||||
});
|
||||
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.remove();
|
||||
dialog.trigger('close');
|
||||
dialog.html("");
|
||||
|
||||
});
|
||||
|
||||
@ -796,8 +796,8 @@ function setup_add_rp_dialog(group){
|
||||
|
||||
$('#add_rp_close',dialog).die();
|
||||
$('#add_rp_close',dialog).live( "click", function() {
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.remove();
|
||||
dialog.trigger('close');
|
||||
dialog.html("");
|
||||
});
|
||||
|
||||
OpenNebula.Zone.list({
|
||||
@ -1078,8 +1078,8 @@ function setupCreateGroupDialog(){
|
||||
setupTips($create_group_dialog);
|
||||
|
||||
$('#create_group_reset_button').click(function(){
|
||||
$create_group_dialog.foundation('reveal', 'close');
|
||||
$create_group_dialog.remove();
|
||||
$create_group_dialog.trigger('close');
|
||||
$create_group_dialog.html("");
|
||||
setupCreateGroupDialog();
|
||||
|
||||
popUpCreateGroupDialog();
|
||||
@ -1241,7 +1241,7 @@ function setupCreateGroupDialog(){
|
||||
|
||||
|
||||
Sunstone.runAction("Group.create",group_json);
|
||||
$create_group_dialog.foundation('reveal', 'close');
|
||||
$create_group_dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -892,13 +892,13 @@ function setupCreateHostDialog(){
|
||||
//Create the OpenNebula.Host.
|
||||
//If it is successfull we refresh the list.
|
||||
Sunstone.runAction("Host.create",host_json);
|
||||
$create_host_dialog.foundation('reveal', 'close')
|
||||
$create_host_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#wizard_host_reset_button').click(function(){
|
||||
$create_host_dialog.foundation('reveal', 'close');
|
||||
$create_host_dialog.remove();
|
||||
$create_host_dialog.trigger('close');
|
||||
$create_host_dialog.html("");
|
||||
setupCreateHostDialog();
|
||||
|
||||
popUpCreateHostDialog();
|
||||
|
@ -241,7 +241,7 @@ var image_actions = {
|
||||
call: OpenNebula.Image.create,
|
||||
callback: function(request, response){
|
||||
addImageElement(request, response);
|
||||
$create_image_dialog.foundation('reveal', 'close')
|
||||
$create_image_dialog.trigger('close')
|
||||
notifyCustom(tr("Image created"), " ID: " + response.IMAGE.ID, false)
|
||||
},
|
||||
error: onError
|
||||
@ -1109,7 +1109,7 @@ function initialize_create_image_dialog(dialog) {
|
||||
//we this is an image upload we trigger FileUploader
|
||||
//to start the upload
|
||||
if (upload){
|
||||
dialog.foundation('reveal', 'close')
|
||||
dialog.trigger('close')
|
||||
uploader._onInputChange(file_input);
|
||||
} else {
|
||||
Sunstone.runAction("Image.create", img_obj);
|
||||
@ -1140,16 +1140,16 @@ function initialize_create_image_dialog(dialog) {
|
||||
});
|
||||
|
||||
$('#wizard_image_reset_button').click(function(){
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.remove();
|
||||
dialog.trigger('close');
|
||||
//dialog.html("");
|
||||
setupCreateImageDialog();
|
||||
|
||||
popUpCreateImageDialog();
|
||||
});
|
||||
|
||||
$('#advanced_image_reset_button').click(function(){
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.remove();
|
||||
dialog.trigger('close');
|
||||
dialog.html("");
|
||||
setupCreateImageDialog();
|
||||
|
||||
popUpCreateImageDialog();
|
||||
@ -1261,7 +1261,7 @@ function setupImageCloneDialog(){
|
||||
} else {
|
||||
Sunstone.runAction('Image.clone',sel_elems[0],name)
|
||||
};
|
||||
dialog.foundation('reveal', 'close')
|
||||
dialog.trigger('close')
|
||||
setTimeout(function(){
|
||||
Sunstone.runAction('Image.refresh');
|
||||
}, 1500);
|
||||
|
@ -54,7 +54,7 @@ var market_actions = {
|
||||
}
|
||||
|
||||
if ($marketplace_import_dialog != undefined) {
|
||||
$marketplace_import_dialog.remove();
|
||||
$marketplace_import_dialog.html("");
|
||||
}
|
||||
|
||||
dialogs_context.append(marketplace_import_dialog);
|
||||
@ -107,12 +107,12 @@ var market_actions = {
|
||||
})
|
||||
|
||||
image_dialog.on("close", function(){
|
||||
a_image_dialog.remove();
|
||||
image_dialog.remove();
|
||||
a_image_dialog.html("");
|
||||
image_dialog.html("");
|
||||
if ($('a', $("dl#marketplace_import_dialog_tabs")).size > 0) {
|
||||
$('a', $("dl#marketplace_import_dialog_tabs")).first().click();
|
||||
} else {
|
||||
$marketplace_import_dialog.foundation('reveal', 'close');
|
||||
$marketplace_import_dialog.trigger('close');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
@ -122,7 +122,7 @@ var market_actions = {
|
||||
})
|
||||
|
||||
if (response['opennebula_template'] && response['opennebula_template'] !== "CPU=1") {
|
||||
$create_template_dialog.remove();
|
||||
$create_template_dialog.html("");
|
||||
// Template
|
||||
// Append the new div containing the tab and add the tab to the list
|
||||
var template_dialog = $('<div id="'+tab_id+'Tab" class="content disk wizard_internal_tab">'+
|
||||
@ -143,12 +143,12 @@ var market_actions = {
|
||||
})
|
||||
|
||||
template_dialog.on("close", function(){
|
||||
a_template_dialog.remove();
|
||||
template_dialog.remove();
|
||||
a_template_dialog.html("");
|
||||
template_dialog.html("");
|
||||
if ($('a', $("dl#marketplace_import_dialog_tabs")).size > 0) {
|
||||
$('a', $("dl#marketplace_import_dialog_tabs")).first().click();
|
||||
} else {
|
||||
$marketplace_import_dialog.foundation('reveal', 'close');
|
||||
$marketplace_import_dialog.trigger('close');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
@ -1690,7 +1690,7 @@ function setupScaleDialog(){
|
||||
|
||||
Sunstone.runAction('Role.update', roleElements(), obj);
|
||||
|
||||
$scale_dialog.foundation('reveal', 'close')
|
||||
$scale_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
@ -1102,20 +1102,20 @@ function setupCreateServiceTemplateDialog(){
|
||||
$('#create_service_template_submit',dialog).click(function(){
|
||||
var json_template = generate_json_service_template_from_form();
|
||||
Sunstone.runAction("ServiceTemplate.create", json_template );
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#update_service_template_submit',dialog).click(function(){
|
||||
var json_template = generate_json_service_template_from_form();
|
||||
Sunstone.runAction("ServiceTemplate.update",service_template_to_update_id, JSON.stringify(json_template));
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#create_service_template_reset', dialog).click(function(){
|
||||
$create_service_template_dialog.foundation('reveal', 'close');
|
||||
$create_service_template_dialog.remove();
|
||||
$create_service_template_dialog.trigger('close');
|
||||
$create_service_template_dialog.html("");
|
||||
setupCreateServiceTemplateDialog();
|
||||
|
||||
popUpCreateServiceTemplateDialog();
|
||||
|
@ -226,7 +226,7 @@ var template_actions = {
|
||||
type: "create",
|
||||
call: OpenNebula.Template.create,
|
||||
callback: function(request, response){
|
||||
$create_template_dialog.foundation('reveal', 'close')
|
||||
$create_template_dialog.trigger('close')
|
||||
$create_template_dialog.empty();
|
||||
addTemplateElement(request, response);
|
||||
notifyCustom(tr("Template created"), " ID: " + response.VMTEMPLATE.ID, false)
|
||||
@ -322,7 +322,7 @@ var template_actions = {
|
||||
type: "single",
|
||||
call: OpenNebula.Template.update,
|
||||
callback: function(request, response){
|
||||
$create_template_dialog.foundation('reveal', 'close')
|
||||
$create_template_dialog.trigger('close')
|
||||
notifyMessage(tr("Template updated correctly"));
|
||||
},
|
||||
error: onError
|
||||
@ -3503,26 +3503,27 @@ function setupCreateTemplateDialog(){
|
||||
|
||||
dialogs_context.append('<div id="create_template_dialog" class="reveal-modal large max-height" data-reveal></div>');
|
||||
$create_template_dialog = $('#create_template_dialog',dialogs_context);
|
||||
var dialog = $create_template_dialog;
|
||||
|
||||
//Insert HTML in place
|
||||
$create_template_dialog.html(create_template_tmpl);
|
||||
$(document).foundation();
|
||||
initialize_create_template_dialog($create_template_dialog);
|
||||
dialog.html(create_template_tmpl);
|
||||
//$(document).foundation();
|
||||
initialize_create_template_dialog(dialog);
|
||||
}
|
||||
|
||||
function initialize_create_template_dialog(dialog) {
|
||||
var tabs = $( "#template_create_tabs", dialog)//.tabs().addClass("ui-tabs-vertical");
|
||||
|
||||
$('#template_template_reset_button').click(function(){
|
||||
$create_template_dialog.foundation('reveal', 'close');
|
||||
$create_template_dialog.remove();
|
||||
$('#template_template_reset_button', dialog).click(function(){
|
||||
dialog.trigger('close');
|
||||
dialog.html("");
|
||||
setupCreateTemplateDialog();
|
||||
popUpCreateTemplateDialog();
|
||||
});
|
||||
|
||||
$('#template_template_reset_button_update').click(function(){
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.remove();
|
||||
$('#template_template_reset_button_update', dialog).click(function(){
|
||||
dialog.trigger('close');
|
||||
dialog.html("");
|
||||
setupCreateTemplateDialog();
|
||||
|
||||
popUpUpdateTemplateDialog();
|
||||
@ -3782,7 +3783,7 @@ function initialize_create_template_dialog(dialog) {
|
||||
|
||||
function popUpUpdateTemplateDialog(){
|
||||
if ($create_template_dialog) {
|
||||
$create_template_dialog.remove();
|
||||
$create_template_dialog.html("");
|
||||
}
|
||||
|
||||
// TODO do not recreate if it exists
|
||||
@ -3806,7 +3807,7 @@ function popUpUpdateTemplateDialog(){
|
||||
|
||||
function popUpCreateTemplateDialog(){
|
||||
if ($create_template_dialog) {
|
||||
$create_template_dialog.remove();
|
||||
$create_template_dialog.html("");
|
||||
}
|
||||
// TODO do not recreate if it exists
|
||||
setupCreateTemplateDialog();
|
||||
@ -4543,7 +4544,7 @@ function setupTemplateCloneDialog(){
|
||||
} else {
|
||||
Sunstone.runAction('Template.clone',sel_elems[0],name)
|
||||
};
|
||||
$(this).parents('#template_clone_dialog').foundation('reveal', 'close')
|
||||
$(this).parents('#template_clone_dialog').trigger('close')
|
||||
setTimeout(function(){
|
||||
Sunstone.runAction('Template.refresh');
|
||||
}, 1500);
|
||||
@ -4760,7 +4761,7 @@ function setupInstantiateTemplateDialog(easy_provision){
|
||||
};
|
||||
}
|
||||
|
||||
$instantiate_vm_template_dialog.foundation('reveal', 'close')
|
||||
$instantiate_vm_template_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -790,7 +790,7 @@ function setupCreateUserDialog(){
|
||||
}
|
||||
|
||||
Sunstone.runAction("User.create",user_json);
|
||||
$create_user_dialog.foundation('reveal', 'close');
|
||||
$create_user_dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@ -818,7 +818,7 @@ function setupUpdatePasswordDialog(){
|
||||
}
|
||||
|
||||
Sunstone.runAction("User.passwd",getSelectedNodes(dataTable_users),pw);
|
||||
$update_pw_dialog.foundation('reveal', 'close');
|
||||
$update_pw_dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
};
|
||||
@ -850,7 +850,7 @@ function setupChangeAuthenticationDialog(){
|
||||
}
|
||||
|
||||
Sunstone.runAction("User.chauth",getSelectedNodes(dataTable_users), driver);
|
||||
$change_auth_dialog.foundation('reveal', 'close');
|
||||
$change_auth_dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
@ -2049,7 +2049,7 @@ function setupDateTimePicker(input_to_fill, time_str){
|
||||
$(input_to_fill).val(date_str);
|
||||
$(input_to_fill).trigger("change");
|
||||
|
||||
$date_time_picker_dialog.foundation('reveal', 'close')
|
||||
$date_time_picker_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
};
|
||||
@ -2285,7 +2285,7 @@ function setupSaveAsDialog(){
|
||||
|
||||
Sunstone.runAction('VM.saveas', vm_id, obj);
|
||||
|
||||
$save_as_dialog.foundation('reveal', 'close')
|
||||
$save_as_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
};
|
||||
@ -2362,7 +2362,7 @@ function setupAttachDiskDialog(){
|
||||
var obj = {DISK: data}
|
||||
Sunstone.runAction('VM.attachdisk', vm_id, obj);
|
||||
|
||||
$attach_disk_dialog.foundation('reveal', 'close')
|
||||
$attach_disk_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
};
|
||||
@ -2619,7 +2619,7 @@ function setupAttachNicDialog(){
|
||||
var obj = {NIC: data}
|
||||
Sunstone.runAction('VM.attachnic', vm_id, obj);
|
||||
|
||||
$attach_nic_dialog.foundation('reveal', 'close')
|
||||
$attach_nic_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
};
|
||||
@ -2804,7 +2804,7 @@ function setupResizeCapacityDialog(){
|
||||
|
||||
Sunstone.runAction('VM.resize', vm_id, obj);
|
||||
|
||||
$resize_capacity_dialog.foundation('reveal', 'close')
|
||||
$resize_capacity_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
};
|
||||
@ -2995,7 +2995,7 @@ function setupSnapshotDialog(){
|
||||
|
||||
Sunstone.runAction('VM.snapshot_create', vm_id, obj);
|
||||
|
||||
$snapshot_dialog.foundation('reveal', 'close')
|
||||
$snapshot_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
};
|
||||
@ -3231,7 +3231,7 @@ function setupCreateVMDialog(include_select_image){
|
||||
setTimeout(function(){
|
||||
Sunstone.runAction("VM.list");
|
||||
},1500);
|
||||
$create_vm_dialog.foundation('reveal', 'close')
|
||||
$create_vm_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@ -3388,7 +3388,7 @@ function setupDeployVMDialog(){
|
||||
Sunstone.runAction("VM.deploy_action", elem, extra_info);
|
||||
});
|
||||
|
||||
$deploy_vm_dialog.foundation('reveal', 'close')
|
||||
$deploy_vm_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@ -3486,7 +3486,7 @@ function setupMigrateVMDialog(live){
|
||||
}
|
||||
});
|
||||
|
||||
$migrate_vm_dialog.foundation('reveal', 'close')
|
||||
$migrate_vm_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -1296,7 +1296,7 @@ function setupCreateVNetDialog() {
|
||||
};
|
||||
|
||||
Sunstone.runAction("Network.create",network_json);
|
||||
$create_vn_dialog.foundation('reveal', 'close')
|
||||
$create_vn_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -1304,21 +1304,21 @@ function setupCreateVNetDialog() {
|
||||
var template=$('#template',dialog).val();
|
||||
var vnet_json = {vnet: {vnet_raw: template}};
|
||||
Sunstone.runAction("Network.create",vnet_json);
|
||||
$create_vn_dialog.foundation('reveal', 'close')
|
||||
$create_vn_dialog.trigger('close')
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#wizard_vnet_reset_button').click(function(){
|
||||
$create_vn_dialog.foundation('reveal', 'close');
|
||||
$create_vn_dialog.remove();
|
||||
$create_vn_dialog.trigger('close');
|
||||
$create_vn_dialog.html("");
|
||||
setupCreateVNetDialog();
|
||||
|
||||
popUpCreateVnetDialog();
|
||||
});
|
||||
|
||||
$('#advanced_vnet_reset_button').click(function(){
|
||||
$create_vn_dialog.foundation('reveal', 'close');
|
||||
$create_vn_dialog.remove();
|
||||
$create_vn_dialog.trigger('close');
|
||||
$create_vn_dialog.html("");
|
||||
setupCreateVNetDialog();
|
||||
|
||||
popUpCreateVnetDialog();
|
||||
|
@ -33,7 +33,7 @@ function setupCreateZoneDialog(){
|
||||
var endpoint=$("#endpoint",this).val();
|
||||
var zone_json = { "zone" : { "name" : name, "endpoint" : endpoint}};
|
||||
Sunstone.runAction("Zone.create",zone_json);
|
||||
$create_zone_dialog.foundation('reveal', 'close');
|
||||
$create_zone_dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -895,7 +895,7 @@ function setupConfirmDialogs(){
|
||||
}
|
||||
|
||||
if (!error){
|
||||
context.foundation('reveal', 'close')
|
||||
context.trigger('close')
|
||||
$('.button.dropdown').find('ul').removeClass('show-dropdown');
|
||||
}
|
||||
|
||||
@ -2368,7 +2368,7 @@ function setupQuotasDialog(dialog){
|
||||
var action = $('div.form_buttons button',this).val();
|
||||
var sel_elems = SunstoneCfg["actions"][action].elements();
|
||||
Sunstone.runAction(action,sel_elems,obj);
|
||||
dialog.foundation('reveal', 'close');
|
||||
dialog.trigger('close');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@ -2588,53 +2588,47 @@ function convert_template_to_string(template_json,unshown_values)
|
||||
$.each(template_json, function(key, value)
|
||||
{
|
||||
// value can be an array
|
||||
if (!value)
|
||||
if (!value) return true;
|
||||
if (value.constructor == Array)
|
||||
{
|
||||
template_str=template_str+key+"=\n";
|
||||
var it=null;
|
||||
$.each(value, function(index, element)
|
||||
{
|
||||
if (!element) return true;
|
||||
// current value can be an object
|
||||
if (typeof element == 'object')
|
||||
{
|
||||
template_str+=key+"=[";
|
||||
for(var current_key in element)
|
||||
{
|
||||
template_str+=current_key+"=\""+element[current_key].toString().replace(/"/g,"\\\"")+"\",";
|
||||
}
|
||||
template_str=template_str.substring(0,template_str.length-1);
|
||||
template_str+="]\n";
|
||||
}
|
||||
else // or a string
|
||||
{
|
||||
template_str=template_str+key+"=\""+ element.toString().replace(/"/g,"\\\"") +"\"\n";
|
||||
}
|
||||
})
|
||||
}
|
||||
else
|
||||
else // or a single value
|
||||
{
|
||||
if (value.constructor == Array)
|
||||
{
|
||||
var it=null;
|
||||
$.each(value, function(index, element)
|
||||
{
|
||||
if (!element) return true;
|
||||
// current value can be an object
|
||||
if (typeof element == 'object')
|
||||
{
|
||||
template_str+=key+"=[";
|
||||
for(var current_key in element)
|
||||
{
|
||||
template_str+=current_key+"=\""+element[current_key].toString().replace(/"/g,"\\\"")+"\",";
|
||||
}
|
||||
template_str=template_str.substring(0,template_str.length-1);
|
||||
template_str+="]\n";
|
||||
}
|
||||
else // or a string
|
||||
{
|
||||
template_str=template_str+key+"=\""+ element.toString().replace(/"/g,"\\\"") +"\"\n";
|
||||
}
|
||||
})
|
||||
}
|
||||
else // or a single value
|
||||
{
|
||||
// which in turn can be an object
|
||||
if (typeof value == 'object')
|
||||
{
|
||||
template_str+=key+"=[";
|
||||
for(var current_key in value)
|
||||
{
|
||||
template_str+=current_key+"=\""+value[current_key].toString().replace(/"/g,"\\\"")+"\",";
|
||||
}
|
||||
template_str=template_str.substring(0,template_str.length-1);
|
||||
template_str+="]\n";
|
||||
}
|
||||
else // or a string
|
||||
{
|
||||
template_str=template_str+key+"=\""+ value.toString().replace(/"/g,"\\\"")+"\"\n";
|
||||
}
|
||||
}
|
||||
// which in turn can be an object
|
||||
if (typeof value == 'object')
|
||||
{
|
||||
template_str+=key+"=[";
|
||||
for(var current_key in value)
|
||||
{
|
||||
template_str+=current_key+"=\""+value[current_key].toString().replace(/"/g,"\\\"")+"\",";
|
||||
}
|
||||
template_str=template_str.substring(0,template_str.length-1);
|
||||
template_str+="]\n";
|
||||
}
|
||||
else // or a string
|
||||
{
|
||||
template_str=template_str+key+"=\""+ value.toString().replace(/"/g,"\\\"")+"\"\n";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -2680,7 +2674,7 @@ function insert_extended_template_table(template_json,resource_type,resource_id,
|
||||
new_value = $('#new_value',$(this).parent().parent()).val();
|
||||
new_key = $('#new_key',$(this).parent().parent()).val();
|
||||
|
||||
if ( new_key != "" )
|
||||
if ( new_value != "" && new_key != "" )
|
||||
{
|
||||
var template_json_bk = $.extend({}, template_json);
|
||||
if(template_json[$.trim(new_key)] && (template_json[$.trim(new_key)] instanceof Array))
|
||||
@ -3148,19 +3142,19 @@ function insert_permissions_table(tab_name, resource_type, resource_id, owner, g
|
||||
<th style="width:40px;text-align:center;">'+tr("Manage")+'</th>\
|
||||
<th style="width:40px;text-align:center;">'+tr("Admin")+'</th></tr></thead>\
|
||||
<tr>\
|
||||
<td>'+tr("Owner")+'</td>\
|
||||
<td class="key_td">'+tr("Owner")+'</td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check owner_u" /></td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check owner_m" /></td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check owner_a" /></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td>'+tr("Group")+'</td>\
|
||||
<td class="key_td">'+tr("Group")+'</td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check group_u" /></td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check group_m" /></td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check group_a" /></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td>'+tr("Other")+'</td>\
|
||||
<td class="key_td">'+tr("Other")+'</td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check other_u" /></td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check other_m" /></td>\
|
||||
<td style="text-align:center"><input type="checkbox" class="permission_check other_a" /></td>\
|
||||
@ -3180,7 +3174,7 @@ function insert_permissions_table(tab_name, resource_type, resource_id, owner, g
|
||||
|
||||
if (Config.isTabActionEnabled(tab_name, resource_type+'.chown')) {
|
||||
str += '<tr>\
|
||||
<td>'+tr("Owner")+'</td>\
|
||||
<td class="key_td">'+tr("Owner")+'</td>\
|
||||
<td colspan="2" id="value_td_owner">'+owner+'</td>\
|
||||
<td><div id="div_edit_chg_owner">\
|
||||
<a id="div_edit_chg_owner_link" class="edit_e" href="#"><i class="fa fa-pencil-square-o right"/></a>\
|
||||
@ -3217,7 +3211,7 @@ function insert_permissions_table(tab_name, resource_type, resource_id, owner, g
|
||||
|
||||
if (Config.isTabActionEnabled(tab_name, resource_type+'.chgrp')) {
|
||||
str += '<tr>\
|
||||
<td>'+tr("Group")+'</td>\
|
||||
<td class="key_td">'+tr("Group")+'</td>\
|
||||
<td colspan="2" id="value_td_group">'+group+'</td>\
|
||||
<td><div id="div_edit_chg_group">\
|
||||
<a id="div_edit_chg_group_link" class="edit_e" href="#"><i class="fa fa-pencil-square-o right"/></a>\
|
||||
@ -3589,7 +3583,7 @@ $(document).ready(function(){
|
||||
if (!error){
|
||||
//proceed to close confirm dialog in
|
||||
//case it was open
|
||||
$('div#confirm_dialog').foundation('reveal', 'close');
|
||||
$('div#confirm_dialog').trigger('close');
|
||||
};
|
||||
|
||||
return false;
|
||||
@ -3615,7 +3609,7 @@ $(document).ready(function(){
|
||||
|
||||
//Close overlay dialogs when clicking outside of them.
|
||||
$(".ui-widget-overlay").live("click", function (){
|
||||
$("div:ui-dialog:visible").foundation('reveal', 'close');
|
||||
$("div:ui-dialog:visible").trigger('close');
|
||||
});
|
||||
|
||||
//Close select lists when clicking somewhere else.
|
||||
|
@ -85,7 +85,7 @@ table {
|
||||
font-size: 16px !important;
|
||||
background: #fff !important;
|
||||
border-bottom: 1px solid #efefef !important;;
|
||||
color: #999 !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
td {
|
||||
@ -235,7 +235,7 @@ select {
|
||||
}
|
||||
|
||||
.key_td {
|
||||
color: #777;
|
||||
color: #777 !important;
|
||||
}
|
||||
|
||||
.reveal-modal {
|
||||
@ -278,7 +278,8 @@ fieldset {
|
||||
border-radius: 3px;
|
||||
|
||||
legend {
|
||||
font-weight: none;
|
||||
font-weight: normal !important;
|
||||
font-size: 16px !important;
|
||||
color: #555;
|
||||
}
|
||||
}
|
||||
@ -355,14 +356,14 @@ fieldset {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #777 !important;
|
||||
color: #555 !important;
|
||||
padding: 10px 0px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
dd.active {
|
||||
a {
|
||||
color: #555 !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -471,6 +472,10 @@ table.dataTable {
|
||||
margin: 0.5em 0 !important;
|
||||
max-width: none !important;
|
||||
width: 100%;
|
||||
|
||||
tr {
|
||||
background: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting,
|
||||
|
Loading…
x
Reference in New Issue
Block a user