From ffc3f9f41c3d8d6df08d9ad6138f4ad74749ccec Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 18 May 2010 10:00:48 -0700 Subject: 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. --- modules/organize/lib/Gallery3WebClient.swf | Bin 0 -> 139321 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 modules/organize/lib/Gallery3WebClient.swf (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf new file mode 100644 index 00000000..a9e4c66b Binary files /dev/null and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From e4ff302e3b1d64de2864e7fcd64f26e6d012089b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 20 May 2010 09:05:50 -0700 Subject: Add items and add albums are now working. What still needs to be done is add a progress bar for longer running tasks --- modules/organize/controllers/organize.php | 6 ++++-- modules/organize/lib/Gallery3WebClient.swf | Bin 139321 -> 136657 bytes .../organize/source/Gallery3Organize_source.zip | Bin 924325 -> 937810 bytes 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index e713fdd9..d2c273b6 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -28,8 +28,10 @@ class Organize_Controller extends Controller { $v = new View("organize_dialog.html"); $v->album = $album; // @todo turn this into an api call. - $v->file_filter = json_encode(array("Images" => "*.jpg; *.jpeg; *.gif; *.png", - "Movies" => "*.flv; *.mp4")); + $v->file_filter = json_encode( + array("photo" => array("label" => "Images", + "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), + "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4")))); $v->domain = $input->server("SERVER_NAME"); // @todo figure out how to connect this w/o a dependency $v->base_url = url::abs_site("rest") . "/"; diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index a9e4c66b..1069eae0 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index c6f7eebe..133a7fcf 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ -- cgit v1.2.3 From a1181c5a49631b77b7ed9200a8730aed464bf46e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 21 May 2010 07:29:17 -0700 Subject: 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. --- modules/organize/lib/Gallery3WebClient.swf | Bin 136657 -> 135882 bytes .../organize/source/Gallery3Organize_source.zip | Bin 937810 -> 936852 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 1069eae0..e4b40e4a 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index 133a7fcf..45fda930 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ -- cgit v1.2.3 From 56587febfff2955c09b5b82a63c31cf547066f32 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 28 May 2010 09:36:54 -0700 Subject: Add a progress dialog box when deleting, uploading or updating items. --- modules/organize/lib/Gallery3WebClient.swf | Bin 135882 -> 137214 bytes .../organize/source/Gallery3Organize_source.zip | Bin 936852 -> 938411 bytes modules/organize/views/organize_dialog.html.php | 7 +++++-- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index e4b40e4a..4f55c455 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index 45fda930..6a0a8c7f 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 5da4aca4..da135857 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -61,12 +61,15 @@ "deleteSelected": for_js() ?>, "uploadedText": for_js() ?>, "removeFileText": for_js() ?>, - "totalFiles": for_js() ?>, - "totalSize": for_js() ?>, "bytes": for_js() ?>, "kilobytes": for_js() ?>, "megabytes": for_js() ?>, "gigabytes": for_js() ?>, + "progressLabel": for_js() ?>, + "uploadLabel": for_js() ?>, + "moveTitle": for_js() ?>, + "deleteTitle": for_js() ?>, + "uploadTitle": for_js() ?>, "cancel": for_js() ?>, "close": for_js() ?> }; -- cgit v1.2.3 From c4d85721fc0a3b9aad45451fb917d6e23b804c05 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 28 May 2010 16:43:10 -0700 Subject: Change the rearrange processing to use the ProcessItemQueue when moving children, so a progress dialog is displayed --- modules/organize/lib/Gallery3WebClient.swf | Bin 137214 -> 137234 bytes .../organize/source/Gallery3Organize_source.zip | Bin 938411 -> 938397 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 4f55c455..0a4d6383 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index 6a0a8c7f..4cf5c13b 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ -- cgit v1.2.3 From af240a34982c07dd2d3caa79c67222cfbb8e4f4a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 7 Jun 2010 05:25:26 -0700 Subject: Update the rest client to use ancestors_for instead of ancestor_for. --- modules/organize/lib/Gallery3WebClient.swf | Bin 137234 -> 137234 bytes .../organize/source/Gallery3Organize_source.zip | Bin 938397 -> 933143 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 0a4d6383..54169a5b 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index 4cf5c13b..09a73acf 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ -- cgit v1.2.3 From 38e8ab3d718d31dee7c8c27064e45c018540f358 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 10 Jun 2010 09:14:13 -0700 Subject: Provide better handling and a progress dialog when loading or updating files. --- modules/organize/lib/Gallery3WebClient.swf | Bin 137234 -> 144465 bytes .../organize/source/Gallery3Organize_source.zip | Bin 933143 -> 945619 bytes modules/organize/views/organize_dialog.html.php | 4 ++++ 3 files changed, 4 insertions(+) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 54169a5b..d983760d 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index 09a73acf..ce3bbdf3 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index da135857..574117e5 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -56,6 +56,10 @@ function getTextStrings() { var strings = { "statusText": for_js() ?>, + "remoteError": + for_js() ?>, + "addAlbumError": for_js() ?>, + "errorOccurred": for_js() ?>, "addAlbum": for_js() ?>, "addImages": for_js() ?>, "deleteSelected": for_js() ?>, -- cgit v1.2.3 From 6aab0cbec6da442199ca13ecf6078f77b203dd00 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 10 Jun 2010 13:12:10 -0700 Subject: Review the code for xss exposures and provide the functionality to update the organize dialog bar when the selected album changes. --- modules/organize/lib/Gallery3WebClient.swf | Bin 144465 -> 145294 bytes .../organize/source/Gallery3Organize_source.zip | Bin 945619 -> 945080 bytes modules/organize/views/organize_dialog.html.php | 6 +++++- 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index d983760d..271888c1 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index ce3bbdf3..9a64222f 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 574117e5..2d340f13 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -31,6 +31,10 @@ $("#g-dialog").dialog("close"); } + function setTitle(title) { + $("#ui-dialog-title-g-dialog").text(for_js() ?> + title); + } + function getOrganizeStyles() { var styles = { "color": colorToHex($("#g-organize").css("color")), @@ -117,6 +121,6 @@
-

html::purify($album->title))) ?>

+

html::purify($album->title))) ?>

 
-- cgit v1.2.3 From cbcb7432b3ddd5bc08f0d127b2f138a5df2b378b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 10 Jun 2010 14:10:19 -0700 Subject: Correct a problem with the sort order and sort direction fields being ignored. --- modules/organize/lib/Gallery3WebClient.swf | Bin 145294 -> 145339 bytes .../organize/source/Gallery3Organize_source.zip | Bin 945080 -> 945159 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 271888c1..6ff0d5ba 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/source/Gallery3Organize_source.zip b/modules/organize/source/Gallery3Organize_source.zip index 9a64222f..d4494dc2 100644 Binary files a/modules/organize/source/Gallery3Organize_source.zip and b/modules/organize/source/Gallery3Organize_source.zip differ -- cgit v1.2.3 From 47aa65143060ff376d95ca182c55132d821917fb Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 13 Jun 2010 17:58:50 -0700 Subject: 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 --- modules/organize/controllers/organize.php | 11 +-- modules/organize/lib/Gallery3WebClient.swf | Bin 145339 -> 142627 bytes modules/organize/views/organize_dialog.html.php | 104 ++++++++++++------------ 3 files changed, 60 insertions(+), 55 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index d2c273b6..b5a25400 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -28,23 +28,24 @@ class Organize_Controller extends Controller { $v = new View("organize_dialog.html"); $v->album = $album; // @todo turn this into an api call. - $v->file_filter = json_encode( + $v->file_filter = addslashes(json_encode( array("photo" => array("label" => "Images", "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), - "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4")))); + "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4"))))); $v->domain = $input->server("SERVER_NAME"); // @todo figure out how to connect this w/o a dependency $v->base_url = url::abs_site("rest") . "/"; - $v->sort_order = json_encode(array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending"))); + $v->sort_order = addslashes(json_encode(array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending")))); $sort_fields = array(); foreach (album::get_sort_order_options() as $field => $description) { $sort_fields[$field] = (string)$description; } - $v->sort_fields = json_encode($sort_fields); + $v->sort_fields = addslashes(json_encode($sort_fields)); $user = identity::active_user(); - $v->api_key = rest::get_access_key($user->id)->access_key; + $v->access_key = rest::get_access_key($user->id)->access_key; + Kohana_Log::add("error", $v->__toString()); print $v; } diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 6ff0d5ba..879a4fec 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 2d340f13..8c5ba133 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -27,63 +27,76 @@ }); function closeOrganizeDialog() { - console.log("closeOrganizeDialog"); $("#g-dialog").dialog("close"); } function setTitle(title) { - $("#ui-dialog-title-g-dialog").text(for_js() ?> + title); + $("#ui-dialog-title-g-dialog").text(for_js() ?> + title); } function getOrganizeStyles() { - var styles = { - "color": colorToHex($("#g-organize").css("color")), - "backgroundColor": colorToHex($("#g-organize").css("backgroundColor")), - "borderColor": colorToHex($("#g-organize").css("borderLeftColor")), - "rollOverColor": colorToHex($("#g-organize-hover").css("backgroundColor")), - "selectionColor": colorToHex($("#g-organize-active").css("backgroundColor")) + return { + color: colorToHex($("#g-organize").css("color")), + backgroundColor: colorToHex($("#g-organize").css("backgroundColor")), + borderColor: colorToHex($("#g-organize").css("borderLeftColor")), + rollOverColor: colorToHex($("#g-organize-hover").css("backgroundColor")), + selectionColor: colorToHex($("#g-organize-active").css("backgroundColor")) }; - return styles; } function colorToHex(color) { - var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color); + // Surprising no one, the color extracted from the css is in a different format + // in IE than it is when extracted from FF or Chrome. FF and Chrome return + // the of "rgb(nn,nn,nn)". Where as IE returns it as #hhhhhh. - var red = parseInt(digits[2]); - var green = parseInt(digits[3]); - var blue = parseInt(digits[4]); + if (color.indexOf("#") === 0) { + return '0x' + color.substring(1); + } else { + var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color); - var rgb = blue | (green << 8) | (red << 16); - return digits[1] + '0x' + rgb.toString(16); + var red = parseInt(digits[2]); + var green = parseInt(digits[3]); + var blue = parseInt(digits[4]); + + var rgb = blue | (green << 8) | (red << 16); + return digits[1] + '0x' + rgb.toString(16); + } } function getTextStrings() { - var strings = { - "statusText": for_js() ?>, - "remoteError": + return { + statusText: for_js() ?>, + remoteError: for_js() ?>, - "addAlbumError": for_js() ?>, - "errorOccurred": for_js() ?>, - "addAlbum": for_js() ?>, - "addImages": for_js() ?>, - "deleteSelected": for_js() ?>, - "uploadedText": for_js() ?>, - "removeFileText": for_js() ?>, - "bytes": for_js() ?>, - "kilobytes": for_js() ?>, - "megabytes": for_js() ?>, - "gigabytes": for_js() ?>, - "progressLabel": for_js() ?>, - "uploadLabel": for_js() ?>, - "moveTitle": for_js() ?>, - "deleteTitle": for_js() ?>, - "uploadTitle": for_js() ?>, - "cancel": for_js() ?>, - "close": for_js() ?> + addAlbumError: for_js() ?>, + errorOccurred: for_js() ?>, + addAlbum: for_js() ?>, + addImages: for_js() ?>, + deleteSelected: for_js() ?>, + uploadedText: for_js() ?>, + removeFileText: for_js() ?>, + progressLabel: for_js() ?>, + uploadLabel: for_js() ?>, + moveTitle: for_js() ?>, + deleteTitle: for_js() ?>, + uploadTitle: for_js() ?>, + cancel: for_js() ?>, + close: for_js() ?> }; - return strings; } + function getGalleryParameters() { + return { + fileFilter: "", + domain: "", + sortOrder: "", + sortFields: "", + baseUrl: "", + accessKey: "", + albumId: "id ?>", + controller: "/" + }; + }; /* For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. @@ -91,16 +104,7 @@ var swfVersionStr = "0.0.0"; /* To use express install, set to playerProductInstall.swf, otherwise the empty string.*/ var xiSwfUrlStr = ""; - var flashvars = { - fileFilter: '', - domains: '[""]', - sortOrder: '', - sortFields: '', - baseUrl: '', - apiKey: '', - albumId: "id ?>", - controller: '/' - }; + var flashvars = {}; var size = $.gallery_get_viewport_size(); @@ -111,8 +115,8 @@ params.allowscriptaccess = "sameDomain"; params.allowfullscreen = "true"; var attributes = {}; - attributes.id = "g-organize-object"; - attributes.name = "organize"; + attributes.id = "Gallery3WebClient"; + attributes.name = "Gallery3WebClient"; attributes.align = "middle"; swfobject.embedSWF("", "flashContent", size.width() - 100, size.height() - 135, @@ -121,6 +125,6 @@
-

html::purify($album->title))) ?>

+

html::purify($album->title))) ?>

 
-- cgit v1.2.3 From f10d641044fe31224af5b42b148a8ee77d9a34db Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 14 Jun 2010 13:07:58 -0700 Subject: 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. --- modules/organize/controllers/organize.php | 2 ++ modules/organize/lib/Gallery3WebClient.swf | Bin 142627 -> 147590 bytes modules/organize/views/organize_dialog.html.php | 11 +++++++---- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 199aeaf3..d688a76d 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -45,6 +45,8 @@ class Organize_Controller extends Controller { $user = identity::active_user(); $v->access_key = rest::get_access_key($user->id)->access_key; + + $v->protocol = (empty($_SERVER["HTTPS"]) OR $_SERVER["HTTPS"] === "off") ? "http" : "https"; print $v; } diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 879a4fec..c51fa4e8 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 8c5ba133..8160a339 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -87,14 +87,17 @@ function getGalleryParameters() { return { - fileFilter: "", + dialogWidth: $("#g-dialog:parent").width(), + dialogHeight: $("#g-dialog").height(), domain: "", + accessKey: "", + protocol: "", + fileFilter: "", sortOrder: "", sortFields: "", - baseUrl: "", - accessKey: "", albumId: "id ?>", - controller: "/" + restUri: "/", + controller: "/" }; }; /* -- cgit v1.2.3 From f5eb5d5d7014e1d09194803d3839f0077bc9f890 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 14 Jun 2010 14:17:56 -0700 Subject: add an 'icon' to identify albums in the organize dialog. --- modules/organize/lib/Gallery3WebClient.swf | Bin 147590 -> 147955 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index c51fa4e8..04de2a1d 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 81f176cf8e313c8c700bd38045dab870fbfc77bb Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 15 Jun 2010 07:14:17 -0700 Subject: 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. --- modules/organize/lib/Gallery3WebClient.swf | Bin 147955 -> 150666 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 04de2a1d..3c871e8a 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 3d4f04e827f54c3e4dec6a7d1e8e3bf78cf9603a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 17 Jun 2010 06:14:24 -0700 Subject: Change the add album dialog to not replace the internet address or name fields if they already contain values. --- modules/organize/lib/Gallery3WebClient.swf | Bin 150666 -> 150760 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 3c871e8a..82735217 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 545a91270d22506362e67032a3c54fdb21f8823e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 18 Jun 2010 19:05:59 -0700 Subject: 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 --- modules/organize/controllers/organize.php | 31 ++++++++++-------------- modules/organize/lib/Gallery3WebClient.swf | Bin 150760 -> 147793 bytes modules/organize/views/organize_dialog.html.php | 4 +-- 3 files changed, 14 insertions(+), 21 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index e8db991b..732ac3f6 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -25,32 +25,27 @@ class Organize_Controller extends Controller { access::required("view", $album); access::required("edit", $album); - $v = new View("organize_dialog.html"); - $v->album = $album; - - $v->domain = $input->server("SERVER_NAME"); - $user = identity::active_user(); - $v->access_key = rest::get_access_key($user->id)->access_key; - - $v->file_filter = addslashes(json_encode( - array("photo" => array("label" => "Images", - "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), - "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4"))))); - - $v->sort_order = addslashes( - json_encode(array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending")))); $sort_fields = array(); foreach (album::get_sort_order_options() as $field => $description) { $sort_fields[$field] = (string)$description; } - $v->sort_fields = addslashes(json_encode($sort_fields)); + $sort_order = array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending")); + $file_filter = json_encode( + array("photo" => array("label" => "Images", + "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), + "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4")))); + $v = new View("organize_dialog.html"); + $v->album = $album; + $v->domain = $input->server("SERVER_NAME"); + $v->access_key = rest::get_access_key($user->id)->access_key; + $v->file_filter = addslashes($file_filter); + $v->sort_order = addslashes(json_encode($sort_order)); + $v->sort_fields = addslashes(json_encode($sort_fields)); $v->rest_uri = url::site("rest") . "/"; - $v->controller_uri = url::site("organize") . "/"; - - $v->swf_url = url::file("modules/organize/lib/Gallery3WebClient.swf?") . + $v->swf_uri = url::file("modules/organize/lib/Gallery3WebClient.swf?") . filemtime(MODPATH . "organize/lib/Gallery3WebClient.swf"); print $v; } diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 82735217..9f753076 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 9e70d168..c41e5960 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -87,8 +87,6 @@ function getGalleryParameters() { return { - dialogWidth: $("#g-dialog:parent").width(), - dialogHeight: $("#g-dialog").height(), domain: "", accessKey: "", protocol: "", @@ -121,7 +119,7 @@ attributes.id = "Gallery3WebClient"; attributes.name = "Gallery3WebClient"; attributes.align = "middle"; - swfobject.embedSWF("", + swfobject.embedSWF("", "flashContent", size.width() - 100, size.height() - 135, swfVersionStr, xiSwfUrlStr, flashvars, params, attributes); -- cgit v1.2.3 From e40b2371ee4cc2756d80b36042124c71f21bc353 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 18 Jun 2010 21:49:11 -0700 Subject: 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. --- modules/organize/lib/Gallery3WebClient.swf | Bin 147793 -> 147825 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 9f753076..4515182f 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From a57ac38839e32b8f6551f67883c9596ee9c7b9e7 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 19 Jun 2010 17:32:15 -0700 Subject: Change the organize dialog to make use of the new error handling --- modules/organize/lib/Gallery3WebClient.swf | Bin 147825 -> 147776 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize/lib/Gallery3WebClient.swf') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 4515182f..40249a73 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3