[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4399 - phpcompta/trunk/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4399 - phpcompta/trunk/include |
Date: |
Fri, 18 Nov 2011 14:39:39 +0100 (CET) |
Author: danydb
Date: 2011-11-18 14:39:39 +0100 (Fri, 18 Nov 2011)
New Revision: 4399
Modified:
phpcompta/trunk/include/ajax_auto_anc_card.php
phpcompta/trunk/include/class_anc_print.php
phpcompta/trunk/include/class_ianccard.php
Log:
0000462: Autocompletion pour les postes analytiques mod ajax_misc.php
Modified: phpcompta/trunk/include/ajax_auto_anc_card.php
===================================================================
--- phpcompta/trunk/include/ajax_auto_anc_card.php 2011-11-18 13:30:04 UTC
(rev 4398)
+++ phpcompta/trunk/include/ajax_auto_anc_card.php 2011-11-18 13:39:39 UTC
(rev 4399)
@@ -5,8 +5,16 @@
$user=new User($cn);
$user->Check();
$user->check_dossier($_GET['gDossier']);
-$res=$cn->exec_sql("select po_id,po_description from poste_analytique where
pa_id=$1 ~* and (po_description ~*$2 or po_id ~* $3 limit 8",
+if ( isset($_REQUEST['pa_id']) )
+{
+ $res=$cn->exec_sql("select po_id,po_description from poste_analytique
where pa_id=$1 ~* and (po_description ~*$2 or po_id ~* $3 order by po_id limit
12",
array($_REQUEST['pa_id'],$_POST['anccard'],$_POST['anccard']));
+}
+else
+{
+ $res=$cn->exec_sql("select po_id,po_description from poste_analytique
where po_description ~*$2 or po_id ~* $3 order by po_id limit 12 ",
+ array($_POST['anccard'],$_POST['anccard']));
+}
$nb=Database::num_row($res);
echo "<ul>";
for ($i = 0;$i< $nb;$i++)
Modified: phpcompta/trunk/include/class_anc_print.php
===================================================================
--- phpcompta/trunk/include/class_anc_print.php 2011-11-18 13:30:04 UTC (rev
4398)
+++ phpcompta/trunk/include/class_anc_print.php 2011-11-18 13:39:39 UTC (rev
4399)
@@ -109,7 +109,7 @@
$from_poste->plan_ctl='pa_id';
$from_poste->value=$this->from_poste;
- $to_poste=new IText('to_poste','to_poste');
+ $to_poste=new IAncCard('to_poste','to_poste');
$to_poste->value=$this->to_poste;
$to_poste->size=10;
@@ -128,16 +128,14 @@
$plan_id->selected=$this->pa_id;
$r.=_( "Plan Analytique :").$plan_id->input();
- $poste=new IText();
- $poste->size=10;
- $r.=_("Entre l'activité
").$poste->input("from_poste",$this->from_poste);
+ $r.=_("Entre l'activité ").$from_poste->input();
$choose=new IButton();
$choose->name=_("Choix Poste");
$choose->label=_("Recherche");
$choose->javascript="onClick=search_ca(".dossier::id().",'from_poste','pa_id')";
$r.=$choose->input();
- $r.=_(" et l'activité ").$poste->input("to_poste",$this->to_poste);
+ $r.=_(" et l'activité ").$to_poste->input();
$choose->javascript="onClick=search_ca(".dossier::id().",'to_poste','pa_id')";
$r.=$choose->input();
$r.='<span class="notice" style="display:block">'._('Selectionnez le
plan qui vous intéresse avant de cliquer sur Recherche').'</span>';
Modified: phpcompta/trunk/include/class_ianccard.php
===================================================================
--- phpcompta/trunk/include/class_ianccard.php 2011-11-18 13:30:04 UTC (rev
4398)
+++ phpcompta/trunk/include/class_ianccard.php 2011-11-18 13:39:39 UTC (rev
4399)
@@ -118,7 +118,7 @@
}
$javascript=sprintf('try { new
Ajax.Autocompleter("%s","%s_choices","ajax_misc.php?%s",'.
- '{paramName:"anccard",minChars:2,indicator:null, '.
+ '{paramName:"anccard",minChars:1,indicator:null, '.
'callback:%s, '.
' afterUpdateElement:%s});} catch
(e){alert(e.message);};',
$this->name,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4399 - phpcompta/trunk/include,
phpcompta-dev <=