From bcaccb1829c09898a4ce200196ed48a25e7a1e4b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Nov 2017 12:35:25 +0100 Subject: [PATCH] Add layout into link of sub resources to solve undesired cache effect --- htdocs/core/js/lib_foot.js.php | 2 +- htdocs/core/js/lib_head.js.php | 4 ++-- htdocs/main.inc.php | 8 ++++---- htdocs/website/index.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index f9ee9ea3ad4..84004f0f8ab 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -107,7 +107,7 @@ if (! defined('JS_JQUERY_DISABLE_DROPDOWN')) }); $(document).bind(\'click\', function (e) { - // TODO Use a bind on elements in dropdown only to avoid to bind/code all clicks + //console.log("We click outside of dropdown, so we close it."); var $clicked = $(e.target); if (!$clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide(); }); diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 8b8dd3d8a57..ba1fa253c1e 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -919,8 +919,8 @@ function document_preview(file, type, title) if (mode == 'image' && showOriginalSizeButton) { optionsbuttons = { - "trans("OriginalSize")); ?>": function() { console.log("Click on original size"); jQuery(".ui-dialog-content.ui-widget-content > object").css({ "max-height": "none" }); }, - "trans("Close")); ?>": function() { $( this ).dialog( "close" ); } + "transnoentitiesnoconv("OriginalSize")); ?>": function() { console.log("Click on original size"); jQuery(".ui-dialog-content.ui-widget-content > object").css({ "max-height": "none" }); }, + "transnoentitiesnoconv("Close")); ?>": function() { $( this ).dialog( "close" ); } }; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c2cbd0a48fc..e3acac375d0 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1087,7 +1087,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs //print ''."\n"; if (empty($disablehead)) { - $ext='version='.urlencode(DOL_VERSION); + $ext='layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION); print "\n"; if (GETPOST('dol_basehref','alpha')) print ''."\n"; @@ -1314,7 +1314,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs // Global js function print ''."\n"; - print ''."\n"; + print ''."\n"; // JS forced by modules (relative url starting with /) if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2')) @@ -1865,7 +1865,7 @@ if (! function_exists("llxFooter")) global $conf, $langs, $user, $object; global $delayedhtmlcontent; - $ext='version='.urlencode(DOL_VERSION); + $ext='layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION); // Global html output events ($mesgs, $errors, $warnings) dol_htmloutput_events($disabledoutputofmessages); @@ -1926,7 +1926,7 @@ if (! function_exists("llxFooter")) if (! empty($conf->use_javascript_ajax)) { print "\n".''."\n"; - print ''."\n"; + print ''."\n"; } // Wrapper to add log when clicking on download or preview diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 08ce57cfede..13a67132559 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1283,7 +1283,7 @@ if (count($object->records) > 0) // ***** Part for pages - if ($website && ! in_array($action, array('editcss','editmenu','file_manager'))) + if ($website && ! in_array($action, array('editcss','editmenu'))) { print ''; // Close current websitebar to open a new one