added jqueryUI to list of prefetched resources, and updated its loader to not use $.getScript(). Updated require.js files to use ?v= in the url argument for cache buster

v1.18.x
Julian Lam 9 years ago
parent daa7dfacb8
commit 7902987900

@ -466,7 +466,11 @@ app.cacheBuster = null;
return callback();
}
$.getScript(config.relative_path + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js', callback);
var scriptEl = document.createElement('script');
scriptEl.type = 'text/javascript';
scriptEl.src = config.relative_path + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js' + (app.cacheBuster ? '?v=' + app.cacheBuster : '');
scriptEl.onload = callback;
document.head.appendChild(scriptEl);
};
app.showEmailConfirmWarning = function(err) {

@ -46,10 +46,13 @@ module.exports = function(Meta) {
var defaultLinks = [{
rel: "icon",
type: "image/x-icon",
href: nconf.get('relative_path') + '/favicon.ico?' + Meta.config['cache-buster']
href: nconf.get('relative_path') + '/favicon.ico' + (Meta.config['cache-buster'] ? '?' + Meta.config['cache-buster'] : '')
}, {
rel: "manifest",
href: nconf.get('relative_path') + '/manifest.json'
}, {
rel: "prefetch",
href: nconf.get('relative_path') + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js' + (Meta.config['cache-buster'] ? '?v=' + Meta.config['cache-buster'] : '')
}];
// Touch icons for mobile-devices

@ -2,7 +2,7 @@
require.config({
baseUrl: "{relative_path}/src/modules",
waitSeconds: 3,
urlArgs: "{config.cache-buster}",
urlArgs: "v={config.cache-buster}",
paths: {
'forum': '../client',
'admin': '../admin',

Loading…
Cancel
Save