source: branches/2.5/plugins/language_switch/flags.tpl @ 21357

Last change on this file since 21357 was 21357, checked in by mistic100, 11 years ago

Merged revision(s) 21356 from trunk:
[language_switch] update css overload

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1<li id="languageSwitch">{strip}<a id="languageSwitchLink" title="{'Language'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
2  <span class="pwg-icon flags langflag-{$lang_switch.Active.code}">&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}">
8    {if $lang_info.direction=="ltr"}<span class="pwg-icon flags langflag-{$flag.code}">{$flag.alt}</span>{$flag.title}{else}{$flag.title}<span class="pwg-icon flags langflag-{$flag.code}">{$flag.alt}</span>{/if}
9  </a>
10  {if ($smarty.foreach.f.index+1)%3 == 0}<br>{/if}
11  {/foreach}
12</div>
13{/strip}</li>
14
15{footer_script require='jquery'}{literal}
16jQuery("#languageSwitchLink").click(function() {
17        var elt = jQuery("#languageSwitchBox");
18        elt.css("left", Math.min(jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
19                .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
20                .toggle();
21});
22jQuery("#languageSwitchBox").on("mouseleave", function() {
23        jQuery(this).hide();
24});
25{/literal}{/footer_script}
26
27{* <!-- stylish for themes missing .switchBox styles --> *
28{if $LANGUAGE_SWITCH_LOAD_STYLE}
29{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"style.css"}
30{/if}
31
32{* <!-- common style specific for LanguageSwitch --> *}
33{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"language_switch.css"}
Note: See TracBrowser for help on using the repository browser.