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

This commit is contained in:
rlx 2011-09-03 13:19:00 +00:00
parent 12bcb0d4b1
commit 48921b533e
2 changed files with 147 additions and 145 deletions

View file

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