From 11f8be4a2ad9b6e7a2e310a4c117e007e572ca69 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 8 Jun 2012 17:59:38 +0400 Subject: [PATCH] some cleanup... Signed-off-by: Alex A. Naanou --- ui/gallery.html | 46 +++++++++++++++------------------------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/ui/gallery.html b/ui/gallery.html index 996436dd..c35e0db4 100755 --- a/ui/gallery.html +++ b/ui/gallery.html @@ -29,6 +29,14 @@ TODO: - make this into a jquery plugin... - add dynamic loading and unloading for very large sets... - gesture support... +- add basic actions: + - rotate left + - rotate right + - ... +- add info: + - number of images in ribbon + - position in ribbon + - first stage refactoring: - merge almost identical functions... @@ -94,6 +102,7 @@ $(document).ready(function() { */ $(".image").click(handleClick) + // control elements... $('.next-image').click(nextImage) $('.prev-image').click(prevImage) $('.demote').click(demoteImage) @@ -101,22 +110,21 @@ $(document).ready(function() { $('.toggle-wide').click(toggleWideView) $('.toggle-single').click(toggleRibbonView) - // set the default position... - $('.current-image').click() - // load images... // XXX not allowed... //$.getJSON('images.js', loadImages}) // XXX STUB loadImages(image_list) + + // set the default position and init... + $('.current-image').click() + }); function loadImages(json){ - // XXX STUB var images = json.images var ribbon = $('.ribbon').last() - $('.image').remove() for(var i = 0; i < images.length; i++){ @@ -128,7 +136,6 @@ function loadImages(json){ .appendTo(ribbon) } ribbon.children().first().click() - } // XXX jquery.gestures handler... @@ -633,32 +640,9 @@ function demoteImage(){
+