support MSIE 8 until after app load, and MSIE 8 with Chrome Frame beyond that

This commit is contained in:
rolux 2011-09-03 13:19:00 +00:00
parent 545d5c4dc8
commit 921a116a57
2 changed files with 147 additions and 145 deletions

View file

@ -14,20 +14,26 @@ Ox.load('UI', {
loadImages: true, loadImages: true,
showScreen: true, showScreen: true,
theme: 'modern' theme: 'modern'
}, function() { }, function(browserSupported) {
// fixme: use Ox.extend() // fixme: use Ox.extend()
Ox.load('Geo', function() { Ox.load('Geo', function() {
window.pandora = new Ox.App({url: '/api/'}).bindEvent({ window.pandora = new Ox.App({url: '/api/'}).bindEvent({
load: function(event, data) { load: function(data) {
if (!browserSupported) {
return;
}
Ox.extend(pandora, { Ox.extend(pandora, {
requests: {}, requests: {},
ui: {} ui: {}
}); });
loadResources('/static/json/pandora.json', function() { loadResources('/static/json/pandora.json', function() {
Ox.print('Ox.App load', data); Ox.print('Ox.App load', data);
// Ox.UI.hideLoadingScreen(); // Ox.UI.hideLoadingScreen();
@ -110,23 +116,19 @@ Ox.load('Geo', function() {
var promises = []; var promises = [];
files.forEach(function(file) { files.forEach(function(file) {
// fixme: opera doesnt fire onload for svg // fixme: opera doesnt fire onload for svg
// fixme: we don't have any svgs, right?
if ($.browser.opera && Ox.endsWith(file, '.svg')) { if ($.browser.opera && Ox.endsWith(file, '.svg')) {
return; return;
} }
//Ox.print('load', file)
var dfd = new $.Deferred(); var dfd = new $.Deferred();
Ox.loadFile(prefix + file, function() { Ox.loadFile(prefix + file, function() {
dfd.resolve(); dfd.resolve();
}); });
promises.push(dfd.promise()); promises.push(dfd.promise());
}); });
//Ox.print('promises.length', promises.length)
$.when.apply(null, promises) $.when.apply(null, promises)
.done(function() { .done(function() {
//Ox.print('promises done')
$(function() {
callback(); callback();
});
}) })
.fail(function() { .fail(function() {
throw new Error('File not found.') throw new Error('File not found.')
@ -172,5 +174,6 @@ Ox.load('Geo', function() {
); );
} }
}); });
}); });

View file

@ -27,7 +27,6 @@ pandora.ui.placesDialog = function() {
Ox.Request.clearCache(); // fixme: remove Ox.Request.clearCache(); // fixme: remove
callback(result); callback(result);
}); });
}, },
editPlace: function(place, callback) { editPlace: function(place, callback) {
Ox.print('EDITPLACE', place); Ox.print('EDITPLACE', place);