mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
Fix reset button
This commit is contained in:
1 parent
56e32a19a3
commit
7b58b70443
19 files changed
+139
-139
No files matched your search
@@ -1 +1 @@
|
||||
meta.foundation-version {font-family:"/5.1.0/";}meta.foundation-mq-small {font-family:"/only screen and (max-width: 40em)/";width:0em;}meta.foundation-mq-medium {font-family:"/only screen and (min-width:40.063em)/";width:40.063em;}meta.foundation-mq-large {font-family:"/only screen and (min-width:64.063em)/";width:64.063em;}meta.foundation-mq-xlarge {font-family:"/only screen and (min-width:90.063em)/";width:90.063em;}meta.foundation-mq-xxlarge {font-family:"/only screen and (min-width:120.063em)/";width:120.063em;}meta.foundation-data-attribute-namespace {font-family:false;}html ,body {height:100%;}* ,*:before ,*:after {-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}html ,body {font-size:100%;}body {background:#ffffff;color:#222222;padding:0;margin:0;font-family:"Open Sans",sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default;}a:hover {cursor:pointer;}img ,object ,embed {max-width:100%;height:auto;}object ,embed {height:100%;}img {-ms-interpolation-mode:bicubic;}#map_canvas img ,#map_canvas embed ,#map_canvas object ,.map_canvas img ,.map_canvas embed ,.map_canvas object {max-width:none !important;}.left {float:left !important;}.right {float:right !important;}.clearfix {*zoom:1;}.clearfix:before ,.clearfix:after {content:" ";display:table;}.clearfix:after {clear:both;}.hide {display:none;}.antialiased {-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}img {display:inline-block;vertical-align:middle;}textarea {height:auto;min-height:50px;}select {width:100%;}.row {width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:75rem;*zoom:1;}.row:before ,.row:after {content:" ";display:table;}.row:after {clear:both;}.row.collapse>.column ,.row.collapse>.columns {padding-left:0;padding-right:0;float:left;}.row.collapse .row {margin-left:0;margin-right:0;}.row .row {width:auto;margin-left:-0.9375rem;margin-right:-0.9375rem;margin-top:0;margin-bottom:0;max-width:none;*zoom:1;}.row .row:before ,.row .row:after {content:" ";display:table;}.row .row:after {clear:both;}.row .row.collapse {width:auto;margin:0;max-width:none;*zoom:1;}.row .row.collapse:before ,.row .row.collapse:after {content:" ";display:table;}.row .row.collapse:after {clear:both;}.column ,.columns {padding-left:0.9375rem;padding-right:0.9375rem;width:100%;float:left;}@media only screen{.column.small-centered ,.columns.small-centered {margin-left:auto;margin-right:auto;float:none;}.column.small-uncentered ,.columns.small-uncentered {margin-left:0;margin-right:0;float:left;}.column.small-uncentered.opposite ,.columns.small-uncentered.opposite {float:right;}.small-push-0 {left:0%;right:auto;}.small-pull-0 {right:0%;left:auto;}.small-push-1 {left:8.33333%;right:auto;}.small-pull-1 {right:8.33333%;left:auto;}.small-push-2 {left:16.66667%;right:auto;}.small-pull-2 {right:16.66667%;left:auto;}.small-push-3 {left:25%;right:auto;}.small-pull-3 {right:25%;left:auto;}.small-push-4 {left:33.33333%;right:auto;}.small-pull-4 {right:33.33333%;left:auto;}.small-push-5 {left:41.66667%;right:auto;}.small-pull-5 {right:41.66667%;left:auto;}.small-push-6 {left:50%;right:auto;}.small-pull-6 {right:50%;left:auto;}.small-push-7 {left:58.33333%;right:auto;}.small-pull-7 {right:58.33333%;left:auto;}.small-push-8 {left:66.66667%;right:auto;}.small-pull-8 {right:66.66667%;left:auto;}.small-push-9 {left:75%;right:auto;}.small-pull-9 {right:75%;left:auto;}.small-push-10 {left:83.33333%;right:auto;}.small-pull-10 {right:83.33333%;left:auto;}.small-push-11 {left:91.66667%;right:auto;}.small-pull-11 {right:91.66667%;left:auto;}.column ,.columns {position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left;}.small-1 {width:8.33333%;}.small-2 {width:16.66667%;}.small-3 {width:25%;}.small-4 {width:33.33333%;}.small-5 {width:41.66667%;}.small-6 {width:50%;}.small-7 {width:58.33333%;}.small-8 {width:66.66667%;}.small-9 {width:75%;}.small-10 {width:83.33333%;}.small-11 {width:91.66667%;}.small-12 {width:100%;}[class*="column"]+[class*="column"]:last-child {float:right;}[class*="column"]+[class*="column"].end {float:left;}.small-offset-0 {margin-left:0% !important;}.small-offset-1 {margin-left:8.33333% !important;}.small-offset-2 {margin-left:16.66667% !important;}.small-offset-3 {margin-left:25% !important;}.small-offset-4 {margin-left:33.33333% !important;}.small-offset-5 {margin-left:41.66667% !important;}.small-offset-6 {margin-left:50% !important;}.small-offset-7 {margin-left:58.33333% !important;}.small-offset-8 {margin-left:66.66667% !important;}.small-offset-9 {margin-left:75% !important;}.small-offset-10 {margin-left:83.33333% !important;}.small-offset-11 {margin-left:91.66667% !important;}.small-reset-order ,.small-reset-order {margin-left:0;margin-right:0;left:auto;right:auto;float:left;}}@media only screen and (min-width:40.063em){.column.medium-centered ,.columns.medium-centered {margin-left:auto;margin-right:auto;float:none;}.column.medium-uLine truncated
|
||||
meta.foundation-version {font-family:"/5.1.0/";}meta.foundation-mq-small {font-family:"/only screen and (max-width: 40em)/";width:0em;}meta.foundation-mq-medium {font-family:"/only screen and (min-width:40.063em)/";width:40.063em;}meta.foundation-mq-large {font-family:"/only screen and (min-width:64.063em)/";width:64.063em;}meta.foundation-mq-xlarge {font-family:"/only screen and (min-width:90.063em)/";width:90.063em;}meta.foundation-mq-xxlarge {font-family:"/only screen and (min-width:120.063em)/";width:120.063em;}meta.foundation-data-attribute-namespace {font-family:false;}html ,body {height:100%;}* ,*:before ,*:after {-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}html ,body {font-size:100%;}body {background:#ffffff;color:#222222;padding:0;margin:0;font-family:"Open Sans",sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default;}a:hover {cursor:pointer;}img ,object ,embed {max-width:100%;height:auto;}object ,embed {height:100%;}img {-ms-interpolation-mode:bicubic;}#map_canvas img ,#map_canvas embed ,#map_canvas object ,.map_canvas img ,.map_canvas embed ,.map_canvas object {max-width:none !important;}.left {float:left !important;}.right {float:right !important;}.clearfix {*zoom:1;}.clearfix:before ,.clearfix:after {content:" ";display:table;}.clearfix:after {clear:both;}.hide {display:none;}.antialiased {-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}img {display:inline-block;vertical-align:middle;}textarea {height:auto;min-height:50px;}select {width:100%;}.row {width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:75rem;*zoom:1;}.row:before ,.row:after {content:" ";display:table;}.row:after {clear:both;}.row.collapse>.column ,.row.collapse>.columns {padding-left:0;padding-right:0;float:left;}.row.collapse .row {margin-left:0;margin-right:0;}.row .row {width:auto;margin-left:-0.9375rem;margin-right:-0.9375rem;margin-top:0;margin-bottom:0;max-width:none;*zoom:1;}.row .row:before ,.row .row:after {content:" ";display:table;}.row .row:after {clear:both;}.row .row.collapse {width:auto;margin:0;max-width:none;*zoom:1;}.row .row.collapse:before ,.row .row.collapse:after {content:" ";display:table;}.row .row.collapse:after {clear:both;}.column ,.columns {padding-left:0.9375rem;padding-right:0.9375rem;width:100%;float:left;}@media only screen{.column.small-centered ,.columns.small-centered {margin-left:auto;margin-right:auto;float:none;}.column.small-uncentered ,.columns.small-uncentered {margin-left:0;margin-right:0;float:left;}.column.small-uncentered.opposite ,.columns.small-uncentered.opposite {float:right;}.small-push-0 {left:0%;right:auto;}.small-pull-0 {right:0%;left:auto;}.small-push-1 {left:8.33333%;right:auto;}.small-pull-1 {right:8.33333%;left:auto;}.small-push-2 {left:16.66667%;right:auto;}.small-pull-2 {right:16.66667%;left:auto;}.small-push-3 {left:25%;right:auto;}.small-pull-3 {right:25%;left:auto;}.small-push-4 {left:33.33333%;right:auto;}.small-pull-4 {right:33.33333%;left:auto;}.small-push-5 {left:41.66667%;right:auto;}.small-pull-5 {right:41.66667%;left:auto;}.small-push-6 {left:50%;right:auto;}.small-pull-6 {right:50%;left:auto;}.small-push-7 {left:58.33333%;right:auto;}.small-pull-7 {right:58.33333%;left:auto;}.small-push-8 {left:66.66667%;right:auto;}.small-pull-8 {right:66.66667%;left:auto;}.small-push-9 {left:75%;right:auto;}.small-pull-9 {right:75%;left:auto;}.small-push-10 {left:83.33333%;right:auto;}.small-pull-10 {right:83.33333%;left:auto;}.small-push-11 {left:91.66667%;right:auto;}.small-pull-11 {right:91.66667%;left:auto;}.column ,.columns {position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left;}.small-1 {width:8.33333%;}.small-2 {width:16.66667%;}.small-3 {width:25%;}.small-4 {width:33.33333%;}.small-5 {width:41.66667%;}.small-6 {width:50%;}.small-7 {width:58.33333%;}.small-8 {width:66.66667%;}.small-9 {width:75%;}.small-10 {width:83.33333%;}.small-11 {width:91.66667%;}.small-12 {width:100%;}[class*="column"]+[class*="column"]:last-child {float:right;}[class*="column"]+[class*="column"].end {float:left;}.small-offset-0 {margin-left:0% !important;}.small-offset-1 {margin-left:8.33333% !important;}.small-offset-2 {margin-left:16.66667% !important;}.small-offset-3 {margin-left:25% !important;}.small-offset-4 {margin-left:33.33333% !important;}.small-offset-5 {margin-left:41.66667% !important;}.small-offset-6 {margin-left:50% !important;}.small-offset-7 {margin-left:58.33333% !important;}.small-offset-8 {margin-left:66.66667% !important;}.small-offset-9 {margin-left:75% !important;}.small-offset-10 {margin-left:83.33333% !important;}.small-offset-11 {margin-left:91.66667% !important;}.small-reset-order ,.small-reset-order {margin-left:0;margin-right:0;left:auto;right:auto;float:left;}}@media only screen and (min-width:40.063em){.column.medium-centered ,.columns.medium-centered {margin-left:auto;margin-right:auto;float:none;}.column.medium-uLine truncated
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user