projects
/
photo-tags.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
afaa0f8
)
some code cleanup
author
Arun Persaud
<arun@nubati.net>
Sat, 17 Nov 2012 23:09:14 +0000
(15:09 -0800)
committer
Arun Persaud
<arun@nubati.net>
Sat, 17 Nov 2012 23:09:14 +0000
(15:09 -0800)
js/photo-tags.js
patch
|
blob
|
history
diff --git
a/js/photo-tags.js
b/js/photo-tags.js
index e577a15ddfe87ea318c493689ba1c248e44d416b..2b21eb532ffaff253e50fca8ef870bf4c33d0d8a 100644
(file)
--- a/
js/photo-tags.js
+++ b/
js/photo-tags.js
@@
-143,16
+143,9
@@
function next_page() {
update_page_index();
}
update_page_index();
}
-function prev_pic() {
-}
-
-function next_pic() {
-}
-
function load_pic(myid) {
ID=myid;
update_page_index();
function load_pic(myid) {
ID=myid;
update_page_index();
- update_thumbnails();
load_content();
}
load_content();
}
@@
-218,12
+211,13
@@
function update_thumbnails(){
/* resort elements */
d3.select(".nextprev").select("ul").selectAll("li").sort(function(a,b){return a.id-b.id;});
/* resort elements */
d3.select(".nextprev").select("ul").selectAll("li").sort(function(a,b){return a.id-b.id;});
- d3.select(".nextprev").select("ul").selectAll("li").select("a").select("img").classed("current",function(d){return (d.id==IDcurr);});
+ d3.select(".nextprev").select("ul").selectAll("li").select("a").select("img")
+ .classed("current",function(d){return (d.id==IDcurr);});
/* add links for left/right arrows */
if (IDprev != -1 )
/* add links for left/right arrows */
if (IDprev != -1 )
-
d3.select(".left"
).on("click", function() { load_pic(IDprev); });
+
d3.select(".left"
).on("click", function() { load_pic(IDprev); });
if (IDnext != -1 )
d3.select(".right").on("click", function() { load_pic(IDnext); });
if (IDnext != -1 )
d3.select(".right").on("click", function() { load_pic(IDnext); });