mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
- LSform :
-> Correction des templates (balise <a name>) -> JS : Déselection des onglets lors du clique et tentative de focus sur le premier champs du formulaire.
This commit is contained in:
parent
ca3b0d9299
commit
68d2d9977f
3 changed files with 20 additions and 3 deletions
|
@ -43,7 +43,9 @@ var LSform = new Class({
|
||||||
|
|
||||||
onTabBtnClick: function(event,li) {
|
onTabBtnClick: function(event,li) {
|
||||||
if ($type(event)) {
|
if ($type(event)) {
|
||||||
new Event(event).stop();
|
event = new Event(event);
|
||||||
|
event.stop();
|
||||||
|
event.target.blur();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._currentTab!='default_value') {
|
if (this._currentTab!='default_value') {
|
||||||
|
@ -61,7 +63,22 @@ var LSform = new Class({
|
||||||
li.addClass('LSform_layout_current');
|
li.addClass('LSform_layout_current');
|
||||||
var div = $$('div.LSform_layout[title='+this._currentTab+']');
|
var div = $$('div.LSform_layout[title='+this._currentTab+']');
|
||||||
if ($type(div)) {
|
if ($type(div)) {
|
||||||
|
div = div[0];
|
||||||
div.addClass('LSform_layout_current');
|
div.addClass('LSform_layout_current');
|
||||||
|
|
||||||
|
// Focus
|
||||||
|
var ul = div.getElement('ul.LSform');
|
||||||
|
if ($type(ul)) {
|
||||||
|
var el = ul.getElement('input');
|
||||||
|
if (!$type(el)) {
|
||||||
|
el = ul.getElement('textarea');
|
||||||
|
}
|
||||||
|
if ($type(el)) {
|
||||||
|
if(el.type!='hidden') {
|
||||||
|
el.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<!-- Tabs - Start Content -->
|
<!-- Tabs - Start Content -->
|
||||||
{foreach from=$LSform_layout item=tab key=tab_key}
|
{foreach from=$LSform_layout item=tab key=tab_key}
|
||||||
<a name='{$tab_key}'/>
|
<a name='{$tab_key}'></a>
|
||||||
<h2 class='LSform_layout'>{$tab.label}</h2>
|
<h2 class='LSform_layout'>{$tab.label}</h2>
|
||||||
<div class='LSform LSform_layout' title='{$tab_key}'>
|
<div class='LSform LSform_layout' title='{$tab_key}'>
|
||||||
{if $LSformElement_image!='' && $tab.img==1}
|
{if $LSformElement_image!='' && $tab.img==1}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<!-- Tabs - Start Content -->
|
<!-- Tabs - Start Content -->
|
||||||
{foreach from=$LSform_layout item=tab key=tab_key}
|
{foreach from=$LSform_layout item=tab key=tab_key}
|
||||||
<a name='{$tab_key}'/>
|
<a name='{$tab_key}'></a>
|
||||||
<h2 class='LSform_layout'>{$tab.label}</h2>
|
<h2 class='LSform_layout'>{$tab.label}</h2>
|
||||||
<div class='LSform LSform_layout' title='{$tab_key}'>
|
<div class='LSform LSform_layout' title='{$tab_key}'>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue