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
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
Bharat Mediratta
483d8df91b
Change the organize tree to expand/collapse. It doesn't properly open
...
up to the album that you're viewing, and if you move a photo to a
different album it'll reload the entire album tree.
2009-08-29 16:33:22 -07:00
Bharat Mediratta
775987dff9
Fix a bug where organize doesn't properly generate the tree at the root album.
2009-08-29 11:29:38 -07:00
Bharat Mediratta
b833cb6073
Get rid of the task infrastructure. The multiple requests greatly
...
slow down simple operations. We may run into problems with more
complex operations, but let's only add tasks into the mix when it's
clear that we need them.
2009-08-29 10:48:23 -07:00
Bharat Mediratta
f257cd3d69
Major refactor of organize:
...
* Clean up naming conventions for variables in the controller
so that we specifically refer to albums with $album_id, etc.
* Move complexity for drawing tree out of the controller and into
the view.
* Simplify task definitions to get rid of extraneous text
* Change __PLACEHOLDERS__ to clearly define which is the album
and which is the item that we're moving before/after
* Remove as many CSS ids as we can from the tree view to keep
things simple
2009-08-29 10:00:47 -07:00
Bharat Mediratta
cb2171d082
Display the sort order in the Organize dialog, and allow users to
...
change the sort order on the fly.
2009-08-28 14:27:37 -07:00
Bharat Mediratta
b9aca313fa
Fix a couple of off-by-one errors.
2009-08-28 11:41:06 -07:00
Bharat Mediratta
76e541745f
Refactor rearrange_task_handler to have a more linear flow.
2009-08-28 11:13:04 -07:00
Bharat Mediratta
47fd2dc65e
Clean up in preparation for some refactoring.
2009-08-28 09:53:54 -07:00
Tim Almdal
82edd2a37b
This patch adds some security to the organize dialog.
...
1) If images are dragged from the content pane and dropped on a branch in the
tree that the user only has view priviledges, then the drop is cancelled
and the images are reverted.
2) The user cannot click on a branch, to which they only have view priviledges,
the content pane does not change to the new album
2009-08-17 19:52:40 -07:00
Tim Almdal
6f6d5b306b
remove the batch start/stop and replace the ORM update of the weight, with a direct sql update. This bypasses the gallery3 event mechanism. Fire a album_rearrange event when the rearrangement is complete
2009-08-17 12:56:05 -07:00
Tim Almdal
69d1b16818
Change back to using the ORM to update the child weight, but use the batch::start() method so notifications are queued
2009-08-17 12:32:33 -07:00
Tim Almdal
5e9c602b09
Fix the performance problem related to setting the child weight, by bypassing ORM and generating the sql directly.
2009-08-17 11:46:10 -07:00
Tim Almdal
dd9f4b6d7f
The rearrange functionality works. but it is slower than shit. I've left the debug statements in until we can solve this issue.
2009-08-17 08:49:37 -07:00