1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

feature #3748: Fix abide reflow and remove duplicated event check

This commit is contained in:
Daniel Molina 2015-07-31 17:03:42 +02:00
parent 5af9499101
commit cd4832d6a7
6 changed files with 6 additions and 44 deletions

View File

@ -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 = [];

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}