Simplification des options activation ajax/javascript
This commit is contained in:
parent
ff3306bb4c
commit
7288c61ac8
@ -228,7 +228,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("Country").'</td><td>';
|
||||
$form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript?' onChange="company_save_refresh()"':''));
|
||||
$form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript_ajax?' onChange="company_save_refresh()"':''));
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
@ -632,7 +632,7 @@ else
|
||||
}
|
||||
|
||||
// TVA
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "\n";
|
||||
print '<script language="JavaScript" type="text/javascript">';
|
||||
@ -654,7 +654,7 @@ else
|
||||
$s.='<input type="hidden" name="tva_intra_code" size="1" maxlength="2" value="'.$code.'">';
|
||||
$s.='<input type="hidden" name="tva_intra_num" size="12" maxlength="18" value="'.$num.'">';
|
||||
$s.=' ';
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
$s.='<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra_code.value,document.formsoc.tva_intra_num.value);" alt="'.$langs->trans("VATIntraCheckableOnEUSite").'">'.$langs->trans("VATIntraCheck").'</a>';
|
||||
print $form->textwithhelp($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
|
||||
|
||||
@ -50,7 +50,6 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
||||
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"]);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"]);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"]);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_AJAX", $_POST["main_disable_ajax"]);
|
||||
dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["main_confirm_ajax"]);
|
||||
dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["main_popup_calendar"]);
|
||||
dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"]);
|
||||
@ -134,15 +133,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Désactiver ajax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableAjax").'</td><td>';
|
||||
print $html->selectyesno('main_disable_ajax',isset($conf->global->MAIN_DISABLE_AJAX)?$conf->global->MAIN_DISABLE_AJAX:1,1);
|
||||
print ' ('.$langs->trans("AutomaticIfJavascriptDisabled").')';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Confirmation par popup ajax
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
@ -268,12 +258,6 @@ else
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td></tr>";
|
||||
|
||||
// Disable ajax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableAjax").'</td><td>';
|
||||
if ($conf->global->MAIN_DISABLE_JAVASCRIPT) print $langs->trans("Yes").' ('.$langs->trans("JavascriptDisabled").')';
|
||||
else print yn(isset($conf->global->MAIN_DISABLE_AJAX)?$conf->global->MAIN_DISABLE_AJAX:1)."</td></tr>";
|
||||
|
||||
// Confirm ajax
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
|
||||
@ -248,7 +248,7 @@ print '<td>';
|
||||
|
||||
$rangLast = 0;
|
||||
$idLast = -1;
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<script src="menu.js" type="text/javascript"></script>';
|
||||
}
|
||||
@ -260,7 +260,7 @@ function affiche($tab,$rang)
|
||||
{
|
||||
global $rangLast, $idLast, $menu_handler;
|
||||
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
if($rang == $rangLast)
|
||||
{
|
||||
|
||||
@ -213,7 +213,7 @@ print "<form method=\"post\" action=\"produit.php\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"usesearchtoselectproduct\">";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$langs->trans("UseSearchToSelectProduct").'</td>';
|
||||
if (! $conf->use_ajax)
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
print '<td nowrap="nowrap" align="right" colspan="2">';
|
||||
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
||||
|
||||
@ -257,7 +257,7 @@ print "<form method=\"post\" action=\"societe.php\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"usesearchtoselectcompany\">";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="80%">'.$langs->trans("UseSearchToSelectCompany").'</td>';
|
||||
if (! $conf->use_ajax)
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
print '<td nowrap="nowrap" align="right" colspan="2">';
|
||||
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
||||
|
||||
@ -120,7 +120,7 @@ $cate_arbo = $c->get_full_arbo($_GET['type']);
|
||||
*/
|
||||
|
||||
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("CategoriesTree").'</td>';
|
||||
|
||||
@ -230,9 +230,9 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$livraison->cp.'"';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
print '>';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Town').'</td><td><input type="text" name="ville" value="'.$livraison->ville.'"></td></tr>';
|
||||
|
||||
@ -335,9 +335,9 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$livraison->cp.'"';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
print '>';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Town').'</td><td><input type="text" name="ville" value="'.$livraison->ville.'"></td></tr>';
|
||||
|
||||
@ -1161,7 +1161,7 @@ if ($_GET['propalid'] > 0)
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
if ($conf->global->PRODUIT_USE_MARKUP && $conf->use_ajax)
|
||||
if ($conf->global->PRODUIT_USE_MARKUP && $conf->use_javascript_ajax)
|
||||
{
|
||||
$formMarkup = '<form id="formMarkup" action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'" method="post">'."\n";
|
||||
$formMarkup.= '<table class="border" width="100%">'."\n";
|
||||
@ -1268,7 +1268,7 @@ if ($_GET['propalid'] > 0)
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&lineid='.$objp->rowid.'&action=confirm_deleteline&confirm=yes';
|
||||
print '<a href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteProductLine').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'deleteline'.$i.'\')">';
|
||||
@ -1548,7 +1548,7 @@ if ($_GET['propalid'] > 0)
|
||||
$form_close.= '</td></tr>';
|
||||
$form_close.= '<tr><td align="center" colspan="2">';
|
||||
$form_close.= '<input type="submit" class="button" name="validate" value="'.$langs->trans('Validate').'">';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$form_close.= ' <input onClick="Dialog.closeInfo()" type="button" class="button" name="cancel" value="'.$langs->trans('Cancel').'">';
|
||||
}
|
||||
@ -1577,7 +1577,7 @@ if ($_GET['propalid'] > 0)
|
||||
if ($propal->statut == 0 && $propal->total_ttc > 0 && $user->rights->propale->valider)
|
||||
{
|
||||
print '<a class="butAction" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=confirm_validate&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmValidateProp').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'validate\')"';
|
||||
@ -1614,7 +1614,7 @@ if ($_GET['propalid'] > 0)
|
||||
print '</div>'."\n";
|
||||
|
||||
print '<a class="butAction" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
print 'href="#" onClick="dialogInfo($(\'confirm_close\').innerHTML)"'."\n";
|
||||
}
|
||||
@ -1629,7 +1629,7 @@ if ($_GET['propalid'] > 0)
|
||||
if ($propal->statut == 0 && $user->rights->propale->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=confirm_delete&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteProp').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"';
|
||||
|
||||
@ -1425,7 +1425,7 @@ else
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$objp->rowid.'&action=confirm_deleteline&confirm=yes';
|
||||
print '<a href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteProductLine').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'deleteline'.$i.'\')">';
|
||||
@ -1657,7 +1657,7 @@ else
|
||||
if ($commande->statut == 0 && $commande->total_ttc > 0 && $user->rights->commande->valider)
|
||||
{
|
||||
print '<a class="butAction" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
// on v<>rifie si la commande est en num<75>rotation provisoire
|
||||
$ref = substr($commande->ref, 1, 4);
|
||||
@ -1727,7 +1727,7 @@ else
|
||||
if ($user->rights->commande->cloturer)
|
||||
{
|
||||
print '<a class="butAction" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_close&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmCloseOrder').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'close\')"';
|
||||
@ -1747,7 +1747,7 @@ else
|
||||
if ($user->rights->commande->annuler && $nb_expedition == 0)
|
||||
{
|
||||
print '<a class="butActionDelete" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_cancel&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmCancelOrder').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'cancel\')"';
|
||||
@ -1764,7 +1764,7 @@ else
|
||||
if ($commande->statut == 0 && $user->rights->commande->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_delete&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteOrder').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"';
|
||||
|
||||
@ -407,7 +407,7 @@ class CommonObject
|
||||
// On recherche les societes
|
||||
$sql = "SELECT s.rowid, s.nom FROM";
|
||||
$sql .= " ".MAIN_DB_PREFIX."societe as s";
|
||||
if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
{
|
||||
$sql.= " WHERE rowid = ".$selected;
|
||||
}
|
||||
@ -416,7 +416,7 @@ class CommonObject
|
||||
$resql = $object->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
{
|
||||
$langs->load("companies");
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
@ -365,17 +365,11 @@ class Conf
|
||||
$this->use_preview_tabs=1;
|
||||
if (isset($this->global->MAIN_USE_PREVIEW_TABS)) $this->use_preview_tabs=$this->global->MAIN_USE_PREVIEW_TABS;
|
||||
|
||||
// conf->use_javascript
|
||||
$this->use_javascript=1;
|
||||
if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript=! $this->global->MAIN_DISABLE_JAVASCRIPT;
|
||||
|
||||
// conf->use_ajax
|
||||
$this->use_ajax=0; // No Ajax by default
|
||||
if (isset($this->global->MAIN_DISABLE_AJAX)) $this->use_ajax=! $this->global->MAIN_DISABLE_AJAX;
|
||||
// If no Javascript, Ajax is disabled.
|
||||
if (! $this->use_javascript) $this->use_ajax=0;
|
||||
// If no Ajax, Ajax features are disabled.
|
||||
if (! $this->use_ajax)
|
||||
// conf->use_javascript_ajax
|
||||
$this->use_javascript_ajax=1;
|
||||
if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript_ajax=! $this->global->MAIN_DISABLE_JAVASCRIPT;
|
||||
// If no javascript_ajax, Ajax features are disabled.
|
||||
if (! $this->use_javascript_ajax)
|
||||
{
|
||||
$this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
|
||||
$this->global->MAIN_CONFIRM_AJAX=0;
|
||||
|
||||
@ -43,12 +43,12 @@ $langs->load("interventions");
|
||||
|
||||
$fichinterid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
|
||||
// S<EFBFBD>curit<EFBFBD> d'acc<63>s client et commerciaux
|
||||
// Securite d'acces client et commerciaux
|
||||
$socid = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter');
|
||||
|
||||
//R<EFBFBD>cup<EFBFBD>re le r<>sultat de la recherche Ajax
|
||||
//Recupere le resultat de la recherche Ajax
|
||||
//Todo: voir pour le supprimer par la suite
|
||||
if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['socid_id'])
|
||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['socid_id'])
|
||||
{
|
||||
$_POST['socid'] = $_POST['socid_id'];
|
||||
}
|
||||
@ -695,7 +695,7 @@ elseif ($_GET["id"] > 0)
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||
{
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&ligne='.$objp->rowid.'&action=confirm_deleteline&confirm=yes';
|
||||
print '<a href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteInterventionLine').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'deleteline'.$i.'\')">';
|
||||
@ -861,7 +861,7 @@ elseif ($_GET["id"] > 0)
|
||||
if ($fichinter->statut == 0 && $user->rights->ficheinter->creer)
|
||||
{
|
||||
print '<a class="butAction" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&action=confirm_validate&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmValidateIntervention').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'validate\')"';
|
||||
@ -877,7 +877,7 @@ elseif ($_GET["id"] > 0)
|
||||
if ($fichinter->statut == 0 && $user->rights->ficheinter->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&action=confirm_delete&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans("ConfirmDeleteIntervention").'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"';
|
||||
|
||||
@ -86,7 +86,7 @@ class Form
|
||||
$htmltext=ereg_replace("'","\'",$htmltext);
|
||||
$htmltext=ereg_replace("'","\'",$htmltext);
|
||||
|
||||
if ($conf->use_ajax && $tooltipon == 4)
|
||||
if ($conf->use_javascript_ajax && $tooltipon == 4)
|
||||
{
|
||||
$s = '<div id="tip'.$i.'">'."\n";
|
||||
$s.= $text;
|
||||
@ -101,7 +101,7 @@ class Form
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
$htmltext=eregi_replace('"',"\'",$htmltext);
|
||||
if ($tooltipon==1 || $tooltipon==3)
|
||||
@ -378,7 +378,8 @@ class Form
|
||||
$sql = "SELECT rowid, code, libelle, active";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_pays";
|
||||
$sql.= " WHERE active = 1";
|
||||
if ($conf->use_ajax && $conf->global->CODE_DE_TEST == 1)
|
||||
// \TODO A virer
|
||||
if ($conf->use_javascript_ajax && $conf->global->CODE_DE_TEST)
|
||||
{
|
||||
if (is_numeric($selected))
|
||||
{
|
||||
@ -394,7 +395,8 @@ class Form
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($conf->use_ajax && $conf->global->CODE_DE_TEST == 1)
|
||||
// \TODO A virer
|
||||
if ($conf->use_javascript_ajax && $conf->global->CODE_DE_TEST)
|
||||
{
|
||||
$langs->load("companies");
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
@ -681,7 +683,7 @@ class Form
|
||||
$sql = "SELECT s.rowid, s.nom FROM";
|
||||
$sql.= " ".MAIN_DB_PREFIX ."societe as s";
|
||||
if ($filter) $sql.= " WHERE ".$filter;
|
||||
if ($selected && $conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
if ($selected && $conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
{
|
||||
if ($filter)
|
||||
{
|
||||
@ -699,7 +701,7 @@ class Form
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT)
|
||||
{
|
||||
$socid = 0;
|
||||
if ($selected)
|
||||
@ -1072,7 +1074,7 @@ class Form
|
||||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
|
||||
if ($conf->use_ajax)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
if (! $num)
|
||||
{
|
||||
@ -1227,7 +1229,7 @@ class Form
|
||||
|
||||
$num = $this->db->num_rows($result);
|
||||
|
||||
if ($conf->use_ajax)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
if (! $num)
|
||||
{
|
||||
@ -2767,7 +2769,7 @@ class Form
|
||||
/*
|
||||
* Affiche date en popup
|
||||
*/
|
||||
if ($conf->use_javascript && $conf->use_popup_calendar)
|
||||
if ($conf->use_javascript_ajax && $conf->use_popup_calendar)
|
||||
{
|
||||
//print "e".$set_time." t ".$conf->format_date_short;
|
||||
if ($set_time > 0)
|
||||
@ -2818,7 +2820,7 @@ class Form
|
||||
/*
|
||||
* Affiche date en select
|
||||
*/
|
||||
if (! $conf->use_javascript || ! $conf->use_popup_calendar)
|
||||
if (! $conf->use_javascript_ajax || ! $conf->use_popup_calendar)
|
||||
{
|
||||
/*
|
||||
if ($set_time == -1)
|
||||
|
||||
@ -124,7 +124,7 @@ class ModeleBoxes
|
||||
print '<td';
|
||||
if ($nbcol > 0) { print ' colspan="'.$nbcol.'"'; }
|
||||
print '>';
|
||||
if ($conf->use_ajax)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td align="left">';
|
||||
}
|
||||
@ -138,7 +138,7 @@ class ModeleBoxes
|
||||
{
|
||||
print ' <a href="'.$head['sublink'].'" target="_new">'.img_picto($head['subtext'],$head['subpicto']).'</a>';
|
||||
}
|
||||
if ($conf->use_ajax)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '</td><td class="nocellnopadd" width="14">';
|
||||
print img_picto($langs->trans("MoveBox",$this->box_id),'uparrow','style="cursor:move;"');
|
||||
|
||||
@ -183,7 +183,7 @@ class MenuLeft {
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewThirdParty"));
|
||||
if (! $conf->use_javascript) $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual"));
|
||||
if (! $conf->use_javascript_ajax) $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual"));
|
||||
}
|
||||
|
||||
if(is_dir("societe/groupe"))
|
||||
|
||||
@ -619,7 +619,7 @@ if (sizeof($boxarray))
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
if ($conf->use_ajax)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "\n";
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
|
||||
@ -80,7 +80,7 @@ require_once("master.inc.php");
|
||||
// Chargement des includes complementaire de presentation
|
||||
if (! defined('NOREQUIREMENU')) require_once(DOL_DOCUMENT_ROOT ."/menu.class.php");
|
||||
if (! defined('NOREQUIREHTML')) require_once(DOL_DOCUMENT_ROOT ."/html.form.class.php");
|
||||
if (! defined('NOREQUIREAJAX') && $conf->use_ajax) require_once(DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php');
|
||||
if (! defined('NOREQUIREAJAX') && $conf->use_javascript_ajax) require_once(DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php');
|
||||
|
||||
// Init session
|
||||
$sessionname="DOLSESSID_".$dolibarr_main_db_name;
|
||||
@ -321,7 +321,7 @@ if (file_exists(DOL_DOCUMENT_ROOT.'/'.$conf->css.".php")) $conf->css.=".php";
|
||||
|
||||
if (isset($user->conf->MAIN_DISABLE_JAVASCRIPT) && $user->conf->MAIN_DISABLE_JAVASCRIPT)
|
||||
{
|
||||
$conf->use_javascript=! $user->conf->MAIN_DISABLE_JAVASCRIPT;
|
||||
$conf->use_javascript_ajax=! $user->conf->MAIN_DISABLE_JAVASCRIPT;
|
||||
}
|
||||
|
||||
// Defini gestionnaire de menu a utiliser
|
||||
@ -659,7 +659,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
|
||||
print '<link rel="stylesheet" type="text/css" media="print" href="'.DOL_URL_ROOT.'/theme/print.css">'."\n";
|
||||
|
||||
// Style sheets pour la class Window
|
||||
if (! $disablejs && ($conf->use_javascript && $conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX))
|
||||
if (! $disablejs && $conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/window/default.css">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/window/alphacube.css">'."\n";
|
||||
@ -678,11 +678,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
|
||||
print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">'."\n";
|
||||
print '<link rel="author" title="Dolibarr Development Team" href="http://www.dolibarr.org">'."\n";
|
||||
|
||||
if (! $disablejs && ($conf->use_javascript || $conf->use_ajax))
|
||||
if (! $disablejs && $conf->use_javascript_ajax)
|
||||
{
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_head.js"></script>'."\n";
|
||||
}
|
||||
if (! $disablejs && $conf->use_ajax)
|
||||
if (! $disablejs && $conf->use_javascript_ajax)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php';
|
||||
|
||||
@ -976,7 +976,7 @@ function llxFooter($foot='',$limitIEbug=1)
|
||||
print "\n";
|
||||
}
|
||||
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_foot.js"></script>';
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ if (! $user->rights->produit->lire) accessforbidden();
|
||||
|
||||
//Récupère le résultat de la recherche Ajax
|
||||
//Todo: voir pour le supprimer par la suite
|
||||
if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['id_fourn_id'])
|
||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['id_fourn_id'])
|
||||
{
|
||||
$_POST['id_fourn'] = $_POST['id_fourn_id'];
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
}
|
||||
if ($user->rights->produit->creer)
|
||||
{
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?id='.$product->id.'&file='.urlencode($pdir.$viewfilename).'&action=confirm_delete&confirm=yes';
|
||||
print '<a href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeletePicture').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"';
|
||||
|
||||
@ -309,8 +309,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
|
||||
|
||||
print_titre($langs->trans("NewCompany"));
|
||||
|
||||
//$conf->use_javascript=0;
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "<br>\n";
|
||||
print $langs->trans("ThirdPartyType").': ';
|
||||
@ -414,14 +413,14 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$soc->cp.'"';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
print '>';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans('Town').'</td><td><input type="text" name="ville" value="'.$soc->ville.'"></td></tr>';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
$form->select_pays($soc->pays_id,'pays_id',$conf->use_javascript?' onChange="autofilltownfromzip_save_refresh_create()"':'');
|
||||
$form->select_pays($soc->pays_id,'pays_id',$conf->use_javascript_ajax?' onChange="autofilltownfromzip_save_refresh_create()"':'');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
|
||||
@ -526,7 +525,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
|
||||
print '</td>';
|
||||
|
||||
// Code TVA
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "\n";
|
||||
print '<script language="JavaScript" type="text/javascript">';
|
||||
@ -541,7 +540,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
|
||||
$s ='<input type="text" class="flat" name="tva_intra_code" size="1" maxlength="2" value="'.$soc->tva_intra_code.'">';
|
||||
$s.='<input type="text" class="flat" name="tva_intra_num" size="12" maxlength="18" value="'.$soc->tva_intra_num.'">';
|
||||
$s.=' ';
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
$s.='<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra_code.value,document.formsoc.tva_intra_num.value);" alt="'.$langs->trans("VATIntraCheckableOnEUSite").'">'.$langs->trans("VATIntraCheck").'</a>';
|
||||
print $form->textwithhelp($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
|
||||
@ -768,15 +767,15 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$soc->cp.'"';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"';
|
||||
print '>';
|
||||
if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(cp.value,ville)">';
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$langs->trans('Town').'</td><td><input type="text" name="ville" value="'.$soc->ville.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
$form->select_pays($soc->pays_id,'pays_id',$conf->use_javascript?' onChange="autofilltownfromzip_save_refresh_edit()"':'');
|
||||
$form->select_pays($soc->pays_id,'pays_id',$conf->use_javascript_ajax?' onChange="autofilltownfromzip_save_refresh_edit()"':'');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
|
||||
@ -836,7 +835,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
print '</td>';
|
||||
|
||||
// Code TVA
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "\n";
|
||||
print '<script language="JavaScript" type="text/javascript">';
|
||||
@ -851,7 +850,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
$s ='<input type="text" class="flat" name="tva_intra_code" size="1" maxlength="2" value="'.$soc->tva_intra_code.'">';
|
||||
$s.='<input type="text" class="flat" name="tva_intra_num" size="12" maxlength="18" value="'.$soc->tva_intra_num.'">';
|
||||
$s.=' ';
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
$s.='<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra_code.value,document.formsoc.tva_intra_num.value);" alt="'.$langs->trans("VATIntraCheckableOnEUSite").'">'.$langs->trans("VATIntraCheck").'</a>';
|
||||
print $form->textwithhelp($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
|
||||
@ -1033,7 +1032,7 @@ else
|
||||
print '</td>';
|
||||
|
||||
// VAT Code
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print "\n";
|
||||
print '<script language="JavaScript" type="text/javascript">';
|
||||
@ -1053,7 +1052,7 @@ else
|
||||
$s.='<input type="hidden" name="tva_intra_code" size="1" maxlength="2" value="'.$code.'">';
|
||||
$s.='<input type="hidden" name="tva_intra_num" size="12" maxlength="18" value="'.$num.'">';
|
||||
$s.=' ';
|
||||
if ($conf->use_javascript)
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
$s.='<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra_code.value,document.formsoc.tva_intra_num.value);" alt="'.$langs->trans("VATIntraCheckableOnEUSite").'">'.$langs->trans("VATIntraCheck").'</a>';
|
||||
print $form->textwithhelp($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
|
||||
@ -1181,7 +1180,7 @@ else
|
||||
if ($user->rights->societe->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" ';
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$url = $_SERVER["PHP_SELF"].'?socid='.$soc->id.'&action=confirm_delete&confirm=yes';
|
||||
print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteCompany').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user