Prerequisites to the custom fields (and space tabs to regular tabs conversion on some files)

SVN:trunk[3919]
This commit is contained in:
Guillaume Lajarige
2016-02-19 16:43:28 +00:00
parent bfadbc4098
commit 17127a5157
24 changed files with 2278 additions and 1990 deletions

View File

@@ -1,46 +1,46 @@
//iTop Form field
//iTop Subform field
;
$(function()
{
// the widget definition, where 'itop' is the namespace,
// 'subform_field' the widget name
$.widget( 'itop.subform_field', $.itop.form_field,
{
// default options
options:
{
field_set: null
},
// the widget definition, where 'itop' is the namespace,
// 'subform_field' the widget name
$.widget( 'itop.subform_field', $.itop.form_field,
{
// default options
options:
{
field_set: null
},
// the constructor
_create: function()
{
var me = this;
this.element
.addClass('subform_field');
// the constructor
_create: function()
{
var me = this;
this.element
.addClass('subform_field');
this._super();
},
// events bound via _bind are removed automatically
// revert other modifications here
_destroy: function()
{
this.element
.removeClass('subform_field');
this._super();
},
// events bound via _bind are removed automatically
// revert other modifications here
_destroy: function()
{
this.element
.removeClass('subform_field');
this._super();
},
getCurrentValue: function()
{
return this.options.field_set.triggerHandler('get_current_values');
},
validate: function(event, data)
{
return {
is_valid: this.options.field_set.triggerHandler('validate', data),
error_messages: []
}
},
});
this._super();
},
getCurrentValue: function()
{
return this.options.field_set.triggerHandler('get_current_values');
},
validate: function(oEvent, oData)
{
return {
is_valid: this.options.field_set.triggerHandler('validate', oData),
error_messages: []
}
},
});
});