fix a bug that would keep loadFile from caching files

This commit is contained in:
rlx 2011-10-23 16:00:59 +00:00
parent 116d0bfdbf
commit 925aa8d627
2 changed files with 5 additions and 3 deletions

View file

@ -122,13 +122,15 @@ Ox.load = function() {
}; };
Ox.Log = (function() { Ox.Log = (function() {
var filter = /.*?/, var filter = /*localStorage && localStorage.filter
? new RegExp(localStorage.filter) || */'/.*?/',
that = function() { that = function() {
Ox.Log.log.apply(null, arguments); Ox.Log.log.apply(null, arguments);
return that; return that;
}; };
that.filter = function(regexp) { that.filter = function(regexp) {
filter = regexp; filter = regexp;
// ...
}; };
that.log = function() { that.log = function() {
if (filter.test(JSON.stringify(arguments))) { if (filter.test(JSON.stringify(arguments))) {

View file

@ -91,10 +91,10 @@ Ox.loadFile = (function() {
if (isImage) { if (isImage) {
// for an image, save the element itself, // for an image, save the element itself,
// so that it remains in the browser cache // so that it remains in the browser cache
cache['file'] = element; cache[file] = element;
callback(element); callback(element);
} else { } else {
cache['file'] = true; cache[file] = true;
callback(); callback();
} }
} }