Last change
on this file since 69453 was
69453,
checked in by bystrano@…, 8 years ago
|
Merge branch 'master' of github.com:bystrano/menu_evitement
|
File size:
1.6 KB
|
Line | |
---|
1 | #SET{lien_vers_menu_admin, #CONFIG{menu_evitement}|table_valeur{lien_vers_menu_admin}} |
---|
2 | #SET{structure, #CONFIG{menu_evitement}|table_valeur{structure}} |
---|
3 | |
---|
4 | <div id="menu-evitement"> |
---|
5 | [(#GET{lien_vers_menu_admin}|oui|et{#ARRAY{1comite, 0minirezo}|find{#SESSION{statut}}}) |
---|
6 | <a href="#spip-admin" class="lien-menu-evitement"> |
---|
7 | <:menu_evitement:goto_admin:> |
---|
8 | </a> |
---|
9 | ] |
---|
10 | |
---|
11 | <BOUCLE_structure(DATA) {source table, #GET{structure}}> |
---|
12 | [<a href="#(#VALEUR|table_valeur{cible})" class="lien-menu-evitement"> |
---|
13 | [(#VALEUR|table_valeur{titre})] |
---|
14 | </a>] |
---|
15 | </BOUCLE_structure> |
---|
16 | |
---|
17 | <script> |
---|
18 | (function ($) { |
---|
19 | $(function () { |
---|
20 | |
---|
21 | $('.lien-menu-evitement').keyup(function (e) { |
---|
22 | if (e.keyCode == 13) { // touche 'enter' |
---|
23 | var href = $(this).attr('href'); |
---|
24 | $(href).find('a.lien-menu-evitement').first().focus(); |
---|
25 | } |
---|
26 | }); |
---|
27 | |
---|
28 | [(#CONFIG{menu_evitement/cacher_menu_quand_pas_focus}|oui) |
---|
29 | |
---|
30 | $('#menu-evitement').addClass('virer') |
---|
31 | .find('.lien-menu-evitement') |
---|
32 | .focusin(function () { |
---|
33 | $(this).parents('#menu-evitement').removeClass('virer'); |
---|
34 | }) |
---|
35 | .focusout(function () { |
---|
36 | $(this).parents('#menu-evitement').addClass('virer'); |
---|
37 | }); |
---|
38 | ] |
---|
39 | |
---|
40 | [(#CONFIG{menu_evitement/cacher_ancres_quand_pas_focus}|oui) |
---|
41 | $('.ancre.lien-menu-evitement') |
---|
42 | .addClass('virer') |
---|
43 | .focusin(function () { |
---|
44 | $(this).removeClass('virer'); |
---|
45 | }) |
---|
46 | .focusout(function () { |
---|
47 | $(this).addClass('virer'); |
---|
48 | }); |
---|
49 | ] |
---|
50 | |
---|
51 | }); |
---|
52 | })(jQuery); |
---|
53 | </script> |
---|
54 | |
---|
55 | </div> |
---|
Note: See
TracBrowser
for help on using the repository browser.