From a91bdad8de6501a94d6f965f418cf838409022e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Feb 2022 12:01:48 +0100 Subject: [PATCH 1/5] Fix responsive --- htdocs/contrat/card.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 2bde3f3174a..216702da9ed 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1123,18 +1123,16 @@ if ($action == 'create') { // Ligne info remises tiers print ''.$langs->trans('Discounts').''; if ($soc->remise_percent) { - print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); + print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent).' '; } else { - print $langs->trans("CompanyHasNoRelativeDiscount"); + print ''.$langs->trans("CompanyHasNoRelativeDiscount").'. '; } - print '. '; $absolute_discount = $soc->getAvailableDiscounts(); if ($absolute_discount) { - print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); + print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)).'.'; } else { - print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print ''.$langs->trans("CompanyHasNoAbsoluteDiscount").'.'; } - print '.'; print ''; } @@ -1361,18 +1359,16 @@ if ($action == 'create') { // Line info of thirdparty discounts print ''.$langs->trans('Discount').''; if ($object->thirdparty->remise_percent) { - print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent); + print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent).'. '; } else { - print $langs->trans("CompanyHasNoRelativeDiscount"); + print ''.$langs->trans("CompanyHasNoRelativeDiscount").'. '; } $absolute_discount = $object->thirdparty->getAvailableDiscounts(); - print '. '; if ($absolute_discount) { - print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); + print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)).'.'; } else { - print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print ''.$langs->trans("CompanyHasNoAbsoluteDiscount").'.'; } - print '.'; print ''; // Date From 7055d326e4a5e481bb67c976629d523640f8d1b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Feb 2022 13:22:38 +0100 Subject: [PATCH 2/5] FIX rtl languages --- htdocs/theme/eldy/btn.inc.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index af8f26b9a24..f639fb9eea1 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -281,8 +281,8 @@ a.btnTitle.btnTitleSelected { display: block; } -div.pagination li:first-child a.btnTitle{ - margin-left: 10px; +div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrows a.btnTitle { + margin-: 10px; } .button-title-separator{ diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index f25efc97168..e1532b338b6 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3713,7 +3713,7 @@ div.refidno form { } div.pagination { - float: right; + float: ; } div.pagination a { font-weight: normal; From c7f99f140e30e00d3ce095632818e9c634fb600d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Feb 2022 17:41:32 +0100 Subject: [PATCH 3/5] Fix remove validator --- dev/dolibarr_changes.txt | 4 ++++ .../restler/framework/Luracast/Restler/explorer/index.html | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 7ce22e790c3..d4a9b725524 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -205,6 +205,8 @@ with with foreach ($value[1] as $k => $v) { + + JSGANTT: -------- * Replace in function JSGantt.taskLink @@ -233,11 +235,13 @@ JCROP: * Remove analytics tag into file index.html + JQUERYFILETREE: --------------- * Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors + RESTLER: -------- diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html index 7fedb694c17..5b7ca132af3 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html @@ -68,7 +68,7 @@ if(window.SwaggerTranslator) { window.SwaggerTranslator.translate(); } - + addApiKeyAuthorization(); }, onFailure: function(data) { @@ -83,7 +83,9 @@ showRequestHeaders: false, showOperationIds: false, displayOperationIds: false, - displayRequestDuration: true + displayRequestDuration: true, + /* @CHANGE LDR Add validatorUrl */ + validatorUrl: null }); function addApiKeyAuthorization(){ From fe01f75e970bdb14d6c610e7d8d4444e3013469b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Feb 2022 17:50:26 +0100 Subject: [PATCH 4/5] Fix API_ENDPOINT_RULES with api of external modules --- htdocs/api/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 70aeae96447..da194f12655 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -304,7 +304,7 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && foreach ($listofendpoints as $endpointrule) { $tmparray = explode(':', $endpointrule); - if ($classfile == $tmparray[0] && $tmparray[1] == 1) { + if (($classfile == $tmparray[0] || $classfile.'api' == $tmparray[0]) && $tmparray[1] == 1) { $endpointisallowed = true; break; } From 5a37b2c6493573ca087db0d5ecac6a310fd678c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Feb 2022 18:10:21 +0100 Subject: [PATCH 5/5] Fix API call --- htdocs/api/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index da194f12655..ae84e61ea32 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -61,6 +61,13 @@ if (preg_match('/\/explorer\/swagger\.json/', $_SERVER["PHP_SELF"])) { header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE'); header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY'); } +// When we request url to get an API, we accept Cross site so we can make js API call inside another website +if (preg_match('/\/api\/index\.php/', $_SERVER["PHP_SELF"])) { + header('Access-Control-Allow-Origin: *'); + header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE'); + header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY'); +} + $res = 0; if (!$res && file_exists("../main.inc.php")) {