From fc6fa5ccb7ae23bee7ca82ef7aaf31e543877d0a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 15 May 2013 18:35:03 +0000 Subject: [PATCH] =?UTF-8?q?task=20#841=20:=20am=C3=A9lioration=20encodage,?= =?UTF-8?q?=20passe=20d'un=20champs=20=C3=A0=20l'autre=20avec=20TAB,=20la?= =?UTF-8?q?=20date=20a=20le=20focus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_acc_ledger.php | 3 ++- include/class_acc_ledger_fin.php | 2 +- include/class_acc_ledger_purchase.php | 4 ++++ include/class_acc_ledger_sold.php | 4 +++- include/class_html_input.php | 4 ++-- include/class_ibutton.php | 3 +++ include/class_icard.php | 2 +- include/class_itva_popup.php | 3 ++- include/compta_ven.inc.php | 1 + 9 files changed, 19 insertions(+), 7 deletions(-) diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index c74691575..4b33a76f5 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -1763,6 +1763,7 @@ class Acc_Ledger extends jrn_def_sql $w->value = (isset($jrn_concerned)) ? $jrn_concerned : ""; $ret.="Réconciliation/rapprochements : " . $w->input(); } + $ret.= create_script("$('".$wDate->id."').focus()"); return $ret; } @@ -2305,7 +2306,7 @@ class Acc_Ledger extends jrn_def_sql $value = 0; return $value; } - + /** * @brief create the invoice and saved it as attachment to the * operation, diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index 06933ed67..5a578b397 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -430,7 +430,7 @@ class Acc_Ledger_Fin extends Acc_Ledger require_once('template/form_ledger_fin.php'); $r.=ob_get_contents(); ob_end_clean(); - + $r.= create_script("$('".$Date->id."').focus()"); return $r; } diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index 61344af7e..dd2ed7dc8 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -890,11 +890,13 @@ class Acc_Ledger_Purchase extends Acc_Ledger /* Add button */ $f_add_button=new IButton('add_card'); $f_add_button->label=_('Créer une nouvelle fiche'); + $f_add_button->tabindex=-1; $f_add_button->set_attribute('ipopup','ipop_newcard'); $f_add_button->set_attribute('jrn',$this->id); $f_add_button->javascript=" this.jrn=\$('p_jrn').value;select_card_type(this);"; $f_add_button2=new IButton('add_card2'); + $f_add_button2->tabindex=-1; $f_add_button2->label=_('Créer une nouvelle fiche'); $f_add_button2->set_attribute('ipopup','ipop_newcard'); $f_add_button2->set_attribute('filter',$this->get_all_fiche_def ()); @@ -1227,6 +1229,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $r.=''; } + // set focus on date + $r.= create_script("$('".$Date->id."').focus()"); return $r; } diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index bc85b699e..2d271b7bc 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -1032,12 +1032,14 @@ class Acc_Ledger_Sold extends Acc_Ledger $flag_tva=$g_parameter->MY_TVA_USE; /* Add button */ $f_add_button=new IButton('add_card'); + $f_add_button->tabindex=-1; $f_add_button->label=_('Créer une nouvelle fiche'); $f_add_button->set_attribute('ipopup','ipop_newcard'); $f_add_button->set_attribute('jrn',$this->id); $f_add_button->javascript="this.jrn=\$('p_jrn').value; select_card_type(this);"; $f_add_button2=new IButton('add_card2'); + $f_add_button2->tabindex=-1; $f_add_button2->label=_('Créer une nouvelle fiche'); $f_add_button2->set_attribute('ipopup','ipop_newcard'); $f_add_button2->set_attribute('filter',$this->get_all_fiche_def ()); @@ -1355,7 +1357,7 @@ class Acc_Ledger_Sold extends Acc_Ledger $r.=HtmlInput::hidden('jrn_type','VEN'); $r.=HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_add_row()"'); - + $r.= create_script("$('".$Date->id."').focus()"); return $r; } diff --git a/include/class_html_input.php b/include/class_html_input.php index 5e61ba443..05ff0d937 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -219,12 +219,12 @@ class HtmlInput } static function infobulle($p_comment) { - $r='?'; + $r='?'; return $r; } static function warnbulle($p_comment) { - $r='Δ'; + $r='Δ'; return $r; } /** diff --git a/include/class_ibutton.php b/include/class_ibutton.php index 6d0e0025c..fb67950b2 100644 --- a/include/class_ibutton.php +++ b/include/class_ibutton.php @@ -36,8 +36,10 @@ class IButton extends HtmlInput if ( $this->readOnly==true) return $this->display(); $extra= ( isset($this->extra))?$this->extra:""; $this->id=($this->id=="")?$this->name:$this->id; + $tab=(isset($this->tabindex))?' tabindex="'.$this->tabindex.'"':""; $r=''; @@ -46,6 +48,7 @@ class IButton extends HtmlInput return $r; } + /*!\brief print in html the readonly value of the widget*/ public function display() { diff --git a/include/class_icard.php b/include/class_icard.php index be8958f06..6f78ccef0 100644 --- a/include/class_icard.php +++ b/include/class_icard.php @@ -299,7 +299,7 @@ class ICard extends HtmlInput else $a.="this.inp='".$this->name."';"; $a.="this.popup='ipop_card';"; - + $button->tabindex=-1; $button->javascript=$a.' search_card(this)'; return $button->input(); } diff --git a/include/class_itva_popup.php b/include/class_itva_popup.php index a5e17ccf7..bf7df5b66 100644 --- a/include/class_itva_popup.php +++ b/include/class_itva_popup.php @@ -80,7 +80,7 @@ class ITva_Popup extends HtmlInput if ( $this->readOnly==true) return $this->display(); - $str=''; + $str=''; $r=sprintf($str,$this->name,$this->value,$this->id,$this->js); if ($this->in_table) @@ -128,6 +128,7 @@ class ITva_Popup extends HtmlInput // button $bt=new IButton('bt_'.$this->id); + $bt->tabindex="-1"; $bt->label=_(' TVA '); $bt->set_attribute('gDossier',dossier::id()); $bt->set_attribute('ctl',$this->id); diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index c993ea9ef..444cb0f8a 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -257,6 +257,7 @@ global $g_parameter; { echo create_script(" get_last_date()"); } + exit();