From 2ceadcf68a9efbe063967999f275b6905060232b Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 31 Dec 2014 19:18:03 +0300 Subject: [PATCH] some tweaks... Signed-off-by: Alex A. Naanou --- ui (gen4)/file.js | 7 ++++++- ui (gen4)/images.js | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/file.js b/ui (gen4)/file.js index c1f129f5..cf0e7699 100755 --- a/ui (gen4)/file.js +++ b/ui (gen4)/file.js @@ -130,12 +130,17 @@ function loadJSON(path){ // - error - an error occurred... // // +// NOTE: this is fairly generic and does not care about the type of data +// or it's format as long as it's JSON and the file names comply +// with the scheme above... +// +// XXX add support for sharding... // XXX test with: // requirejs(['file'], // function(m){ // f = m.loadIndex("L:/mnt/hdd15 (photo)/NTFS1/media/img/others") }) // .done(function(d){ console.log(d) }) -// XXX need to do better error handling... +// XXX need to do better error handling -- stop when an error is not recoverable... // XXX a bit overcomplicated (???), see if this can be split into more generic // sections... var loadIndex = diff --git a/ui (gen4)/images.js b/ui (gen4)/images.js index 3bdeecc2..6affbdaf 100755 --- a/ui (gen4)/images.js +++ b/ui (gen4)/images.js @@ -607,6 +607,8 @@ module.ImagesPrototype = { } return this }, + // XXX this is really odd: renaming this to 'toJSON' breaks JavasCript + // making chrome/node just say: "" and a filename... dumpJSON: function(data){ return JSON.parse(JSON.stringify(this)) },