Commit Graph

51 Commits

Author SHA1 Message Date
Bharat Mediratta
a245c57400 Further streamline the code.
Organize_Controller:
* Remove unnecessary constants
* Rename index() to dialog()
* Simplify _get_micro_thumb_grid

organize.js:
* Move sizing code in here from organize_dialog.html.php

organize_dialog.html.php:
* Move CSS and JS links in here so that we only load them when we need them.
* Move sizing code into organize.js

organize_thumb_grid.html.php:
* Move pagination logic in here, since it's view centric
* Collapse the css class determination code and inline it
2009-08-06 21:52:23 -07:00
Bharat Mediratta
d3f4643699 * Rename setContents -> show_album to be consistent style wise (no camel
caps) and more explicit about what it's doing.
* use toggleClass() to simplify the +/- css management.
2009-08-06 21:02:22 -07:00
Bharat Mediratta
6e4023a720 Fix indentation. 2009-08-06 16:16:11 -07:00
Tim Almdal
794a7a5abf Leverage the gallery.dialog/js functionality in order to reduce duplicate code 2009-08-06 14:55:03 -07:00
Tim Almdal
7ed15ea481 Remove 6 more lines by removing the generalization of the close dialog processing 2009-08-06 10:03:38 -07:00
Tim Almdal
d7c7a06efe Remove the complicated calculation to determine the height of the
micro thumb grid, by setting all the parent elements to 100% in the
css and then subtract the height of the button bar
2009-08-06 09:46:39 -07:00
Tim Almdal
7bdf382e81 Revert "Revert "Revert "Allow a theme to override the page refresh mechanism. Create a new"""
This reverts commit 7b1cca168c.

Basically remove it and Bharat and I will fight it out in SF for a resolution :-)
2009-08-06 07:02:41 -07:00
Tim Almdal
8131e6fa38 Tighten up the code by loading all the albums in the tree at once, removing
the events to populate the button bar.
2009-08-06 06:33:17 -07:00
Tim Almdal
cab46cf038 Remove the resize dialog on window resize functionality 2009-08-05 22:28:37 -07:00
Tim Almdal
824a80b0d4 Change the content pane based on the selection in the album tree 2009-08-05 15:24:31 -07:00
Tim Almdal
63f3efef37 Revert "Revert "Enable the expand/collapse of branches by clicking on the plus/minus""
This reverts commit e37526f94d.
2009-08-05 10:26:49 -07:00
Tim Almdal
65c850c393 Revert "Revert "Checkpoint the organize module rewrite. At this point, it doesn't really do""
This reverts commit 397468c47b.
2009-08-05 10:26:11 -07:00
Tim Almdal
7b1cca168c Revert "Revert "Allow a theme to override the page refresh mechanism. Create a new""
This reverts commit 9f396178ce.
2009-08-05 10:25:23 -07:00
Tim Almdal
9f396178ce Revert "Allow a theme to override the page refresh mechanism. Create a new"
This reverts commit 1f014aae6c.
2009-08-05 09:24:27 -07:00
Tim Almdal
397468c47b Revert "Checkpoint the organize module rewrite. At this point, it doesn't really do"
This reverts commit a25f08d433.
2009-08-05 09:23:32 -07:00
Tim Almdal
e37526f94d Revert "Enable the expand/collapse of branches by clicking on the plus/minus"
This reverts commit 869c3de961.
2009-08-05 09:23:01 -07:00
Tim Almdal
869c3de961 Enable the expand/collapse of branches by clicking on the plus/minus
icons.  Branches with no albums, will not have an icon.
2009-08-05 08:31:58 -07:00
Tim Almdal
a25f08d433 Checkpoint the organize module rewrite. At this point, it doesn't really do
anything, but get the dialog up, populate the album tree and intelligently
populate the micro thumb grid.
Still to do:
1) get the microthumbs laided out ptoperly
2) expand and collapse functionality in the album tree
3) use the album tree to change the content of the micro thumb grid
4) Actually add some functionality

At the moment, it supports a callback "" to allow modules to add icons
to the organize drawer label.  The close button is added outside of this
framework as it will always be last.
2009-08-03 09:19:17 -07:00
Tim Almdal
1f014aae6c Allow a theme to override the page refresh mechanism. Create a new
javascript lib (gallery.reload.js) which defines the functions
gallery_reload() and gallery_location(new_location).  They just
do a window.location.reload() and window.location = new_location.

This change breaks the assumption that all themes will handle page reloads
the same and allows the theme to customize the page refresh.
2009-07-27 12:39:12 -07:00
Tim Almdal
fcb031c2b6 Rename the get_url function in organize.js so that it doesn't collide with the
one in server_add
2009-07-04 22:47:43 -07:00
Tim Almdal
0451351f51 Set a minimum distance (10px) that the cursor has to move inorder for
the draggable functionality to be activated
2009-05-22 16:13:37 +00:00
Tim Almdal
09c8953af7 Provide delete confirmations in quick pane and organize features. If
I've missed any spots let me know.
2009-05-21 02:24:37 +00:00
Tim Almdal
a9e3692027 1) This provides the editting functionality for albums and photos in the
organize feature.
2) Remove the tag functionality at this point
3) Added a callback to handle validating conflicting names (only used
by organize at this point.
4) Closes #231
2009-05-21 01:31:29 +00:00
Tim Almdal
762ca22544 This takes us the next step closer to providing bulk edit. We still
can't edit, but we are getting closer :-).
This change sets up a framework for modules to contribute edit panels
to the organize drawer. Currently implemented General (albums and
photos), Sort Order (albums only) and Manage Tags
2009-05-18 19:34:03 +00:00
Tim Almdal
2c2839c13b Create a thumbnail stack of selected thumbnails for the organize
drawer
2009-05-07 17:39:34 +00:00
Tim Almdal
6a295dc93d 1) Leave an object selected if its clicked.
2) And a 1em left margin to provide more spacing, so the lasso is less inclusive
2009-05-07 05:16:56 +00:00
Tim Almdal
5305d1f569 Improve the selection/drag handling so that drag of a single item
doesn't have to be selected first
2009-05-07 04:56:08 +00:00
Tim Almdal
a8879cfe89 1) Improved selection processing.
2) Drawer closes if no images or albums are selected
2009-05-06 20:27:49 +00:00
Tim Almdal
88c0ede495 Add missing return statement 2009-05-02 03:23:55 +00:00
Tim Almdal
a12ed1de02 Move the drawer to the bottom of the page and compress the thumb grid
when the drawer opens.  This way the drawer is never scrolled.
2009-05-02 03:08:30 +00:00
Chad Kieffer
590eceaf93 Set organize messages to use existing gMessage, added album cover message. 2009-05-01 05:35:56 +00:00
Tim Almdal
33122e8968 Change album cover functionality added 2009-04-29 03:57:24 +00:00
Tim Almdal
89bdd6ca98 The delete button now deletes the selected items 2009-04-29 01:29:39 +00:00
Tim Almdal
12d976b94d 1) Refactor the ajax calls so that the code is reused across multipl
request types.
2) Enable/Disable the drawer handle buttons depending on the number of
items selcted
3) Image rotation works.
2009-04-28 21:29:14 +00:00
Tim Almdal
091fde3e00 Another iteration of the organize module:
Rearrange the layout as per discussion with thumb, start the drawer
functionality. Still to do... 
1) Add the processing behind the buttons on the drawer handle
2) Enable the drawer buttons when something is selected
3) Create a copy of the thumbs for the drawer
4) Add the bulk editting functionality to the drawer
2009-04-27 20:30:46 +00:00
Tim Almdal
465182e58f 1) Move the progress bar to a dialog
2) Provide status and error messages back to the user
2009-04-23 20:48:09 +00:00
Tim Almdal
b1a15f2130 Implement a cancel button so that if an organize task is paused, it
can be cancelled.
2009-04-23 04:53:48 +00:00
Tim Almdal
933770cf0e 1) Fix index overflow issue.
2) Fix where the microthumb was removed even if the move was cancelled
2009-04-22 23:23:15 +00:00
Tim Almdal
475b8fe9ff Dragging from the thumbgrid to an album in the tree now works.
Refactored the javascript to minimize duplication.
2009-04-22 16:09:57 +00:00
Tim Almdal
9d31564b7c 1) Disable drag when the rearrange task is running
2) Add the album name to the task name
2009-04-21 18:11:27 +00:00
Tim Almdal
4e944577f4 The pause button now works. 2009-04-21 14:15:58 +00:00
Tim Almdal
c94fc344e8 Added progress bar and pause and continue functionality to rearrange 2009-04-21 06:04:03 +00:00
Tim Almdal
ad10584dc1 1) Add rearrange processing as a task
2) Improved drop location determination
3) Add a revert if dropped on an invalid target
4) Add a popup dialog to display ajax errors
Still to do progress bar, pause/continue and status messages
2009-04-20 18:44:19 +00:00
Tim Almdal
e8d99f22a1 Simplify the handling of moves to the beginning or end of the album 2009-04-19 18:42:53 +00:00
Tim Almdal
663c38a7e8 Continue javascript code cleanup 2009-04-19 18:33:35 +00:00
Tim Almdal
f1a9ac807c Restructure the java script code (i.e. separate complex callbacks or
objects into variables)
2009-04-19 18:02:07 +00:00
Tim Almdal
aaec040716 - Improve the movement of the placeholder
- Make sure the thumbgrid will utoscroll when dragging
- And an ordinal attribute to the thumbnail when generated, based on the
current sort order of the album.
2009-04-19 03:51:29 +00:00
Tim Almdal
1a332009c7 Change how mutiple requests for micro thumbnails is handler.
handle the edge cases where the draggable is dropped on the micro
thumbnail panel
2009-04-17 20:17:53 +00:00
Tim Almdal
d8e9133873 Another iteration in the quest for the perfect organize module. At
this point you can select microthumbs, by clicking on them, ctrl-click
will add to the selection.  You can select by drawing a lasso around
images. Holding the ctrl will add the lassoed thumbs to the selection.
Once slected, thumbs can be dragged and dropped within the current
At this point no background processing takes place
2009-04-17 02:06:00 +00:00
Tim Almdal
898eba8e6f Here is the current state of "organize". I'm having trouble getting
drag and drop to work.  And to get it to layout properly.  Any
thoughts would be appreciated.
2009-04-09 16:33:14 +00:00