mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Prerequisites to the custom fields (and space tabs to regular tabs conversion on some files)
SVN:trunk[3919]
This commit is contained in:
@@ -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: []
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user