From 5ef37efcb0cbfe86bff34510c874a33f7ab8d9e1 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Tue, 29 May 2007 19:56:43 +0000 Subject: [PATCH] Add ajax function --- html/commercial.php | 7 +++++-- html/fid.php | 27 +++++++++++++++++++++++++++ html/index.php | 2 +- html/style-light.css | 5 ++++- html/user_jrn.php | 2 +- include/class_widget.php | 17 +++++++++++------ include/constant.php | 9 ++++----- 7 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 html/fid.php diff --git a/html/commercial.php b/html/commercial.php index c1648590f..f7053a75e 100644 --- a/html/commercial.php +++ b/html/commercial.php @@ -76,8 +76,8 @@ echo "

Commercial ".$_SESSION['g_name']." "; echo '
- - + + @@ -138,6 +138,7 @@ if ( $p_action == 'suivi_courrier') //----------------------------------------------------- if ( $p_action == "facture" ) { + echo JS_AJAX_FICHE; require_once("facture.inc.php"); } //----------------------------------------------------- @@ -150,6 +151,7 @@ if ( $p_action == 'contact') // Expense if ( $p_action == 'depense') { + echo JS_AJAX_FICHE; require_once("depense.inc.php"); } //----------------------------------------------------- @@ -162,6 +164,7 @@ if ( $p_action == 'admin') // Banque if ( $p_action == 'bank') { + echo JS_AJAX_FICHE; require_once("bank.inc.php"); } //----------------------------------------------------- diff --git a/html/fid.php b/html/fid.php new file mode 100644 index 000000000..ea2cf0673 --- /dev/null +++ b/html/fid.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/html/index.php b/html/index.php index 9a32d0b83..e4120d65f 100644 --- a/html/index.php +++ b/html/index.php @@ -76,7 +76,7 @@ BODY { -Version 2.3.2 +Version 2.3.3-cvs

Il est conseillé de ne PAS utiliser Internet Explorer.

diff --git a/html/style-light.css b/html/style-light.css index a812f1e77..c66f7e963 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -199,7 +199,10 @@ span.even { background-color:#DDE6FF; display:block; } - +span.error { + background-color:white; + font-color:red; +} tr.odd { background-color:#DDE6FF; font-size:10px; diff --git a/html/user_jrn.php b/html/user_jrn.php index 015278916..60eb4461c 100644 --- a/html/user_jrn.php +++ b/html/user_jrn.php @@ -90,7 +90,7 @@ if ( $p_jrn != -1 ) $g_dossier=$_SESSION['g_dossier']; $g_user=$_SESSION['g_user']; - +echo JS_AJAX_FICHE; // Execute Action for p_jrn if ( $jrn_type=='VEN' ) require('user_action_ven.php'); if ( $jrn_type=='ACH' ) require('user_action_ach.php'); diff --git a/include/class_widget.php b/include/class_widget.php index c780655c8..0d181079f 100644 --- a/include/class_widget.php +++ b/include/class_widget.php @@ -124,8 +124,9 @@ class widget { $disabled = $this->disabled ? "DISABLED" : ""; if (strtoupper($this->type)=="TEXT") { if ( $this->readonly==false) { - $r="name\" VALUE=\"$this->value\" SIZE=\"$this->size\" ".$disabled.">";} else { - $r=sprintf('%s', $this->value,$this->name,$this->value); + $r="name\" NAME=\"$this->name\" VALUE=\"$this->value\" SIZE=\"$this->size\" ".$disabled.">"; + } else { + $r=sprintf('%s', $this->value,$this->name,$this->name,$this->value); } if ($this->table==1) { @@ -148,7 +149,7 @@ class widget { if ($this->readonly==false ) { //echo "Selected ".$this->selected; - $r="name\" NAME=\"$this->name\">"; for ( $i=0;$ivalue);$i++) { $checked=($this->selected==$this->value[$i]['value'])?"SELECTED":""; @@ -381,8 +382,8 @@ class widget { - - %s + %s + ', $l_sessid, @@ -395,7 +396,11 @@ class widget { $this->extra2, $this->label, $this->name, - $this->value + $this->name, + $this->value, + $this->name, + $this->extra, //deb or cred + $this->extra2 //jrn ); } else { // readonly == true diff --git a/include/constant.php b/include/constant.php index 102c5dc1f..e52a7d284 100644 --- a/include/constant.php +++ b/include/constant.php @@ -35,7 +35,7 @@ define ("DEBUG","true"); // action // access aux journaux define ("ENCJRN",1); -// création facture +// cr�ation facture // define("FACT",2); // lecture aux fiche define ("FICHE_READ",3); @@ -47,11 +47,11 @@ define("FORM",5); define ("MPCMN",6); // Gestion des journaux define ("GJRN",7); -// Gestion des paramètres globaux +// Gestion des param�tres globaux define ("PARM",8); // Voir la balance des compte define ("BALANCE",20); -// Access à la centralisation +// Access � la centralisation define ("CENTRALIZE",10); define ("VEN",11); define ("BQE",12); @@ -156,8 +156,6 @@ define ("JS_UPDATE_PCMN", define ("JS_SEARCH_CARD"," - - "); // concerned operation define ("JS_CONCERNED_OP",' @@ -203,6 +201,7 @@ function ChangeTVA(p_ctl,p_value) { } "); +define ("JS_AJAX_FICHE",''); // Sql string define ("SQL_LIST_ALL_INVOICE","");