mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 08:19:05 +01:00
LSform : Added feature to go directly in tab with #name value in URL
This commit is contained in:
parent
a311ed9842
commit
661b680fea
1 changed files with 15 additions and 3 deletions
|
@ -2,6 +2,7 @@ var LSform = new Class({
|
||||||
initialize: function(){
|
initialize: function(){
|
||||||
this._modules=[];
|
this._modules=[];
|
||||||
this._elements=[];
|
this._elements=[];
|
||||||
|
this._tabBtns=[];
|
||||||
|
|
||||||
if ($type($('LSform_idform'))) {
|
if ($type($('LSform_idform'))) {
|
||||||
this.objecttype = $('LSform_objecttype').value;
|
this.objecttype = $('LSform_objecttype').value;
|
||||||
|
@ -79,10 +80,21 @@ var LSform = new Class({
|
||||||
}
|
}
|
||||||
li.getFirst('a').addEvent('click',this.onTabBtnClick.bindWithEvent(this,li));
|
li.getFirst('a').addEvent('click',this.onTabBtnClick.bindWithEvent(this,li));
|
||||||
},this);
|
},this);
|
||||||
|
|
||||||
|
$$('li.LSform_layout a').each(function(a) {
|
||||||
|
this._tabBtns[a.href]=a;
|
||||||
|
},this);
|
||||||
|
|
||||||
if (LIs.length != 0) {
|
if (LIs.length != 0) {
|
||||||
this._currentTab = 'default_value';
|
if ($type(this._tabBtns[window.location])) {
|
||||||
document.getElement('li.LSform_layout').getFirst('a').fireEvent('click');
|
this._currentTab = 'default_value';
|
||||||
|
this._tabBtns[window.location].fireEvent('click');
|
||||||
|
byDefault=0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._currentTab = 'default_value';
|
||||||
|
document.getElement('li.LSform_layout').getFirst('a').fireEvent('click');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue