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

This commit is contained in:
rMalie
2011-08-22 09:33:16 +00:00
parent 86e9932a44
commit e64eb39f48
6 changed files with 35 additions and 27 deletions

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">