Fix: Pb in price level management

This commit is contained in:
Laurent Destailleur 2009-03-28 19:11:38 +00:00
parent 53cf18e3e8
commit e9aae286cd
2 changed files with 50 additions and 45 deletions

View File

@ -18,16 +18,16 @@
*/
/**
\file htdocs/lib/agenda.lib.php
\brief Ensemble de fonctions de base de dolibarr sous forme d'include
\version $Id$
*/
* \file htdocs/lib/agenda.lib.php
* \brief Ensemble de fonctions de base de dolibarr sous forme d'include
* \version $Id$
*/
/**
\brief Show actions to do array
\param max Max nb of records
*/
* \brief Show actions to do array
* \param max Max nb of records
*/
function show_array_actions_to_do($max=5)
{
global $langs, $conf, $user, $db, $bc, $socid;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Regis Houssin <regis@dolibarr.fr>
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,8 +16,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see http://www.gnu.org/
*
* $Id$
*/
/**
* \file htdocs/lib/agenda.lib.php
* \brief Page called by Ajax request for produts
* \version $Id$
*/
function ajax_indicator($htmlname,$indicator='working')
@ -27,14 +31,14 @@ function ajax_indicator($htmlname,$indicator='working')
}
/**
\brief Recupere la valeur d'un champ, effectue un traitement Ajax et affiche le resultat
\param htmlname nom et id du champ
\param keysearch nom et id complementaire du champ de collecte
\param url chemin du fichier de reponse : /chemin/fichier.php
\param option champ supplementaire de recherche dans les parametres
\param indicator Nom de l'image gif sans l'extension
\return script script complet
*/
* \brief Recupere la valeur d'un champ, effectue un traitement Ajax et affiche le resultat
* \param htmlname nom et id du champ
* \param keysearch nom et id complementaire du champ de collecte
* \param url chemin du fichier de reponse : /chemin/fichier.php
* \param option champ supplementaire de recherche dans les parametres
* \param indicator Nom de l'image gif sans l'extension
* \return script script complet
*/
function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
{
$script = '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'" value="">';
@ -54,6 +58,7 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
}
};';
$script.='Ajax.Responders.register(myIndicator'.$htmlname.');';
//print 'param='.$keysearch.'="+$F("'.$keysearch.$htmlname.'")+"&htmlname='.$htmlname.$option; exit;
$script.='new Form.Element.Observer($("'.$keysearch.$htmlname.'"), 1,
function(){
var myAjax = new Ajax.Updater( {
@ -70,15 +75,15 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
}
/**
\brief Récupére la valeur d'un champ, effectue un traitement Ajax et affiche le résultat
\param htmlname nom et id du champ
\param keysearch nom et id complémentaire du champ de collecte
\param id ID du champ a modifier
\param url chemin du fichier de réponse : /chemin/fichier.php
\param option champ supplémentaire de recherche dans les paramétres
\param indicator Nom de l'image gif sans l'extension
\return script script complet
*/
* \brief Get value of a field, do Ajax process and show result
* \param htmlname nom et id du champ
* \param keysearch nom et id complementaire du champ de collecte
* \param id ID du champ a modifier
* \param url chemin du fichier de reponse : /chemin/fichier.php
* \param option champ supplementaire de recherche dans les parametres
* \param indicator Nom de l'image gif sans l'extension
* \return script script complet
*/
function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator='working')
{
$script = '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'" value="">';
@ -112,12 +117,12 @@ function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator=
}
/**
\brief Récupére la valeur d'un champ, effectue un traitement Ajax et affiche le résultat
\param htmlname nom et id du champ
\param url chemin du fichier de réponse : /chemin/fichier.php
\param indicator nom de l'image gif sans l'extension
\return script script complet
*/
* \brief Get vlaue of field, do Ajax process and return result
* \param htmlname nom et id du champ
* \param url chemin du fichier de reponse : /chemin/fichier.php
* \param indicator nom de l'image gif sans l'extension
* \return script script complet
*/
function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
{
if ($indicator) $script.= ajax_indicator($htmlname,$indicator);