1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

Feature #4217: Rename dialog to context

This commit is contained in:
Daniel Molina 2016-02-09 16:16:18 +01:00
parent 6cc4faf8e3
commit 743cdf38e6

View File

@ -104,19 +104,19 @@ define(function(require) {
});
}
function _onShow(dialog) {
function _onShow(context) {
this.imagesTable.resetResourceTableSelect();
this.marketPlacesTable.resetResourceTableSelect();
this.marketPlacesTableAdvanced.resetResourceTableSelect();
$("#NAME", dialog).focus();
$("#NAME", context).focus();
return false;
}
// Set up the create datastore dialog
function _setup(dialog) {
Tips.setup(dialog);
// Set up the create datastore context
function _setup(context) {
Tips.setup(context);
this.imagesTable.initialize();
this.marketPlacesTable.initialize();
@ -131,16 +131,16 @@ define(function(require) {
}
function _submitWizard(dialog) {
function _submitWizard(context) {
var marketPlaceJSON = {};
$.extend(marketPlaceJSON, WizardFields.retrieve(dialog));
$.extend(marketPlaceJSON, WizardFields.retrieve(context));
var vmTemplate = $('#VMTEMPLATE', dialog).val();
var vmTemplate = $('#VMTEMPLATE', context).val();
if (vmTemplate) {
marketPlaceJSON['VMTEMPLATE64'] = btoa(vmTemplate);
}
var appTemplate = $('#APPTEMPLATE', dialog).val();
var appTemplate = $('#APPTEMPLATE', context).val();
if (appTemplate) {
marketPlaceJSON['APPTEMPLATE64'] = btoa(appTemplate);
}
@ -154,8 +154,8 @@ define(function(require) {
return false;
}
function _submitAdvanced(dialog) {
var template = $('#template', dialog).val();
function _submitAdvanced(context) {
var template = $('#template', context).val();
var marketPlaceAppObj = {
"marketplaceapp" : {
"marketplaceapp_raw" : template