phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4404 - in phpcompta/trunk: html/js include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4404 - in phpcompta/trunk: html/js include
Date: Fri, 18 Nov 2011 14:58:20 +0100 (CET)

Author: danydb
Date: 2011-11-18 14:58:19 +0100 (Fri, 18 Nov 2011)
New Revision: 4404

Modified:
   phpcompta/trunk/html/js/anc_script.js
   phpcompta/trunk/include/class_ianccard.php
Log:
0000462: Autocompletion filter thanks  a html object

Modified: phpcompta/trunk/html/js/anc_script.js
===================================================================
--- phpcompta/trunk/html/js/anc_script.js       2011-11-18 13:48:58 UTC (rev 
4403)
+++ phpcompta/trunk/html/js/anc_script.js       2011-11-18 13:58:19 UTC (rev 
4404)
@@ -342,3 +342,16 @@
     $("pamount"+nb.value).value="0";
     nb.value++;
 }
+/**
+ address@hidden this function is called before the querystring is send to the
+ * fid2.php, add a filter based on the ledger 'p_jrn'
+ address@hidden obj is the input field
+ address@hidden queryString is the queryString to modify
+ address@hidden ICard::input
+ */
+function filter_anc(obj,queryString)
+{
+    var pa_id=obj.plan_ctl;
+    queryString=queryString+"&pa_id="+pa_id;
+    return queryString;
+}
\ No newline at end of file

Modified: phpcompta/trunk/include/class_ianccard.php
===================================================================
--- phpcompta/trunk/include/class_ianccard.php  2011-11-18 13:48:58 UTC (rev 
4403)
+++ phpcompta/trunk/include/class_ianccard.php  2011-11-18 13:58:19 UTC (rev 
4404)
@@ -47,7 +47,7 @@
     }
     /*!\brief set the javascript callback function
      * by default it is update_value called BEFORE the querystring is send
-     *
+     * If you use the plan ctl must be set to filter_anc
      *\param $p_name callback function name
      */
     function set_callback($p_name)
@@ -83,7 +83,7 @@
         if ( $this->readOnly==true) return $this->display();
 
 
-        $attr=$this->get_js_attr();
+       
 
         $label='';
         if ( $this->dblclick != '')
@@ -114,9 +114,9 @@
             $query.="&pa_id=".$this->plan;
         } elseif ( $this->plan_ctl <> '')
         {
-            $query.="&pa_ctl=".$this->plan_ctl;
+               $this->set_attribute("plan_ctl", $this->plan_ctl);
         }
-
+        $attr=$this->get_js_attr();
         $javascript=sprintf('try { new 
Ajax.Autocompleter("%s","%s_choices","ajax_misc.php?%s",'.
                             '{paramName:"anccard",minChars:1,indicator:null, '.
                             'callback:%s, '.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]