diff options
author | rub <rub@piwigo.org> | 2008-10-14 20:46:34 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2008-10-14 20:46:34 +0000 |
commit | 87689c8280371b74dafb7d68e9e28c9c59706210 (patch) | |
tree | 096c78b3116adeeb938115b72ed1d378fc41c691 | |
parent | 3be71cd5c2c7336fc8abd8daa912cc577eb09074 (diff) |
Resolved issue 0000893: 404 errors on template-common/lib/ui/i18n/ui.datepicker-en.js
Proposition of fix.
Waiting validation before merge to branch 2.0
git-svn-id: http://piwigo.org/svn/trunk@2739 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/template/goto/include/datepicker.inc.tpl | 14 | ||||
-rw-r--r-- | template/yoga/include/datepicker.inc.tpl | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/admin/template/goto/include/datepicker.inc.tpl b/admin/template/goto/include/datepicker.inc.tpl index 812bf9632..71669fde0 100644 --- a/admin/template/goto/include/datepicker.inc.tpl +++ b/admin/template/goto/include/datepicker.inc.tpl @@ -1,10 +1,22 @@ {* $Id$ *} +{php} + global $lang_info; + + $filename = get_root_url()."template-common/lib/ui/i18n/ui.datepicker-".$lang_info['code'].".js"; + + $this->assign('exist_jquery_datepicker_lang', file_exists($filename)); + $this->assign('filename_jquery_datepicker_lang', $filename); +{/php} + {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"} {known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.datepicker.packed.js"} -{known_script id="jquery.ui.datepicker-$lang_info.code" src=$ROOT_URL|@cat:"template-common/lib/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"} {known_script id="datepicker.js" src=$ROOT_URL|@cat:"template-common/datepicker.js"} +{if $exist_jquery_datepicker_lang} +{known_script id="jquery.ui.datepicker-$lang_info.code" src=$filename_jquery_datepicker_lang} +{/if} + {html_head} <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template-common/lib/ui/ui.datepicker.css"> {/html_head} diff --git a/template/yoga/include/datepicker.inc.tpl b/template/yoga/include/datepicker.inc.tpl index 871be0ea6..ef6e158d8 100644 --- a/template/yoga/include/datepicker.inc.tpl +++ b/template/yoga/include/datepicker.inc.tpl @@ -1,10 +1,22 @@ {* $Id$ *} +{php} + global $lang_info; + + $filename = get_root_url()."template-common/lib/ui/i18n/ui.datepicker-".$lang_info['code'].".js"; + + $this->assign('exist_jquery_datepicker_lang', file_exists($filename)); + $this->assign('filename_jquery_datepicker_lang', $filename); +{/php} + {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"} {known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.datepicker.packed.js"} -{known_script id="jquery.ui.datepicker-$lang_info.code" src=$ROOT_URL|@cat:"template-common/lib/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"} {known_script id="datepicker.js" src=$ROOT_URL|@cat:"template-common/datepicker.js"} +{if $exist_jquery_datepicker_lang} +{known_script id="jquery.ui.datepicker-$lang_info.code" src=$filename_jquery_datepicker_lang} +{/if} + {html_head} <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template-common/lib/ui/ui.datepicker.css"> {/html_head} |