Commit Graph
102 Commits
Author SHA1 Message Date
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 AlmdalandBharat Mediratta 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 DISEZandBharat Mediratta 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
Bharat Mediratta cfbbf9ef60 Convert __toString() to use (string) cast instead. 2010-01-27 21:58:06 -08:00
Bharat Mediratta 07a9ef2276 Convert some database calls 2009-12-25 13:24:38 -08:00
Bharat Mediratta 8b9a02084a Updates for the latest version of Kohana 2.4:
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -08:00
Andy Staudacher 7608870537 Controller auth / CSRF fixes 2009-09-15 22:51:49 -07:00
Tim Almdal 5f343ab8a0 Change the variable to to resolve ticket #769 2009-09-14 08:11:12 -07:00
Bharat Mediratta 752c857116 Rename ORM_MPTT::is_descendant() to ORM_MPTT::contains() to make the
API a little clearer.  Write a test for it, too.
2009-09-10 10:28:43 -07:00
Bharat Mediratta b550a06045 Rename $album to $target in move_to() 2009-09-10 10:08:29 -07:00
Tim Almdal 2bbe162339 A better fix for #741... the original problem was that the source and album variables were reversed 2009-09-10 10:09:09 -07:00
Tim Almdal eb345cb870 Changed the check in organize_Controller::move_to:
1) check that target and source are not the same.
2) check that the source is not already a child of the target (use to be a
   descendant) Fixes #741.
2009-09-10 06:17:21 -07:00
Bharat Mediratta db03c5d799 Don't try to move an item into its own descendant hierarchy. Just leave it out of the move for now. 2009-08-30 15:09:13 -07:00
Bharat Mediratta c615918829 Manage the selection so we don't automatically select an album
whenever we expand a tree.
2009-08-30 14:40:55 -07:00
Bharat Mediratta d1ade6620e Precalculate the organize tree based on the selected album and render
it right away while still allowing incremental tree loading.
2009-08-30 14:35:27 -07:00