aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/language_switch/flags.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/language_switch/flags.tpl')
-rw-r--r--plugins/language_switch/flags.tpl76
1 files changed, 31 insertions, 45 deletions
diff --git a/plugins/language_switch/flags.tpl b/plugins/language_switch/flags.tpl
index 3add5c1a2..e77e89668 100644
--- a/plugins/language_switch/flags.tpl
+++ b/plugins/language_switch/flags.tpl
@@ -1,50 +1,36 @@
-</ul>
-<ul class="categoryActions">
-<li class="menuf">
- <div>
- <ul>
- <li>
- <a rel="nofollow" href="#" class="activeFlag">
- <img class="flags" src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>
- </a>
-<!--[if lte IE 6]>
- <a rel="nofollow" href="#">
- <img class="flags" src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>
- <table>
- <tr>
- <td>
-<![endif]-->
- <ul class="flag-pan">
- <li class="languageSwitchBoxTitle">{'Language'|@translate}</li>
+<li>{strip}<a id="languageSwitchLink" title="{'Language'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+ <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>
+</a>
+<div id="languageSwitchBox" class="switchBox">
+ <div class="switchBoxTitle">{'Language'|@translate}</div>
+ {foreach from=$lang_switch.flags item=flag name=f}
+ <a rel="nofollow" href="{$flag.url}"><img class="flags" src="{$flag.img}" alt="{$flag.alt}"> {$flag.title}</a>
+ {if ($smarty.foreach.f.index+1)%3 == 0}<br>{/if}
+ {/foreach}
+</div>
+{/strip}</li>
-{foreach from=$lang_switch.flags key=code item=flag name=f}
- <li>
- <a rel="nofollow" href="{$flag.url}">
- <img class="flags" src="{$flag.img}" alt="{$flag.alt}" title="{$flag.alt}"/> {$flag.title}
- </a>
- </li>
-{/foreach}
+{footer_script require='jquery'}{literal}
+jQuery("#languageSwitchLink").click(function() {
+ var elt = jQuery("#languageSwitchBox");
+ elt.css("left", Math.min(jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
+ .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
+ .toggle();
+});
+jQuery("#languageSwitchBox").on("mouseleave", function() {
+ jQuery(this).hide();
+});
+{/literal}{/footer_script}
- </ul>
-<!--[if lte IE 6]>
- </td>
- </tr>
- </table>
- </a>
-<![endif]-->
- </li>
- </ul>
- </div>
-</li>
-
-{combine_css path="plugins/language_switch/language_switch-default.css"}
+{* <!-- switchBox structure for theme which don't include default style --> *}
+{if $themeconf.parent != 'default' or (isset($themeconf.load_parent_local_head) and $themeconf.load_parent_local_head == false) }
+{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"default.css"}
+{/if}
-{if $themeconf.name eq 'Sylvia'}
-{combine_css path="plugins/language_switch/language_switch-Sylvia.css"}
+{* <!-- stylish for non core themes (should be removed when all themes are updated) --> *}
+{if $themeconf.name != 'clear' and $themeconf.name != 'dark' and $themeconf.name != 'elegant' and $themeconf.name != 'Sylvia'}
+{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"style.css"}
{/if}
-{html_head}
-<!--[if lte IE 6]>
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}plugins/language_switch/language_switch-ie6.css">
-<![endif]-->
-{/html_head} \ No newline at end of file
+{* <!-- common style specific for LanguageSwitch --> *}
+{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"language_switch.css"} \ No newline at end of file