mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
development: Unified create buttons in a dropdown
This commit is contained in:
parent
9c38e999f5
commit
c6792354d8
@ -25,13 +25,16 @@ define(function(require) {
|
||||
},
|
||||
"Datastore.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create"
|
||||
text: Locale.tr("Create"),
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list"
|
||||
},
|
||||
"Datastore.import_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create",
|
||||
text: Locale.tr("Import"),
|
||||
icon: '<i class="fas fa-download"/>'
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list",
|
||||
alwaysActive: true
|
||||
},
|
||||
"Datastore.addtocluster" : {
|
||||
type : "action",
|
||||
|
@ -26,7 +26,9 @@ define(function(require) {
|
||||
},
|
||||
"Image.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create"
|
||||
text: Locale.tr("Create"),
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list"
|
||||
},
|
||||
"Image.upload_marketplace_dialog" : {
|
||||
type: "action",
|
||||
@ -34,9 +36,10 @@ define(function(require) {
|
||||
},
|
||||
"Image.import_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create",
|
||||
text: Locale.tr("Import"),
|
||||
icon: '<i class="fas fa-download"/>'
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list",
|
||||
alwaysActive: true
|
||||
},
|
||||
"Image.chown" : {
|
||||
type: "confirm_with_select",
|
||||
|
@ -25,7 +25,9 @@ define(function(require) {
|
||||
},
|
||||
"ServiceTemplate.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create"
|
||||
text: Locale.tr("Create"),
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list"
|
||||
},
|
||||
"ServiceTemplate.update_dialog" : {
|
||||
type: "action",
|
||||
@ -33,9 +35,9 @@ define(function(require) {
|
||||
text: Locale.tr("Update")
|
||||
},
|
||||
"ServiceTemplate.instantiate_dialog" : {
|
||||
type: "action",
|
||||
layout: "main",
|
||||
text: Locale.tr("Instantiate")
|
||||
type: "create_dialog",
|
||||
text: Locale.tr("Instantiate"),
|
||||
layout: "create_flatten"
|
||||
},
|
||||
"ServiceTemplate.chown" : {
|
||||
type: "confirm_with_select",
|
||||
|
@ -26,13 +26,15 @@ define(function(require) {
|
||||
},
|
||||
"Template.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create"
|
||||
text: Locale.tr("Create"),
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list"
|
||||
},
|
||||
"Template.import_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create",
|
||||
text: Locale.tr("Import"),
|
||||
icon: '<i class="fas fa-download"/>',
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list",
|
||||
alwaysActive: true
|
||||
},
|
||||
"Template.update_dialog" : {
|
||||
@ -41,9 +43,9 @@ define(function(require) {
|
||||
text: Locale.tr("Update")
|
||||
},
|
||||
"Template.instantiate_vms" : {
|
||||
type: "action",
|
||||
layout: "main",
|
||||
text: Locale.tr("Instantiate")
|
||||
type: "create_dialog",
|
||||
text: Locale.tr("Instantiate"),
|
||||
layout: "create_flatten"
|
||||
},
|
||||
"Template.chown" : {
|
||||
type: "confirm_with_select",
|
||||
|
@ -139,6 +139,11 @@ define(function(require) {
|
||||
//Sunstone.resetFormPanel(TAB_ID, INSTANTIATE_DIALOG_ID);
|
||||
var selected_nodes = Sunstone.getDataTable(TAB_ID).elements();
|
||||
|
||||
if (selected_nodes.length != 1) {
|
||||
Notifier.notifyMessage("Please select one (and just one) Virtual Network Template.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Sunstone.showFormPanel(TAB_ID, INSTANTIATE_DIALOG_ID, "instantiate",
|
||||
function(formPanelInstance, context) {
|
||||
formPanelInstance.setTemplateIds(context, selected_nodes);
|
||||
|
@ -26,7 +26,9 @@ define(function(require) {
|
||||
},
|
||||
"VNTemplate.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
layout: "create"
|
||||
text: Locale.tr("Create"),
|
||||
layout: "create_flatten",
|
||||
custom_classes: "only-sunstone-list"
|
||||
},
|
||||
"VNTemplate.update_dialog" : {
|
||||
type: "action",
|
||||
@ -34,9 +36,9 @@ define(function(require) {
|
||||
text: Locale.tr("Update")
|
||||
},
|
||||
"VNTemplate.instantiate_vnets" : {
|
||||
type: "action",
|
||||
layout: "main",
|
||||
text: Locale.tr("Instantiate")
|
||||
type: "create_dialog",
|
||||
text: Locale.tr("Instantiate"),
|
||||
layout: "create_flatten"
|
||||
},
|
||||
"VNTemplate.addtocluster" : {
|
||||
type : "action",
|
||||
|
@ -25,9 +25,9 @@ define(function(require) {
|
||||
"VirtualRouterTemplate.update_dialog" : TemplateButtons["Template.update_dialog"],
|
||||
// "VirtualRouterTemplate.instantiate_vms" : TemplateButtons["Template.instantiate_vms"],
|
||||
"VirtualRouterTemplate.instantiate_dialog" : {
|
||||
type: "action",
|
||||
layout: "main",
|
||||
text: Locale.tr("Instantiate")
|
||||
type: "create_dialog",
|
||||
text: Locale.tr("Instantiate"),
|
||||
layout: "create_flatten"
|
||||
},
|
||||
"VirtualRouterTemplate.chown" : TemplateButtons["Template.chown"],
|
||||
"VirtualRouterTemplate.chgrp" : TemplateButtons["Template.chgrp"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user