From 8e21dda195015a3c9420553f874c10d3ebfa5dfa Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 3 Jan 2011 20:24:21 -0800 Subject: 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. --- modules/organize/helpers/organize_event.php | 6 +++--- modules/organize/helpers/organize_theme.php | 27 --------------------------- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 modules/organize/helpers/organize_theme.php (limited to 'modules/organize/helpers') diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index 2f997600..fbe18a7a 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -27,7 +27,7 @@ class organize_event_Core { ->id("organize") ->label(t("Organize album")) ->css_id("g-menu-organize-link") - ->url(url::site("organize/dialog/{$item->id}"))); + ->url(url::site("organize/frame/{$item->id}"))); } } @@ -39,7 +39,7 @@ class organize_event_Core { ->id("organize") ->label(t("Organize album")) ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/dialog/{$item->id}"))); + ->url(url::site("organize/frame/{$item->id}"))); } else { $parent = $item->parent(); $menu->get("options_menu") @@ -47,7 +47,7 @@ class organize_event_Core { ->id("move") ->label(t("Move to another album")) ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/dialog/{$parent->id}?selected_id={$item->id}"))); + ->url(url::site("organize/frame/{$parent->id}?selected_id={$item->id}"))); } } } diff --git a/modules/organize/helpers/organize_theme.php b/modules/organize/helpers/organize_theme.php deleted file mode 100644 index d69ab82c..00000000 --- a/modules/organize/helpers/organize_theme.php +++ /dev/null @@ -1,27 +0,0 @@ -item(); - if ($item && access::can("edit", $item) && $item->is_album()) { - $theme->css("organize_theme.css"); - } - } -} -- cgit v1.2.3 From aebcd445135648603590e2ab99f40b72ee8ed097 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 5 Jan 2011 22:19:33 -0800 Subject: Swap organize_frame and organize_dialog since they were semantically reversed. organize_dialog contains the stuff that pops up in the dialog, organize_frame contains the stuff that's in the embedded iframe. --- modules/organize/helpers/organize_event.php | 6 +- modules/organize/views/organize_dialog.html.php | 420 +----------------------- modules/organize/views/organize_frame.html.php | 420 +++++++++++++++++++++++- 3 files changed, 423 insertions(+), 423 deletions(-) (limited to 'modules/organize/helpers') diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index fbe18a7a..2f997600 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -27,7 +27,7 @@ class organize_event_Core { ->id("organize") ->label(t("Organize album")) ->css_id("g-menu-organize-link") - ->url(url::site("organize/frame/{$item->id}"))); + ->url(url::site("organize/dialog/{$item->id}"))); } } @@ -39,7 +39,7 @@ class organize_event_Core { ->id("organize") ->label(t("Organize album")) ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/frame/{$item->id}"))); + ->url(url::site("organize/dialog/{$item->id}"))); } else { $parent = $item->parent(); $menu->get("options_menu") @@ -47,7 +47,7 @@ class organize_event_Core { ->id("move") ->label(t("Move to another album")) ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/frame/{$parent->id}?selected_id={$item->id}"))); + ->url(url::site("organize/dialog/{$parent->id}?selected_id={$item->id}"))); } } } diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index d9303075..7bff576d 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -1,409 +1,23 @@ -" /> -" /> -" /> - - - - + diff --git a/modules/organize/views/organize_frame.html.php b/modules/organize/views/organize_frame.html.php index 2abea898..d9303075 100644 --- a/modules/organize/views/organize_frame.html.php +++ b/modules/organize/views/organize_frame.html.php @@ -1,23 +1,409 @@ - + + + - -- cgit v1.2.3 From edcb3b665690acc85067bc43e1900390be228a4e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 7 Jan 2011 20:23:49 -0800 Subject: Make the CSS for the organize menu consistently g-organize-link. Fixes #1070. --- modules/organize/helpers/organize_event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/organize/helpers') diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index 2f997600..d6d21fc1 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -26,7 +26,7 @@ class organize_event_Core { ->append(Menu::factory("dialog") ->id("organize") ->label(t("Organize album")) - ->css_id("g-menu-organize-link") + ->css_id("g-organize-link") ->url(url::site("organize/dialog/{$item->id}"))); } } -- cgit v1.2.3 From 4fc5d50eb83f29c0a28ce16b9ff22179fd3f2c98 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 8 Jan 2011 12:59:12 -0800 Subject: Bump the organize module to version 3 and get rid of the code that makes sure that it depends on the REST module. --- installer/install.sql | 2 +- modules/organize/helpers/organize_event.php | 18 --------- modules/organize/helpers/organize_installer.php | 49 ------------------------- modules/organize/module.info | 4 +- 4 files changed, 3 insertions(+), 70 deletions(-) delete mode 100644 modules/organize/helpers/organize_installer.php (limited to 'modules/organize/helpers') diff --git a/installer/install.sql b/installer/install.sql index c1d71dc2..09fabc7d 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -247,7 +247,7 @@ CREATE TABLE {modules} ( INSERT INTO {modules} VALUES (1,1,'gallery',43,1); INSERT INTO {modules} VALUES (2,1,'user',3,2); INSERT INTO {modules} VALUES (3,1,'comment',3,3); -INSERT INTO {modules} VALUES (4,1,'organize',2,4); +INSERT INTO {modules} VALUES (4,1,'organize',1,4); INSERT INTO {modules} VALUES (5,1,'info',2,5); INSERT INTO {modules} VALUES (6,1,'rss',1,6); INSERT INTO {modules} VALUES (7,1,'search',1,7); diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index d6d21fc1..58daf180 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -51,22 +51,4 @@ class organize_event_Core { } } } - - static function pre_deactivate($data) { - if ($data->module == "rest") { - $data->messages["warn"][] = t("The Organize module requires the Rest module."); - } - } - - static function module_change($changes) { - if (!module::is_active("rest") || in_array("rest", $changes->deactivate)) { - site_status::warning( - t("The Organize module requires the Rest module. Activate the Rest module now", - array("url" => html::mark_clean(url::site("admin/modules")))), - "organize_needs_rest"); - } else { - site_status::clear("organize_needs_rest"); - } - } - } diff --git a/modules/organize/helpers/organize_installer.php b/modules/organize/helpers/organize_installer.php deleted file mode 100644 index 2faa598b..00000000 --- a/modules/organize/helpers/organize_installer.php +++ /dev/null @@ -1,49 +0,0 @@ -Activate the Rest module now", - array("url" => html::mark_clean(url::site("admin/modules")))), - "organize_needs_rest"); - } - - module::set_version("organize", $version = 2); - } - } - - static function can_activate() { - $messages = array(); - if (!module::is_active("rest")) { - $messages["warn"][] = t("The Organize module requires the Rest module."); - } - return $messages; - } -} diff --git a/modules/organize/module.info b/modules/organize/module.info index d7199571..be0bc86d 100644 --- a/modules/organize/module.info +++ b/modules/organize/module.info @@ -1,3 +1,3 @@ name = "Organize" -description = "Organize your gallery by apply tags or moving images" -version = 2 +description = "Visually rearrange and move photos in your gallery" +version = 3 -- cgit v1.2.3