forked from 0x2620/pandora
support MSIE 8 until after app load, and MSIE 8 with Chrome Frame beyond that
This commit is contained in:
parent
545d5c4dc8
commit
921a116a57
2 changed files with 147 additions and 145 deletions
|
@ -14,7 +14,7 @@ Ox.load('UI', {
|
|||
loadImages: true,
|
||||
showScreen: true,
|
||||
theme: 'modern'
|
||||
}, function() {
|
||||
}, function(browserSupported) {
|
||||
|
||||
// fixme: use Ox.extend()
|
||||
|
||||
|
@ -22,12 +22,18 @@ 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.')
|
||||
|
@ -173,4 +175,5 @@ Ox.load('Geo', function() {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -27,7 +27,6 @@ pandora.ui.placesDialog = function() {
|
|||
Ox.Request.clearCache(); // fixme: remove
|
||||
callback(result);
|
||||
});
|
||||
|
||||
},
|
||||
editPlace: function(place, callback) {
|
||||
Ox.print('EDITPLACE', place);
|
||||
|
|
Loading…
Reference in a new issue