Fix: Broken ajax features
This commit is contained in:
parent
d4c7f3e407
commit
6c4251fcfc
@ -167,7 +167,7 @@ var value: String;
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
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;
|
||||
|
||||
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 onClick="Dialog.closeInfo()" type="button" class="button" name="cancel" value="'.$langs->trans('Cancel').'">'."\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";
|
||||
|
||||
@ -487,7 +487,7 @@ class FormCompany
|
||||
{
|
||||
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 class="nobordernopadding" align="left" width="16">';
|
||||
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
|
||||
* \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 htmlname Name and id of field
|
||||
* \param keysearch Optional field to filter
|
||||
* \param url Full relative URL of page
|
||||
* \param option champ supplementaire de recherche dans les parametres
|
||||
* \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')
|
||||
{
|
||||
@ -63,7 +63,7 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
||||
function(){
|
||||
var myAjax = new Ajax.Updater( {
|
||||
success: \'ajdynfield'.$htmlname.'\'},
|
||||
\''.DOL_URL_ROOT.$url.'\', {
|
||||
\''.$url.'\', {
|
||||
method: \'get\',
|
||||
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 option champ supplementaire de recherche dans les parametres
|
||||
* \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')
|
||||
{
|
||||
@ -106,7 +106,7 @@ function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator=
|
||||
$script.='new Form.Element.DelayedObserver($("'.$keysearch.$htmlname.'"), 1,
|
||||
function(){
|
||||
var elementHTML = $(\''.$id.'\');
|
||||
var url = \''.DOL_URL_ROOT.$url.'\';
|
||||
var url = \''.$url.'\';
|
||||
o_options = new Object();
|
||||
o_options = {method: \'get\',parameters: "'.$keysearch.'="+$F("'.$keysearch.$htmlname.'")+"'.$option.'"};
|
||||
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 url chemin du fichier de reponse : /chemin/fichier.php
|
||||
* \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')
|
||||
{
|
||||
@ -131,7 +131,7 @@ function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
|
||||
|
||||
$script.= '<div id="result'.$htmlname.'" class="autocomplete"></div>';
|
||||
$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\',
|
||||
paramName: \''.$htmlname.'\',
|
||||
minChars: \'1\',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user