diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js index 1cdc38f02..60b186f52 100644 --- a/html/js/noalyss_script.js +++ b/html/js/noalyss_script.js @@ -4127,3 +4127,21 @@ function reconnect(){ } }); } + +/** + * @brief enlarge an INPUT TEXT + * + */ +function enlarge_text(p_domid,p_size) { + try { + var element= document.getElementById(p_domid); + if ( !element) {console.error (`enlarge text doesn't exist [${p_domid}]`)} + var current_size=parseInt(element.getAttribute('size')); + element.setAttribute('size',current_size+parseInt(p_size)); + } catch (e) { + console.error(`enlarge text fails with ${p_domid} ${p_size} `); + console.error(e.message); + } + + +} \ No newline at end of file diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index 80bec9839..6d76cf302 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -926,37 +926,41 @@ class Acc_Ledger extends jrn_def_sql $wPJ->value=(isset($e_pj))?$e_pj:$default_pj; $ret.=''; $ret.=''; - $ret.=' '._('Pièce').' : '.$wPJ->input(); - $ret.=HtmlInput::hidden('e_pj_suggest', $default_pj); - $ret.=''; + $ret.=' '._('Pièce').' '; + $ret.=td($wPJ->input()); $ret.=''; - + $ret.=''; $ret.=''; - $ret.=''; - $ret.=_('Libellé'); + $ret.=td(_('Libellé')); + $ret.=''; + $wDescription=new IText('desc'); $wDescription->readonly=$p_readonly; - $wDescription->size="50"; + $wDescription->size = (empty($desc))?60:strlen($desc)+5; + $wDescription->size = ($wDescription->size<60)?60:$wDescription->size; $wDescription->value=(isset($desc))?$desc:''; - $ret.=$wDescription->input(); + $ret.=Icon_Action::longer("desc",20); $ret.=''; $ret.=''; + // Currency + $currency_select = $this->CurrencyInput("currency_code", "p_currency_rate" , "p_currency_euro"); + $currency_select->selected=$http->request('p_currency_code','string',0); + + $currency_input=new INum("p_currency_rate"); + $currency_input->prec=6; + $currency_input->id="p_currency_rate"; + $currency_input->value=$http->request('p_currency_rate','string',1); + $ret.=tr(td(_("Devise")).td($currency_select->input(). + $currency_input->change('CurrencyComputeMisc(\'p_currency_rate\',\'p_currency_euro\');'))); + $ret.=''; + $currency=new Acc_Currency($this->db,0); $ret.=''; - // Currency - $currency_select = $this->CurrencyInput("currency_code", "p_currency_rate" , "p_currency_euro"); - $currency_select->selected=$http->request('p_currency_code','string',0); - - $currency_input=new INum("p_currency_rate"); - $currency_input->prec=6; - $currency_input->id="p_currency_rate"; - $currency_input->value=$http->request('p_currency_rate','string',1); - $ret.=_("Devise")." ".$currency_select->input(); - $ret.=$currency_input->change('CurrencyComputeMisc(\'p_currency_rate\',\'p_currency_euro\');'); - $currency=new Acc_Currency($this->db,0); - + $ret.=HtmlInput::hidden('e_pj_suggest', $default_pj); + + $nb_row=(isset($nb_item) )?$nb_item:$this->nb; diff --git a/include/class/acc_ledger_sale.class.php b/include/class/acc_ledger_sale.class.php index 9213986f8..9ca68cd19 100644 --- a/include/class/acc_ledger_sale.class.php +++ b/include/class/acc_ledger_sale.class.php @@ -1348,7 +1348,8 @@ EOF; $Commentaire = new IText(); $Commentaire->table = 0; $Commentaire->setReadOnly(false); - $Commentaire->size = 60; + $Commentaire->size = (empty($e_comm))?60:strlen($e_comm)+5; + $Commentaire->size = ($Commentaire->size<60)?60:$Commentaire->size; $Commentaire->tabindex = 3; $label = Icon_Action::infobulle(1); diff --git a/include/lib/icon_action.class.php b/include/lib/icon_action.class.php index 3d7f7afe9..6e865164a 100644 --- a/include/lib/icon_action.class.php +++ b/include/lib/icon_action.class.php @@ -447,4 +447,18 @@ class Icon_Action uniqid(),$p_js,""); return $r; } + + /** + * @brief Increase size of input_text (p_domid) with p_domid + * @param $p_domid domid of the input "text" element + * @param $p_size size of the element + * @return string HTML string + */ + static function longer($p_domid,$p_size) { + $r=sprintf('%s', + $p_domid,$p_domid,$p_size,""); + return $r; + } } diff --git a/include/operation_ods_new.inc.php b/include/operation_ods_new.inc.php index 1872c0cd4..5b5197a0b 100644 --- a/include/operation_ods_new.inc.php +++ b/include/operation_ods_new.inc.php @@ -27,7 +27,7 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); -global $g_user,$g_parameter; +global $g_user,$g_parameter,$http; $cn=Dossier::connect(); $id_predef = $http->request('p_jrn_predef','number',-1); @@ -67,6 +67,8 @@ if ( isset ($_GET['action']) && ! isset($_POST['correct']) && ! isset($correct) { $op->set_od_id($http->request('pre_def','number')); $p_post=$op->compute_array(); + // operation description are not in the same variable + $p_post['desc']=$p_post['e_comm']; } } } diff --git a/include/template/form_ledger_detail.php b/include/template/form_ledger_detail.php index 493a8e320..12ad9303b 100644 --- a/include/template/form_ledger_detail.php +++ b/include/template/form_ledger_detail.php @@ -61,10 +61,10 @@ - + - + diff --git a/scenario/icon_actionTest.php b/scenario/icon_actionTest.php index 5823bc2ab..f35ea25a9 100644 --- a/scenario/icon_actionTest.php +++ b/scenario/icon_actionTest.php @@ -107,4 +107,8 @@ include_once NOALYSS_INCLUDE."/lib/icon_action.class.php";

Option +

+

+ Increase INPUT TEXT Element +

\ No newline at end of file