Fix for rtl languages

This commit is contained in:
Laurent Destailleur 2017-01-21 16:12:25 +01:00
parent f03ad00466
commit 3a2d9c8610
6 changed files with 18 additions and 19 deletions

View File

@ -29,17 +29,16 @@
*/
class Translate
{
var $dir; // Directories that contains /langs subdirectory
public $dir; // Directories that contains /langs subdirectory
var $defaultlang; // Current language for current user
var $direction = 'ltr'; // Left to right or Right to left
var $charset_output='UTF-8'; // Codage used by "trans" method outputs
public $defaultlang; // Current language for current user
public $charset_output='UTF-8'; // Codage used by "trans" method outputs
var $tab_translate=array(); // Array of all translations key=>value
private $_tab_loaded=array(); // Array to store result after loading each language file
public $tab_translate=array(); // Array of all translations key=>value
private $_tab_loaded=array(); // Array to store result after loading each language file
var $cache_labels=array(); // Cache for labels return by getLabelFromKey method
var $cache_currencies=array(); // Cache to store currency symbols
public $cache_labels=array(); // Cache for labels return by getLabelFromKey method
public $cache_currencies=array(); // Cache to store currency symbols

View File

@ -2504,7 +2504,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = '')
if ($titlealt == 'default') $titlealt = $langs->trans('Modify');
return img_picto($titlealt, 'edit.png', ($float ? 'style="float: right"' : $other));
return img_picto($titlealt, 'edit.png', ($float ? 'style="float: '.($langs->tab_translate["DIRECTION"] == 'rtl'?'left':'right').'"' : $other));
}
/**

View File

@ -2239,7 +2239,7 @@ else
print '<table width="100%" class="nobordernopadding"><tr><td>';
print $langs->trans('IncotermLabel');
print '<td><td align="right">';
if ($user->rights->societe->creer) print '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
if ($user->rights->societe->creer) print '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$object->id.'&action=editincoterm">'.img_edit('',1).'</a>';
else print '&nbsp;';
print '</td></tr></table>';
print '</td>';

View File

@ -5,7 +5,7 @@
print $langs->trans('SalesRepresentatives');
print '<td><td align="right">';
if ($user->rights->societe->creer && $user->rights->societe->client->voir)
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$object->id.'">'.img_edit().'</a>';
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$object->id.'">'.img_edit('',1).'</a>';
else
print '&nbsp;';
print '</td></tr></table>';

View File

@ -1244,10 +1244,10 @@ div.menu_titre {
.mainmenuaspan
{
<?php if ($disableimages) { ?>
padding-left: 4px;
padding-right: 2px;
padding-<?php print $left; ?>: 4px;
padding-<?php print $right; ?>: 2px;
<?php } else { ?>
padding-right: 4px;
padding-<?php print $right; ?>: 4px;
<?php } ?>
}
@ -2056,7 +2056,7 @@ a.tabTitle {
font-family: <?php print $fontlist ?>;
font-weight: normal !important;
padding: 4px 6px 2px 0px;
margin-right: 10px;
margin-<?php print $right; ?>: 10px;
text-decoration: none;
white-space: nowrap;
}

View File

@ -1254,10 +1254,10 @@ div.menu_titre {
.mainmenuaspan
{
<?php if ($disableimages) { ?>
padding-left: 4px;
padding-right: 2px;
padding-<?php print $left; ?>: 4px;
padding-<?php print $right; ?>: 2px;
<?php } else { ?>
padding-right: 4px;
padding-<?php print $right; ?>: 4px;
<?php } ?>
}
@ -2042,7 +2042,7 @@ a.tabTitle {
/* background: #657090;
color: white;*/
color:rgba(0,0,0,.5);
margin-right:10px;
margin-<?php print $right; ?>: 10px;
text-shadow:1px 1px 1px #ffffff;
font-family: <?php print $fontlist ?>;
font-weight: normal;