From 342be9818f8c35dd13c8159960a9f71ae33d4c72 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sat, 23 Apr 2011 23:26:28 -0400 Subject: Turn off bullets on the tag admin list. --- themes/admin_wind/css/screen.css | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 177eb1e6..f01c2a94 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -100,6 +100,7 @@ a:hover, form ul li, #g-action-status li, #g-log-entries li, +#g-tag-admin li, .g-buttonset li, .g-buttonset-vertical li, .g-paginator li, -- cgit v1.2.3 From c8f90e861b866d0caa86343a6c7213e923023d39 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 07:14:38 -0700 Subject: Automated update of .build_number to 129 for branch master Last update: ce14f5fb906335c35bdb2754bb0cd482e7526f09 (8 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 68a5d742..37dc1950 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=128 +build_number=129 -- cgit v1.2.3 From b89c40242f85ecb49393e4fe6aeb3659550f60a4 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 07:49:41 -0700 Subject: Sentence-case the url. Fixes #1706. --- modules/g2_import/helpers/g2_import_event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/g2_import/helpers/g2_import_event.php b/modules/g2_import/helpers/g2_import_event.php index 0e078d08..0afa62d8 100644 --- a/modules/g2_import/helpers/g2_import_event.php +++ b/modules/g2_import/helpers/g2_import_event.php @@ -34,7 +34,7 @@ class g2_import_event_Core { ->get("settings_menu") ->append(Menu::factory("link") ->id("g2_import") - ->label(t("Gallery 2 Import")) + ->label(t("Gallery 2 import")) ->url(url::site("admin/g2_import"))); } } -- cgit v1.2.3 From bbd5417fef9c3ad28c6e57cb787e86684f49a71b Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 07:50:19 -0700 Subject: Automated update of .build_number to 130 for branch master Last update: ce14f5fb906335c35bdb2754bb0cd482e7526f09 (10 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 37dc1950..befc7f03 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=129 +build_number=130 -- cgit v1.2.3 From b4cdd016dc97f2df608bb14d2088cb4ddbd32c35 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 24 Apr 2011 11:53:29 -0400 Subject: Third times the charm. Rethink unordered lists and bullets. Revert to turning them off by default and provide a new class, g-text, to define a list or a section of text as needing to display bullets. --- modules/g2_import/views/admin_g2_import.html.php | 4 ++-- modules/gallery/views/admin_block_welcome.html.php | 2 +- themes/admin_wind/css/screen.css | 17 ++--------------- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index cf5e4755..2f4a1b28 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -112,8 +112,8 @@ $("document").ready(function() {

-
-
    +
    +
    • Review permissions!") ?>
    • diff --git a/modules/gallery/views/admin_block_welcome.html.php b/modules/gallery/views/admin_block_welcome.html.php index d8c96187..d3765d19 100644 --- a/modules/gallery/views/admin_block_welcome.html.php +++ b/modules/gallery/views/admin_block_welcome.html.php @@ -2,7 +2,7 @@

      -
        +
        • graphics and language settings.", array("graphics_url" => html::mark_clean(url::site("admin/graphics")), diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index f01c2a94..6f1c0962 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -92,25 +92,12 @@ a:hover, /* Lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-content ul li { +ul.g-text li, +.g-text ul li { list-style-type: disc; margin-left: 1em; } -form ul li, -#g-action-status li, -#g-log-entries li, -#g-tag-admin li, -.g-buttonset li, -.g-buttonset-vertical li, -.g-paginator li, -.ui-sortable li, -.ui-widget-header li { - list-style: none !important; - margin-left: 0 !important; -} - - /* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ form { -- cgit v1.2.3 From f8493a1df26f242959e931d862c5f1282dd324e8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 08:57:09 -0700 Subject: Revert my two "fixes" on top of Andy's tag combine change. Leave Tag_Model::items() calling Item_Model::viewable() because it's too dangerous to separate that out, and it's fragile to rely on only admins doing tag combines. Revert "Undo the change made in 5ce85636329b14673718836b3631a3e46efdc3bb because it messes up tag counts" - This reverts commit 67d2e8081c6e5f0b679881bca3fdc81fe1e78ccc. Revert "Move the calculation for item_related_update ahead of the duplicate" - This reverts commit 5ce85636329b14673718836b3631a3e46efdc3bb. --- modules/tag/models/tag.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php index 13e253ba..bb79e707 100644 --- a/modules/tag/models/tag.php +++ b/modules/tag/models/tag.php @@ -75,8 +75,12 @@ class Tag_Model_Core extends ORM { ->where("id", "!=", $this->id) ->find(); if ($duplicate_tag->loaded()) { - // If so, tag its items with this tag so as to merge it. - foreach ($duplicate_tag->items() as $item) { + // If so, tag its items with this tag so as to merge it + $duplicate_tag_items = ORM::factory("item") + ->join("items_tags", "items.id", "items_tags.item_id") + ->where("items_tags.tag_id", "=", $duplicate_tag->id) + ->find_all(); + foreach ($duplicate_tag_items as $item) { $this->add($item); } @@ -84,7 +88,6 @@ class Tag_Model_Core extends ORM { $duplicate_tag->delete(); } - // Figure out what items have changed in this tag for our item_related_update event below if (isset($this->object_relations["items"])) { $added = array_diff($this->changed_relations["items"], $this->object_relations["items"]); $removed = array_diff($this->object_relations["items"], $this->changed_relations["items"]); -- cgit v1.2.3 From 6100de33ac9ec61350301b4c1f45bcaf383e4841 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 09:01:18 -0700 Subject: Automated update of .build_number to 131 for branch master Last update: bbd5417fef9c3ad28c6e57cb787e86684f49a71b (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index befc7f03..efcaa779 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=130 +build_number=131 -- cgit v1.2.3 From ce5a2532ebcd5131056df908d2da831e91407e9d Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 24 Apr 2011 13:41:12 -0400 Subject: Extend .g-text list styles to ordered lists to admin_wind theme. Add .g-text list styles to wind theme. --- themes/admin_wind/css/screen.css | 9 +++++++++ themes/wind/css/screen.css | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 6f1c0962..d67850ec 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -95,6 +95,15 @@ a:hover, ul.g-text li, .g-text ul li { list-style-type: disc; +} + +ol.g-text li, +.g-text ol li { + list-style-type: decimal; +} + +.g-text li, +.g-text li { margin-left: 1em; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index b470ab1c..81231426 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -111,6 +111,23 @@ a:hover, padding-left: 32px; } +/* Lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +ul.g-text li, +.g-text ul li { + list-style-type: disc; +} + +ol.g-text li, +.g-text ol li { + list-style-type: decimal; +} + +.g-text li, +.g-text li { + margin-left: 1em; +} + /* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ form { -- cgit v1.2.3 From f4d76a8abe04612efe01f146617d760ffdd4b69f Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 24 Apr 2011 13:56:39 -0400 Subject: Don't put the Admin > Theme Options Save button in a fieldset. --- modules/gallery/controllers/admin_theme_options.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/gallery/controllers/admin_theme_options.php b/modules/gallery/controllers/admin_theme_options.php index a968a56d..d9323ea0 100644 --- a/modules/gallery/controllers/admin_theme_options.php +++ b/modules/gallery/controllers/admin_theme_options.php @@ -108,7 +108,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::event("theme_edit_form", $form); - $group = $form->group("buttons"); $group->submit("")->value(t("Save")); return $form; } -- cgit v1.2.3 From 8e7a8fd2dc3245c2d236a2cd33d8c1a61ef9963c Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 24 Apr 2011 14:09:03 -0400 Subject: Add a bit of space below progress bars. Fixes #1703. --- themes/admin_wind/css/screen.css | 2 +- themes/wind/css/screen.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index d67850ec..a26bf6d2 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -896,7 +896,7 @@ button { .g-progress-bar { height: 1em; width: 100%; - margin-top: .5em; + margin: .5em 0; display: inline-block; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 81231426..d6909364 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -945,7 +945,7 @@ button { .g-progress-bar { height: 1em; width: 100%; - margin-top: .5em; + margin: .5em 0; display: inline-block; } -- cgit v1.2.3 From ea2127c3b2ddef5709e02b4804c074bd1f942159 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 21:02:34 -0700 Subject: Fix a bug introduced in f2477703faa7cd05ff1aa16da3ecef7b666bef40 which was a fix for #1581 that caused us to skip adding highlights for any albums that had no sub-albums. --- modules/g2_import/helpers/g2_import.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 23fb29e5..e9c19c9d 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -518,12 +518,11 @@ class g2_import_Core { static function set_album_highlight(&$queue) { // Dequeue the current album and enqueue its children list($g2_album_id, $children) = each($queue); - if (empty($children)) { - return; - } unset($queue[$g2_album_id]); - foreach ($children as $key => $value) { - $queue[$key] = $value; + if (!empty($children)) { + foreach ($children as $key => $value) { + $queue[$key] = $value; + } } $messages = array(); -- cgit v1.2.3 From 15f4657452795c2852c58c9f1840ce4e1f58d401 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 21:03:16 -0700 Subject: Automated update of .build_number to 132 for branch master Last update: 6100de33ac9ec61350301b4c1f45bcaf383e4841 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index efcaa779..ce9a62d4 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=131 +build_number=132 -- cgit v1.2.3 From 701c1fb12f2f254d8d7e7756a09cb5e825123a2f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 22:45:45 -0700 Subject: Ignore the presort when transferring over sort orders. Fixes #1710. --- modules/g2_import/helpers/g2_import.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index e9c19c9d..50ab8a23 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -475,9 +475,10 @@ class g2_import_Core { 1 => "ASC", ORDER_ASCENDING => "ASC", ORDER_DESCENDING => "DESC"); - // Only consider G2's first sort order + // G2 sorts can either be or |. Right now we can't + // map presorts so ignore them. $g2_order = explode("|", $g2_album->getOrderBy() . ""); - $g2_order = $g2_order[0]; + $g2_order = end($g2_order); if (empty($g2_order)) { $g2_order = g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderBy')); } -- cgit v1.2.3 From ded13a931a1e3f12649969bf7188febeb19ceb51 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 22:46:26 -0700 Subject: Automated update of .build_number to 133 for branch master Last update: 15f4657452795c2852c58c9f1840ce4e1f58d401 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index ce9a62d4..fea9bdb6 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=132 +build_number=133 -- cgit v1.2.3 From 953be781dc91254599224fa6e95fcc435e787975 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 22:51:14 -0700 Subject: Refactor the meat of g2_import::import_album() off into a separate function so taht we can call it on the root album as well. Fixes --- modules/g2_import/helpers/g2_import.php | 96 +++++++++++++++------------- modules/g2_import/helpers/g2_import_task.php | 6 ++ 2 files changed, 58 insertions(+), 44 deletions(-) diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 50ab8a23..22a054ac 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -448,50 +448,8 @@ class g2_import_Core { $album = ORM::factory("item"); $album->type = "album"; $album->parent_id = self::map($g2_album->getParentId()); - $album->name = $g2_album->getPathComponent(); - $album->title = self::_decode_html_special_chars($g2_album->getTitle()); - $album->title or $album->title = $album->name; - $album->description = self::_decode_html_special_chars(self::extract_description($g2_album)); - $album->owner_id = self::map($g2_album->getOwnerId()); - try { - $album->view_count = (int) g2(GalleryCoreApi::fetchItemViewCount($g2_album_id)); - } catch (Exception $e) { - // @todo log - $album->view_count = 0; - } - $album->created = $g2_album->getCreationTimestamp(); - - $order_map = array( - "originationTimestamp" => "captured", - "creationTimestamp" => "created", - "description" => "description", - "modificationTimestamp" => "updated", - "orderWeight" => "weight", - "pathComponent" => "name", - "summary" => "description", - "title" => "title", - "viewCount" => "view_count"); - $direction_map = array( - 1 => "ASC", - ORDER_ASCENDING => "ASC", - ORDER_DESCENDING => "DESC"); - // G2 sorts can either be or |. Right now we can't - // map presorts so ignore them. - $g2_order = explode("|", $g2_album->getOrderBy() . ""); - $g2_order = end($g2_order); - if (empty($g2_order)) { - $g2_order = g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderBy')); - } - $g2_order_direction = explode("|", $g2_album->getOrderDirection() . ""); - $g2_order_direction = $g2_order_direction[0]; - if (empty($g2_order_direction)) { - $g2_order_direction = - g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderDirection')); - } - if (array_key_exists($g2_order, $order_map)) { - $album->sort_column = $order_map[$g2_order]; - $album->sort_order = $direction_map[$g2_order_direction]; - } + + g2_import::set_album_values($album, $g2_album); try { $album->save(); @@ -513,6 +471,56 @@ class g2_import_Core { self::_import_permissions($g2_album, $album); } + /** + * Transfer over all the values from a G2 album to a G3 album. + */ + static function set_album_values($album, $g2_album) { + $album->name = $g2_album->getPathComponent(); + $album->title = self::_decode_html_special_chars($g2_album->getTitle()); + $album->title or $album->title = $album->name; + $album->description = self::_decode_html_special_chars(self::extract_description($g2_album)); + $album->owner_id = self::map($g2_album->getOwnerId()); + try { + $album->view_count = (int) g2(GalleryCoreApi::fetchItemViewCount($g2_album_id)); + } catch (Exception $e) { + // @todo log + $album->view_count = 0; + } + $album->created = $g2_album->getCreationTimestamp(); + + $order_map = array( + "originationTimestamp" => "captured", + "creationTimestamp" => "created", + "description" => "description", + "modificationTimestamp" => "updated", + "orderWeight" => "weight", + "pathComponent" => "name", + "summary" => "description", + "title" => "title", + "viewCount" => "view_count"); + $direction_map = array( + 1 => "ASC", + ORDER_ASCENDING => "ASC", + ORDER_DESCENDING => "DESC"); + // G2 sorts can either be or |. Right now we can't + // map presorts so ignore them. + $g2_order = explode("|", $g2_album->getOrderBy() . ""); + $g2_order = end($g2_order); + if (empty($g2_order)) { + $g2_order = g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderBy')); + } + $g2_order_direction = explode("|", $g2_album->getOrderDirection() . ""); + $g2_order_direction = $g2_order_direction[0]; + if (empty($g2_order_direction)) { + $g2_order_direction = + g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderDirection')); + } + if (array_key_exists($g2_order, $order_map)) { + $album->sort_column = $order_map[$g2_order]; + $album->sort_order = $direction_map[$g2_order_direction]; + } + } + /** * Set the highlight properly for a single album */ diff --git a/modules/g2_import/helpers/g2_import_task.php b/modules/g2_import/helpers/g2_import_task.php index 5e908676..31615a55 100644 --- a/modules/g2_import/helpers/g2_import_task.php +++ b/modules/g2_import/helpers/g2_import_task.php @@ -127,6 +127,12 @@ class g2_import_task_Core { $g2_root_id = g2(GalleryCoreApi::getDefaultAlbumId()); $tree = g2(GalleryCoreApi::fetchAlbumTree()); $task->set("queue", $queue = array($g2_root_id => $tree)); + + // Update the root album to reflect the Gallery2 root album. + $root_album = item::root(); + g2_import::set_album_values( + $root_album, g2(GalleryCoreApi::loadEntitiesById($g2_root_id))); + $root_album->save(); } $log_message = g2_import::import_album($queue); if ($log_message) { -- cgit v1.2.3 From 84407648fe0115875908ebd8c68fc1755d3ecd2b Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 22:52:02 -0700 Subject: Automated update of .build_number to 134 for branch master Last update: 15f4657452795c2852c58c9f1840ce4e1f58d401 (3 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index fea9bdb6..049abf42 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=133 +build_number=134 -- cgit v1.2.3 From 8533420f5d307e81a90c3d26a75b666350aee0f2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 22:55:01 -0700 Subject: Look for and return embed.php files in the autocomplete list if we can find them. Fixes #1708. --- modules/g2_import/controllers/admin_g2_import.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php index cf68d911..5c4995c9 100644 --- a/modules/g2_import/controllers/admin_g2_import.php +++ b/modules/g2_import/controllers/admin_g2_import.php @@ -100,6 +100,11 @@ class Admin_g2_import_Controller extends Admin_Controller { foreach (glob("{$path_prefix}*") as $file) { if (is_dir($file) && !is_link($file)) { $directories[] = $file; + + // If we find an embed.php, include it as well + if (file_exists("$file/embed.php")) { + $directories[] = "$file/embed.php"; + } } } -- cgit v1.2.3 From 10f117238a4302092fdfb71a02542281f2b2d356 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 22:55:59 -0700 Subject: Automated update of .build_number to 135 for branch master Last update: 15f4657452795c2852c58c9f1840ce4e1f58d401 (5 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 049abf42..1df3b5cb 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=134 +build_number=135 -- cgit v1.2.3 From 4ad94639a638c38db7fcd9c89f8f3f241a529c83 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 24 Apr 2011 22:59:55 -0700 Subject: Automated update of .build_number to 136 for branch master Last update: 10f117238a4302092fdfb71a02542281f2b2d356 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 1df3b5cb..182fcf4d 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=135 +build_number=136 -- cgit v1.2.3 From 4e7524664a24dd2ca2309c9d67843a19e74b48e0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 23:04:50 -0700 Subject: Show the tabs after the page has loaded to prevent Firefox from rendering the unstyled page and then flashing. Fixes #1705. --- modules/g2_import/views/admin_g2_import.html.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 2f4a1b28..9c4eb840 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -30,9 +30,13 @@ $("document").ready(function() { .tabs("select", 1) ; + + // Show the tabs after the page has loaded to prevent Firefox from rendering the + // unstyled page and then flashing. + $("#g-admin-g2-import-tabs").show(); }); -
          + diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index 1395686c..e04b9169 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -30,6 +30,52 @@ class Gallery_View_Core extends View { return $absolute_url ? url::abs_file($arg) : url::file($arg); } + /** + * Set up the data and render a pager. + * + * See themes/wind/views/pager.html for documentation on the variables generated here. + */ + public function paginator() { + $v = new View("paginator.html"); + $v->page_type = $this->page_type; + $v->page_subtype = $this->page_subtype; + $v->first_page_url = null; + $v->previous_page_url = null; + $v->next_page_url = null; + $v->last_page_url = null; + + if ($this->page_type == "collection") { + $v->page = $this->page; + $v->max_pages = $this->max_pages; + $v->total = $this->children_count; + + if ($this->page != 1) { + $v->first_page_url = url::site(url::merge(array("page" => 1))); + $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1))); + } + + if ($this->page != $this->max_pages) { + $v->next_page_url = url::site(url::merge(array("page" => $this->page + 1))); + $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages))); + } + + $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; + $v->last_visible_position = min($this->page * $this->page_size, $v->total); + } else if ($this->page_type == "item") { + $v->position = $this->position; + $v->total = $this->sibling_count; + if ($this->previous_item) { + $v->previous_page_url = $this->previous_item->url(); + } + + if ($this->next_item) { + $v->next_page_url = $this->next_item->url(); + } + } + + return $v; + } + /** * Begin gather up scripts or css files so that they can be combined into a single request. * diff --git a/modules/gallery/libraries/MY_Pagination.php b/modules/gallery/libraries/MY_Pagination.php deleted file mode 100644 index e697c0bd..00000000 --- a/modules/gallery/libraries/MY_Pagination.php +++ /dev/null @@ -1,35 +0,0 @@ -auto_hide === TRUE AND $this->total_pages <= 1) { - return ""; - } - - if ($style === NULL) { - // Use default style - $style = $this->style; - } - - // Return rendered pagination view - return View::factory("pager.html", get_object_vars($this))->render(); - } -} diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 152efc37..d6834464 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -138,52 +138,6 @@ class Theme_View_Core extends Gallery_View { return $menu->render(); } - /** - * Set up the data and render a pager. - * - * See themes/wind/views/pager.html for documentation on the variables generated here. - */ - public function paginator() { - $v = new View("paginator.html"); - $v->page_type = $this->page_type; - $v->page_subtype = $this->page_subtype; - $v->first_page_url = null; - $v->previous_page_url = null; - $v->next_page_url = null; - $v->last_page_url = null; - - if ($this->page_type == "collection") { - $v->page = $this->page; - $v->max_pages = $this->max_pages; - $v->total = $this->children_count; - - if ($this->page != 1) { - $v->first_page_url = url::site(url::merge(array("page" => 1))); - $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1))); - } - - if ($this->page != $this->max_pages) { - $v->next_page_url = url::site(url::merge(array("page" => $this->page + 1))); - $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages))); - } - - $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; - $v->last_visible_position = min($this->page * $this->page_size, $v->total); - } else if ($this->page_type == "item") { - $v->position = $this->position; - $v->total = $this->sibling_count; - if ($this->previous_item) { - $v->previous_page_url = $this->previous_item->url(); - } - - if ($this->next_item) { - $v->next_page_url = $this->next_item->url(); - } - } - - return $v; - } - /** * Print out any site wide status information. */ diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php index a3633b52..41be6c03 100644 --- a/modules/user/controllers/admin_users.php +++ b/modules/user/controllers/admin_users.php @@ -21,6 +21,8 @@ class Admin_Users_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); $view->page_title = t("Users and groups"); + $view->page_type = "collection"; + $view->page_subtype = "admin_users"; $view->content = new View("admin_users.html"); // @todo: add this as a config option @@ -29,6 +31,12 @@ class Admin_Users_Controller extends Admin_Controller { $builder = db::build(); $user_count = $builder->from("users")->count_records(); + // Pagination info + $view->page = $page; + $view->page_size = $page_size; + $view->children_count = $user_count; + $view->max_pages = ceil($view->children_count / $view->page_size); + $view->content->pager = new Pagination(); $view->content->pager->initialize( array("query_string" => "page", diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index a7bd6b27..033c9dae 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -110,7 +110,7 @@
          - + paginator() ?>
          diff --git a/themes/admin_wind/views/pager.html.php b/themes/admin_wind/views/pager.html.php deleted file mode 100644 index 5fff5845..00000000 --- a/themes/admin_wind/views/pager.html.php +++ /dev/null @@ -1,44 +0,0 @@ - - -
            - $current_first_item, - "to_number" => $current_last_item, - "count" => $total_items)) ?> -
          • - - - - - - - - - - - - - - -
          • -
          • -
          • - - - - - - - - - - - - - - -
          • -
          diff --git a/themes/admin_wind/views/paginator.html.php b/themes/admin_wind/views/paginator.html.php new file mode 100644 index 00000000..3cb0223d --- /dev/null +++ b/themes/admin_wind/views/paginator.html.php @@ -0,0 +1,88 @@ + + + +
            +
          • + + + + + + + + + + + + + + + + + +
          • + +
          • + + + $first_visible_position, + "to_number" => $last_visible_position, + "count" => $total)) ?> + + $position, "total" => $total)) ?> + + + + +
          • + +
          • + + + + + + + + + + + + + + + + + +
          • +
          -- cgit v1.2.3 From ebdc97b140fc5fce83d25da43b8bfcd595315ce4 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Tue, 26 Apr 2011 09:49:52 -0700 Subject: Automated update of .build_number to 141 for branch master Last update: c6d1d6a6aed96f772690b74ac0be482bc2128a8d (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index b9dbbf41..69e66c62 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=140 +build_number=141 -- cgit v1.2.3 From 466b24307c4ac827cd4075a07a5fff567b6f4093 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 26 Apr 2011 21:01:36 -0700 Subject: Hide the paginator when there are no children. #1721. --- themes/admin_wind/views/paginator.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/admin_wind/views/paginator.html.php b/themes/admin_wind/views/paginator.html.php index 3cb0223d..b46d9741 100644 --- a/themes/admin_wind/views/paginator.html.php +++ b/themes/admin_wind/views/paginator.html.php @@ -27,6 +27,7 @@ // ?> +
          • @@ -61,8 +62,6 @@ $position, "total" => $total)) ?> - -
          • @@ -86,3 +85,4 @@
          + \ No newline at end of file -- cgit v1.2.3 From 77875e2fab86c9fc74c775545cd7df6b9a0fbc40 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 26 Apr 2011 21:01:58 -0700 Subject: Include jquery.scrollTo.js. Fixes #1720. --- themes/admin_wind/views/admin.html.php | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index 65473e57..e19c6aeb 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -29,6 +29,7 @@ script("gallery.ajax.js") ?> script("gallery.dialog.js") ?> script("superfish/js/superfish.js") ?> + script("jquery.scrollTo.js") ?> admin_head() ?> -- cgit v1.2.3 From 743e2f88d8cbba7ea5f7b3b78ab721c141d1ec99 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 26 Apr 2011 21:02:43 -0700 Subject: Overhaul the Admin > Content > Comments page. Use a tabbed interface for consistency with other parts of the admin UI (ie: G2 import). The UI is now Ajax driven because that's how jQuery tabs works best in this case. This requires a little finagling in JS to get the paginator links to load properly. While I'm in there, add a paginator at the top of the table, make the buttons in the delete tab sane and smooth scroll back to the top of the tab when switching pages. Fixes #1702 --- .../comment/controllers/admin_manage_comments.php | 32 ++-- .../comment/views/admin_manage_comments.html.php | 211 +++------------------ .../views/admin_manage_comments_queue.html.php | 157 +++++++++++++++ 3 files changed, 205 insertions(+), 195 deletions(-) create mode 100644 modules/comment/views/admin_manage_comments_queue.html.php diff --git a/modules/comment/controllers/admin_manage_comments.php b/modules/comment/controllers/admin_manage_comments.php index effefcbb..72684e70 100644 --- a/modules/comment/controllers/admin_manage_comments.php +++ b/modules/comment/controllers/admin_manage_comments.php @@ -28,8 +28,10 @@ class Admin_Manage_Comments_Controller extends Admin_Controller { ->where("updated", "<", db::expr("UNIX_TIMESTAMP() - 86400 * 7")) ->execute(); - // Redirect to the appropriate queue - url::redirect("admin/manage_comments/queue/unpublished"); + $view = new Admin_View("admin.html"); + $view->content = new View("admin_manage_comments.html"); + $view->content->menu = $this->_menu($this->_counts()); + print $view; } public function menu_labels() { @@ -43,15 +45,11 @@ class Admin_Manage_Comments_Controller extends Admin_Controller { public function queue($state) { $page = max(Input::instance()->get("page"), 1); - $view = new Admin_View("admin.html"); - $view->page_title = t("Manage comments"); - $view->page_type = "collection"; - $view->page_subtype = "admin_comments"; - $view->content = new View("admin_manage_comments.html"); - $view->content->counts = $this->_counts(); - $view->content->menu = $this->_menu($view->content->counts); - $view->content->state = $state; - $view->content->comments = ORM::factory("comment") + $view = new Gallery_View("admin_manage_comments_queue.html"); + $view->counts = $this->_counts(); + $view->menu = $this->_menu($view->counts); + $view->state = $state; + $view->comments = ORM::factory("comment") ->order_by("created", "DESC") ->order_by("id", "DESC") ->where("state", "=", $state) @@ -59,11 +57,21 @@ class Admin_Manage_Comments_Controller extends Admin_Controller { ->offset(($page - 1) * self::$items_per_page) ->find_all(); - // Pagination info + // This view is not themed so we can't use $theme->url() in the view and have to + // reproduce Gallery_View::url() logic here. + $atn = theme::$admin_theme_name; + $view->fallback_avatar_url = url::abs_file("themes/$atn/images/avatar.jpg"); + $view->page = $page; + $view->page_type = "collection"; + $view->page_subtype = "admin_comments"; $view->page_size = self::$items_per_page; $view->children_count = $this->_counts()->$state; $view->max_pages = ceil($view->children_count / $view->page_size); + + // Also we want to use $theme->paginator() so we need a dummy theme + $view->theme = $view; + print $view; } diff --git a/modules/comment/views/admin_manage_comments.html.php b/modules/comment/views/admin_manage_comments.html.php index e7a61837..e3c8546c 100644 --- a/modules/comment/views/admin_manage_comments.html.php +++ b/modules/comment/views/admin_manage_comments.html.php @@ -2,200 +2,45 @@ - -
          -

          -
          - -
          - render() ?> -
          - - -

          - - - - - - - - - -

          - - -
          - - 0): ?> -

          - -

          - -

          - spam): ?> - spam) ?> -

          -

          - "> - - - - - -

          -
          - - - -
          -

          - -

          -
          - - - - - - - - - - "> - - - - - -
          - - - - - -
          - - " - class="g-avatar" - alt="author_name()) ?>" - width="40" - height="40" /> - -

          author_name()) ?>

          -
          - -

          created) ?>

          - text)) ?> -
          -
            - state != "unpublished"): ?> -
          • - - - - -
          • - - state != "published"): ?> -
          • - - - - -
          • - - state != "spam"): ?> -
          • - - - - -
          • - - -
          • - - - - -
          • -
          -
          + // Paginator clicks load their href in the active tab panel + var fix_links = function() { + $(".g-paginator a, a#g-delete-all-spam").click(function(event) { + event.stopPropagation(); + $.scrollTo(0, 800, { easing: "swing" }); + $(this).parents(".ui-tabs-panel").load( + $(this).attr("href"), + function() { + fix_links(); + }); + return false; + }); + } -
          - paginator() ?> -
          + $(document).ready(function() { + $("#g-admin-comments").tabs({ + show: fix_links, + }); + }); + -
          +
          + render() ?>
          diff --git a/modules/comment/views/admin_manage_comments_queue.html.php b/modules/comment/views/admin_manage_comments_queue.html.php new file mode 100644 index 00000000..d847d729 --- /dev/null +++ b/modules/comment/views/admin_manage_comments_queue.html.php @@ -0,0 +1,157 @@ + +
          + +
          + + 0): ?> +

          + +

          + +

          + spam): ?> + spam) ?> +

          +

          + "> + + + + + +

          +
          + + + +
          +

          + +

          +
          + + +
          + paginator() ?> +
          + + + + + + + + "> + + + + + +
          + + + + + +
          + + <?= html::clean_attribute($comment->author_name()) ?> + +

          + + author_name()) ?> + +

          +
          + +

          created) ?>

          + text)) ?> +
          +
            + state != "unpublished" && $comment->state != "deleted"): ?> +
          • + + + + +
          • + + state != "published"): ?> +
          • + + + + + + + + +
          • + + state != "spam"): ?> +
          • + + + + +
          • + + + state != "deleted"): ?> +
          • + + + + +
          • + +
          +
          + +
          + paginator() ?> +
          +
          -- cgit v1.2.3 From 192cb124aa0f38ed804299bf39c15538cc768d7a Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Tue, 26 Apr 2011 21:05:12 -0700 Subject: Automated update of .build_number to 142 for branch master Last update: c6d1d6a6aed96f772690b74ac0be482bc2128a8d (5 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 69e66c62..c85046c4 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=141 +build_number=142 -- cgit v1.2.3 From 4fa46d6a0433347e456be8c0d309d2da59dcecd5 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 26 Apr 2011 22:38:53 -0600 Subject: Move wind and admin_wind RTL style definitions out to their own file. Call that file when an RTL language is selected. --- themes/admin_wind/css/screen-rtl.css | 308 +++++++++++++++++++++++++++++++ themes/admin_wind/css/screen.css | 310 ------------------------------- themes/admin_wind/views/admin.html.php | 3 + themes/wind/css/screen-rtl.css | 324 ++++++++++++++++++++++++++++++++ themes/wind/css/screen.css | 326 --------------------------------- themes/wind/views/page.html.php | 3 + 6 files changed, 638 insertions(+), 636 deletions(-) create mode 100644 themes/admin_wind/css/screen-rtl.css create mode 100644 themes/wind/css/screen-rtl.css diff --git a/themes/admin_wind/css/screen-rtl.css b/themes/admin_wind/css/screen-rtl.css new file mode 100644 index 00000000..b9a8c7b8 --- /dev/null +++ b/themes/admin_wind/css/screen-rtl.css @@ -0,0 +1,308 @@ +/** + * Gallery 3 Admin Wind Theme Right-to-Left Screen Styles + */ + +.rtl { + direction: rtl; +} + +.rtl #g-header, +.rtl #g-content, +.rtl #g-sidebar, +.rtl #g-footer, +.rtl caption, +.rtl th, +.rtl #g-dialog, +.rtl .g-context-menu li a, +.rtl .g-message-box li, +.rtl #g-site-status li { + text-align: right; +} + +.rtl .g-text-right { + text-align: left; +} + +.rtl .g-error, +.rtl .g-info, +.rtl .g-success, +.rtl .g-warning, +.rtl #g-add-photos-status .g-success, +.rtl #g-add-photos-status .g-error { + background-position: center right; + padding-right: 30px !important; +} + +.rtl form li.g-error, +.rtl form li.g-info, +.rtl form li.g-success, +.rtl form li.g-warning { + padding-right: 0 !important; +} + +.rtl .g-left, +.rtl .g-inline li, +.rtl #g-content #g-album-grid .g-item, +.rtl .sf-menu li, +.rtl .g-breadcrumbs li, +.rtl .g-paginator li, +.rtl .g-buttonset li, +.rtl .ui-icon-left .ui-icon, +.rtl .g-short-form li, +.rtl form ul ul li, +.rtl input[type="submit"], +.rtl input[type="reset"], +.rtl input.checkbox, +.rtl input[type=checkbox], +.rtl input.radio, +.rtl input[type=radio] { + float: right; +} + +.rtl .g-right, +.rtl .ui-icon-right .ui-icon { + float: left; +} + +.rtl .g-inline li { + margin-right: 1em; +} + +.rtl .g-inline li.g-first { + margin-right: 0; +} + +.rtl .g-breadcrumbs li { + background: transparent url('../images/ico-separator-rtl.gif') no-repeat scroll right center; + padding: 1em 18px 1em 8px; +} + +.rtl .g-breadcrumbs .g-first { + background: none; + padding-right: 0; +} + +.rtl input.checkbox { + margin-left: .4em; +} + +.rtl #g-add-comment { + right: inherit; + left: 0; +} + +.rtl .ui-icon-left .ui-icon { + margin-left: .2em; +} + +.rtl .ui-icon-right .ui-icon { + margin-right: .2em; +} + +/* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .g-buttonset .ui-corner-tl { + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-topright: 5px !important; + -webkit-border-top-right-radius: 5px !important; + border-top-right-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-tr { + -moz-border-radius-topright: 0; + -webkit-border-top-right-radius: 0; + border-top-right-radius: 0; + -moz-border-radius-topleft: 5px !important; + -webkit-border-top-left-radius: 5px !important; + border-top-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-bl { + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 5px !important; + -webkit-border-bottom-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-br { + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 5px !important; + -webkit-border-bottom-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-right, +.rtl .ui-progressbar .ui-corner-right { + -moz-border-radius-topright: 0; + -webkit-border-top-right-radius: 0; + border-top-right-radius: 0; + -moz-border-radius-topleft: 5px !important; + -webkit-border-top-left-radius: 5px !important; + border-top-left-radius: 5px !important; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 5px !important; + -webkit-border-bottom-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-left, +.rtl .ui-progressbar .ui-corner-left { + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-topright: 5px !important; + -webkit-border-top-right-radius: 5px !important; + border-top-right-radius: 5px !important; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 5px !important; + -webkit-border-bottom-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .sf-menu a { + border-left: none; + border-right:1px solid #fff; +} + +.rtl .sf-menu a.sf-with-ul { + padding-left: 2.25em; + padding-right: 1em; +} + +.rtl .sf-sub-indicator { + left: .75em !important; + right: auto; + background: url('../../../lib/superfish/images/arrows-ffffff-rtl.png') no-repeat -10px -100px; +} + +.rtl a > .sf-sub-indicator { + top: .8em; + background-position: -10px -100px; +} + +.rtl a:focus > .sf-sub-indicator, +.rtl a:hover > .sf-sub-indicator, +.rtl a:active > .sf-sub-indicator, +.rtl li:hover > a > .sf-sub-indicator, +.rtl li.sfHover > a > .sf-sub-indicator { + background-position: 0 -100px; +} + +.rtl .sf-menu ul .sf-sub-indicator { + background-position: 0 0; +} + +.rtl .sf-menu ul a > .sf-sub-indicator { + background-position: -10px 0; +} + +.rtl .sf-menu ul a:focus > .sf-sub-indicator, +.rtl .sf-menu ul a:hover > .sf-sub-indicator, +.rtl .sf-menu ul a:active > .sf-sub-indicator, +.rtl .sf-menu ul li:hover > a > .sf-sub-indicator, +.rtl .sf-menu ul li.sfHover > a > .sf-sub-indicator { + background-position: 0 0; +} + +.rtl .sf-menu li:hover ul, +.rtl .sf-menu li.sfHover ul { + right: 0; + left: auto; +} + +.rtl ul.sf-menu li li:hover ul, +.rtl ul.sf-menu li li.sfHover ul { + right: 12em; + left: auto; +} +.rtl ul.sf-menu li li li:hover ul, +.rtl ul.sf-menu li li li.sfHover ul { + right: 12em; + left: auto; +} + +.rtl .sf-shadow ul { + background: url('../../../lib/superfish/images/shadow.png') no-repeat bottom left; + padding: 0 0 9px 8px; + border-top-right-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-topright: 0; + -moz-border-radius-bottomleft: 0; + -webkit-border-top-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-topleft: 17px; + -moz-border-radius-bottomright: 17px; + -webkit-border-top-left-radius: 17px; + -webkit-border-bottom-right-radius: 17px; + border-top-left-radius: 17px; + border-bottom-right-radius: 17px; +} + +/* RTL ThemeRoller ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .ui-dialog .ui-dialog-titlebar { + padding: 0.5em 1em 0.3em 0.3em; +} + +.rtl .ui-dialog .ui-dialog-title { + float: right; +} + +.rtl .ui-dialog .ui-dialog-titlebar-close { + left: 0.3em; + right: auto; +} + +.rtl #g-content #g-album-grid .g-item, +.rtl #g-site-theme, +.rtl #g-admin-theme, +.rtl .g-selected img, +.rtl .g-available .g-block img, +.rtl #g-content #g-photo-stream .g-item, +.rtl li.g-group, +.rtl #g-server-add-admin { + float: right; +} + +.rtl #g-admin-graphics .g-available .g-block { + float: right; + margin-left: 1em; + margin-right: 0em; +} + +.rtl #g-site-admin-menu { + left: auto; + right: 150px; +} + +.rtl #g-header #g-login-menu { + float: left; +} + +.rtl #g-header #g-login-menu li { + margin-left: 0; + padding-left: 0; + padding-right: 1.2em; +} + +.rtl #g-sidebar .g-block-content { + padding-left: 0em; + padding-right: 1em; +} + +.rtl .g-selected img, +.rtl .g-available .g-block img { + margin: 0 0 1em 1em; +} diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index a26bf6d2..58942387 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -12,7 +12,6 @@ * 6) Positioning and order * 7) Navigation and menus * 8) jQuery and jQuery UI - * 9) Right-to-left language styles * * @todo Review g-buttonset-vertical */ @@ -1057,312 +1056,3 @@ ul.sf-menu li li li.sfHover ul { #g-admin-dashboard-sidebar .ui-dialog-titlebar { padding: .2em .4em; } - -/** ******************************************************************* - * 9) Right to left styles - *********************************************************************/ - -.rtl { - direction: rtl; -} - -.rtl #g-header, -.rtl #g-content, -.rtl #g-sidebar, -.rtl #g-footer, -.rtl caption, -.rtl th, -.rtl #g-dialog, -.rtl .g-context-menu li a, -.rtl .g-message-box li, -.rtl #g-site-status li { - text-align: right; -} - -.rtl .g-text-right { - text-align: left; -} - -.rtl .g-error, -.rtl .g-info, -.rtl .g-success, -.rtl .g-warning, -.rtl #g-add-photos-status .g-success, -.rtl #g-add-photos-status .g-error { - background-position: center right; - padding-right: 30px !important; -} - -.rtl form li.g-error, -.rtl form li.g-info, -.rtl form li.g-success, -.rtl form li.g-warning { - padding-right: 0 !important; -} - -.rtl .g-left, -.rtl .g-inline li, -.rtl #g-content #g-album-grid .g-item, -.rtl .sf-menu li, -.rtl .g-breadcrumbs li, -.rtl .g-paginator li, -.rtl .g-buttonset li, -.rtl .ui-icon-left .ui-icon, -.rtl .g-short-form li, -.rtl form ul ul li, -.rtl input[type="submit"], -.rtl input[type="reset"], -.rtl input.checkbox, -.rtl input[type=checkbox], -.rtl input.radio, -.rtl input[type=radio] { - float: right; -} - -.rtl .g-right, -.rtl .ui-icon-right .ui-icon { - float: left; -} - -.rtl .g-inline li { - margin-right: 1em; -} - -.rtl .g-inline li.g-first { - margin-right: 0; -} - -.rtl .g-breadcrumbs li { - background: transparent url('../images/ico-separator-rtl.gif') no-repeat scroll right center; - padding: 1em 18px 1em 8px; -} - -.rtl .g-breadcrumbs .g-first { - background: none; - padding-right: 0; -} - -.rtl input.checkbox { - margin-left: .4em; -} - -.rtl #g-add-comment { - right: inherit; - left: 0; -} - -.rtl .ui-icon-left .ui-icon { - margin-left: .2em; -} - -.rtl .ui-icon-right .ui-icon { - margin-right: .2em; -} - -/* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */ - -.rtl .g-buttonset .ui-corner-tl { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - border-top-left-radius: 0; - -moz-border-radius-topright: 5px !important; - -webkit-border-top-right-radius: 5px !important; - border-top-right-radius: 5px !important; -} - -.rtl .g-buttonset .ui-corner-tr { - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-right-radius: 0; - -moz-border-radius-topleft: 5px !important; - -webkit-border-top-left-radius: 5px !important; - border-top-left-radius: 5px !important; -} - -.rtl .g-buttonset .ui-corner-bl { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 5px !important; - -webkit-border-bottom-right-radius: 5px !important; - border-bottom-right-radius: 5px !important; -} - -.rtl .g-buttonset .ui-corner-br { - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomleft: 5px !important; - -webkit-border-bottom-left-radius: 5px !important; - border-bottom-left-radius: 5px !important; -} - -.rtl .g-buttonset .ui-corner-right, -.rtl .ui-progressbar .ui-corner-right { - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-right-radius: 0; - -moz-border-radius-topleft: 5px !important; - -webkit-border-top-left-radius: 5px !important; - border-top-left-radius: 5px !important; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomleft: 5px !important; - -webkit-border-bottom-left-radius: 5px !important; - border-bottom-left-radius: 5px !important; -} - -.rtl .g-buttonset .ui-corner-left, -.rtl .ui-progressbar .ui-corner-left { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - border-top-left-radius: 0; - -moz-border-radius-topright: 5px !important; - -webkit-border-top-right-radius: 5px !important; - border-top-right-radius: 5px !important; - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 5px !important; - -webkit-border-bottom-right-radius: 5px !important; - border-bottom-right-radius: 5px !important; -} - -/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.rtl .sf-menu a { - border-left: none; - border-right:1px solid #fff; -} - -.rtl .sf-menu a.sf-with-ul { - padding-left: 2.25em; - padding-right: 1em; -} - -.rtl .sf-sub-indicator { - left: .75em !important; - right: auto; - background: url('../../../lib/superfish/images/arrows-ffffff-rtl.png') no-repeat -10px -100px; -} - -.rtl a > .sf-sub-indicator { - top: .8em; - background-position: -10px -100px; -} - -.rtl a:focus > .sf-sub-indicator, -.rtl a:hover > .sf-sub-indicator, -.rtl a:active > .sf-sub-indicator, -.rtl li:hover > a > .sf-sub-indicator, -.rtl li.sfHover > a > .sf-sub-indicator { - background-position: 0 -100px; -} - -.rtl .sf-menu ul .sf-sub-indicator { - background-position: 0 0; -} - -.rtl .sf-menu ul a > .sf-sub-indicator { - background-position: -10px 0; -} - -.rtl .sf-menu ul a:focus > .sf-sub-indicator, -.rtl .sf-menu ul a:hover > .sf-sub-indicator, -.rtl .sf-menu ul a:active > .sf-sub-indicator, -.rtl .sf-menu ul li:hover > a > .sf-sub-indicator, -.rtl .sf-menu ul li.sfHover > a > .sf-sub-indicator { - background-position: 0 0; -} - -.rtl .sf-menu li:hover ul, -.rtl .sf-menu li.sfHover ul { - right: 0; - left: auto; -} - -.rtl ul.sf-menu li li:hover ul, -.rtl ul.sf-menu li li.sfHover ul { - right: 12em; - left: auto; -} -.rtl ul.sf-menu li li li:hover ul, -.rtl ul.sf-menu li li li.sfHover ul { - right: 12em; - left: auto; -} - -.rtl .sf-shadow ul { - background: url('../../../lib/superfish/images/shadow.png') no-repeat bottom left; - padding: 0 0 9px 8px; - border-top-right-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-topright: 0; - -moz-border-radius-bottomleft: 0; - -webkit-border-top-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-topleft: 17px; - -moz-border-radius-bottomright: 17px; - -webkit-border-top-left-radius: 17px; - -webkit-border-bottom-right-radius: 17px; - border-top-left-radius: 17px; - border-bottom-right-radius: 17px; -} - -/* RTL ThemeRoller ~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.rtl .ui-dialog .ui-dialog-titlebar { - padding: 0.5em 1em 0.3em 0.3em; -} - -.rtl .ui-dialog .ui-dialog-title { - float: right; -} - -.rtl .ui-dialog .ui-dialog-titlebar-close { - left: 0.3em; - right: auto; -} - -.rtl #g-content #g-album-grid .g-item, -.rtl #g-site-theme, -.rtl #g-admin-theme, -.rtl .g-selected img, -.rtl .g-available .g-block img, -.rtl #g-content #g-photo-stream .g-item, -.rtl li.g-group, -.rtl #g-server-add-admin { - float: right; -} - -.rtl #g-admin-graphics .g-available .g-block { - float: right; - margin-left: 1em; - margin-right: 0em; -} - -.rtl #g-site-admin-menu { - left: auto; - right: 150px; -} - -.rtl #g-header #g-login-menu { - float: left; -} - -.rtl #g-header #g-login-menu li { - margin-left: 0; - padding-left: 0; - padding-right: 1.2em; -} - -.rtl #g-sidebar .g-block-content { - padding-left: 0em; - padding-right: 1em; -} - -.rtl .g-selected img, -.rtl .g-available .g-block img { - margin: 0 0 1em 1em; -} diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index e19c6aeb..9a149149 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -39,6 +39,9 @@ css("themeroller/ui.base.css") ?> css("superfish/css/superfish.css") ?> css("screen.css") ?> + + css("screen-rtl.css") ?> +