diff --git a/ui (gen4)/Makefile b/ui (gen4)/Makefile index 3593a7c8..dcc3bb7c 100755 --- a/ui (gen4)/Makefile +++ b/ui (gen4)/Makefile @@ -35,6 +35,8 @@ CSS_DIR=css NW_PROJECT_FILE=package.json JS_FILES := $(wildcard *.js) HTML_FILES := $(wildcard *.html) +CHROME_APP_KEY=chrome-app.pem + # get files to minify... JS_MIN_FILES := $(patsubst %.js,%.min.js,$(wildcard *.js)) @@ -43,6 +45,7 @@ LOGS := *.log NODE_DIR=node_modules BUILD_DIR=build +CHROME_APP_BUILD_DIR=build/Chrome-App/ImageGrid.Viewer WIN_BUILD_DIR=build/Win32 MAC_BUILD_DIR=build/MacOSX MAC_10_6_BUILD_DIR=build/MacOSX-10.6 @@ -80,6 +83,8 @@ $(NODE_DIR): mkdir -p $(NODE_DIR) $(BUILD_DIR): mkdir -p $(BUILD_DIR) +$(CHROME_APP_BUILD_DIR): + mkdir -p $(CHROME_APP_BUILD_DIR) $(WIN_BUILD_DIR): mkdir -p $(WIN_BUILD_DIR) $(MAC_BUILD_DIR): @@ -132,6 +137,12 @@ dev: css # build targets... # XXX most of the code here is duplicated, find a way to reuse sections... +chrome-app: $(APP_ZIP) $(CHROME_APP_BUILD_DIR) + unzip -u $(APP_ZIP) -d $(CHROME_APP_BUILD_DIR) + cp manifest.json $(CHROME_APP_BUILD_DIR) + rm -rf $(CHROME_APP_BUILD_DIR)/node_modules/ + #chrome --pack-extension=$(CHROME_APP_BUILD_DIR) --pack-extension-key=$(CHROME_APP_KEY) + # node-webkit win32 win32: $(APP_ZIP) $(WIN_BUILD_DIR) unzip -u targets/node-webkit/node-webkit-*-win-ia32.zip \ diff --git a/ui (gen4)/images.js b/ui (gen4)/images.js index 3913db66..594f912b 100755 --- a/ui (gen4)/images.js +++ b/ui (gen4)/images.js @@ -258,6 +258,10 @@ module.ImagesClassPrototype = { var ImagesPrototype = module.ImagesPrototype = { + get length(){ + return Object.keys(this).length + }, + // Generic iterators... // // function format: diff --git a/ui (gen4)/testing.js b/ui (gen4)/testing.js index 1aa20a91..c9303533 100755 --- a/ui (gen4)/testing.js +++ b/ui (gen4)/testing.js @@ -100,6 +100,12 @@ window.load2014 = function(){ } +window.loadInsta = function(){ + return glob('l:/mnt/Dropbox/Instagram/fav/ALL/*+(jpg|png)') + .on('end', function(l){ window.a.loadURLs(l) }) +} + + /********************************************************************** * vim:set ts=4 sw=4 : */ diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 310cc1a8..3737146e 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -210,7 +210,7 @@ actions.Actions({ loadURLs: ['Load a URL list', function(lst){ this.images = images.Images.fromArray(lst) - this.data = data.Data.fromArray(Object.keys(this.images)) + this.data = data.Data.fromArray(this.images.keys()) }],