Commit Graph
264 Commits
Author SHA1 Message Date
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
Bharat Mediratta 185a736ff9 Revert "Combine all the flex runtime libraries into a single downloadable file. Fixes ticket #1241."
This breaks organize on Chrome 5 (Linux) and Chrome 6 (OSX).  See ticket #1241.

This reverts commit 423fca2d5f.
2010-07-27 11:28:12 -07:00
Bharat Mediratta 84a50e737b Fix the "get flashplayer" button. It was throwing a JS error before.
Not sure why it was done in JS in the first place.  Fixes ticket #1256.
2010-07-27 11:18:55 -07:00
Tim Almdal f699d2b385 Fix missing quoate in the organize dialog html template. 2010-07-23 05:56:59 -07:00
Tim Almdal 423fca2d5f Combine all the flex runtime libraries into a single downloadable file. Fixes ticket #1241. 2010-07-23 05:54:50 -07:00
Bharat Mediratta 96bcc8146c Style and text cleanup. Parameterize the minimum flash value so that we can use it in the internationalized string. Fix capitalization. 2010-07-20 07:03:43 -07:00
Tim Almdal bd969a6ffa Fix for ticket #1202. Set the minimum flash version 10.0.0 and display a message and a button to download the latest version if the minimum versiion is not installed. 2010-07-16 07:37:24 -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
Tim Almdal a57ac38839 Change the organize dialog to make use of the new error handling 2010-06-19 17:32:15 -07:00
Tim Almdal 239da24786 Merge branch 'master' of git@github.com:gallery/gallery3 2010-06-18 21:49:26 -07:00
Tim Almdal e40b2371ee Fix an issue that the root album was not being selected if there was no
children, or if organize was being invoked on the root album.
2010-06-18 21:49:11 -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 fce95785be Remove duplicate trailing slash on the controllerUri parameter 2010-06-17 17:41:35 -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 3d4f04e827 Change the add album dialog to not replace the internet address or name fields if they already contain values. 2010-06-17 06:14:24 -07:00
Tim Almdal 172c3fd209 Fix a typo... The controller parameter to the flex organize module should be controllerUri instead. 2010-06-16 17:31:31 -07:00
Bharat Mediratta 8fb56abf03 Bump the organize module to version 2, and check to make sure that the
REST module is active.
2010-06-15 16:30:02 -07:00
Bharat Mediratta d96ce71f1a Remove a stray period. 2010-06-15 15:29:45 -07:00
Tim Almdal 81f176cf8e url::site(...) adds a leading slash to the uri it generates. Take this into account when creating the base url for accessing rest requests.
Update the sort dropdown box to manual when album items are rearranged.
2010-06-15 09:39:45 -07:00
Tim Almdal f5eb5d5d70 add an 'icon' to identify albums in the organize dialog. 2010-06-15 09:14:09 -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 5decb3b252 Move the source to the gallery3-flex repository. 2010-06-13 19:31:48 -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 cbcb7432b3 Correct a problem with the sort order and sort direction fields being ignored. 2010-06-10 14:10:19 -07:00
Tim Almdal 6aab0cbec6 Review the code for xss exposures and provide the functionality to update the organize dialog bar when the selected album changes. 2010-06-10 13:12:10 -07:00
Tim Almdal 38e8ab3d71 Provide better handling and a progress dialog when loading or updating files. 2010-06-10 09:14:13 -07:00
Tim Almdal af240a3498 Update the rest client to use ancestors_for instead of ancestor_for. 2010-06-07 05:25:26 -07:00
Tim Almdal c4d85721fc Change the rearrange processing to use the ProcessItemQueue when moving children, so a progress dialog is displayed 2010-05-28 16:43:10 -07:00
Tim Almdal 56587febff Add a progress dialog box when deleting, uploading or updating items. 2010-05-28 09:42:26 -07:00
Tim Almdal a1181c5a49 Renamed GalleryRestRequestBuilder to GalleryRestRequest. Refactored the sendRequest method out of the GalleryResource class and moved it to the GalleryRestRequest class. Converted the properties captureDate, updatedDate, and createdDate to return a flex date object instead of a string representing a unix timestamp. 2010-05-21 07:29:17 -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 32fa15ca3a Add dependency checking to insure the administrator is notified if the rest module is deactivated 2010-05-09 20:39:31 -07:00
Tim Almdal 0dfc62051e Update the flex organize to use access_key instead of access_token 2010-03-31 07:14:48 -07:00
Tim Almdal e56473c5d7 Checkpoint the organize flex source. Not production ready, but worth checkpointing. 2010-03-30 08:08:30 -07:00
Tim Almdal 7c84ee1b33 Organize now has the add album functionality. 2010-03-30 07:55:56 -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 0c1595d7e8 Clean up the organize_dialog file of some cruft and add the organize.swf file to the organize module. 2010-03-27 15:55:42 -07:00
Tim Almdal 67a8ef4277 Convert the old organize to the new flex based organize 2010-03-27 11:16:41 -07:00
Florent PaternoandTim Almdal 08f11ce90e Fix bug #1015 : repeated ids are prohibited 2010-03-13 08:39:04 -08:00
Tim Almdal 1c022a5c84 Merge branch 'master' into talmdal_dev 2010-03-05 06:54:12 -08: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
Tim Almdal f28b80fcf4 Merge branch 'master' into talmdal_dev 2010-02-26 09:58:57 -08:00