From bd1f9ba99d1ad40bb7fe1c00eaa32b8884aae5e2 Mon Sep 17 00:00:00 2001 From: vangheem Date: Thu, 14 May 2015 16:53:20 -0500 Subject: [PATCH] also patch less.js --- Products/CMFPlone/static/components/less/dist/less.js | 11 +++++++++-- Products/CMFPlone/static/components/r.js/dist/r.js | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Products/CMFPlone/static/components/less/dist/less.js b/Products/CMFPlone/static/components/less/dist/less.js index fbbba14a37..5f019772d4 100644 --- a/Products/CMFPlone/static/components/less/dist/less.js +++ b/Products/CMFPlone/static/components/less/dist/less.js @@ -462,7 +462,15 @@ FileManager.prototype.loadFile = function loadFile(filename, currentDirectory, o return; } - this.doXHR(href, options.mime, function doXHRCallback(data, lastModified) { + /* XXX Plone hack to always re-download resource TTW */ + var url = href; + if(url.indexOf('?') === -1){ + url += '?'; + }else{ + url += '&'; + } + url = url + "bust=" + (new Date()).getTime(); + this.doXHR(url, options.mime, function doXHRCallback(data, lastModified) { // per file cache fileCache[href] = data; @@ -564,7 +572,6 @@ function loadStyles(modifyVars) { } function loadStyleSheet(sheet, callback, reload, remaining, modifyVars) { - var instanceOptions = clone(options); addDataAttr(instanceOptions, sheet); instanceOptions.mime = sheet.type; diff --git a/Products/CMFPlone/static/components/r.js/dist/r.js b/Products/CMFPlone/static/components/r.js/dist/r.js index 31c27a3573..3e7234bb88 100644 --- a/Products/CMFPlone/static/components/r.js/dist/r.js +++ b/Products/CMFPlone/static/components/r.js/dist/r.js @@ -25821,6 +25821,7 @@ define('build', function (require) { d.resolve(require._cachedRawText[path]); return d.promise; } else { + /* XXX Plone hack to always re-download resource TTW */ var url = path; if(url.indexOf('?') === -1){ url += '?';