diff --git a/src/sunstone/public/app/tabs/marketplace-tab/dialogs/import.js b/src/sunstone/public/app/tabs/marketplace-tab/dialogs/import.js index 398afe6c3f..2e9d9a1a4f 100644 --- a/src/sunstone/public/app/tabs/marketplace-tab/dialogs/import.js +++ b/src/sunstone/public/app/tabs/marketplace-tab/dialogs/import.js @@ -54,6 +54,7 @@ define(function(require) { function _setup(context) { var that = this; + context.foundation('abide', 'reflow'); $("#market_import_dialog_content", context).html( ContentHTML({'element': this.element}) ); @@ -69,15 +70,8 @@ define(function(require) { context.off('valid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.on('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); }).on('valid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - - that.number_of_files = that.element['files'].length; that.template_created = false; that.images_information = []; diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js b/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js index 74e8dc6517..bbcaefc4f9 100644 --- a/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js +++ b/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js @@ -53,19 +53,13 @@ define(function(require) { function _setup(context) { var that = this; + context.foundation('abide', 'reflow'); context.off('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.off('valid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.on('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); }).on('valid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - - var force = false; if ($("#force", context).is(":checked")) { force = true; @@ -81,8 +75,6 @@ define(function(require) { return false; }); - context.foundation('reflow', 'abide'); - Tips.setup(context); return false; diff --git a/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js b/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js index 34fc28a120..4e8089d9e9 100644 --- a/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js +++ b/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js @@ -49,18 +49,13 @@ define(function(require) { function _setup(context) { var that = this; + context.foundation('abide', 'reflow'); context.off('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.off('valid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.on('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); }).on('valid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - var name = $('input', this).val(); var sel_elems = Sunstone.getDataTable(TAB_ID).elements(); @@ -77,8 +72,6 @@ define(function(require) { return false; }); - context.foundation('reflow', 'abide'); - return false; } diff --git a/src/sunstone/public/app/tabs/templates-tab/dialogs/instantiate.js b/src/sunstone/public/app/tabs/templates-tab/dialogs/instantiate.js index 396e5fed7c..d0adf64cfe 100644 --- a/src/sunstone/public/app/tabs/templates-tab/dialogs/instantiate.js +++ b/src/sunstone/public/app/tabs/templates-tab/dialogs/instantiate.js @@ -52,17 +52,14 @@ define(function(require) { function _setup(context) { var that = this; + context.foundation('abide', 'reflow'); context.off('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.off('valid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.on('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; }; Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); return false; }).on('valid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; }; var vm_name = $('#vm_name', this).val(); var n_times = $('#vm_n_times', this).val(); var n_times_int = 1; diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js index dcb91fe6c9..966e4b0e8c 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js @@ -54,18 +54,13 @@ define(function(require) { this.userCreation.setup(context); + context.foundation('abide', 'reflow'); context.off('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.off('valid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.on('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); }).on('valid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - var inputs = that.userCreation.retrieve(context); var selElems = Sunstone.getDataTable(TAB_ID).elements(); @@ -79,8 +74,6 @@ define(function(require) { return false; }); - context.foundation('reflow', 'abide'); - return false; } diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/password.js b/src/sunstone/public/app/tabs/users-tab/dialogs/password.js index cce9571fca..c9c77bb8fa 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/password.js +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/password.js @@ -63,18 +63,13 @@ define(function(require) { this.userCreation.setup(context); + context.foundation('abide', 'reflow'); context.off('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.off('valid.fndtn.abide', '#' + DIALOG_ID + 'Form'); context.on('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); }).on('valid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - // Fix for valid event firing twice - if (e.namespace != 'abide.fndtn') { return; } - var inputs = that.userCreation.retrieve(context); Sunstone.runAction('User.passwd', that.selectedElements, inputs.password); @@ -86,8 +81,6 @@ define(function(require) { return false; }); - context.foundation('reflow', 'abide'); - return false; }