From: <die...@us...> - 2011-01-21 13:40:46
|
Revision: 3257 http://openutils.svn.sourceforge.net/openutils/?rev=3257&view=rev Author: diego_schivo Date: 2011-01-21 13:40:40 +0000 (Fri, 21 Jan 2011) Log Message: ----------- PIRMEDIA-201 fallback locale Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html 2011-01-21 10:08:40 UTC (rev 3256) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html 2011-01-21 13:40:40 UTC (rev 3257) @@ -2,7 +2,7 @@ [#setting url_escaping_charset="UTF-8"] [#assign mgnlEl = this.getStatic("it.openutils.mgnlutils.el.MgnlUtilsElFunctions")] [#assign mediaEl = this.getStatic("net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl")] -[#assign i18nFactory = this.getStatic("info.magnolia.cms.i18n.I18nContentSupportFactory")] +[#assign i18nSupport = this.getStatic("info.magnolia.cms.i18n.I18nContentSupportFactory").getI18nSupport()] <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <link rel="stylesheet" type="text/css" href="${this.request.contextPath}/.resources/ext/css/ext-all.css" /> @@ -194,8 +194,8 @@ { xtype: 'panel', html: '<select style="float: right;" onchange="location.href = \'${this.request.contextPath}/.magnolia/pages/playlistView.html?path=\' + playlist.handle + \'&mgnlCK=\' + (new Date()).getTime() + \'&locale=\' + this.options[this.selectedIndex].value;">\ - [#list i18nFactory.getI18nSupport().getLocales() as locale] - <option value="${locale.language}" [#if locale.language == this.locale!'']selected="selected"[/#if]>${locale.language}</option>\ + [#list i18nSupport.getLocales() as locale] + <option value="${locale.language}" [#if (this.locale?exists && locale?string == this.locale) || (!this.locale?exists && locale == i18nSupport.fallbackLocale)]selected="selected"[/#if]>${locale.language}</option>\ [/#list] </select>' }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |