From c1ceefb70f4a13d181ee4772cd12338742218bf1 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 27 Mar 2021 04:44:20 +0100 Subject: [PATCH] Update with new functionality --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/langs/en_US/main.lang | 1 - htdocs/main.inc.php | 21 +++++++-------------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d4e35f12d70..35d311a5416 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3548,7 +3548,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_salary', 'object_shipment', 'object_share-alt', 'object_supplier_invoice', 'object_supplier_invoicea', 'object_supplier_invoiced', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', 'object_movement', - 'off', 'on', 'order', 'copy', + 'off', 'on', 'order', 'paiment', 'play', 'pdf', 'phone', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'stock', 'resize', 'service', 'stats', 'trip', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', 'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index b1798aaf948..b13e15b4a9f 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1128,4 +1128,3 @@ ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected CategTypeNotFound=No tag type found for type of records CopiedToClipboard=Copied to clipboard InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. -HelpCopyToClipboardShort=Copier dans le presse-papier diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 07551aaf9ea..baf9e3196cf 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1985,13 +1985,13 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $dropdownBody .= ' '.$langs->trans("ShowCompanyInfos").''; $dropdownBody .= '
'; - if (!empty($conf->global->MAIN_INFO_SIREN)) $dropdownBody .= '
'.$langs->transcountry("ProfId1Short", $mysoc->country_code).': '.$conf->global->MAIN_INFO_SIREN.' '.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').''; - if (!empty($conf->global->MAIN_INFO_SIRET)) $dropdownBody .= '
'.$langs->transcountry("ProfId2Short", $mysoc->country_code).': '.$conf->global->MAIN_INFO_SIRET.' '.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').''; - if (!empty($conf->global->MAIN_INFO_APE)) $dropdownBody .= '
'.$langs->transcountry("ProfId3Short", $mysoc->country_code).': '.$conf->global->MAIN_INFO_APE.' '.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').''; - if (!empty($conf->global->MAIN_INFO_RCS)) $dropdownBody .= '
'.$langs->transcountry("ProfId4Short", $mysoc->country_code).': '.$conf->global->MAIN_INFO_RCS.' '.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').''; - if (!empty($conf->global->MAIN_INFO_PROFID5)) $dropdownBody .= '
'.$langs->transcountry("ProfId5Short", $mysoc->country_code).': '.$conf->global->MAIN_INFO_PROFID5.' '.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').''; - if (!empty($conf->global->MAIN_INFO_PROFID6)) $dropdownBody .= '
'.$langs->transcountry("ProfId6Short", $mysoc->country_code).': '.$conf->global->MAIN_INFO_PROFID6.' '.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').''; - if (!empty($conf->global->MAIN_INFO_TVAINTRA)) $dropdownBody .= '
'.$langs->trans("VATIntraShort").': '.$conf->global->MAIN_INFO_TVAINTRA.' '.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').''; + if (!empty($conf->global->MAIN_INFO_SIREN)) $dropdownBody .= '
'.$langs->transcountry("ProfId1Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIREN).''; + if (!empty($conf->global->MAIN_INFO_SIRET)) $dropdownBody .= '
'.$langs->transcountry("ProfId2Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIRET).''; + if (!empty($conf->global->MAIN_INFO_APE)) $dropdownBody .= '
'.$langs->transcountry("ProfId3Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_APE).''; + if (!empty($conf->global->MAIN_INFO_RCS)) $dropdownBody .= '
'.$langs->transcountry("ProfId4Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_RCS).''; + if (!empty($conf->global->MAIN_INFO_PROFID5)) $dropdownBody .= '
'.$langs->transcountry("ProfId5Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID5).''; + if (!empty($conf->global->MAIN_INFO_PROFID6)) $dropdownBody .= '
'.$langs->transcountry("ProfId6Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID6).''; + if (!empty($conf->global->MAIN_INFO_TVAINTRA)) $dropdownBody .= '
'.$langs->trans("VATIntraShort").': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_TVAINTRA).''; $dropdownBody .= '
'; @@ -2152,13 +2152,6 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $("#topmenu-login-dropdown").toggleClass("open"); }); - $(".copyToClipboard").on("click", function() { - var dummyContent = $(this).prevAll("span:first").text(); - var dummy = $("").val(dummyContent).appendTo("body").select(); - document.execCommand("copy"); - document.getElementById("dummy").remove(); - }); - $("#topmenulogincompanyinfo-btn").on("click", function() { $("#topmenulogincompanyinfo").slideToggle(); });