Commit Graph

114 Commits

Author SHA1 Message Date
Bharat Mediratta
21a4341014 Fix an assignment-instead-of-comparison bug. I wish PHP had a better
warning system for this stuff.  In this case it's innocuous because
the UI only allows you to rearrange stuff inside a single album, so
the assignment doesn't do anything.  Fixes #1914.
2013-01-25 15:49:04 -05:00
Bharat Mediratta
727a595447 Add back a comment that I accidentally removed in the last commit. 2013-01-24 18:13:26 -05:00
Bharat Mediratta
aa8fffcd8f Extract reweighting logic out of Organize_Controller into
item::reweight_all_children as an API and write a test for it.  Work
in progress on #1914.
2013-01-23 21:33:19 -05:00
Bharat Mediratta
937102e888 Merge pull request #97 from mikeage/organize_tag2
Add batch tagging via the organize module
2013-01-23 14:07:59 -08:00
Mike Miller
80d6a895ed #1952 Add bulk tagging to the Organize module.
Allow a user to highlight one or more items (images, videos, or albums), and enter a tag (or tags, comma delimited) and apply it to all of the selected items. The code is based on the batchtag module.

If the tags module is not enabled, no changes to the Organize UI will be shown.
2013-01-23 22:58:45 +02:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
3191f0f18b Fix up a title that I overlooked in 581d9a58db 2012-05-08 19:03:26 -07:00
Bharat Mediratta
a16b465451 Remove debug line added in 581d9a58db 2012-05-05 19:44:11 -07:00
Bharat Mediratta
581d9a58db Clean up title handling code in organize and wind theme for consistency.
Fixes #1847.
2012-05-05 19:38:31 -07:00
Bharat Mediratta
f488384a7b Guard reparent/rearrange against bad values in source_id. Fixes #1843. 2012-04-30 15:04:45 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Beckett Madden-Woods
1a1a05ed94 Merge commit 'upstream/master' 2011-01-09 04:03:31 +00:00
Beckett Madden-Woods
b78a1319ae Add item delete support to the organize module. Fixes #1588. 2011-01-09 03:59:25 +00:00
Bharat Mediratta
4c80ed53d2 Put up a more visually pleasing placeholder for items that are
missing a thumbnail.  Fixes #1591.
2011-01-08 19:27:08 -08:00
Bharat Mediratta
8f5a3fd0c2 Update the dialog title to reflect the album we're currently
organizing.
2011-01-08 18:45:10 -08:00
Bharat Mediratta
600e04b58c Lock the drag zone if the album is not editable so that users don't
start illegal drags.
2011-01-06 12:02:17 -08:00
Bharat Mediratta
fc6907dcfe Switch back to setting nodes as leaves, but fix the drop zone code to
allow dropping on leaves.
2011-01-06 11:46:15 -08:00
Bharat Mediratta
9682b7ea6e Remove unnecessary leaf param from TreeNode results. 2011-01-06 09:59:08 -08:00
Bharat Mediratta
514d5affa6 When generating the tree, don't mark nodes with no children as a leaf
because that confuses the TreeDropZone JS into thinking that it can't
ever have children.
2011-01-06 09:49:37 -08:00
Bharat Mediratta
84f287865e Don't allow moving an item into its own hierarchy. Just silently skip
those sources for now.
2011-01-06 08:17:01 -08:00
Bharat Mediratta
2167168f51 Get rid of the expando caret in front of empty folders 2011-01-05 22:32:33 -08:00
Bharat Mediratta
372905bd13 Support moving an item before or after the target. 2011-01-05 02:00:40 -08:00
Bharat Mediratta
3a11e0d825 This was left out of 31652eae44. 2011-01-04 22:21:02 -08:00
Bharat Mediratta
8e21dda195 Complete rewrite of the organize module in Javascript using the Sencha
JavaScript library.  It's got all the functionality from the Flash
version except it doesn't support creating new albums or uploading
photos.

Only tested in Chrome 10.0.x so far.
2011-01-03 20:24:21 -08:00
Bharat Mediratta
04add75f6f Get rid of the move dialog and move option. Instead, replace it with
a call to Organize with the appropriate album open.  I have not yet
figured out how to get the SWF code to highlight the active image, but
that's coming.  Partial fix for #1204.
2010-08-22 00:27:24 -07:00
Bharat Mediratta
ae618840b6 Tighten up whitespace. 2010-08-21 15:25:06 -07:00
Bharat Mediratta
387d30da76 use HTTP_HOST instead of SERVER_NAME so that we're sending requests
back to the same canonical domain that we came from.  Else Flash makes
crossdomain.xml requests, fails, and falls over.

Fixes ticket #1298.
2010-08-17 22:32:47 -07:00
Bharat Mediratta
7607e1f932 Full pass over all the JSON encoding and JS dialog code. We now abide
by the following rules:

1) An initial dialog or panel load can take either HTML or JSON, but
   the mime type must accurately reflect its payload.

2) dialog form submits can handle a pure HTML response, but the mime
   type must also be correct.  This properly resolves the problem
   where the reauth code gets a JSON response first from the reauth
   code, and then an HTML response when you reauth and continue on to
   a given form -- try it out with Admin > Settings > Advanced.

3) All JSON replies must set the mime type correctly.  The json::reply
   convenience function does this for us.

4) By default, any HTML content sent back in the JSON response should be
   in the "html" field, no longer the "form" field.

The combination of these allows us to stop doing boilerplate code like
this in our controllers:

  // Print our view, JSON encoded
  json::reply(array("form" => (string) $view));

instead, controllers can just return HTML, eg:

  // Print our view
  print $view;

That's much more intuitive for developers.
2010-07-31 21:16:17 -07:00
Tim Almdal
91a2c04a24 More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
2010-07-31 15:44:55 -07:00
Tim Almdal
329abfe539 Merge branch 'master' into talmdal_dev 2010-07-11 09:09:52 -07:00
Romain LE DISEZ
39962eaddc Accept extension .m4v as video/mp4 2010-07-10 08:09:04 -07:00
Tim Almdal
dbf3199e46 Fix for ticket #1181. Use $.getJSON to retrieve the json contents of the dialog. Convert all the controllers
that create the data to go into a dialog to return the html as part of a json object.
2010-07-06 14:12:01 -07:00
Bharat Mediratta
9b78867427 Simplify rest::get_access_key($user) to rest::access_key() that
returns just the access key string for the active user.  That's how we
use the API, so keep it simple.
2010-06-18 20:43:14 -07:00
Tim Almdal
545a91270d 1) Change how the size of the flexstage is calculated. (Basically remove the
dialogWidth and dialogHeight and adjsut the internal controls when added to
   the stage.
2) Cleanup the controller code
2010-06-18 19:05:59 -07:00
Bharat Mediratta
ec40e03a37 Use request::protocol(). 2010-06-18 15:20:32 -07:00
Tim Almdal
070db2a97a Rearrange the adding of fields to the template so that they match the order of appearance in the template. Also remove the @todo's 2010-06-17 10:21:37 -07:00
Bharat Mediratta
359235182e Add a cache-buster to the SWF url so that it'll refresh in the browser
every time the SWF file changes.
2010-06-17 09:57:38 -07:00
Tim Almdal
f10d641044 Change the parameters for the organize dialog box. The baseUrl parameter was removed and replaced with the restUri, which contains the relative uri for the rest controller. The controller parameter is now the relative uri for the organize controller. The protocol parameter was added. In addition, there is not default size for the organize flex object. It attempts to fit within the gallery3 dialog box. 2010-06-14 13:07:58 -07:00
Tim Almdal
821d3f7854 Remove a debugging statement. 2010-06-13 19:50:52 -07:00
Tim Almdal
47aa651430 Fix problems ith IE and flex initialization when one of the flashvars contains a json encoded string. Also address the problem that IE returns the color values differently that Firefox and Chrome 2010-06-13 17:58:50 -07:00
Tim Almdal
e4ff302e3b Add items and add albums are now working. What still needs to be done is add a progress bar for longer running tasks 2010-05-20 09:05:50 -07:00
Tim Almdal
ffc3f9f41c checkpoint the new organize module. At this point rearrange and move work. Rearrange is moving items within the same album, move is moving to a different album. 2010-05-18 10:00:48 -07:00
Tim Almdal
91f27bf32f add a controller method to return the translated labels for the add album dialog. 2010-03-30 06:33:42 -07:00
Tim Almdal
67a8ef4277 Convert the old organize to the new flex based organize 2010-03-27 11:16:41 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Andy Staudacher
e754bc18ea Input sanitization 2010-02-15 13:44:37 -08:00
Tim Almdal
e2e637064a The adjustment for before or after based on whether the locales rtl or not is now done in the browser. 2010-02-07 14:25:05 -08:00
Tim Almdal
eff7de3852 If the locale is rtl then change 'after' to 'before' or vice-versa. Fixes ticket #939. 2010-02-04 08:51:15 -08:00
Tim Almdal
c820613917 Don't change the current album when items are dragged to a different album in the album tree. Fixes ticket #959. 2010-02-04 08:24:02 -08:00