diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-11-22 23:19:36 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-11-22 23:19:36 -0500 |
| commit | 070b5e6d9d3c7e23c06f0ae0b75026923529c24d (patch) | |
| tree | 89c430dd17ca54ff60f885ecd99cf6cfa0f0b7ff /js/gallery.js | |
| parent | 04537ed34d443d0610b77420d1dbef64bc05fbfa (diff) | |
| parent | 1631cdf643283fc71bc9d70b5dcbce03ab9c2386 (diff) | |
Merge branch 'master' of lmno:dither
Diffstat (limited to 'js/gallery.js')
| -rw-r--r-- | js/gallery.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/js/gallery.js b/js/gallery.js index 16ecdd8..839316c 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -3,7 +3,10 @@ var gallery = {} -gallery.init = function(){ +gallery.init = function(choose){ + if (choose) { + gallery.choose = choose; + } gallery.bind() } @@ -11,7 +14,6 @@ gallery.bind = function(){ $("#gallery-random").click(asdf.random) $("#gallery-search").submit(dumpfm.search) $(document).on("click", "#gallery-images canvas", gallery.click) - status("ready") } gallery.load = function(ims){ @@ -43,6 +45,7 @@ gallery.image = function(im){ $(thumb.canvas).show() }) $(img).click(gallery.choose); + $("#persist-image").attr("checked", false) } try { img.src = im.url; } catch(e){ return; } @@ -52,3 +55,10 @@ gallery.image = function(im){ gallery.click = function(){ gallery.choose() } + +// template for choose function.. bound to an image object +gallery.choose = function(){ + var img = this + var imageURL = this.src +} + |
