mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
(cherry picked from commit fa3a7ecebed944e7234522698046699679cb5800)
This commit is contained in:
parent
81e274b593
commit
2f8e33ed3d
@ -64,7 +64,6 @@ define(function(require) {
|
||||
call: OpenNebulaResource.update,
|
||||
callback: function(req) {
|
||||
// Reset the wizard
|
||||
Sunstone.getDialog(ADD_AR_DIALOG_ID).hide();
|
||||
Sunstone.getDialog(ADD_AR_DIALOG_ID).reset();
|
||||
|
||||
Sunstone.runAction("VNTemplate.show",req.request.data[0]);
|
||||
@ -77,7 +76,6 @@ define(function(require) {
|
||||
call: OpenNebulaResource.update,
|
||||
callback: function(req) {
|
||||
// Reset the wizard
|
||||
Sunstone.getDialog(UPDATE_AR_DIALOG_ID).hide();
|
||||
Sunstone.getDialog(UPDATE_AR_DIALOG_ID).reset();
|
||||
|
||||
Sunstone.runAction("VNTemplate.show",req.request.data[0]);
|
||||
|
@ -99,9 +99,7 @@ define(function(require) {
|
||||
delete that.element.TEMPLATE.AR_POOL;
|
||||
|
||||
Sunstone.runAction('VNTemplate.add_ar', that.vntmplId, TemplateUtils.templateToString(that.element.TEMPLATE));
|
||||
})
|
||||
.on("submit", function(ev) {
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -133,11 +133,10 @@ define(function(require) {
|
||||
$("#ar_list_datatable", that.context).DataTable().columns.adjust().draw();
|
||||
|
||||
$("#ar_list_datatable tbody tr:last", that.context).attr("ar", data.AR_ID);
|
||||
|
||||
Sunstone.getDialog(DIALOG_ID).hide();
|
||||
})
|
||||
.on("submit", function(ev) {
|
||||
ev.preventDefault();
|
||||
Sunstone.getDialog(DIALOG_ID).hide();
|
||||
});
|
||||
|
||||
$("#instantiate_add_ar_ar_type_ip4", context).prop('checked', true);
|
||||
|
@ -79,15 +79,19 @@ define(function(require) {
|
||||
})
|
||||
.on('formvalid.zf.abide', function(ev, frm) {
|
||||
var data = that.arTab.retrieve();
|
||||
|
||||
data['AR_ID'] = that.arId;
|
||||
|
||||
for (i in that.element.TEMPLATE.AR) {
|
||||
if ( that.element.TEMPLATE.AR[i].AR_ID == that.arId ) {
|
||||
that.element.TEMPLATE.AR[i] = data;
|
||||
break;
|
||||
|
||||
if (Array.isArray(that.element.TEMPLATE.AR)){
|
||||
for (i in that.element.TEMPLATE.AR) {
|
||||
if ( that.element.TEMPLATE.AR[i].AR_ID == that.arId ) {
|
||||
that.element.TEMPLATE.AR[i] = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
that.element.TEMPLATE.AR = data;
|
||||
}
|
||||
|
||||
delete that.element.TEMPLATE.AR_POOL;
|
||||
|
||||
@ -97,6 +101,7 @@ define(function(require) {
|
||||
})
|
||||
.on("submit", function(ev) {
|
||||
ev.preventDefault();
|
||||
Sunstone.getDialog(DIALOG_ID).hide();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function _hide() {
|
||||
this.dialogElement.foundation("close");
|
||||
this.dialogElement.foundation("close");
|
||||
}
|
||||
|
||||
function _reset() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user