diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index ad8be2608c1..749033f8392 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -694,7 +694,7 @@ if ($num > 0) } // Action column - print ''; + print ''; print '' . img_edit() . ' '; print '' . img_delete() . ''; print ''; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 4a07f096a5d..5eef895bb0c 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -755,7 +755,7 @@ class FormFile $out.= ($param?'&'.$param:''); //$out.= '&modulepart='.$modulepart; // TODO obsolete ? //$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ? - $out.= '">'.img_picto($langs->trans("Delete"), 'delete.png').''; + $out.= '">'.img_picto($langs->trans("Delete"), 'delete').''; } if ($printer) { @@ -1233,7 +1233,7 @@ class FormFile if ($permtoeditline) { // Link to resize - print ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','class="paddingrightonly"',1).''; + print ''.img_picto($langs->trans("Resize"),'resize','class="paddingrightonly"').''; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 65753457000..bed4bcc8d6a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3052,18 +3052,26 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ } else { + $pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto); + //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) - if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) + if (in_array($pictowithoutext, array('delete', 'edit', 'off', 'on', 'resize', 'switch_off', 'switch_on'))) { - $fakey = $picto; $facolor=''; $fasize=''; - if ($picto == 'switch_off') { $fakey = 'fa-toggle-off'; $facolor='#999'; $fasize='2em'; } - if ($picto == 'switch_on') { $fakey = 'fa-toggle-on'; $facolor='#227722'; $fasize='2em'; } - if ($picto == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; } - if ($picto == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; } - $enabledisablehtml=''; - $enabledisablehtml.=''; + $fakey = $pictowithoutext; $facolor=''; $fasize=''; + if ($pictowithoutext == 'switch_off') { $fakey = 'fa-toggle-off'; $facolor='#999'; $fasize='2em'; } + elseif ($pictowithoutext == 'switch_on') { $fakey = 'fa-toggle-on'; $facolor='#227722'; $fasize='2em'; } + elseif ($pictowithoutext == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; } + elseif ($pictowithoutext == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; } + elseif ($pictowithoutext == 'delete') { $fakey = 'fa-trash'; $facolor='#444'; } + elseif ($pictowithoutext == 'edit') { $fakey = 'fa-pencil'; $facolor='#444'; } + elseif ($pictowithoutext == 'resize') { $fakey = 'fa-crop'; $facolor='#444'; } + else { $fakey = 'fa-'.$pictowithoutext; $facolor='#999'; } + + if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) { $morecss.=($morecss?' ':'').$reg[1]; } + $enabledisablehtml =''; if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $enabledisablehtml.=$titlealt; $enabledisablehtml.=''; + return $enabledisablehtml; } @@ -3306,6 +3314,7 @@ function img_delete($titlealt = 'default', $other = 'class="pictodelete"') if ($titlealt == 'default') $titlealt = $langs->trans('Delete'); return img_picto($titlealt, 'delete.png', $other); + //return ''; } /** diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 8b6cc95368e..633d85e854b 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1716,7 +1716,7 @@ class Product extends CommonObject $price_ttc = price2num($price_ttc,'MU'); if ( $newminprice !== '' || $newminprice === 0) - { + { $price_min = price2num($newminprice,'MU'); $price_min_ttc = price2num($newminprice) * (1 + ($newvat / 100)); $price_min_ttc = price2num($price_min_ttc,'MU'); @@ -2279,8 +2279,8 @@ class Product extends CommonObject } } } - - // If stock decrease is on invoice validation, the theorical stock continue to + + // If stock decrease is on invoice validation, the theorical stock continue to // count the orders to ship in theorical stock when some are already removed b invoice validation. // If option DECREASE_ONLY_UNINVOICEDPRODUCTS is on, we make a compensation. if (! empty($conf->global->STOCK_CALCULATE_ON_BILL)) @@ -4285,7 +4285,7 @@ class Product extends CommonObject if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; + $return.= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; // Link to delete $return.= ''; @@ -4311,7 +4311,7 @@ class Product extends CommonObject if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; + $return.= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; // Link to delete $return.= ''; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 7ae6c4eadfd..73a6b62c181 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1,12 +1,12 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Peter Fontaine * Copyright (C) 2015-2016 Marcos GarcĂ­a * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018 ptibogxiv + * Copyright (C) 2018 ptibogxiv * * 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 @@ -703,10 +703,10 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' // Stripe customer key 'cu_....' stored into llx_societe_account print ''; //print $langs->trans('StripeCustomerId'); - print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', 0, 1, 'socid'); + print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', 0, 2, 'socid'); print ''; //print $stripecu; - print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 1, '', 'socid'); + print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid'); print ''; if (empty($stripecu)) { @@ -734,7 +734,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' { $morehtmlright=''.$langs->trans("Add").''; } - print load_fiche_titre($langs->trans('StripePaymentModes').($stripeacc?' (Stripe connection with Stripe Connect account '.$stripeacc.')':' (Stripe connection with default API credentials)'), $morehtmlright, ''); + print load_fiche_titre($langs->trans('StripePaymentModes').($stripeacc?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, ''); $listofsources = array(); if (is_object($stripe)) @@ -835,7 +835,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if (empty($companypaymentmodetemp->stripe_card_ref)) print $langs->trans("Local"); else print $langs->trans("LocalAndRemote"); print ''; - print ''; + print ''; if ($user->rights->societe->creer) { print ''; @@ -843,7 +843,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print ' '; print ''; - print img_delete($langs->trans("Delete")); + print img_picto($langs->trans("Delete"), 'delete'); print ''; } print ''; @@ -942,11 +942,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print $langs->trans("Remote"); print ''; - print ''; + print ''; if ($user->rights->societe->creer) { print ''; - print img_delete($langs->trans("Delete")); + print img_picto($langs->trans("Delete"), 'delete'); print ''; } print ''; @@ -1130,7 +1130,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; // Edit/Delete - print ''; + print ''; if ($user->rights->societe->creer) { print ''; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index cba140486db..6293802540e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -801,6 +801,9 @@ select.flat.selectlimit { .fa-file-text-o, .fa-file-code-o, .fa-file-powerpoint-o, .fa-file-excel-o, .fa-file-word-o, .fa-file-o, .fa-file-image-o, .fa-file-video-o, .fa-file-audio-o, .fa-file-archive-o, .fa-file-pdf-o { color: #055; } +.fa-trash, .fa-crop, .fa-pencil { + font-size: 1.4em; +} /* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */ /*.table-responsive { @@ -1325,11 +1328,11 @@ div.nopadding { .pictowarning, .pictopreview { padding-: 3px; } -.pictoedit, .pictowarning, .pictodelete { +.pictowarning { vertical-align: text-bottom; } -.fiche img.pictoedit { - opacity: 0.7; +.fiche img.pictoedit, .fiche span.pictoedit { + opacity: 0.4; } .colorthumb { padding-left: 1px !important; diff --git a/htdocs/theme/md/img/menus/ticketsup.png b/htdocs/theme/md/img/menus/ticketsup.png new file mode 100644 index 00000000000..98beeaf593a Binary files /dev/null and b/htdocs/theme/md/img/menus/ticketsup.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 9f774fe3af7..c088e0d4acd 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -801,6 +801,9 @@ select.flat.selectlimit { .fa-file-text-o, .fa-file-code-o, .fa-file-powerpoint-o, .fa-file-excel-o, .fa-file-word-o, .fa-file-o, .fa-file-image-o, .fa-file-video-o, .fa-file-audio-o, .fa-file-archive-o, .fa-file-pdf-o { color: #505; } +.fa-trash, .fa-crop, .fa-pencil { + font-size: 1.4em; +} /* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */ /*.table-responsive { @@ -1333,9 +1336,12 @@ table.noborder tr.liste_titre td { .pictowarning, .pictopreview { padding-: 3px; } -.pictoedit, .pictowarning, .pictodelete { +.pictowarning { vertical-align: text-bottom; } +.fiche img.pictoedit, .fiche span.pictoedit { + opacity: 0.9; +} img.hideonsmartphone.pictoactionview { vertical-align: bottom; } @@ -1682,6 +1688,10 @@ div.mainmenu.project { background-image: url(); } +div.mainmenu.ticketsup { + background-image: url(); +} + div.mainmenu.tools { background-image: url(); } @@ -1696,7 +1706,7 @@ div.mainmenu.website { $moduletomainmenu=array('user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial', 'produit'=>'products','service'=>'products','stock'=>'products', 'don'=>'accountancy','tax'=>'accountancy','banque'=>'accountancy','facture'=>'accountancy','compta'=>'accountancy','accounting'=>'accountancy','adherent'=>'members','import'=>'tools','export'=>'tools','mailing'=>'tools', - 'contrat'=>'commercial','ficheinter'=>'commercial','deplacement'=>'commercial', + 'contrat'=>'commercial','ficheinter'=>'commercial','ticketsup'=>'ticketsup','deplacement'=>'commercial', 'fournisseur'=>'companies', 'barcode'=>'','fckeditor'=>'','categorie'=>'', ); @@ -1712,7 +1722,7 @@ $generic=1; // Put here list of menu entries when the div.mainmenu.menuentry was previously defined $divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','ftp','holiday','hrm','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','stripe','webservices','website'); // Put here list of menu entries we are sure we don't want -$divnotrequired=array('multicurrency','salaries','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition'); +$divnotrequired=array('multicurrency','salaries','ticketsup','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition'); foreach($mainmenuusedarray as $val) { if (empty($val) || in_array($val,$divalreadydefined)) continue; diff --git a/htdocs/ticketsup/class/ticketsup.class.php b/htdocs/ticketsup/class/ticketsup.class.php index a7b95bedbbe..3795978289e 100644 --- a/htdocs/ticketsup/class/ticketsup.class.php +++ b/htdocs/ticketsup/class/ticketsup.class.php @@ -2612,7 +2612,7 @@ class Ticketsup extends CommonObject } if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return .= '' . img_picto($langs->trans("Resize"), DOL_URL_ROOT . '/theme/common/transform-crop-and-resize', '', 1) . '   '; + $return .= '' . img_picto($langs->trans("Resize"), 'resize', '') . '   '; // Link to delete $return .= ''; @@ -2641,7 +2641,7 @@ class Ticketsup extends CommonObject if ($showaction) { if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return .= '' . img_picto($langs->trans("Resize"), DOL_URL_ROOT . '/theme/common/transform-crop-and-resize', '', 1) . '   '; + $return .= '' . img_picto($langs->trans("Resize"), 'resize', '') . '   '; // Link to delete $return .= '';