2
0
forked from Wavyzz/dolibarr

Add layout into link of sub resources to solve undesired cache effect

This commit is contained in:
Laurent Destailleur
2017-11-18 12:35:25 +01:00
parent f284cd6c0f
commit bcaccb1829
4 changed files with 8 additions and 8 deletions

View File

@@ -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();
});

View File

@@ -919,8 +919,8 @@ function document_preview(file, type, title)
if (mode == 'image' && showOriginalSizeButton)
{
optionsbuttons = {
"<?php echo dol_escape_js($langs->trans("OriginalSize")); ?>": function() { console.log("Click on original size"); jQuery(".ui-dialog-content.ui-widget-content > object").css({ "max-height": "none" }); },
"<?php echo dol_escape_js($langs->trans("Close")); ?>": function() { $( this ).dialog( "close" ); }
"<?php echo dol_escape_js($langs->transnoentitiesnoconv("OriginalSize")); ?>": function() { console.log("Click on original size"); jQuery(".ui-dialog-content.ui-widget-content > object").css({ "max-height": "none" }); },
"<?php echo dol_escape_js($langs->transnoentitiesnoconv("Close")); ?>": function() { $( this ).dialog( "close" ); }
};
}

View File

@@ -1087,7 +1087,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
//print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">'."\n";
if (empty($disablehead))
{
$ext='version='.urlencode(DOL_VERSION);
$ext='layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION);
print "<head>\n";
if (GETPOST('dol_basehref','alpha')) print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref','alpha')).'">'."\n";
@@ -1314,7 +1314,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// Global js function
print '<!-- Includes JS of Dolibarr -->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext?'&amp;'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\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".'<!-- Includes JS Footer of Dolibarr -->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.($ext?'&amp;'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n";
}
// Wrapper to add log when clicking on download or preview

View File

@@ -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 '</div>'; // Close current websitebar to open a new one