bookmark: 'thumbnails',\r
video: 'extras'};\r
\r
- if (this.gal != null && preload[view] != undefined) {\r
+ if (!OFFLINEAPP && this.gal != null && preload[view] != undefined) {\r
var w = this.addWaiter(true);\r
this.gal.downloadAndCall(preload[view], function() {\r
if ($this.waiterActive(w)) {\r
}\r
var e = pdf.split('/');\r
pdfName = e.pop();\r
- if (this.gal) {\r
+ if (this.gal && !OFFLINEAPP) {\r
this.displayLoader();\r
this.gal.downloadAndCall('extras', function() {\r
$this._openFile(pdf, $("#print"), 'pdf', pdfName);\r
var gal = null;
var home = window.location.toString();
var resolution = 'auto';
+var OFFLINEAPP = false;
try {
$(function() {
function loadPhonegap() {
var cordova = 'data/cordova.js';
var cordovaStorage = window.localStorage.getItem('cordova');
+ OFFLINEAPP = window.localStorage.getItem('offlineapp') == '1';
+
if (cordovaStorage) {
cordova = window.localStorage.getItem('cordova');
}
loadJSLibrary(
cordova
, function() {
- });
+ });
}
function onAppResume() {
resolution = collection.res;
}
- if (DATAS.phonegap && !manifest) {
+ if (DATAS.phonegap && !manifest && !OFFLINEAPP) {
manifest = collection.manifestPub[DATAS.id];
}
- if (navigator.onLine && manifest) {
+ if (navigator.onLine && manifest && !OFFLINEAPP) {
var readyToLoad = false;
var finishedLoading = false;
gal = new GameAssetLoader(JSON.parse(manifest), fsprefix);
var id = $(this).data('id');
window.localStorage.setItem('locale', locale);
- var topmanifest = window.sessionStorage.getItem('topmanifest');
- window.gallocale = new GameAssetLoader(JSON.parse(topmanifest), window.sessionStorage.getItem('galfsprefix'));
- window.gallocale.init(function() {
- window.gallocale.downloadAndCall('p_' + id, function() {
- var url = window.home;
- var replace = "/" + fluidbook.datas.id + "/";
- var replaceby = "/" + id + "/";
- url = url.replace(replace, replaceby);
- var c = window.localStorage.getItem('collection');
- window.location = url;
+ if (OFFLINEAPP) {
+ /**
+ *
+ * @todo
+ */
+ } else {
+ var topmanifest = window.sessionStorage.getItem('topmanifest');
+ window.gallocale = new GameAssetLoader(JSON.parse(topmanifest), window.sessionStorage.getItem('galfsprefix'));
+ window.gallocale.init(function() {
+ window.gallocale.downloadAndCall('p_' + id, function() {
+ var url = window.home;
+ var replace = "/" + fluidbook.datas.id + "/";
+ var replaceby = "/" + id + "/";
+ url = url.replace(replace, replaceby);
+ var c = window.localStorage.getItem('collection');
+ window.location = url;
+ });
});
- });
+ }
} catch (err) {
}