mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 00:09:06 +01:00
LSformElement_supannCompositeAttribute: fix handling field JS reinitialization for date components
This commit is contained in:
parent
a0fc721776
commit
cc07f293ab
2 changed files with 10 additions and 2 deletions
|
@ -8,17 +8,19 @@ var LSformElement_supannCompositeAttribute_field_value = new Class({
|
||||||
varLSform.addModule(field_type,this);
|
varLSform.addModule(field_type,this);
|
||||||
},
|
},
|
||||||
|
|
||||||
initializeLSformElement_supannCompositeAttribute_field_value: function(el) {
|
initializeLSformElement_supannCompositeAttribute_field_value: function(el, reinitialize) {
|
||||||
if (!$type(el)) {
|
if (!$type(el)) {
|
||||||
el = this.li;
|
el = this.li;
|
||||||
}
|
}
|
||||||
el.getElements('p').each(function(p) {
|
el.getElements('p').each(function(p) {
|
||||||
this.components[p.get('data-component')]=new LSformElement_supannCompositeAttribute_field_value_component(p,p.get('data-component'),this.name);
|
this.components[p.get('data-component')]=new LSformElement_supannCompositeAttribute_field_value_component(p,p.get('data-component'),this.name);
|
||||||
|
if (reinitialize)
|
||||||
|
this.components[p.get('data-component')].reinitialize();
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
reinitialize: function(el) {
|
reinitialize: function(el) {
|
||||||
this.initializeLSformElement_supannCompositeAttribute_field_value(el);
|
this.initializeLSformElement_supannCompositeAttribute_field_value(el, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
clear: function() {
|
clear: function() {
|
||||||
|
|
|
@ -45,6 +45,12 @@ var LSformElement_supannCompositeAttribute_field_value_component = new Class({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
reinitialize: function() {
|
||||||
|
if (this.cconf.type == 'date') {
|
||||||
|
varLSform.initializeModule('LSformElement_date', this.p);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
toggleInputSearch: function() {
|
toggleInputSearch: function() {
|
||||||
if (this.inputSearch.getStyle('display')=='none') {
|
if (this.inputSearch.getStyle('display')=='none') {
|
||||||
this.inputSearch.setStyle('display','block');
|
this.inputSearch.setStyle('display','block');
|
||||||
|
|
Loading…
Reference in a new issue