diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 53b13e367a6..02f974a6d25 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2041,7 +2041,8 @@ class Form $autoOpen=true; $dialogconfirm='dialog-confirm'; if (! is_int($useajax)) { - list($useajax,$button) = explode(',',$useajax); + $button=$useajax; + $useajax=1; $autoOpen=false; $dialogconfirm.='-'.$button; } @@ -2049,7 +2050,7 @@ class Form $pageno=($useajax == 2?$page.'&confirm=no':''); // New code using jQuery only - $formconfirm.= ''."\n"; diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 66d075b0b8f..551f87a203b 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2006 Auguria SARL * Copyright (C) 2010 Juanjo Menent @@ -1029,9 +1029,9 @@ if ($id || $ref) dol_fiche_head($head, 'card', $titre, 0, $picto); // Confirmation de la suppression de la facture - if ($action == 'delete') + if ($action == 'delete' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)) { - $ret=$html->form_confirm("fiche.php?id=".$product->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,2); + $ret=$html->form_confirm("fiche.php?id=".$product->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,"action-delete"); if ($ret == 'html') print '
'; } @@ -1193,7 +1193,7 @@ else if ($action != 'create') // Clone confirmation -if ($action == 'clone') +if ($action == 'clone' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) ) { // Create an array for form $formquestion=array( @@ -1203,7 +1203,7 @@ if ($action == 'clone') array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true) ); // Paiement incomplet. On demande si motif = escompte ou autre - $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$product->id,$langs->trans('CloneProduct'),$langs->trans('ConfirmCloneProduct',$product->ref),'confirm_clone',$formquestion,'yes',2,230,600); + $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$product->id,$langs->trans('CloneProduct'),$langs->trans('ConfirmCloneProduct',$product->ref),'confirm_clone',$formquestion,'yes','action-clone',230,600); } @@ -1222,8 +1222,13 @@ if ($action == '') if ($product->no_button_edit <> 1) print 'id.'">'.$langs->trans("Modify").''; - if ($product->no_button_copy <> 1) - print 'id.'">'.$langs->trans("ToClone").''; + if ($product->no_button_copy <> 1) { + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { + print ''.$langs->trans('ToClone').''."\n"; + } else { + print 'id.'">'.$langs->trans("ToClone").''; + } + } } $product_is_used = $product->verif_prod_use($product->id); @@ -1232,7 +1237,14 @@ if ($action == '') { if (! $product_is_used && $product->no_button_delete <> 1) { - print 'id.'">'.$langs->trans("Delete").''; + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) + { + print ''.$langs->trans('Delete').''."\n"; + } + else + { + print 'id.'">'.$langs->trans("Delete").''; + } } else { diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 570c0872864..dae5a48c37c 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1331,7 +1331,7 @@ else if ($action == 'delete' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)) { $html = new Form($db); - $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?socid=".$soc->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"1,action-delete"); + $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?socid=".$soc->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete"); if ($ret == 'html') print '
'; } diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 02125dc649a..76a7b0d98a4 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -955,7 +955,7 @@ span.tabspan { /* Nouvelle syntaxe a utiliser */ -.butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { +.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { font-family: ; font-weight: bold; background: white; @@ -996,7 +996,7 @@ span.tabspan { cursor: not-allowed; } -span.butActionDelete { +span.butAction, span.butActionDelete { cursor: pointer; }