source: trunk/plugins/language_switch/flags.tpl @ 15923

Last change on this file since 15923 was 15923, checked in by mistic100, 12 years ago

[Language Switch] new version using 2.4 drop-down menus

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1<li>{strip}<a id="languageSwitchLink" title="{'Language'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
2  <span class="pwg-icon" style="background:url('{$lang_switch.Active.img}') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Language'|@translate}</span>
3</a>
4<div id="languageSwitchBox" class="switchBox">
5  <div class="switchBoxTitle">{'Language'|@translate}</div>
6  {foreach from=$lang_switch.flags item=flag name=f}
7  <a rel="nofollow" href="{$flag.url}"><img class="flags" src="{$flag.img}" alt="{$flag.alt}"> {$flag.title}</a>
8  {if ($smarty.foreach.f.index+1)%3 == 0}<br>{/if}
9  {/foreach}
10</div>
11{/strip}</li>
12
13{footer_script require='jquery'}{literal}
14jQuery("#languageSwitchLink").click(function() {
15        var elt = jQuery("#languageSwitchBox");
16        elt.css("left", Math.min(jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
17                .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
18                .toggle();
19});
20jQuery("#languageSwitchBox").on("mouseleave", function() {
21        jQuery(this).hide();
22});
23{/literal}{/footer_script}
24
25{* <!-- switchBox structure for theme which don't include default style --> *}
26{if $themeconf.parent != 'default' or (isset($themeconf.load_parent_local_head) and $themeconf.load_parent_local_head == false) }
27{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"default.css"}
28{/if}
29
30{* <!-- stylish for non core themes (should be removed when all themes are updated) --> *}
31{if $themeconf.name != 'clear' and $themeconf.name != 'dark' and $themeconf.name != 'elegant' and $themeconf.name != 'Sylvia'}
32{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"style.css"}
33{/if}
34
35{* <!-- common style specific for LanguageSwitch --> *}
36{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"language_switch.css"}
Note: See TracBrowser for help on using the repository browser.