From b80756ac72df7d7fa12e5f7c3fdeeeabf4f1590a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 24 Dec 2013 22:08:18 +0400 Subject: [PATCH] bumped DATA version to 2.2... Signed-off-by: Alex A. Naanou --- ui/data.js | 6 +++++- ui/files.js | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/data.js b/ui/data.js index 451f4287..4b619d4f 100755 --- a/ui/data.js +++ b/ui/data.js @@ -38,12 +38,16 @@ // - MARKED now maintained sorted, live, // - will auto-sort marks on load of 2.0 data and change // data version to 2.1, will need a re-save, +// 2.2 - Minor update to how data is handled and saved +// - now DATA.current is saved separately in current.json +// loading is done from current.json and if not found from +// data.json // // NOTE: Gen1 and Gen3 refer to code generations rather than data format // iterations, Gen2 is skipped here as it is a different project // (PortableMag) mostly built on the same code base as // ImageGrid.Viewer -var DATA_VERSION = '2.1' +var DATA_VERSION = '2.2' var CONFIG = { diff --git a/ui/files.js b/ui/files.js index b2801858..b4332a03 100755 --- a/ui/files.js +++ b/ui/files.js @@ -486,12 +486,13 @@ function loadFileState(path, prefix){ res.resolve() // version 2.* - } else if(/2\.[0-9*]/.test(json.version)) { + } else if(/2\.[0-9]*/.test(json.version)) { DATA = json $.when( // XXX load config... // load current position... + // added on 2.2 bubbleProgress(prefix, loadLatestFile(path, CURRENT_FILE, @@ -508,6 +509,8 @@ function loadFileState(path, prefix){ // normalizePath(DATA.image_file, base) // : null), res, true), // run registered loaders... + // added on 2.1 + // XXX bubbleProgress??? runFileLoaders(prefix, res)) .done(function(){ $('.viewer').trigger('fileStateLoaded')