summaryrefslogtreecommitdiff
path: root/js/gallery.js
diff options
context:
space:
mode:
authorjules <jules@okfoc.us>2014-02-02 18:58:46 -0500
committerjules <jules@okfoc.us>2014-02-02 18:58:46 -0500
commitb125e3106727e0acb627f17f4de0a1c3a1cf6f49 (patch)
tree36a2be85ac7ee402cd78fe9d53e4dc7da8d9c023 /js/gallery.js
parentc1e6c0c182102e5d61a8ac26b403b42c5fd40591 (diff)
parent2c0ddba2dab715a7c81a106edcfdd9f5be0592a2 (diff)
Merge branch 'master' into pepper
Diffstat (limited to 'js/gallery.js')
-rw-r--r--js/gallery.js14
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
+}
+