Fix: Broken ajax features
This commit is contained in:
parent
d4c7f3e407
commit
6c4251fcfc
@ -167,7 +167,7 @@ var value: String;
|
|||||||
|
|
||||||
function InitializeSetup(): Boolean;
|
function InitializeSetup(): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := MsgBox('You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer.' #13#13 'This setup install or upgrade Dolibarr ERP-CRM and third party softwares (Apache, Mysql and PHP) configured for a Dolibarr usage.' #13#13 'If you want to share your Apache, Mysql and PHP with other projects than Dolibarr, it is recommended to make ' #13 'a manual installation of Dolibarr on your own Apache, Mysql and PHP installation.' #13#13 'Do you want to start installation/upgrade process ?', mbConfirmation, MB_YESNO) = idYes;
|
Result := MsgBox('You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer.' #13#13 'This setup install or upgrade Dolibarr ERP-CRM and third party softwares (Apache, Mysql and PHP) configured for a Dolibarr usage.' #13#13 'If you have technical knowledge and plan to share your Apache, Mysql and PHP with other projects than Dolibarr, you should not use this assistant and make a manual installation of Dolibarr on an existing Apache, Mysql and PHP installation (installed by WampServer for example).' #13#13 'Do you want to start installation/upgrade process ?', mbConfirmation, MB_YESNO) = idYes;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure InitializeWizard();
|
procedure InitializeWizard();
|
||||||
|
|||||||
@ -1405,7 +1405,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$formMarkup.= '<input type="submit" class="button" name="validate" value="'.$langs->trans('Validate').'">'."\n";
|
$formMarkup.= '<input type="submit" class="button" name="validate" value="'.$langs->trans('Validate').'">'."\n";
|
||||||
//$formMarkup.= ' <input onClick="Dialog.closeInfo()" type="button" class="button" name="cancel" value="'.$langs->trans('Cancel').'">'."\n";
|
//$formMarkup.= ' <input onClick="Dialog.closeInfo()" type="button" class="button" name="cancel" value="'.$langs->trans('Cancel').'">'."\n";
|
||||||
$formMarkup.= '</td></tr></table></form>'."\n";
|
$formMarkup.= '</td></tr></table></form>'."\n";
|
||||||
$formMarkup.= ajax_updaterWithID("rate".$i,"markup","sellingprice_ht".$i,"/product/ajaxproducts.php","&count=".$i,"working")."\n";
|
$formMarkup.= ajax_updaterWithID("rate".$i,"markup","sellingprice_ht".$i,DOL_URL_ROOT."/product/ajaxproducts.php","&count=".$i,"working")."\n";
|
||||||
|
|
||||||
|
|
||||||
print '<td align="right">'."\n";
|
print '<td align="right">'."\n";
|
||||||
|
|||||||
@ -487,7 +487,7 @@ class FormCompany
|
|||||||
{
|
{
|
||||||
print '<input type="text" size="30" id="'.$htmlname.'" name="'.$htmlname.'" value="'.$obj->nom.'" '.$htmloption.' />';
|
print '<input type="text" size="30" id="'.$htmlname.'" name="'.$htmlname.'" value="'.$obj->nom.'" '.$htmloption.' />';
|
||||||
}
|
}
|
||||||
print ajax_autocompleter(($socid?$socid:-1),$htmlname,'/societe/ajaxcompanies.php','');
|
print ajax_autocompleter(($socid?$socid:-1),$htmlname,DOL_URL_ROOT.'/societe/ajaxcompanies.php','');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nobordernopadding" align="left" width="16">';
|
print '<td class="nobordernopadding" align="left" width="16">';
|
||||||
print ajax_indicator($htmlname,'working');
|
print ajax_indicator($htmlname,'working');
|
||||||
|
|||||||
@ -32,12 +32,12 @@ function ajax_indicator($htmlname,$indicator='working')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get value of a field, do Ajax process and show result
|
* \brief Get value of a field, do Ajax process and show result
|
||||||
* \param htmlname nom et id du champ
|
* \param htmlname Name and id of field
|
||||||
* \param keysearch nom et id complementaire du champ de collecte
|
* \param keysearch Optional field to filter
|
||||||
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
* \param url Full relative URL of page
|
||||||
* \param option champ supplementaire de recherche dans les parametres
|
* \param option champ supplementaire de recherche dans les parametres
|
||||||
* \param indicator Nom de l'image gif sans l'extension
|
* \param indicator Nom de l'image gif sans l'extension
|
||||||
* \return script script complet
|
* \return string script complet
|
||||||
*/
|
*/
|
||||||
function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
|||||||
function(){
|
function(){
|
||||||
var myAjax = new Ajax.Updater( {
|
var myAjax = new Ajax.Updater( {
|
||||||
success: \'ajdynfield'.$htmlname.'\'},
|
success: \'ajdynfield'.$htmlname.'\'},
|
||||||
\''.DOL_URL_ROOT.$url.'\', {
|
\''.$url.'\', {
|
||||||
method: \'get\',
|
method: \'get\',
|
||||||
parameters: "'.$keysearch.'="+$F("'.$keysearch.$htmlname.'")+"&htmlname='.$htmlname.$option.'"
|
parameters: "'.$keysearch.'="+$F("'.$keysearch.$htmlname.'")+"&htmlname='.$htmlname.$option.'"
|
||||||
});
|
});
|
||||||
@ -82,7 +82,7 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
|||||||
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
||||||
* \param option champ supplementaire de recherche dans les parametres
|
* \param option champ supplementaire de recherche dans les parametres
|
||||||
* \param indicator Nom de l'image gif sans l'extension
|
* \param indicator Nom de l'image gif sans l'extension
|
||||||
* \return script script complet
|
* \return string script complet
|
||||||
*/
|
*/
|
||||||
function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator='working')
|
function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator='working')
|
||||||
{
|
{
|
||||||
@ -106,7 +106,7 @@ function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator=
|
|||||||
$script.='new Form.Element.DelayedObserver($("'.$keysearch.$htmlname.'"), 1,
|
$script.='new Form.Element.DelayedObserver($("'.$keysearch.$htmlname.'"), 1,
|
||||||
function(){
|
function(){
|
||||||
var elementHTML = $(\''.$id.'\');
|
var elementHTML = $(\''.$id.'\');
|
||||||
var url = \''.DOL_URL_ROOT.$url.'\';
|
var url = \''.$url.'\';
|
||||||
o_options = new Object();
|
o_options = new Object();
|
||||||
o_options = {method: \'get\',parameters: "'.$keysearch.'="+$F("'.$keysearch.$htmlname.'")+"'.$option.'"};
|
o_options = {method: \'get\',parameters: "'.$keysearch.'="+$F("'.$keysearch.$htmlname.'")+"'.$option.'"};
|
||||||
var myAjax = new Ajax.Updater(elementHTML,url,o_options);
|
var myAjax = new Ajax.Updater(elementHTML,url,o_options);
|
||||||
@ -121,7 +121,7 @@ function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator=
|
|||||||
* \param htmlname nom et id du champ
|
* \param htmlname nom et id du champ
|
||||||
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
||||||
* \param indicator nom de l'image gif sans l'extension
|
* \param indicator nom de l'image gif sans l'extension
|
||||||
* \return script script complet
|
* \return string script complet
|
||||||
*/
|
*/
|
||||||
function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
|
function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
|
||||||
{
|
{
|
||||||
@ -131,7 +131,7 @@ function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
|
|||||||
|
|
||||||
$script.= '<div id="result'.$htmlname.'" class="autocomplete"></div>';
|
$script.= '<div id="result'.$htmlname.'" class="autocomplete"></div>';
|
||||||
$script.= '<script type="text/javascript">';
|
$script.= '<script type="text/javascript">';
|
||||||
$script.= 'new Ajax.Autocompleter(\''.$htmlname.'\',\'result'.$htmlname.'\',\''.DOL_URL_ROOT.$url.'\',{
|
$script.= 'new Ajax.Autocompleter(\''.$htmlname.'\',\'result'.$htmlname.'\',\''.$url.'\',{
|
||||||
method: \'post\',
|
method: \'post\',
|
||||||
paramName: \''.$htmlname.'\',
|
paramName: \''.$htmlname.'\',
|
||||||
minChars: \'1\',
|
minChars: \'1\',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user