version toolbar.css for cache-busting

pull/1/head
ansuz 8 years ago
parent 9d3f859657
commit 76990ac1b2

@ -1,7 +1,8 @@
define([ define([
'/customize/application_config.js', '/customize/application_config.js',
'/api/config',
'/bower_components/jquery/dist/jquery.min.js' '/bower_components/jquery/dist/jquery.min.js'
], function (Config) { ], function (Config, ApiConfig) {
var $ = window.jQuery; var $ = window.jQuery;
var Messages = {}; var Messages = {};
@ -54,8 +55,9 @@ define([
var firstConnection = true; var firstConnection = true;
var lagErrors = 0; var lagErrors = 0;
var styleToolbar = function ($container, href) { var styleToolbar = function ($container, href, version) {
href = href || '/customize/toolbar.css'; href = href || '/customize/toolbar.css' + (version?('?' + version): '');
$.ajax({ $.ajax({
url: href, url: href,
dataType: 'text', dataType: 'text',
@ -80,7 +82,12 @@ define([
} }
$container.prepend($toolbar); $container.prepend($toolbar);
if (ApiConfig && ApiConfig.requireConf && ApiConfig.requireConf.urlArgs) {
styleToolbar($container, undefined, ApiConfig.requireConf.urlArgs);
} else {
styleToolbar($container); styleToolbar($container);
}
return $toolbar; return $toolbar;
}; };

Loading…
Cancel
Save