New: Avoid horizontal scroll on standard resolution.

This commit is contained in:
Laurent Destailleur 2012-10-15 23:13:28 +02:00
parent e34cdb76e8
commit 5dff8dbc6d
3 changed files with 7 additions and 4 deletions

View File

@ -1192,7 +1192,7 @@ function fieldList($fieldlist,$obj='',$tabname='')
if ($fieldlist[$field] == 'pays') { if ($fieldlist[$field] == 'pays') {
if (in_array('region_id',$fieldlist)) { print '<td>&nbsp;</td>'; continue; } // For region page, we do not show the country input if (in_array('region_id',$fieldlist)) { print '<td>&nbsp;</td>'; continue; } // For region page, we do not show the country input
print '<td>'; print '<td>';
print $form->select_country((! empty($obj->pays_code)?$obj->pays_code:(! empty($obj->pays)?$obj->pays:'')),'pays'); print $form->select_country((! empty($obj->pays_code)?$obj->pays_code:(! empty($obj->pays)?$obj->pays:'')), 'pays', '', 28);
print '</td>'; print '</td>';
} }
elseif ($fieldlist[$field] == 'pays_id') { elseif ($fieldlist[$field] == 'pays_id') {

View File

@ -443,9 +443,10 @@ class Form
* @param string $selected Id or Code or Label of preselected country * @param string $selected Id or Code or Label of preselected country
* @param string $htmlname Name of html select object * @param string $htmlname Name of html select object
* @param string $htmloption Options html on select object * @param string $htmloption Options html on select object
* @param string $maxlength Max length for labels (0=no limit)
* @return string HTML string with select * @return string HTML string with select
*/ */
function select_country($selected='',$htmlname='pays_id',$htmloption='') function select_country($selected='',$htmlname='pays_id',$htmloption='',$maxlength=0)
{ {
global $conf,$langs; global $conf,$langs;
@ -495,7 +496,7 @@ class Form
{ {
$out.= '<option value="'.$row['rowid'].'">'; $out.= '<option value="'.$row['rowid'].'">';
} }
$out.= $row['label']; $out.= dol_trunc($row['label'],$maxlength,'middle');
if ($row['code_iso']) $out.= ' ('.$row['code_iso'] . ')'; if ($row['code_iso']) $out.= ' ('.$row['code_iso'] . ')';
$out.= '</option>'; $out.= '</option>';
} }

View File

@ -1299,6 +1299,8 @@ Sell=Sell
InvoiceDateUsed=Invoice date used InvoiceDateUsed=Invoice date used
YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Foundation), so there is no VAT options to setup. YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Foundation), so there is no VAT options to setup.
AccountancyCode=Accountancy Code AccountancyCode=Accountancy Code
AccountancyCodeSell=Sale account. code
AccountancyCodeBuy=Purchase account. code
##### Agenda ##### ##### Agenda #####
AgendaSetup=Events and agenda module setup AgendaSetup=Events and agenda module setup
PasswordTogetVCalExport=Key to authorize export link PasswordTogetVCalExport=Key to authorize export link