// Improve multishop ergonomy (you edit this field for) on languages fields

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8136 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-22 09:33:16 +00:00
parent ae6350fabf
commit 4e0b3ed2f7
6 changed files with 35 additions and 27 deletions
+18
View File
@@ -65,6 +65,24 @@ echo '
color:'.(Tools::getBrightness(empty(Context::getContext()->employee->bo_color) ? '#FFFFFF' : Context::getContext()->employee->bo_color) < 128 ? 'white' : '#383838').'
}
</style>
<script type="text/javascript">
$().ready(function()
{
var hints = $(\'.translatable span.hint\');
';
if (Shop::isMultiShopActivated())
{
if (Context::shop() == Shop::CONTEXT_ALL)
$youEditFieldFor = translate('A modification of this field will be applied for all shops');
else if (Context::shop() == Shop::CONTEXT_GROUP)
$youEditFieldFor = sprintf(translate('A modification of this field will be applied for all shops of group %s'), '<b>'.Context::getContext()->shop->getGroup()->name.'</b>');
else
$youEditFieldFor = sprintf(translate('A modification of this field will be applied for the shop %s'), '<b>'.Context::getContext()->shop->name.'</b>');
echo 'hints.html(hints.html()+\'<br /><span class="red">'.addslashes($youEditFieldFor).'</span>\');';
}
echo '
});
</script>
</head>
<body '.((!empty(Context::getContext()->employee->bo_color)) ? 'style="background:'.Tools::htmlentitiesUTF8(Context::getContext()->employee->bo_color).'"' : '').'>
<div id="top_container">