load modules with Ox.VERSION in build mode to make caching work
This commit is contained in:
parent
0be0d5fbb7
commit
0588ebe211
3 changed files with 5 additions and 4 deletions
|
@ -230,7 +230,7 @@ Ox.load.UI = function(options, callback) {
|
|||
|
||||
function loadFiles() {
|
||||
|
||||
Ox.getFile(Ox.PATH + '/Ox.UI/jquery/jquery.js', function() {
|
||||
Ox.getFile(Ox.PATH + '/Ox.UI/jquery/jquery.js?' + Ox.VERSION, function() {
|
||||
initUI();
|
||||
Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.json?' + Ox.VERSION, function(data) {
|
||||
var counter = 0, length = data.files.length;
|
||||
|
@ -243,7 +243,7 @@ Ox.load.UI = function(options, callback) {
|
|||
++counter == length && initThemes();
|
||||
});
|
||||
} else {
|
||||
Ox.getFile(Ox.PATH + file, function() {
|
||||
Ox.getFile(Ox.PATH + file + '?' + Ox.VERSION, function() {
|
||||
++counter == length && initThemes();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ Ox.load = function() {
|
|||
} else {
|
||||
Ox.forEach(modules, function(options, module) {
|
||||
Ox.getFile(
|
||||
Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js',
|
||||
Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js?' + Ox.VERSION,
|
||||
function() {
|
||||
Ox.load[module](options, function(success) {
|
||||
succeeded += success;
|
||||
|
|
|
@ -96,7 +96,8 @@ Ox.getAsync = function(urls, get, callback) {
|
|||
var element, tagValue, typeValue, urlKey;
|
||||
if (!cache[url]) {
|
||||
if (!type) {
|
||||
type = url.split('.').pop();
|
||||
type = Ox.parseURL(url).pathname.split('.').pop();
|
||||
console.log(type, url);
|
||||
type = type == 'css' ? 'stylesheet'
|
||||
: type == 'js' ? 'script' : 'image';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue