diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/vmgroup.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/vmgroup.js index aeac1bac21..48066706e8 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/vmgroup.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/vmgroup.js @@ -25,7 +25,7 @@ define(function(require) { var Tips = require('utils/tips'); var WizardFields = require('utils/wizard-fields'); var UniqueId = require('utils/unique-id'); - var vmgroupSection = require('utils/vmgroup-section') + var vmgroupSection = require('utils/vmgroup-section'); var VMGroupsTable = require('tabs/vmgroup-tab/datatable'); diff --git a/src/sunstone/public/app/utils/custom-tags-table.js b/src/sunstone/public/app/utils/custom-tags-table.js index a3079642a3..6189fb7524 100644 --- a/src/sunstone/public/app/utils/custom-tags-table.js +++ b/src/sunstone/public/app/utils/custom-tags-table.js @@ -29,7 +29,10 @@ define(function(require) { return TemplateHTML(); } - function _setup(context, hide_vector_button = false, resourceType = undefined, element = undefined, elementID = undefined){ + function _setup(context, hide_vector_button, resourceType, element, elementID){ + if (!hide_vector_button) { + hide_vector_button = false; + } context.off("click", ".add_custom_tag"); context.on("click", ".add_custom_tag", function(){ $("tbody.custom_tags", context).append(RowTemplateHTML()); diff --git a/src/sunstone/public/app/utils/panel/template-table.js b/src/sunstone/public/app/utils/panel/template-table.js index 6109c28fc5..824cc490c0 100644 --- a/src/sunstone/public/app/utils/panel/template-table.js +++ b/src/sunstone/public/app/utils/panel/template-table.js @@ -32,7 +32,10 @@ define(function(require) { @param {String} tableName Header of the table (i.e: Locale.tr("Attributes")) @returns {String} HTML table */ - function _html(templateJSON, resourceType, tableName, modify=true) { + function _html(templateJSON, resourceType, tableName, modify) { + if (!modify) { + modify = true; + } var str = '
\ diff --git a/src/sunstone/public/app/utils/vmgroup-section.js b/src/sunstone/public/app/utils/vmgroup-section.js index 9970eeaf12..b103ae84f5 100644 --- a/src/sunstone/public/app/utils/vmgroup-section.js +++ b/src/sunstone/public/app/utils/vmgroup-section.js @@ -56,7 +56,7 @@ define(function(require) { }); } - function _onShow(context,vmGroupTable=undefined){ + function _onShow(context, vmGroupTable){ if(vmGroupTable) vmGroupTable.refreshResourceTableSelect(); $("#role_section",context).hide(); @@ -98,14 +98,14 @@ define(function(require) { } } - function _fill(context, templateJSON, vmGroupTable=undefined){ + function _fill(context, templateJSON, vmGroupTable){ if(templateJSON.VMGROUP){ var element = templateJSON.VMGROUP; vmGroupTable.selectResourceTableSelect({ids:element.VMGROUP_ID}); _generate_provision_role_table(context,element.VMGROUP_ID, element.ROLE); } } - function _retrieve(context, vmGroupTable=undefined) { + function _retrieve(context, vmGroupTable) { if(!vmGroupTable){ $.each($('.role_table_section',context), function(){ if(this.innerText != ""){ @@ -134,7 +134,7 @@ define(function(require) { return false; } - function _generate_provision_role_table(context, idvmgroup, fill=undefined) { + function _generate_provision_role_table(context, idvmgroup, fill) { OpenNebula.VMGroup.show({ data : { id: idvmgroup, @@ -143,18 +143,18 @@ define(function(require) { $(".role_table_section").empty(); var roles = template_json["VM_GROUP"].ROLES.ROLE; $(".title_roles",context).text(Locale.tr("Roles")+" "+ template_json["VM_GROUP"].NAME); - if(roles){ - if(Array.isArray(roles)){ + if (roles){ + if (Array.isArray(roles)){ $.each(roles, function(){ $(" |