From 416d1d0301640ce9c22483f1160ed3107824540a Mon Sep 17 00:00:00 2001 From: laurantines Date: Mon, 25 May 2020 12:26:05 +0200 Subject: [PATCH 1/6] Update list.php Search by d,phone, d.phone_perso, d.phone_mobile in SELECT QUERY --- htdocs/adherents/list.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 6cb34192845..bf8353da5c9 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -301,6 +301,9 @@ if ($search_email) $sql .= natural_search("d.email", $search_email); if ($search_town) $sql .= natural_search("d.town", $search_town); if ($search_zip) $sql .= natural_search("d.zip", $search_zip); if ($search_state) $sql .= natural_search("state.nom", $search_state); +if ($search_phone) $sql .= natural_search("d.phone", $search_phone); +if ($search_phone_perso) $sql .= natural_search("d.phone_perso", $search_phone_perso); +if ($search_phone_mobile) $sql .= natural_search("d.phone_mobile", $search_phone_mobile); if ($search_country) $sql .= " AND d.country IN (".$search_country.')'; if ($filter == 'uptodate') $sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = 0)"; if ($filter == 'outofdate') $sql .= " AND ((datefin IS NULL OR datefin < '".$db->idate($now)."') AND t.subscription = 1)"; From c7d43b26df68a73c9e44e2a5811fa79fcfa8c19e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 May 2020 01:44:22 +0200 Subject: [PATCH 2/6] Prepare ChangeLog for v12 --- ChangeLog | 254 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 227 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index ffb51bd26c3..395b443cd1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,233 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 12.0 compared to 11.0 ***** +For users: + +NEW: Module MO (Manufacturing Order) is available as stable module. +NEW: Receipt printer module moved from 'development' to 'experimental' +NEW: Add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists. +NEW: add numbering module for TakePOS module +NEW: 2 new options when creating an invoice from time spent on a project : by period or by task +NEW: Accountancy add column thirdparty on binding page +NEW: Accountancy - Add Export for Fiducial Winfic eWinfic WinSis Compta +NEW: Accountancy - Add Export LD compta version 10 +NEW: Accountancy - Add mode intra & export for product or service bought +NEW: Accountancy - Add possibility to manage a short alternative label for account - Use to simplify accountancy +NEW: Accountancy - General ledger - Add an option to search not reconciled lines +NEW: Add accountancy code of thirdparty in contact and supplier export +NEW: add a link to notes in members list +NEW: add a parameter to group same products in TakePOS +NEW: add a parameter to sort product by label in TakePOS +NEW: Add a profil to import contact categories +NEW: Add company extrafields into order export +NEW: add const CASHDESK_FORCE_DECREASE_STOCK to force batch decrementation +NEW: add const TAKEPOS_NUMPAD_USE_PAYMENT_ICON to use icons on payment buttons +NEW: add csv separator setup in module admin +NEW: add dedicated substitutions keys for extrafields of type date and datetime +NEW: add default warehouse for dispatch +NEW: Add due date in feature "Export accounting documents" +NEW: Add duration information for fichinter +NEW: Start support of Dark theme into ELDY theme +NEW: Add field author public alias for blog post on website module +NEW: Add "finished" field on product list +NEW: Add French association chart of accounts 2018 +NEW: Add French farm chart of accounts 2014 +NEW: Add French foundation chart of accounts 2018 +NEW: add global reduction in cash desk +NEW: Add graph type 'piesemicircle' +NEW: Add hook getInputIdProf. Better solution for #13228 +NEW: Add hook on margin list page +NEW: add icon on payment buttons in cash desk +NEW: Add include various payments and loans in accounting report with simplfified accountancy +NEW: Add invoice stat graph and categ search +NEW: Addition of delivery times in substitution variables +NEW: add member to validate on dashboard +NEW: Add method to add social network sharing buttons on blog posts +NEW: add multicurrency columns to document lists +NEW: add numbering module for cash desk +NEW: add Opening Balance column to balance.php +NEW: add opportunity status in project stats +NEW: Add option PDF_USE_ALSO_LANGUAGE_CODE to generate PDF in 2 languages +NEW: Add option to hide all inactive users into combo list of users. +NEW: add PDF certificate if present on document folder +NEW: add product if only one found +NEW: Add product on key "Enter" in search bar +NEW: add professional ID 1 in sepamandate document +NEW: Add Project Ref Column on list of social/fiscal contributions +NEW: add Project Ref in events export +NEW: add public and private notes in propal list +NEW: Add social networks of the company +NEW: Add sorting for contacts of ... pages +NEW: Add subtitution variables for url of document in backoffice +NEW: Add tel and fax in warehouse card +NEW: add total of value in product stat +NEW: add total weighted amount in project list +NEW: add units in product list +NEW: add VAT ID in sepamandate document +NEW: add VAT rates in free zone for product/service in TakePOS +NEW: add weighted amount on project/opportunity +NEW: add width and height measures in product list +NEW: add WYSiWYG on member type's description +NEW: [Allow constants values to be overridden by environment variables] +NEW: Allow custom module class origine type in Mouvementstock +NEW: allow display extrafields on pdf +NEW: Allow extrafields on pdf : extend to line desc +NEW: allow time consumed to be linked to another task +NEW: Another way to navigate between pages for some lists +NEW: Add author column in the client/supplier invoice lists and into order list +NEW: bank account tags for invoice ODT template +NEW: Bar Restaurant tab and Auto order +NEW: better filter on shipment list as other list +NEW: Better php module view admin +NEW: Bookkeeping - Add link to document & pdf +NEW: Bookmarks are now in top menu bar +NEW: Can check all events in one click in setup of audited events +NEW: Can create an deposit from order using a percentage of qty. +NEW: Can edit option PDF_USE_ALSO_LANGUAGE_CODE from PDF setup page +NEW: Can enter and edit stripe credit card using the Stripe card ID +NEW: Can filter on donation status in list +NEW: Can replace a string into all pages in website module +NEW: Can select several fields to personalize list before submit. +NEW: Can select which element to export in export accounting documents. +NEW: can update contact in import model +NEW: Cash Fence in TakePOS +NEW: Categories and subcategories sorted by label in TakePOS +NEW: Categories for actioncomm +NEW: Category filter for bank and warehouse list +NEW: Chart of accounts to Ecuador +NEW: class tool for converting units +NEW: Close #13011 Add button create thirdparty when creating intervention +NEW: Colorful theme for TakePOS +NEW: columns units in product list +NEW: compatibility of translabel with more dict +NEW: Confirm file delete on fracture card +NEW: "contact_civility" for ODT templates +NEW: CUPS printing compatibility for TakePOS +NEW: Customer command list - Add date start & date end +NEW: display weight in shipment list +NEW: Documentation about PHP support in Dolibarr +NEW: Donation - Update FR CERFA to 11580*04 +NEW: Easier way to setup the different types of tax. Better visibility. +NEW: enable put for agendaevents api +NEW: Expedition list - Add date start & date end +NEW: Experiment supplier packaging with option PRODUCT_USE_SUPPLIER_PACKAGING: Using price according to the minimum quantity +NEW: Export module, add extrafields for Contract and Contract line +NEW: Extend retained warranty to be available for all invoices +NEW: filter by product on supplier order API +NEW: French new regions +NEW: get documents for categories with RESP API +NEW: get proposal by ref with API +NEW: Hidden option MAIN_TEMP_DIR +NEW: hook and data id +NEW: hook on ics generation to add more events in eventarray +NEW: hook on product load stats +NEW: If $dolibarr_main_force_https is set, the flag 'secure' on session +NEW: ignore dir for apple pay with stripe +NEW: Invoice list - Add date start & date end +NEW: invoice list: enable multicurrency columns +NEW: labels on reduction buttons in cash desk +NEW: Minimum sell prices taking into account in TakePOS +NEW: monthly view to enter time +NEW: Multiple sales in TakePOS +NEW: multiselect categorie client stats facturation +NEW: no confirm discard ticket if paid +NEW: not show linked table on add message action +NEW: only auto print paid ticket in cash desk +NEW: only show units columns in product list (not in service list) +NEW: order list: enable multicurrency columns +NEW: Overwrite tpl with module_part['tpl'] is deprecated. USe hooks +NEW: possibility to defined rounding rules by currency +NEW: possibility to show society info when print page +NEW: Povide a RSS Feed for blogposts +NEW: PRODUCT_SHOW_ORIGIN_IN_COMBO +NEW: Project task list, add column selector and extrafields +NEW: Propal list - Add date start & date end +NEW: propal list: enable multicurrency columns +NEW: RECEIPT_PRINTER_NB_CHARACT_BY_LINE and FIX: product label +NEW: Restore version of application on main screen (for screenshots) +NEW: Salaries list - Add date start & date end +NEW: search on key code "enter" if defined in TakePOS +NEW: set payment method on paid ticket in TakePOS +NEW: Show active widget state of a RSS feed +NEW: Show count of each category elements in category card +NEW: Show creator, last update user of category/tag in the information tab +NEW: Show list of users in the user category card +NEW: show messages on ticket card +NEW: show "New category" button in top of sub categories list +NEW: show project label in project index +NEW: Show units of products in stocks and hide total units if content is of diffents units +NEW: sorting elements on project overview +NEW: special option MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION to store in document line created form other documents lines the id of original lines and origin class line rather than origin object id and origin object type +NEW: stats invoice graph with 3 bars (3 years instead of 2) +NEW: supplier invoice list: enable multicurrency columns +NEW: supplier order list: enable multicurrency columns +NEW: supplier proposal list: enable multicurrency columns +NEW: Support of tag {line_pos} for line numbers for tables in ODT templates +NEW: Support some HTML contents into ODT documents +NEW: Parameters for Bar Restaurant are grouped in same tab +NEW: Takepos : Sort products by reference +NEW: Takepos supplements are supported. +NEW: The info_admin() can show text after click on other text +NEW: The module selection uses a KanBan view by default. +NEW: tooltip for Unit_type and scale in "Dictionary setup - Measuring Units" +NEW: tooltip notes with first public note and then private note +NEW: Tree view for sub-categories +NEW: Truncate columns names when too long and show full title as popup +NEW: upload odt models for invoices, order, proposal, thirdparties and shipments. +NEW: Use native --convert-to feature to convert to pdf +NEW: Add user on order list +NEW: Various payment list - Add search date start & date end & subledger account +NEW: visu FROM day TO day in permonth view +NEW: Website logs are now into a separated log file. +NEW: X-Axis on graph are shown verticaly when there is a lot of values. +NEW: Can force ref of a variant product + +For developers or integrators: + +NEW: Add API to get types of expense reports +NEW: API filter bankaccounts by category +NEW: API filter contacts by category +NEW: API filter members by category +NEW: API filter projects by category +NEW: API filter thirdpartie by category +NEW: API filter thirdparty by category +NEW: API filter user by category +NEW: API filter warehouses by categorie +NEW: api for get user's documents +NEW: api invoice get by ref +NEW: API to update purchase price. +NEW: Move engine to build charts from jflot to chart.js +NEW: Upgrade ace to 1.4.8 - Upgrade select2 to 4.0.13 +NEW: Upgrade Stripe library to 6.43.1 +NEW: Bookkeeping by account - Add selectfields & hook +NEW: Can force position of legend of graph on right (instead of top) +NEW: Can change destination of "Back to list" using a "backtolist" parameter +NEW: add more category types from hook + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* PHP 5.5 is no more supported. Minimum PHP is now 5.6+. +* Default mode for GETPOST function is now 'alphanohtml' instead of 'none'. So check when you make POST or GET requests with + HTML content that you make a GETPOST('myparam', 'restricthtml') or GETPOST('myparam', 'none') if you really need posted content without sanitizing + the HTML code of content (in such a case, sanitize data later) +* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless. +* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced + by a "_" automatically when a reference (with a custom numbering mask that use it) is generated. +* Library jflot (replace with chartjs) was removed. +* Library geoip (replaced with geoip2) was removed. +* Hidden constant COMMANDE_VALID_AFTER_CLOSE_PROPAL was renamed into ORDER_VALID_AFTER_CLOSE_PROPAL. +* Object field ref_int is deprecated and set to 'not used', method to fetch object by only ref_int is not supported anymore. +* UserGroup class has been refactored with new architecture. Triggers of class UserGroup are now USERGROUP_CREATE, USERGROUP_MODIFY, USERGROUP_DELETE +* A new way to navigate between pages in list is available. To use it (not mandatory), you must: + - replace line $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); + - remove input field in form '';' + - add parameter $pagenavastextinput to value 1 when calling print_barre_liste() + + + ***** ChangeLog for 11.0.4 compared to 11.0.3 ***** FIX: #13749 FIX: #7594 Expense report multi pagebreak @@ -80,33 +307,6 @@ FIX: Wrong Sql on getListOfTowns api method FIX: wrong user right's name to top menu "commercial" FIX: XSS Vulnerability reported by Mehmet Kelepçe / Gais Cyber Security -***** ChangeLog for 12.0.0 compared to 11.0.0 ***** -For Users: -NEW: Module MO (Manufacturing Order) is available as stable module. -NEW: Add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists. - -For Developers or integrators: -* A new way to navigate between pages in list is available. To use it, you must - - replace $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); - - remove input field in form '';' - - add parameter $pagenavastextinput to value 1 when calling print_barre_liste -* UserGroup class has been refactored with new architecture. Triggers of class UserGroup are now USERGROUP_CREATE, USERGROUP_MODIFY, USERGROUP_DELETE - -WARNING: - -Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* PHP 5.5 is no more supported. Minimum PHP is now 5.6+. -* Default mode for GETPOST function is now 'alphanohtml' instead of 'none'. So check when you make POST or GET requests - with HTML content that you make a GETPOST('myparam', 'restricthtml') or GETPOST('myparam', 'none') if you really need posted content without sanitizing - the HTML into content (in such a case, sanitize data later) -* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless. -* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced - by a "_" automatically when a reference (with a custom numbering mask that use it) is generated. -* Library jflot (replace with chartjs) and geoip (replaced with geoip2) were removed. -* Hidden constant COMMANDE_VALID_AFTER_CLOSE_PROPAL were renamed into ORDER_VALID_AFTER_CLOSE_PROPAL. -* Object field ref_int is deprecated and set to not used, object fetch by only ref_int is not supported anymore. - - ***** ChangeLog for 11.0.3 compared to 11.0.2 ***** FIX: unit price for selected supplier products not set. NaN was used. FIX: use bad var to check if total is positive for each VAT rate when validating an invoice From f849ccd1289be386199f56e0363c34ba7cdac0fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 May 2020 01:47:32 +0200 Subject: [PATCH 3/6] Doc --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 395b443cd1a..7e8ce042bf3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -187,6 +187,7 @@ NEW: Can force ref of a variant product For developers or integrators: +NEW: Add a method $form->widgetForTranslation to allow any field of a form to be entered into different languages. NEW: Add API to get types of expense reports NEW: API filter bankaccounts by category NEW: API filter contacts by category From 7ceb236a095f195916384ee8c33be9a96d3109f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 May 2020 14:43:50 +0200 Subject: [PATCH 4/6] Fix look and field v12 --- htdocs/categories/info.php | 15 +++++++++++---- htdocs/categories/photos.php | 2 +- htdocs/categories/traduction.php | 11 +++++------ htdocs/categories/viewcat.php | 2 +- htdocs/commande/info.php | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/htdocs/categories/info.php b/htdocs/categories/info.php index 644886c7387..bef54f9dd6b 100644 --- a/htdocs/categories/info.php +++ b/htdocs/categories/info.php @@ -60,10 +60,10 @@ llxHeader('', $langs->trans('Categories'), ''); //$object->info($object->id); -$head = categories_prepare_head($object, $type); - $title = Categorie::$MAP_TYPE_TITLE_AREA[$type]; +$head = categories_prepare_head($object, $type); + dol_fiche_head($head, 'info', $langs->trans($title), -1, 'category'); $backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type); $linkback = ''.$langs->trans("BackToList").''; @@ -78,14 +78,21 @@ $morehtmlref .= ''; dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.$type, 0, '', '', 1); +print '
'; + print '
'; print '
'; print '
'; -print ''; + +print '
'; +print ''; + +print '
'; dol_print_object_info($object); -print '
'; +print '
'; + print '
'; dol_fiche_end(); diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 07e5d56d268..6b20105f797 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -144,7 +144,7 @@ if ($object->id) print '
'; print '
'; - print ''; + print '
'; // Description print '
'; diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index c3f87e404b7..b06a24c995f 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -22,7 +22,7 @@ /** * \file htdocs/product/traduction.php * \ingroup product - * \brief Page de traduction des produits + * \brief Page of translation of products */ require '../main.inc.php'; @@ -167,12 +167,12 @@ $cancel != $langs->trans("Cancel") && * View */ -llxHeader("", "", $langs->trans("Translation")); - $form = new Form($db); $formadmin = new FormAdmin($db); $formother = new FormOther($db); +llxHeader("", "", $langs->trans("Translation")); + $title = Categorie::$MAP_TYPE_TITLE_AREA[$type]; $head = categories_prepare_head($object, $type); @@ -194,8 +194,7 @@ $object->next_prev_filter = ' type = '.$object->type; $object->ref = $object->label; $morehtmlref = '
'.$langs->trans("Root").' >> '; $ways = $object->print_all_ways(" >> ", '', 1); -foreach ($ways as $way) -{ +foreach ($ways as $way) { $morehtmlref .= $way."
\n"; } $morehtmlref .= '
'; @@ -207,7 +206,7 @@ print '
'; print '
'; print '
'; -print ''; +print '
'; // Description print '
'; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 803b4ae34ab..958b77e42e8 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -241,7 +241,7 @@ print '
'; print '
'; print '
'; -print ''; +print '
'; // Description print '
'; diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 6de602c22d4..9b45bf66312 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -20,7 +20,7 @@ /** * \file htdocs/commande/info.php * \ingroup commande - * \brief Page des informations d'une commande + * \brief Sale Order info page */ require '../main.inc.php'; From 91ecd3455fec6f9c7301b2de726fe3660ca0eb97 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 May 2020 22:30:11 +0200 Subject: [PATCH 5/6] Fix CSS --- htdocs/core/lib/functions.lib.php | 32 +++++------ htdocs/main.inc.php | 2 +- htdocs/theme/eldy/info-box.inc.php | 62 ++++++++++++++++----- htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/info-box.inc.php | 88 +++++++++++++++++++++++------- 5 files changed, 134 insertions(+), 52 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e3059ade21e..d08522bfaa4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3262,24 +3262,24 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // Add CSS $arrayconvpictotomorcess = array( - 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'accountancy'=>'bg-infobox-bank_account', + 'action'=>'infobox-action', 'account'=>'infobox-bank_account', 'accountancy'=>'infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', - 'bill'=>'bg-infobox-commande', 'billa'=>'bg-infobox-commande', 'billd'=>'bg-infobox-commande', - 'cash-register'=>'bg-infobox-bank_account', 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'conversation'=>'bg-infobox-contrat', - 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', - 'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat', - 'multicurrency'=>'bg-infobox-bank_account', - 'members'=>'bg-infobox-adherent', 'member'=>'bg-infobox-adherent', 'money-bill-alt'=>'bg-infobox-bank_account', - 'order'=>'bg-infobox-commande', - 'user'=>'bg-infobox-adherent', 'users'=>'bg-infobox-adherent', + 'bill'=>'infobox-commande', 'billa'=>'infobox-commande', 'billd'=>'infobox-commande', + 'cash-register'=>'infobox-bank_account', 'contract'=>'infobox-contrat', 'check'=>'font-status4', 'conversation'=>'infobox-contrat', + 'donation'=>'infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'infobox-action', + 'hrm'=>'infobox-adherent', 'group'=>'infobox-adherent', 'intervention'=>'infobox-contrat', + 'multicurrency'=>'infobox-bank_account', + 'members'=>'infobox-adherent', 'member'=>'infobox-adherent', 'money-bill-alt'=>'infobox-bank_account', + 'order'=>'infobox-commande', + 'user'=>'infobox-adherent', 'users'=>'infobox-adherent', 'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4', - 'holiday'=>'bg-infobox-holiday', 'invoice'=>'bg-infobox-commande', - 'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal', - 'resource'=>'bg-infobox-action', - 'supplier_invoice'=>'bg-infobox-order_supplier', 'supplier_invoicea'=>'bg-infobox-order_supplier', 'supplier_invoiced'=>'bg-infobox-order_supplier', - 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal', - 'ticket'=>'bg-infobox-contrat', 'title_accountancy'=>'bg-infobox-bank_account', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action', - //'title_setup'=>'bg-infobox-action', 'tools'=>'bg-infobox-action', + 'holiday'=>'infobox-holiday', 'invoice'=>'infobox-commande', + 'payment'=>'infobox-bank_account', 'poll'=>'infobox-adherent', 'project'=>'infobox-project', 'projecttask'=>'infobox-project', 'propal'=>'infobox-propal', + 'resource'=>'infobox-action', + 'supplier_invoice'=>'infobox-order_supplier', 'supplier_invoicea'=>'infobox-order_supplier', 'supplier_invoiced'=>'infobox-order_supplier', + 'supplier_order'=>'infobox-order_supplier', 'supplier_proposal'=>'infobox-supplier_proposal', + 'ticket'=>'infobox-contrat', 'title_accountancy'=>'infobox-bank_account', 'title_hrm'=>'infobox-holiday', 'trip'=>'infobox-expensereport', 'title_agenda'=>'infobox-action', + //'title_setup'=>'infobox-action', 'tools'=>'infobox-action', 'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode' ); if (!empty($arrayconvpictotomorcess[$pictowithouttext])) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 98d00a98404..490641ca9fa 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1262,7 +1262,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (GETPOSTISSET('dol_optimize_smallscreen')) { $themeparam .= '&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen', 'int'); } if (GETPOSTISSET('dol_no_mouse_hover')) { $themeparam .= '&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover', 'int'); } if (GETPOSTISSET('dol_use_jmobile')) { $themeparam .= '&dol_use_jmobile='.GETPOST('dol_use_jmobile', 'int'); $conf->dol_use_jmobile = GETPOST('dol_use_jmobile', 'int'); } - if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) { $themeparam .= '&THEME_AGRESSIVENESS_RATIO='.GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); } + if (GETPOSTISSET('THEME_SATURATE_RATIO')) { $themeparam .= '&THEME_SATURATE_RATIO='.GETPOST('THEME_SATURATE_RATIO', 'int'); } if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) { diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 2b734f037b3..a0f54591534 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -198,12 +198,10 @@ a.info-box-text{ text-decoration: none;} include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $prefix = ''; -//$prefix = 'background-'; if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; -if (!isset($conf->global->THEME_AGRESSIVENESS_RATIO) && $prefix) $conf->global->THEME_AGRESSIVENESS_RATIO = -50; -if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENESS_RATIO = GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); -//var_dump($conf->global->THEME_AGRESSIVENESS_RATIO); +if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.7; +if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); ?> .info-box-icon { @@ -211,38 +209,76 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES color: #fff !important; opacity: 0.95; + global->THEME_SATURATE_RATIO)) { ?> + filter: saturate(global->THEME_SATURATE_RATIO; ?>); + } .bg-infobox-project{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #6c6aa8 !important; } .bg-infobox-action{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #a47080 !important; } .bg-infobox-propal, .bg-infobox-facture, .bg-infobox-commande{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #99a17d !important; } .bg-infobox-supplier_proposal, .bg-infobox-invoice_supplier, .bg-infobox-order_supplier{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #599caf !important; } .bg-infobox-contrat, .bg-infobox-ticket{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #46a676 !important; } .bg-infobox-bank_account{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #b0a53e !important; } .bg-infobox-adherent, .bg-infobox-member { - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #79633f !important; } .bg-infobox-expensereport{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #79633f !important; } .bg-infobox-holiday{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #755114 !important; +} + +.infobox-adherent, .infobox-member { + color: #79633f !important; +} +.infobox-project{ + color: #6c6aa8 !important; +} +.infobox-action{ + color: #a47080 !important; +} +.infobox-propal, +.infobox-facture, +.infobox-commande{ + color: #99a17d !important; +} +.infobox-supplier_proposal, +.infobox-invoice_supplier, +.infobox-order_supplier{ + color: #599caf !important; +} +.infobox-contrat, .infobox-ticket{ + color: #46a676 !important; +} +.infobox-bank_account{ + color: #b0a53e !important; +} +.infobox-adherent, .infobox-member { + color: #79633f !important; +} +.infobox-expensereport{ + color: #79633f !important; +} +.infobox-holiday{ + color: #755114 !important; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 927d29e1919..526846f8a19 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -237,7 +237,7 @@ print 'fontsizesmaller='.$fontsizesmaller."\n"; print 'topMenuFontSize='.$topMenuFontSize."\n"; print 'toolTipBgColor='.$toolTipBgColor."\n"; print 'toolTipFontColor='.$toolTipFontColor."\n"; -print 'conf->global->THEME_AGRESSIVENESS_RATIO='.$conf->global->THEME_AGRESSIVENESS_RATIO." (must be between -100 and +100)\n"; +print 'conf->global->THEME_SATURATE_RATIO='.$conf->global->THEME_SATURATE_RATIO." (must be between 0 and 1)\n"; print '*/'."\n"; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index f2a2a8b810d..6a313ace567 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -8,42 +8,85 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $prefix = ''; -//$prefix = 'background-'; if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; + +$prefix = ''; +if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; + +if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.5; +if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); + ?> .bg-infobox-project{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #6c6aa8 !important; } .bg-infobox-action{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #a47080 !important; } .bg-infobox-propal, .bg-infobox-facture, .bg-infobox-commande{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #99a17d !important; } .bg-infobox-supplier_proposal, .bg-infobox-invoice_supplier, .bg-infobox-order_supplier{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #599caf !important; } .bg-infobox-contrat, .bg-infobox-ticket{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #46a676 !important; } .bg-infobox-bank_account{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #b0a53e !important; } .bg-infobox-adherent, .bg-infobox-member{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #79633f !important; } .bg-infobox-expensereport{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #79633f !important; } .bg-infobox-holiday{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #755114 !important; } + +.infobox-adherent, .infobox-member { + color: #79633f !important; +} +.infobox-project{ + color: #6c6aa8 !important; +} +.infobox-action{ + color: #a47080 !important; +} +.infobox-propal, +.infobox-facture, +.infobox-commande{ + color: #99a17d !important; +} +.infobox-supplier_proposal, +.infobox-invoice_supplier, +.infobox-order_supplier{ + color: #599caf !important; +} +.infobox-contrat, .infobox-ticket{ + color: #46a676 !important; +} +.infobox-bank_account{ + color: #b0a53e !important; +} +.infobox-adherent, .infobox-member { + color: #79633f !important; +} +.infobox-expensereport{ + color: #79633f !important; +} +.infobox-holiday{ + color: #755114 !important; +} + + .info-box-module-external span.info-box-icon-version { background: #bbb; } @@ -102,6 +145,9 @@ if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'backgro font-size: 45px; line-height: 90px; background: #eee; + global->THEME_SATURATE_RATIO)) { ?> + filter: saturate(global->THEME_SATURATE_RATIO; ?>); + } .info-box-sm .info-box-icon { width: 80px; @@ -233,39 +279,39 @@ a.info-box-text{ text-decoration: none;} } global->THEME_AGRESSIVENESS_RATIO)) $conf->global->THEME_AGRESSIVENESS_RATIO = -100; -if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENESS_RATIO = GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); +if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.7; +if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); ?> .bg-infobox-project i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #605ca8 !important; } .bg-infobox-action i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #d84b80 !important; } .bg-infobox-propal i.fa, .bg-infobox-facture i.fa, .bg-infobox-commande i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #abb87b !important; } .bg-infobox-supplier_proposal i.fa, .bg-infobox-invoice_supplier i.fa, .bg-infobox-order_supplier i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #40b0cf !important; } .bg-infobox-contrat i.fa, .bg-infobox-ticket i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #20a68a !important; } .bg-infobox-bank_account i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #b0a53e !important; } .bg-infobox-adherent i.fa, .bg-infobox-member i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #755114 !important; } .bg-infobox-expensereport i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #755114 !important; } .bg-infobox-holiday i.fa{ - color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; + color: #755114 !important; } From 44273e05708eafd9ffd8b5b6e973b4e137d1abb7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 May 2020 22:31:27 +0200 Subject: [PATCH 6/6] Fix duplicate code --- htdocs/theme/md/info-box.inc.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 6a313ace567..65ff1811269 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -10,9 +10,6 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $prefix = ''; if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; -$prefix = ''; -if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; - if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.5; if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int');