From 65051a4bf77321518a0cf80bc328a7ed609dfc90 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 23 Sep 2009 15:06:17 -0700 Subject: Rename the default themes to wind and admin_wind. Change xss_data.txt file to reflect this move. Not completely moved yet, but the git st is rather large so lets commit this now as a base for the cleanup. --- themes/wind/views/album.html.php | 41 +++++++++++ themes/wind/views/block.html.php | 10 +++ themes/wind/views/dynamic.html.php | 29 ++++++++ themes/wind/views/movie.html.php | 37 ++++++++++ themes/wind/views/page.html.php | 142 +++++++++++++++++++++++++++++++++++++ themes/wind/views/pager.html.php | 44 ++++++++++++ themes/wind/views/photo.html.php | 59 +++++++++++++++ themes/wind/views/sidebar.html.php | 18 +++++ 8 files changed, 380 insertions(+) create mode 100644 themes/wind/views/album.html.php create mode 100644 themes/wind/views/block.html.php create mode 100644 themes/wind/views/dynamic.html.php create mode 100644 themes/wind/views/movie.html.php create mode 100644 themes/wind/views/page.html.php create mode 100644 themes/wind/views/pager.html.php create mode 100644 themes/wind/views/photo.html.php create mode 100644 themes/wind/views/sidebar.html.php (limited to 'themes/wind/views') diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php new file mode 100644 index 00000000..01f7be50 --- /dev/null +++ b/themes/wind/views/album.html.php @@ -0,0 +1,41 @@ + + +
+ album_top() ?> +

title) ?>

+
description)) ?>
+
+ + +album_bottom() ?> + +pager() ?> diff --git a/themes/wind/views/block.html.php b/themes/wind/views/block.html.php new file mode 100644 index 00000000..e8cff833 --- /dev/null +++ b/themes/wind/views/block.html.php @@ -0,0 +1,10 @@ + + + + +
+

+
+ +
+
diff --git a/themes/wind/views/dynamic.html.php b/themes/wind/views/dynamic.html.php new file mode 100644 index 00000000..9ed9d69b --- /dev/null +++ b/themes/wind/views/dynamic.html.php @@ -0,0 +1,29 @@ + +
+
+ dynamic_top() ?> +
+

+
+ + +dynamic_bottom() ?> + +pager() ?> diff --git a/themes/wind/views/movie.html.php b/themes/wind/views/movie.html.php new file mode 100644 index 00000000..910814dd --- /dev/null +++ b/themes/wind/views/movie.html.php @@ -0,0 +1,37 @@ + +
+ photo_top() ?> + + + + + movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?> + +
+

title) ?>

+
description)) ?>
+
+ + photo_bottom() ?> + context_menu($item, "#gMovieId-{$item->id}") ?> +
diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php new file mode 100644 index 00000000..19d8cc00 --- /dev/null +++ b/themes/wind/views/page.html.php @@ -0,0 +1,142 @@ + + + + + + + <? if ($page_title): ?> + <?= $page_title ?> + <? else: ?> + <? if ($theme->item()): ?> + <? if ($theme->item()->is_album()): ?> + <?= t("Browse Album :: %album_title", array("album_title" => $theme->item()->title)) ?> + <? elseif ($theme->item()->is_photo()): ?> + <?= t("Photo :: %photo_title", array("photo_title" => $theme->item()->title)) ?> + <? else: ?> + <?= t("Movie :: %movie_title", array("movie_title" => $theme->item()->title)) ?> + <? endif ?> + <? elseif ($theme->tag()): ?> + <?= t("Browse Tag :: %tag_title", array("tag_title" => $theme->tag()->name)) ?> + <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> + <?= t("Gallery") ?> + <? endif ?> + <? endif ?> + + " type="image/x-icon" /> + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("themeroller/ui.base.css") ?> + css("screen.css") ?> + + page_type == 'album'): ?> + + + + + + + script("jquery.js") ?> + script("jquery.form.js") ?> + script("jquery-ui.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("gallery.form.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + script("ui.init.js") ?> + + head() they get combined */ ?> + page_type == "photo"): ?> + script("jquery.scrollTo.js") ?> + script("gallery.show_full_size.js") ?> + page_type == "movie"): ?> + script("flowplayer.js") ?> + + + head() ?> + + + body_attributes() ?>> + page_top() ?> +
+ site_status() ?> +
+
+ header_top() ?> + + + + + +
+ site_menu() ?> +
+ header_bottom() ?> +
+ + + + +
+
+
+
+
+ messages() ?> + +
+
+
+
+ page_type != "login"): ?> + + +
+
+
+ footer() ?> + + + + + +
    + credits() ?> +
+ +
+
+ page_bottom() ?> + + diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php new file mode 100644 index 00000000..7cdc9bb0 --- /dev/null +++ b/themes/wind/views/pager.html.php @@ -0,0 +1,44 @@ + + + diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php new file mode 100644 index 00000000..b0096043 --- /dev/null +++ b/themes/wind/views/photo.html.php @@ -0,0 +1,59 @@ + + +item())): ?> + + + + +
+ photo_top() ?> + + + +
+ resize_top($item) ?> + + for_html_attr() ?>"> + + resize_img(array("id" => "gPhotoId-{$item->id}", "class" => "gResize")) ?> + + + + resize_bottom($item) ?> + context_menu($item, "#gPhotoId-{$item->id}") ?> +
+ +
+

title) ?>

+
description)) ?>
+
+ + photo_bottom() ?> +
diff --git a/themes/wind/views/sidebar.html.php b/themes/wind/views/sidebar.html.php new file mode 100644 index 00000000..04379eb6 --- /dev/null +++ b/themes/wind/views/sidebar.html.php @@ -0,0 +1,18 @@ + +sidebar_top() ?> +
+
+ + album_menu() ?> + + photo_menu() ?> + + movie_menu() ?> + + tag_menu() ?> + +
+
+ +sidebar_blocks() ?> +sidebar_bottom() ?> -- cgit v1.2.3 From ef35f0900170c9c375d5c1c87fc79c613ee96c51 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sat, 26 Sep 2009 14:28:43 -0600 Subject: Force IE 8 into IE 8 compatiblility mode --- themes/wind/views/page.html.php | 1 + 1 file changed, 1 insertion(+) (limited to 'themes/wind/views') diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 19d8cc00..59b02f95 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -4,6 +4,7 @@ + <? if ($page_title): ?> <?= $page_title ?> -- cgit v1.2.3 From 484dd7abaa03009c66edad50ce60dd872a80ae92 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Sat, 26 Sep 2009 15:50:16 -0600 Subject: Remove IE 8 compatibility mode, it's not really needed after the latest context menu update --- themes/wind/views/page.html.php | 1 - 1 file changed, 1 deletion(-) (limited to 'themes/wind/views') diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 59b02f95..19d8cc00 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -4,7 +4,6 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=8" /> <title> <? if ($page_title): ?> <?= $page_title ?> -- cgit v1.2.3 From daa3a2b43cd6e1458014e763e9640b8db16cc0c1 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Wed, 30 Sep 2009 00:32:52 -0600 Subject: First round of CSS refactor updates. Added calls to gallery.common.css from wind and admin_wind. Replaced basic text align and block float classes. Removed section #2 from both themes screen styles. --- lib/gallery.common.css | 10 +++++---- modules/comment/views/admin_comments.html.php | 2 +- modules/gallery/views/admin_maintenance.html.php | 6 +++--- .../gallery/views/admin_maintenance_task.html.php | 2 +- modules/tag/views/admin_tags.html.php | 4 ++-- modules/user/views/admin_users.html.php | 2 +- themes/admin_wind/css/screen.css | 24 ---------------------- themes/admin_wind/views/admin.html.php | 1 + themes/admin_wind/views/pager.html.php | 2 +- themes/wind/css/fix-ie.css | 2 +- themes/wind/css/screen.css | 24 ---------------------- themes/wind/views/movie.html.php | 2 +- themes/wind/views/page.html.php | 1 + themes/wind/views/pager.html.php | 2 +- themes/wind/views/photo.html.php | 2 +- 15 files changed, 21 insertions(+), 65 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index eb686bcf..0aa9cc29 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -108,12 +108,14 @@ form .g-error { * 3) Positioning and order **********************************************************************/ -.g-right { - float: right; -} - .g-left { float: left; + margin: 1em 1em 1em 0; +} + +.g-right { + float: right; + margin: 1em 0 1em 1em; } .g-first { diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 455cd714..5e9ffb1a 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -116,7 +116,7 @@ title="<?= html::clean_attribute($comment->author_email()) ?>"> <?= html::clean($comment->author_name()) ?> </a></p> </td> <td> - <div class="right"> + <div class="g-right"> <? $item = $comment->item() ?> <div class="gItem gPhoto"> <a href="<?= $item->url() ?>"> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index ce693d73..cdfe6cfd 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -63,7 +63,7 @@ <th> <?= t("Action") ?> <a href="<?= url::site("admin/maintenance/cancel_running_tasks?csrf=$csrf") ?>" - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> <?= t("cancel all") ?></a> </th> </tr> @@ -102,7 +102,7 @@ </a> <? endif ?> <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> <?= t("cancel") ?> </a> </td> @@ -136,7 +136,7 @@ <th> <?= t("Action") ?> <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>" - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"></span><?= t("remove all finished") ?></a> </th> </tr> diff --git a/modules/gallery/views/admin_maintenance_task.html.php b/modules/gallery/views/admin_maintenance_task.html.php index ddd5bd17..c0bc0d43 100644 --- a/modules/gallery/views/admin_maintenance_task.html.php +++ b/modules/gallery/views/admin_maintenance_task.html.php @@ -57,7 +57,7 @@ <div id="gStatus"> <?= t("Starting up...") ?> </div> - <div class="txtright"> + <div class="g-txt-right"> <button id="gPauseButton" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Pause") ?></button> <button id="gDoneButton" class="ui-state-default ui-corner-all" style="display: none" onclick="dismiss()"><?= t("Close") ?></button> </div> diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 8f3693aa..23a00567 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -23,7 +23,7 @@ <? $column_tag_count = 0 ?> <table id="gTagAdmin" class="gBlockContent"> - <caption class="understate"> + <caption class="g-understate"> <?= t2("There is one tag", "There are %count tags", $tags->count()) ?> </caption> <tr> @@ -48,7 +48,7 @@ <li> <span id="gTag-<?= $tag->id ?>" class="gEditable tag-name"><?= html::clean($tag->name) ?></span> - <span class="understate">(<?= $tag->count ?>)</span> + <span class="g-understate">(<?= $tag->count ?>)</span> <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" class="gDialogLink delete-link gButtonLink"> <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index c065e4b1..348747dd 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -43,7 +43,7 @@ </script> <div class="gBlock"> <a href="<?= url::site("admin/users/add_user_form") ?>" - class="gDialogLink gButtonLink right ui-icon-left ui-state-default ui-corner-all" + class="gDialogLink gButtonLink g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new user")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new user") ?> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 3aee0719..d006463d 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -5,7 +5,6 @@ * * Sheet organization: * 1) Basic HTML elements - * 2) Reusable classes * 3) Reusable content blocks * 4) Page layout containers * 5) Content blocks in specific layout containers @@ -239,29 +238,6 @@ li.gError select { border: 2px solid red; } -/** ******************************************************************* - * 2) Reusable generic classes - *********************************************************************/ - -.inactive, .understate { - color: #ccc; - font-weight: normal; -} - -.left { - float: left; - margin: 1em 1em 1em 0; -} - -.right { - float: right; - margin: 1em 0 1em 1em; -} - -.txtright { - text-align: right; -} - /** ******************************************************************* * 3) Reusable content blocks *********************************************************************/ diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index ef15ed25..b18f010a 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -10,6 +10,7 @@ <?= $theme->css("yui/reset-fonts-grids.css") ?> <?= $theme->css("themeroller/ui.base.css") ?> <?= $theme->css("superfish/css/superfish.css") ?> + <?= $theme->css("gallery.common.css") ?> <?= $theme->css("screen.css") ?> <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" href="<?= $theme->url("fix-ie.css") ?>" diff --git a/themes/admin_wind/views/pager.html.php b/themes/admin_wind/views/pager.html.php index 5034ec19..90c71446 100644 --- a/themes/admin_wind/views/pager.html.php +++ b/themes/admin_wind/views/pager.html.php @@ -25,7 +25,7 @@ <? endif ?> </li> <li class="gInfo"><?= $from_to_msg ?></li> - <li class="txtright"> + <li class="g-txt-right"> <? if ($next_page): ?> <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a> diff --git a/themes/wind/css/fix-ie.css b/themes/wind/css/fix-ie.css index eee88c15..4c13764f 100644 --- a/themes/wind/css/fix-ie.css +++ b/themes/wind/css/fix-ie.css @@ -28,7 +28,7 @@ input.submit { float: none !important; } -.gPager .txtright { +.gPager .g-txt-right { width: 29%; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index df46b443..9f3a53e6 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -5,7 +5,6 @@ * * Sheet organization: * 1) Basic HTML elements - * 2) Reusable classes * 3) Reusable content blocks * 4) Page layout containers * 5) Content blocks in specific layout containers @@ -242,29 +241,6 @@ li.gError select { border: 2px solid red; } -/** ******************************************************************* - * 2) Reusable generic classes - *********************************************************************/ - -.inactive, .understate { - color: #ccc; - font-weight: normal; -} - -.left { - float: left; - margin: 1em 1em 1em 0; -} - -.right { - float: right; - margin: 1em 0 1em 1em; -} - -.txtright { - text-align: right; -} - /** ******************************************************************* * 3) Reusable content blocks *********************************************************************/ diff --git a/themes/wind/views/movie.html.php b/themes/wind/views/movie.html.php index 910814dd..8b8e43a8 100644 --- a/themes/wind/views/movie.html.php +++ b/themes/wind/views/movie.html.php @@ -13,7 +13,7 @@ <? endif; ?> </li> <li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> - <li class="txtright"> + <li class="g-txt-right"> <? if ($next_item): ?> <a href="<?= $next_item->url() ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 19d8cc00..414174b6 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -27,6 +27,7 @@ <?= $theme->css("yui/reset-fonts-grids.css") ?> <?= $theme->css("superfish/css/superfish.css") ?> <?= $theme->css("themeroller/ui.base.css") ?> + <?= $theme->css("gallery.common.css") ?> <?= $theme->css("screen.css") ?> <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>" diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php index 7cdc9bb0..b57e0c9d 100644 --- a/themes/wind/views/pager.html.php +++ b/themes/wind/views/pager.html.php @@ -25,7 +25,7 @@ <? endif ?> </li> <li class="gInfo"><?= $from_to_msg ?></li> - <li class="txtright"> + <li class="g-txt-right"> <? if ($next_page): ?> <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a> diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index b0096043..25e1ad39 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -26,7 +26,7 @@ <? endif; ?> </li> <li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> - <li class="txtright"> + <li class="g-txt-right"> <? if ($next_item): ?> <a href="<?= $next_item->url() ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> -- cgit v1.2.3 From 72672bda39b76dae698805c3e0e6efdbdcf21105 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Wed, 30 Sep 2009 08:04:49 -0600 Subject: Replaced gButtonLink with g-button. --- lib/gallery.common.css | 12 +++++++++++ modules/comment/views/admin_comments.html.php | 12 +++++------ modules/comment/views/comments.html.php | 2 +- modules/exif/views/exif_sidebar.html.php | 2 +- modules/g2_import/views/admin_g2_import.html.php | 2 +- modules/gallery/views/admin_graphics_gd.html.php | 4 ++-- .../views/admin_graphics_graphicsmagick.html.php | 2 +- .../views/admin_graphics_imagemagick.html.php | 2 +- modules/gallery/views/admin_languages.html.php | 2 +- modules/gallery/views/admin_maintenance.html.php | 18 ++++++++-------- modules/gallery/views/l10n_client.html.php | 2 +- modules/gallery/views/welcome_message.html.php | 2 +- modules/organize/views/organize_dialog.html.php | 2 +- modules/tag/views/admin_tags.html.php | 2 +- modules/user/views/admin_users.html.php | 10 ++++----- modules/user/views/admin_users_group.html.php | 6 +++--- modules/watermark/views/admin_watermarks.html.php | 6 +++--- themes/admin_wind/css/screen.css | 25 ++++++++-------------- themes/admin_wind/js/ui.init.js | 2 +- themes/admin_wind/views/pager.html.php | 16 +++++++------- themes/wind/css/screen.css | 15 ++++--------- themes/wind/js/ui.init.js | 2 +- themes/wind/views/movie.html.php | 8 +++---- themes/wind/views/pager.html.php | 16 +++++++------- themes/wind/views/photo.html.php | 8 +++---- 25 files changed, 89 insertions(+), 91 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 0aa9cc29..d57e95fc 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -138,6 +138,18 @@ form .g-error { } .g-button { + display: inline-block; + margin: 0 4px 0 0; + padding: .2em .4em; +} + +.g-button, +.g-button:hover, +.g-button:active { + cursor: pointer !important; + outline: 0; + text-decoration: none; + -moz-outline-style: none; } .g-progressbar { diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 5e9ffb1a..ec5ad7b2 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -139,7 +139,7 @@ <? if ($comment->state != "unpublished"): ?> <li> <a href="javascript:set_state('unpublished',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-check"></span> <?= t("Unapprove") ?> </a> @@ -148,7 +148,7 @@ <? if ($comment->state != "published"): ?> <li> <a href="javascript:set_state('published',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-check"></span> <?= t("Approve") ?> </a> @@ -157,7 +157,7 @@ <? if ($comment->state != "spam"): ?> <li> <a href="javascript:set_state('spam',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-cancel"></span> <?= t("Spam") ?> </a> @@ -166,14 +166,14 @@ <!-- <li> <a href="javascript:reply(<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-arrowreturnthick-1-w"></span> <?= t("Reply") ?> </a> </li> <li> <a href="javascript:Edit(<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-pencil"></span> <?= t("Edit") ?> </a> @@ -181,7 +181,7 @@ --> <li> <a href="javascript:set_state('deleted',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-trash"></span> <?= t("Delete") ?> </a> diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index dd706a23..ee4a8ad6 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <a href="<?= url::site("form/add/comments/{$item->id})") ?>" id="gAddCommentButton" - class="gButtonLink ui-corner-all ui-icon-left ui-state-default right"> + class="g-button ui-corner-all ui-icon-left ui-state-default right"> <span class="ui-icon ui-icon-comment"></span> <?= t("Add a comment") ?> </a> diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 60c0e1d4..23ecab03 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <a id="gExifDataLink" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-info"></span> <?= t("View more information") ?> </a> diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 23ff27a8..91b723ad 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -84,7 +84,7 @@ </div> <p> - <a class="gButtonLink gDialogLink ui-state-default ui-corner-all" + <a class="g-button gDialogLink ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/start/g2_import_task::import?csrf=$csrf") ?>"> <?= t("Begin import!") ?> </a> diff --git a/modules/gallery/views/admin_graphics_gd.html.php b/modules/gallery/views/admin_graphics_gd.html.php index 010a31b4..08c19234 100644 --- a/modules/gallery/views/admin_graphics_gd.html.php +++ b/modules/gallery/views/admin_graphics_gd.html.php @@ -11,7 +11,7 @@ <?= t("You have GD version %version.", array("version" => $tk->version)) ?> </div> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> </p> <? elseif ($tk->installed): ?> <? if ($tk->error): ?> @@ -20,7 +20,7 @@ </p> <? endif ?> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> </p> <? else: ?> <div class="gModuleStatus gInfo"> diff --git a/modules/gallery/views/admin_graphics_graphicsmagick.html.php b/modules/gallery/views/admin_graphics_graphicsmagick.html.php index 97624850..6ee15bc3 100644 --- a/modules/gallery/views/admin_graphics_graphicsmagick.html.php +++ b/modules/gallery/views/admin_graphics_graphicsmagick.html.php @@ -11,7 +11,7 @@ <?= t("GraphicsMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </div> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate Graphics Magic") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate Graphics Magic") ?></a> </p> <? else: ?> <div class="gModuleStatus gWarning"> diff --git a/modules/gallery/views/admin_graphics_imagemagick.html.php b/modules/gallery/views/admin_graphics_imagemagick.html.php index cdff7c2c..aeef4919 100644 --- a/modules/gallery/views/admin_graphics_imagemagick.html.php +++ b/modules/gallery/views/admin_graphics_imagemagick.html.php @@ -11,7 +11,7 @@ <?= t("ImageMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </div> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a> </p> <? elseif ($tk->error): ?> <div class="gModuleStatus gWarning"> diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index fb30c7ba..d6f50516 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -88,7 +88,7 @@ <p><?= t("<strong>Step 3:</strong> Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?></p> <a href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>" - class="gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="g-button ui-state-default ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-power"></span> <? if (Session::instance()->get("l10n_mode", false)): ?> <?= t("Stop translation mode") ?> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 00ba5199..8c3917b6 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -30,7 +30,7 @@ </td> <td> <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <?= t("run") ?> </a> </td> @@ -62,7 +62,7 @@ </th> <th> <a href="<?= url::site("admin/maintenance/cancel_running_tasks?csrf=$csrf") ?>" - class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> <?= t("cancel all") ?></a> <?= t("Action") ?> </th> @@ -96,11 +96,11 @@ </td> <td> <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" - class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> <?= t("cancel") ?> </a> <? if ($task->state == "stalled"): ?> - <a class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all" + <a class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>"> <?= t("resume") ?> </a> @@ -135,7 +135,7 @@ </th> <th> <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>" - class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"></span><?= t("remove all finished") ?></a> <?= t("Action") ?> </th> @@ -166,19 +166,19 @@ </td> <td> <? if ($task->done): ?> - <a href="<?= url::site("admin/maintenance/remove/$task->id?csrf=$csrf") ?>" class="gButtonLink ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/remove/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> <?= t("remove") ?> </a> <? if ($task->get_log()): ?> - <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="gDialogLink gButtonLink ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button ui-state-default ui-corner-all"> <?= t("browse log") ?> </a> <? endif ?> <? else: ?> - <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="gDialogLink gButtonLink" ui-state-default ui-corner-all> + <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button" ui-state-default ui-corner-all> <?= t("resume") ?> </a> - <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="gButtonLink ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> <?= t("cancel") ?> </a> <? endif ?> diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index b0f424be..a7f001aa 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -68,7 +68,7 @@ </div> <input type="submit" name="l10n-edit-save" value="<?= t("Save translation")->for_html_attr() ?>"/> <a href="javascript: Gallery.l10nClient.copySourceText()" - class="gButtonLink ui-state-default ui-corner-all"><?= t("Copy source text") ?></a> + class="g-button ui-state-default ui-corner-all"><?= t("Copy source text") ?></a> </form> </div> </div> diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php index 5515c3dc..021e5772 100644 --- a/modules/gallery/views/welcome_message.html.php +++ b/modules/gallery/views/welcome_message.html.php @@ -18,7 +18,7 @@ <a href="<?= url::site("form/edit/users/{$user->id}") ?>" title="<?= t("Edit Your Profile")->for_html_attr() ?>" id="gAfterInstallChangePasswordLink" - class="gButtonLink ui-state-default ui-corners-all"> + class="g-button ui-state-default ui-corners-all"> <?= t("Change Password Now") ?> </a> <script> diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index cbc2e4f9..87f12be9 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -31,7 +31,7 @@ </div> <div id="gOrganizeControls"> <a id="gOrganizeClose" href="#" ref="done" - class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a> + class="g-button ui-corner-all ui-state-default"><?= t("Close") ?></a> <form> <?= t("Sort order") ?> <?= form::dropdown(array("id" => "gOrganizeSortColumn"), album::get_sort_order_options(), $album->sort_column) ?> diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 23a00567..b7344cda 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -50,7 +50,7 @@ <span id="gTag-<?= $tag->id ?>" class="gEditable tag-name"><?= html::clean($tag->name) ?></span> <span class="g-understate">(<?= $tag->count ?>)</span> <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" - class="gDialogLink delete-link gButtonLink"> + class="gDialogLink delete-link g-button"> <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> </li> diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 348747dd..5ee62fae 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -43,7 +43,7 @@ </script> <div class="gBlock"> <a href="<?= url::site("admin/users/add_user_form") ?>" - class="gDialogLink gButtonLink g-right ui-icon-left ui-state-default ui-corner-all" + class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new user")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new user") ?> @@ -85,15 +85,15 @@ <td class="gActions"> <a href="<?= url::site("admin/users/edit_user_form/$user->id") ?>" open_text="<?= t("close") ?>" - class="gPanelLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="gPanelLink g-button ui-state-default ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?= t("edit") ?></span></a> <? if (user::active()->id != $user->id && !$user->guest): ?> <a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>" - class="gDialogLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="gDialogLink g-button ui-state-default ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> <? else: ?> <span title="<?= t("This user cannot be deleted")->for_html_attr() ?>" - class="gButtonLink ui-state-disabled ui-corner-all ui-icon-left"> + class="g-button ui-state-disabled ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></span> <? endif ?> </td> @@ -105,7 +105,7 @@ <div id="gGroupAdmin" class="gBlock"> <a href="<?= url::site("admin/users/add_group_form") ?>" - class="gDialogLink gButtonLink right ui-icon-left ui-state-default ui-corner-all" + class="gDialogLink g-button right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new group")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new group") ?> diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index 476e0817..6f2496f8 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -4,11 +4,11 @@ <? if (!$group->special): ?> <a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>" title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? else: ?> <a title="<?= t("This default group cannot be deleted")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-state-disabled ui-corner-all ui-icon-left"> + class="gDialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? endif ?> </h4> @@ -20,7 +20,7 @@ <?= html::clean($user->name) ?> <? if (!$group->special): ?> <a href="javascript:remove_user(<?= $user->id ?>, <?= $group->id ?>)" - class="gButtonLink ui-state-default ui-corner-all ui-icon-left" + class="g-button ui-state-default ui-corner-all ui-icon-left" title="<?= t("Remove %user from %group group", array("user" => $user->name, "group" => $group->name))->for_html_attr() ?>"> <span class="ui-icon ui-icon-closethick"><?= t("remove") ?></span> diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index ac69d21d..3790030d 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -8,7 +8,7 @@ <? if (empty($name)): ?> <a href="<?= url::site("admin/watermarks/form_add") ?>" title="<?= t("Upload a watermark")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> <? else: ?> <h2> <?= t("Active Watermark") ?> </h2> <p> @@ -27,10 +27,10 @@ <div class="controls"> <a href="<?= url::site("admin/watermarks/form_edit") ?>" title="<?= t("Edit Watermark")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> <a href="<?= url::site("admin/watermarks/form_delete") ?>" title="<?= t("Delete Watermark")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> </div> </div> <? endif ?> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index d006463d..737c5939 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -68,9 +68,9 @@ h3 { a, .gMenu a, #gDialog a, -.gButtonLink, -.gButtonLink:hover, -.gButtonLink:active, +.g-button, +.g-button:hover, +.g-button:active, a.ui-state-hover, input.ui-state-hover, button.ui-state-hover { @@ -283,11 +283,11 @@ li.gError select { background: #eee; } -.gAvailable .gButtonLink { +.gAvailable .g-button { width: 96%; } -.gSelected .gButtonLink { +.gSelected .g-button { display: none; } @@ -627,7 +627,7 @@ li.gGroup h4 { border-bottom: 1px dashed #ccc; padding: .5em 0 .5em .5em; } -li.gGroup .gButtonLink { +li.gGroup .g-button { padding: 0; } li.gGroup ul, li.gGroup div { @@ -644,7 +644,7 @@ li.gGroup div p { li.gGroup .gUser { padding: .2em 0 0 .5em; } -li.gGroup .gUser .gButtonLink { +li.gGroup .gUser .g-button { vertical-align: middle; } @@ -838,13 +838,6 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { /* jQuery UI ThemeRoller buttons */ -.gButtonLink { - display: inline-block; - margin: 0 4px 0 0; - padding: .2em .4em; - outline: 0; -} - .gButtonSet { padding-left: 1px; } @@ -853,7 +846,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: left; } -.gButtonSet .gButtonLink { +.gButtonSet .g-button { margin: 0; } @@ -1106,7 +1099,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { clear: both; } -#gTranslations .gButtonLink { +#gTranslations .g-button { padding: .5em; } diff --git a/themes/admin_wind/js/ui.init.js b/themes/admin_wind/js/ui.init.js index c6379c09..d9b011bd 100644 --- a/themes/admin_wind/js/ui.init.js +++ b/themes/admin_wind/js/ui.init.js @@ -37,7 +37,7 @@ $(document).ready(function(){ if ($("#gAdminCommentsMenu").length) { $("#gAdminCommentsMenu ul").removeClass("gMenu").removeClass("sf-menu"); $("#gAdminCommentsMenu").addClass("gButtonSet"); - $("#gAdminCommentsMenu a").addClass("gButtonLink ui-state-default"); + $("#gAdminCommentsMenu a").addClass("g-button ui-state-default"); $("#gAdminCommentsMenu ul li:first a").addClass("ui-corner-left"); $("#gAdminCommentsMenu ul li:last a").addClass("ui-corner-right"); } diff --git a/themes/admin_wind/views/pager.html.php b/themes/admin_wind/views/pager.html.php index 90c71446..29b9f9d0 100644 --- a/themes/admin_wind/views/pager.html.php +++ b/themes/admin_wind/views/pager.html.php @@ -10,34 +10,34 @@ "count" => $total_items)) ?> <li> <? if ($first_page): ?> - <a href="<?= str_replace('{page}', 1, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', 1, $url) ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-first"></span><?= t("first") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-seek-first"></span><?= t("first") ?></a> <? endif ?> <? if ($previous_page): ?> - <a href="<?= str_replace('{page}', $previous_page, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', $previous_page, $url) ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a> <? endif ?> </li> <li class="gInfo"><?= $from_to_msg ?></li> <li class="g-txt-right"> <? if ($next_page): ?> - <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a> <? else: ?> - <a class="gButtonLink ui-state-disabled ui-icon-right ui-corner-all"> + <a class="g-button ui-state-disabled ui-icon-right ui-corner-all"> <span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a> <? endif ?> <? if ($last_page): ?> - <a href="<?= str_replace('{page}', $last_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', $last_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-end"></span><?= t("last") ?></a> <? else: ?> - <a class="gButtonLink ui-state-disabled ui-icon-right ui-corner-all"> + <a class="g-button ui-state-disabled ui-icon-right ui-corner-all"> <span class="ui-icon ui-icon-seek-end"></span><?= t("last") ?></a> <? endif ?> </li> diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 9f3a53e6..6d955481 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -68,9 +68,9 @@ h3 { a, .gMenu a, #gDialog a, -.gButtonLink, -.gButtonLink:hover, -.gButtonLink:active, +.g-button, +.g-button:hover, +.g-button:active, a.ui-state-hover, input.ui-state-hover, button.ui-state-hover { @@ -884,13 +884,6 @@ form .gError, /* jQuery UI ThemeRoller buttons */ -.gButtonLink { - display: inline-block; - margin: 0 4px 0 0; - padding: .2em .4em; - outline: 0; -} - .gButtonSet { padding-left: 1px; } @@ -899,7 +892,7 @@ form .gError, float: left; } -.gButtonSet .gButtonLink { +.gButtonSet .g-button { margin: 0; } diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index c79e91bd..4a1962c0 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -49,7 +49,7 @@ $(document).ready(function() { // Apply styles and icon classes to gContextMenu if ($(".gContextMenu").length) { $(".gContextMenu li").addClass("ui-state-default"); - $(".gContextMenu a").addClass("gButtonLink ui-icon-left"); + $(".gContextMenu a").addClass("g-button ui-icon-left"); $(".gContextMenu a").prepend("<span class=\"ui-icon\"></span>"); $(".gContextMenu a span").each(function() { var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString(); diff --git a/themes/wind/views/movie.html.php b/themes/wind/views/movie.html.php index 8b8e43a8..cf7c9b7f 100644 --- a/themes/wind/views/movie.html.php +++ b/themes/wind/views/movie.html.php @@ -5,20 +5,20 @@ <ul class="gPager"> <li> <? if ($previous_item): ?> - <a href="<?= $previous_item->url() ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> + <a href="<?= $previous_item->url() ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> <? endif; ?> </li> <li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> <li class="g-txt-right"> <? if ($next_item): ?> - <a href="<?= $next_item->url() ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> + <a href="<?= $next_item->url() ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-right ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-right ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> <? endif ?> </li> diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php index b57e0c9d..155c8d16 100644 --- a/themes/wind/views/pager.html.php +++ b/themes/wind/views/pager.html.php @@ -10,34 +10,34 @@ "count" => $total_items)) ?> <li> <? if ($first_page): ?> - <a href="<?= str_replace('{page}', 1, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', 1, $url) ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-first"></span><?= t("first") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-seek-first"></span><?= t("first") ?></a> <? endif ?> <? if ($previous_page): ?> - <a href="<?= str_replace('{page}', $previous_page, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', $previous_page, $url) ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a> <? endif ?> </li> <li class="gInfo"><?= $from_to_msg ?></li> <li class="g-txt-right"> <? if ($next_page): ?> - <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a> <? else: ?> - <a class="gButtonLink ui-state-disabled ui-icon-right ui-corner-all"> + <a class="g-button ui-state-disabled ui-icon-right ui-corner-all"> <span class="ui-icon ui-icon-seek-next"></span><?= t("next") ?></a> <? endif ?> <? if ($last_page): ?> - <a href="<?= str_replace('{page}', $last_page, $url) ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> + <a href="<?= str_replace('{page}', $last_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-seek-end"></span><?= t("last") ?></a> <? else: ?> - <a class="gButtonLink ui-state-disabled ui-icon-right ui-corner-all"> + <a class="g-button ui-state-disabled ui-icon-right ui-corner-all"> <span class="ui-icon ui-icon-seek-end"></span><?= t("last") ?></a> <? endif ?> </li> diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index 25e1ad39..def3d8b7 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -18,20 +18,20 @@ <ul class="gPager"> <li> <? if ($previous_item): ?> - <a href="<?= $previous_item->url() ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> + <a href="<?= $previous_item->url() ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> <? endif; ?> </li> <li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> <li class="g-txt-right"> <? if ($next_item): ?> - <a href="<?= $next_item->url() ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> + <a href="<?= $next_item->url() ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> <? else: ?> - <a class="gButtonLink ui-icon-right ui-state-disabled ui-corner-all"> + <a class="g-button ui-icon-right ui-state-disabled ui-corner-all"> <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> <? endif ?> </li> -- cgit v1.2.3 From 60d35b89929d9029c794f72d6a9c38b676e282f6 Mon Sep 17 00:00:00 2001 From: Tim Almdal <tnalmdal@shaw.ca> Date: Wed, 30 Sep 2009 07:31:11 -0700 Subject: Use the block_manager to manage site sidebar panels. Fixes ticket #110. * Extend block_manager to handle sidebar blocks. get_available has become get_available_admin_blocks, get_list becomes get_admin_list. * Create new functions get_available_site_blocks which will look for gallery_block get_available_site_blocks. * Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks * Change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach * Convert the user module to use the new sidebar block structure. remove the installers for info and image_block modules. * Convert tag and rss modules to the new sidebar framework. reset the version number to 1 for info and image_block modules. * Change the get_html method to ignore empty blocks and change the individual handlers to return an empty string if no block is generated * Add a warning message if no sidebar blocks are active and provide a link to the admin page that configures the sidebar. --- modules/comment/helpers/comment_block.php | 2 +- modules/gallery/controllers/admin_dashboard.php | 4 +- modules/gallery/controllers/admin_sidebar.php | 28 ++++++++++ modules/gallery/helpers/block_manager.php | 24 ++++++--- modules/gallery/helpers/gallery_block.php | 5 +- modules/gallery/libraries/Theme_View.php | 12 ++++- modules/gallery/module.info | 2 +- modules/gallery/views/admin_sidebar.html.php | 9 ++++ modules/image_block/helpers/image_block_block.php | 63 +++++++++++++++++++++++ modules/image_block/helpers/image_block_theme.php | 50 ------------------ modules/info/helpers/info_block.php | 39 ++++++++++++++ modules/info/helpers/info_theme.php | 10 ---- modules/rss/helpers/rss_block.php | 49 ++++++++++++++++++ modules/rss/helpers/rss_theme.php | 40 -------------- modules/tag/helpers/tag_block.php | 45 ++++++++++++++++ modules/tag/helpers/tag_theme.php | 19 ------- modules/user/helpers/user_block.php | 46 +++++++++++++++++ modules/user/helpers/user_theme.php | 17 ------ themes/wind/views/no_sidebar.html.php | 5 ++ 19 files changed, 319 insertions(+), 150 deletions(-) create mode 100644 modules/gallery/controllers/admin_sidebar.php create mode 100644 modules/gallery/views/admin_sidebar.html.php create mode 100644 modules/image_block/helpers/image_block_block.php delete mode 100644 modules/image_block/helpers/image_block_theme.php create mode 100644 modules/info/helpers/info_block.php create mode 100644 modules/rss/helpers/rss_block.php delete mode 100644 modules/rss/helpers/rss_theme.php create mode 100644 modules/tag/helpers/tag_block.php create mode 100644 modules/user/helpers/user_block.php create mode 100644 themes/wind/views/no_sidebar.html.php (limited to 'themes/wind/views') diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index 08182905..b989be6b 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class comment_block_Core { - static function get_list() { + static function get_admin_list() { return array("recent_comments" => t("Recent Comments")); } diff --git a/modules/gallery/controllers/admin_dashboard.php b/modules/gallery/controllers/admin_dashboard.php index 3cb97b14..6bf3b966 100644 --- a/modules/gallery/controllers/admin_dashboard.php +++ b/modules/gallery/controllers/admin_dashboard.php @@ -34,7 +34,7 @@ class Admin_Dashboard_Controller extends Admin_Controller { $form = gallery_block::get_add_block_form(); if ($form->validate()) { list ($module_name, $id) = explode(":", $form->add_block->id->value); - $available = block_manager::get_available(); + $available = block_manager::get_available_admin_blocks(); if ($form->add_block->center->value) { block_manager::add("dashboard_center", $module_name, $id); @@ -66,7 +66,7 @@ class Admin_Dashboard_Controller extends Admin_Controller { } if (!empty($deleted)) { - $available = block_manager::get_available(); + $available = block_manager::get_available_admin_blocks(); $title = $available[join(":", $deleted)]; message::success(t("Removed <b>%title</b> block", array("title" => $title))); } diff --git a/modules/gallery/controllers/admin_sidebar.php b/modules/gallery/controllers/admin_sidebar.php new file mode 100644 index 00000000..7e71426a --- /dev/null +++ b/modules/gallery/controllers/admin_sidebar.php @@ -0,0 +1,28 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2009 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class Admin_Sidebar_Controller extends Admin_Controller { + public function index() { + $view = new Admin_View("admin.html"); + $view->content = new View("admin_sidebar.html"); + print $view; + } + +} + diff --git a/modules/gallery/helpers/block_manager.php b/modules/gallery/helpers/block_manager.php index 20b641d4..b99a6571 100644 --- a/modules/gallery/helpers/block_manager.php +++ b/modules/gallery/helpers/block_manager.php @@ -38,13 +38,21 @@ class block_manager_Core { self::set_active($location, $blocks); } - static function get_available() { + static function get_available_admin_blocks() { + return self::_get_blocks("get_admin_list"); + } + + static function get_available_site_blocks() { + return self::_get_blocks("get_site_list"); + } + + private static function _get_blocks($function) { $blocks = array(); foreach (module::active() as $module) { $class_name = "{$module->name}_block"; - if (method_exists($class_name, "get_list")) { - foreach (call_user_func(array($class_name, "get_list")) as $id => $title) { + if (method_exists($class_name, $function)) { + foreach (call_user_func(array($class_name, $function)) as $id => $title) { $blocks["{$module->name}:$id"] = $title; } } @@ -52,14 +60,16 @@ class block_manager_Core { return $blocks; } - static function get_html($location) { + static function get_html($location, $theme) { $active = self::get_active($location); $result = ""; foreach ($active as $id => $desc) { if (method_exists("$desc[0]_block", "get")) { - $block = call_user_func(array("$desc[0]_block", "get"), $desc[1]); - $block->id = $id; - $result .= $block; + $block = call_user_func(array("$desc[0]_block", "get"), $desc[1], $theme); + if (!empty($block)) { + $block->id = $id; + $result .= $block; + } } } return $result; diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index b7816954..f2cb8ded 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class gallery_block_Core { - static function get_list() { + static function get_admin_list() { return array( "welcome" => t("Welcome to Gallery 3!"), "photo_stream" => t("Photo Stream"), @@ -94,7 +94,8 @@ class gallery_block_Core { $form = new Forge("admin/dashboard/add_block", "", "post", array("id" => "gAddDashboardBlockForm")); $group = $form->group("add_block")->label(t("Add Block")); - $group->dropdown("id")->label(t("Available Blocks"))->options(block_manager::get_available()); + $group->dropdown("id")->label(t("Available Blocks")) + ->options(block_manager::get_available_admin_blocks()); $group->submit("center")->value(t("Add to center")); $group->submit("sidebar")->value(t("Add to sidebar")); return $form; diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 728e8bf9..ab25a4b6 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -153,6 +153,17 @@ class Theme_View_Core extends Gallery_View { return message::get(); } + /** + * Print out the sidebar. + */ + public function sidebar_blocks() { + $sidebar = block_manager::get_html("site.sidebar", $this); + if (empty($sidebar) && user::active()->admin) { + $sidebar = new View("no_sidebar.html"); + } + return $sidebar; + } + /** * Handle all theme functions that insert module content. */ @@ -176,7 +187,6 @@ class Theme_View_Core extends Gallery_View { case "photo_top": case "resize_bottom": case "resize_top": - case "sidebar_blocks": case "sidebar_bottom": case "sidebar_top": case "thumb_bottom": diff --git a/modules/gallery/module.info b/modules/gallery/module.info index bffcb1c6..f509ff08 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ name = "Gallery 3" description = "Gallery core application" -version = 14 +version = 15 diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php new file mode 100644 index 00000000..32386f5d --- /dev/null +++ b/modules/gallery/views/admin_sidebar.html.php @@ -0,0 +1,9 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> + +<h1> <?= t("Arrange Sidebar") ?> </h1> +<p> + <?= t("Select and drag blocks from the available column to the active column to add to the sidebar; remove by dragging the other way.") ?> +</p> + +<div id="gSiteBlocks"> +</div> \ No newline at end of file diff --git a/modules/image_block/helpers/image_block_block.php b/modules/image_block/helpers/image_block_block.php new file mode 100644 index 00000000..d0402eb6 --- /dev/null +++ b/modules/image_block/helpers/image_block_block.php @@ -0,0 +1,63 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2009 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class image_block_block_Core { + static function get_site_list() { + return array("random_image" => t("Random Image")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "random_image": + $block = new Block(); + $block->css_id = "gImageBlock"; + $block->title = t("Random Image"); + $block->content = new View("image_block_block.html"); + + $random = ((float)mt_rand()) / (float)mt_getrandmax(); + + $items = ORM::factory("item") + ->viewable() + ->where("type !=", "album") + ->where("rand_key < ", $random) + ->orderby(array("rand_key" => "DESC")) + ->find_all(1); + + if ($items->count() == 0) { + // Try once more. If this fails, just ditch the block altogether + $items = ORM::factory("item") + ->viewable() + ->where("type !=", "album") + ->where("rand_key >= ", $random) + ->orderby(array("rand_key" => "DESC")) + ->find_all(1); + } + + if ($items->count() > 0) { + $block->content->item = $items->current(); + } else { + $block = ""; + } + break; + } + + return $block; + } +} diff --git a/modules/image_block/helpers/image_block_theme.php b/modules/image_block/helpers/image_block_theme.php deleted file mode 100644 index 78138b23..00000000 --- a/modules/image_block/helpers/image_block_theme.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2009 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class image_block_theme_Core { - static function sidebar_blocks($theme) { - $block = new Block(); - $block->css_id = "gImageBlock"; - $block->title = t("Random Image"); - $block->content = new View("image_block_block.html"); - - $random = ((float)mt_rand()) / (float)mt_getrandmax(); - - $items = ORM::factory("item") - ->viewable() - ->where("type !=", "album") - ->where("rand_key < ", $random) - ->orderby(array("rand_key" => "DESC")) - ->find_all(1); - - if ($items->count() == 0) { - // Try once more. If this fails, just ditch the block altogether - $items = ORM::factory("item") - ->viewable() - ->where("type !=", "album") - ->where("rand_key >= ", $random) - ->orderby(array("rand_key" => "DESC")) - ->find_all(1); - } - - $block->content->item = $items->current(); - - return $items->count() == 0 ? "" : $block; - } -} diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php new file mode 100644 index 00000000..3a853609 --- /dev/null +++ b/modules/info/helpers/info_block.php @@ -0,0 +1,39 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2009 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class info_block_Core { + static function get_site_list() { + return array("metadata" => t("Metadata")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "metadata": + if ($theme->item()) { + $block = new Block(); + $block->css_id = "gMetadata"; + $block->title = $theme->item()->is_album() ? t("Album Info") : t("Photo Info"); + $block->content = new View("info_block.html"); + } + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/info/helpers/info_theme.php b/modules/info/helpers/info_theme.php index 4bf894ad..8b8602a1 100644 --- a/modules/info/helpers/info_theme.php +++ b/modules/info/helpers/info_theme.php @@ -18,16 +18,6 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class info_theme_Core { - static function sidebar_blocks($theme) { - if ($theme->item()) { - $block = new Block(); - $block->css_id = "gMetadata"; - $block->title = $theme->item()->is_album() ? t("Album Info") : t("Photo Info"); - $block->content = new View("info_block.html"); - return $block; - } - } - static function thumb_info($theme, $item) { $results = ""; if ($item->view_count) { diff --git a/modules/rss/helpers/rss_block.php b/modules/rss/helpers/rss_block.php new file mode 100644 index 00000000..43043f5f --- /dev/null +++ b/modules/rss/helpers/rss_block.php @@ -0,0 +1,49 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2009 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class rss_block_Core { + static function get_site_list() { + return array("rss_feeds" => t("Available RSS Feeds")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "rss_feeds": + $feeds = array(); + foreach (module::active() as $module) { + $class_name = "{$module->name}_rss"; + if (method_exists($class_name, "available_feeds")) { + $feeds = array_merge($feeds, + call_user_func(array($class_name, "available_feeds"), $theme->item(), $theme->tag())); + } + } + if (!empty($feeds)) { + $block = new Block(); + $block->css_id = "gRss"; + $block->title = t("Available RSS Feeds"); + $block->content = new View("rss_block.html"); + $block->content->feeds = $feeds; + } + break; + } + + return $block; + } +} diff --git a/modules/rss/helpers/rss_theme.php b/modules/rss/helpers/rss_theme.php deleted file mode 100644 index 3d1b9a29..00000000 --- a/modules/rss/helpers/rss_theme.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2009 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class rss_theme_Core { - static function sidebar_blocks($theme) { - $block = new Block(); - $block->css_id = "gRss"; - $block->title = t("Available RSS Feeds"); - $block->content = new View("rss_block.html"); - $block->content->feeds = array(); - foreach (module::active() as $module) { - $class_name = "{$module->name}_rss"; - if (method_exists($class_name, "available_feeds")) { - $block->content->feeds = array_merge( - $block->content->feeds, - call_user_func(array($class_name, "available_feeds"), $theme->item(), $theme->tag())); - } - } - - if ($block->content->feeds) { - return $block; - } - } -} diff --git a/modules/tag/helpers/tag_block.php b/modules/tag/helpers/tag_block.php new file mode 100644 index 00000000..bbcc5fd1 --- /dev/null +++ b/modules/tag/helpers/tag_block.php @@ -0,0 +1,45 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2009 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class tag_block_Core { + static function get_site_list() { + return array("tag" => t("Popular Tags")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "tag": + $block = new Block(); + $block->css_id = "gTag"; + $block->title = t("Popular Tags"); + $block->content = new View("tag_block.html"); + $block->content->cloud = tag::cloud(30); + + if ($theme->item() && $theme->page_type() != "tag" && access::can("edit", $theme->item())) { + $controller = new Tags_Controller(); + $block->content->form = tag::get_add_form($theme->item()); + } else { + $block->content->form = ""; + } + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php index 1bce9bd8..4f22d2ac 100644 --- a/modules/tag/helpers/tag_theme.php +++ b/modules/tag/helpers/tag_theme.php @@ -28,25 +28,6 @@ class tag_theme_Core { $theme->script("tag.js"); } - static function sidebar_blocks($theme) { - // @todo this needs to be data driven - - $block = new Block(); - $block->css_id = "gTag"; - $block->title = t("Popular Tags"); - $block->content = new View("tag_block.html"); - $block->content->cloud = tag::cloud(30); - - if ($theme->item() && $theme->page_type() != "tag" && access::can("edit", $theme->item())) { - $controller = new Tags_Controller(); - $block->content->form = tag::get_add_form($theme->item()); - } else { - $block->content->form = ""; - } - - return $block; - } - static function sort_by_name($tag1, $tag2) { return strcasecmp($tag1->name, $tag2->name); } diff --git a/modules/user/helpers/user_block.php b/modules/user/helpers/user_block.php new file mode 100644 index 00000000..e7671f06 --- /dev/null +++ b/modules/user/helpers/user_block.php @@ -0,0 +1,46 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2009 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class user_block_Core { + static function get_site_list() { + return array("language" => t("Language Preference")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "language": + $locales = locales::installed(); + foreach ($locales as $locale => $display_name) { + $locales[$locale] = SafeString::of_safe_html($display_name); + } + if (count($locales) > 1) { + $block = new Block(); + $block->css_id = "gUserLanguageBlock"; + $block->title = t("Language Preference"); + $block->content = new View("user_languages_block.html"); + $block->content->installed_locales = + array_merge(array("" => t("« none »")), $locales); + $block->content->selected = (string) user::cookie_locale(); + } + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/user/helpers/user_theme.php b/modules/user/helpers/user_theme.php index 098d87fd..69d63eaf 100644 --- a/modules/user/helpers/user_theme.php +++ b/modules/user/helpers/user_theme.php @@ -33,21 +33,4 @@ class user_theme_Core { return $view->render(); } } - - static function sidebar_blocks($theme) { - $locales = locales::installed(); - foreach ($locales as $locale => $display_name) { - $locales[$locale] = SafeString::of_safe_html($display_name); - } - if (count($locales) > 1) { - $block = new Block(); - $block->css_id = "gUserLanguageBlock"; - $block->title = t("Language Preference"); - $block->content = new View("user_languages_block.html"); - $block->content->installed_locales = - array_merge(array("" => t("« none »")), $locales); - $block->content->selected = (string) user::cookie_locale(); - return $block; - } - } } diff --git a/themes/wind/views/no_sidebar.html.php b/themes/wind/views/no_sidebar.html.php new file mode 100644 index 00000000..7324cf9e --- /dev/null +++ b/themes/wind/views/no_sidebar.html.php @@ -0,0 +1,5 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<div class="gWarning"> + <?= t("No active sidebar panels. <a href=\"%url\">Add panels</a>", + array("url" => html::mark_clean(url::site("admin/sidebar")))) ?> +</div> -- cgit v1.2.3 From e1e8904e4a82792effd721fc0b4c028d86cf177a Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Wed, 30 Sep 2009 22:49:36 -0600 Subject: Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's and classes in the login/reset password dialog. --- lib/gallery.common.css | 56 ++++++++++++++--- lib/gallery.common.js | 4 +- lib/gallery.dialog.js | 72 +++++++++++----------- modules/exif/helpers/exif.php | 2 +- modules/exif/views/exif_sidebar.html.php | 2 +- modules/g2_import/views/admin_g2_import.html.php | 2 +- modules/gallery/helpers/graphics.php | 2 +- modules/gallery/libraries/Menu.php | 2 +- .../gallery/views/admin_advanced_settings.html.php | 2 +- modules/gallery/views/admin_maintenance.html.php | 8 +-- .../views/admin_maintenance_show_log.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 4 +- modules/organize/js/organize.js | 16 ++--- modules/organize/views/organize_dialog.html.php | 2 +- modules/search/helpers/search.php | 2 +- modules/server_add/js/server_add.js | 4 +- modules/tag/js/tag.js | 2 +- modules/tag/views/admin_tags.html.php | 2 +- modules/user/helpers/group.php | 1 + modules/user/helpers/user.php | 3 + modules/user/views/admin_users.html.php | 8 +-- modules/user/views/admin_users_group.html.php | 4 +- modules/user/views/login.html.php | 2 +- modules/user/views/login_ajax.html.php | 24 ++++---- modules/watermark/views/admin_watermarks.html.php | 6 +- themes/admin_wind/css/screen.css | 55 ++--------------- themes/admin_wind/js/ui.init.js | 2 +- themes/wind/css/fix-ie.css | 2 +- themes/wind/css/screen.css | 63 +++---------------- themes/wind/js/ui.init.js | 4 +- themes/wind/views/album.html.php | 2 +- 31 files changed, 158 insertions(+), 204 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 601f6609..54453012 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -3,9 +3,10 @@ * * Sheet organization: * 1) Text - * 2) States and interactions - * 3) Positioning and order - * 4) Reusable containers/widgets + * 2) Dimension and scale + * 3) States and interactions + * 4) Positioning and order + * 5) Containers/widgets */ /** ******************************************************************* @@ -24,8 +25,16 @@ text-align: right; } + +/** ******************************************************************* + * 2) Dimension and scale + **********************************************************************/ + +.g-narrow { +} + /** ******************************************************************* - * 2) States and interactions + * 3) States and interactions **********************************************************************/ .g-active, @@ -105,7 +114,7 @@ form .g-error { } /** ******************************************************************* - * 3) Positioning and order + * 4) Positioning and order **********************************************************************/ .g-left { @@ -131,10 +140,43 @@ form .g-error { } /** ******************************************************************* - * 4) Reusable containers/widgets + * 5) Containers/widgets **********************************************************************/ -.g-dialog { +#g-dialog { + text-align: left; +} + +#g-dialog .g-narrow { + margin: 0 auto; + width: 270px; +} + +#g-dialog fieldset { + border: none; +} + +#g-dialog legend { + display: none; +} + +#g-dialog form input[type="text"], +#g-dialog form input[type="password"] { + width: 100%; +} + +#g-dialog p { + margin: 0; +} + +#g-dialog li { + padding-left: 0; +} + +#g-dialog .g-cancel { + clear: none; + float: left; + margin: .3em 1em; } .g-button { diff --git a/lib/gallery.common.js b/lib/gallery.common.js index a91f021e..59482b22 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -53,7 +53,7 @@ return this.each(function(i){ var size; switch ($(this).attr("id")) { - case "#gDialog": + case "#g-dialog": case "#gPanel": size = "Large"; break; @@ -133,7 +133,7 @@ function() { if (in_progress == 0) { $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); - $(this).find(".gDialogLink").gallery_dialog(); + $(this).find(".g-dialogLink").gallery_dialog(); $(this).find(".gAjaxLink").gallery_ajax(); } }, diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 39c451e3..a70200f9 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -15,75 +15,75 @@ _show: function(sHref) { var self = this; - var eDialog = '<div id="gDialog"></div>'; + var eDialog = '<div id="g-dialog"></div>'; $("body").append(eDialog); if (!self.options.close) { self.options.close = self.close_dialog; } - $("#gDialog").dialog(self.options); + $("#g-dialog").dialog(self.options); - $("#gDialog").gallery_show_loading(); + $("#g-dialog").gallery_show_loading(); $.get(sHref, function(data) { - $("#gDialog").html(data).gallery_show_loading(); + $("#g-dialog").html(data).gallery_show_loading(); - if ($("#gDialog form").length) { - self.form_loaded(null, $("#gDialog form")); + if ($("#g-dialog form").length) { + self.form_loaded(null, $("#g-dialog form")); } self._layout(); - $("#gDialog").dialog("open"); + $("#g-dialog").dialog("open"); // Remove titlebar for progress dialogs or set title - if ($("#gDialog #gProgress").length) { + if ($("#g-dialog #gProgress").length) { $(".ui-dialog-titlebar").remove(); - } else if ($("#gDialog h1").length) { - $("#gDialog").dialog('option', 'title', $("#gDialog h1:eq(0)").html()); - } else if ($("#gDialog fieldset legend").length) { - $("#gDialog").dialog('option', 'title', $("#gDialog fieldset legend:eq(0)").html()); + } else if ($("#g-dialog h1").length) { + $("#g-dialog").dialog('option', 'title', $("#g-dialog h1:eq(0)").html()); + } else if ($("#g-dialog fieldset legend").length) { + $("#g-dialog").dialog('option', 'title', $("#g-dialog fieldset legend:eq(0)").html()); } - if ($("#gDialog form").length) { + if ($("#g-dialog form").length) { self._ajaxify_dialog(); } }); - $("#gDialog").dialog("option", "self", self); + $("#g-dialog").dialog("option", "self", self); }, _layout: function() { var dialogWidth; - var dialogHeight = $("#gDialog").height(); - var cssWidth = new String($("#gDialog form").css("width")); + var dialogHeight = $("#g-dialog").height(); + var cssWidth = new String($("#g-dialog form").css("width")); var childWidth = cssWidth.replace(/[^0-9]/g,""); var size = $.gallery_get_viewport_size(); - if ($("#gDialog iframe").length) { + if ($("#g-dialog iframe").length) { dialogWidth = size.width() - 100; // Set the iframe width and height - $("#gDialog iframe").width("100%").height(size.height() - 100); - } else if ($("#gDialog .gDialogPanel").length) { + $("#g-dialog iframe").width("100%").height(size.height() - 100); + } else if ($("#g-dialog .g-dialogPanel").length) { dialogWidth = size.width() - 100; - $("#gDialog").dialog("option", "height", size.height() - 100); + $("#g-dialog").dialog("option", "height", size.height() - 100); } else if (childWidth == "" || childWidth > 300) { dialogWidth = 500; } - $("#gDialog").dialog('option', 'width', dialogWidth); + $("#g-dialog").dialog('option', 'width', dialogWidth); }, form_loaded: function(event, ui) { // Should be defined (and localized) in the theme MSG_CANCEL = MSG_CANCEL || 'Cancel'; - var eCancel = '<a href="#" class="gCancel">' + MSG_CANCEL + '</a>'; - if ($("#gDialog .submit").length) { - $("#gDialog .submit").addClass("ui-state-default ui-corner-all"); + var eCancel = '<a href="#" class="g-cancel">' + MSG_CANCEL + '</a>'; + if ($("#g-dialog .submit").length) { + $("#g-dialog .submit").addClass("ui-state-default ui-corner-all"); $.fn.gallery_hover_init(); - $("#gDialog .submit").parent().append(eCancel); - $("#gDialog .gCancel").click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog .submit").parent().append(eCancel); + $("#g-dialog .g-cancel").click(function(event) { + $("#g-dialog").dialog("close"); event.preventDefault(); }); } - $("#gDialog .ui-state-default").hover( + $("#g-dialog .ui-state-default").hover( function() { $(this).addClass("ui-state-hover"); }, @@ -94,23 +94,23 @@ }, close_dialog: function(event, ui) { - var self = $("#gDialog").dialog("option", "self"); - if ($("#gDialog form").length) { - self._trigger("form_closing", null, $("#gDialog form")); + var self = $("#g-dialog").dialog("option", "self"); + if ($("#g-dialog form").length) { + self._trigger("form_closing", null, $("#g-dialog form")); } - self._trigger("dialog_closing", null, $("#gDialog")); - $("#gDialog").dialog("destroy").remove(); + self._trigger("dialog_closing", null, $("#g-dialog")); + $("#g-dialog").dialog("destroy").remove(); }, _ajaxify_dialog: function() { var self = this; - $("#gDialog form").ajaxForm({ + $("#g-dialog form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gDialog form").replaceWith(data.form); + $("#g-dialog form").replaceWith(data.form); self._ajaxify_dialog(); - self.form_loaded(null, $("#gDialog form")); + self.form_loaded(null, $("#g-dialog form")); if (typeof data.reset == 'function') { eval(data.reset + '()'); } diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 83540622..453690ea 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -163,7 +163,7 @@ class exif_Core { list ($remaining) = exif::stats(); if ($remaining) { site_status::warning( - t('Your Exif index needs to be updated. <a href="%url" class="gDialogLink">Fix this now</a>', + t('Your Exif index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>', array("url" => html::mark_clean(url::site("admin/maintenance/start/exif_task::update_index?csrf=__CSRF__")))), "exif_index_out_of_date"); } diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 23ecab03..3c7bb517 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <a id="gExifDataLink" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-info"></span> <?= t("View more information") ?> </a> diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 91b723ad..314f030b 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -84,7 +84,7 @@ </div> <p> - <a class="g-button gDialogLink ui-state-default ui-corner-all" + <a class="g-button g-dialogLink ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/start/g2_import_task::import?csrf=$csrf") ?>"> <?= t("Begin import!") ?> </a> diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 0e32022f..f9b88638 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -249,7 +249,7 @@ class graphics_Core { "%count of your photos are out of date. <a %attrs>Click here to fix them</a>", $count, array("attrs" => html::mark_clean(sprintf( - 'href="%s" class="gDialogLink"', + 'href="%s" class="g-dialogLink"', url::site("admin/maintenance/start/gallery_task::rebuild_dirty_images?csrf=__CSRF__"))))), "graphics_dirty"); } diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index 07b2b2b8..4be374a2 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -142,7 +142,7 @@ class Menu_Element_Dialog extends Menu_Element { } else { $css_class = ""; } - return "<li><a$css_id class=\"gDialogLink $css_class\" href=\"$this->url\" " . + return "<li><a$css_id class=\"g-dialogLink $css_class\" href=\"$this->url\" " . "title=\"$this->label\">$this->label</a></li>"; } } diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index c3595da5..6ad265ac 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -23,7 +23,7 @@ <td> <?= html::clean($var->name) ?> </td> <td> <a href="<?= url::site("admin/advanced_settings/edit/$var->module_name/" . html::clean($var->name)) ?>" - class="gDialogLink" + class="g-dialogLink" title="<?= t("Edit %var (%module_name)", array("var" => $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> <? if ($var->value): ?> <?= html::clean($var->value) ?> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 8c3917b6..977ba75b 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -30,7 +30,7 @@ </td> <td> <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <?= t("run") ?> </a> </td> @@ -100,7 +100,7 @@ <?= t("cancel") ?> </a> <? if ($task->state == "stalled"): ?> - <a class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all" + <a class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>"> <?= t("resume") ?> </a> @@ -170,12 +170,12 @@ <?= t("remove") ?> </a> <? if ($task->get_log()): ?> - <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button ui-state-default ui-corner-all"> <?= t("browse log") ?> </a> <? endif ?> <? else: ?> - <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button" ui-state-default ui-corner-all> + <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button" ui-state-default ui-corner-all> <?= t("resume") ?> </a> <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> diff --git a/modules/gallery/views/admin_maintenance_show_log.html.php b/modules/gallery/views/admin_maintenance_show_log.html.php index 2dfef90f..c61db871 100644 --- a/modules/gallery/views/admin_maintenance_show_log.html.php +++ b/modules/gallery/views/admin_maintenance_show_log.html.php @@ -9,7 +9,7 @@ appendTo('body').submit().remove(); }; </script> -<div id="gTaskLogDialog"> +<div id="gTaskLog-dialog"> <h1> <?= $task->name ?> </h1> <div class="gTaskLog"> <pre><?= html::purify($task->get_log()) ?></pre> diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index 0aac4717..d0ffc414 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -30,7 +30,7 @@ <? if (!$info->site) continue ?> <? if ($id == $site) continue ?> <div class="gBlock"> - <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> <h3> <?= $info->name ?> </h3> @@ -68,7 +68,7 @@ <? if (!$info->admin) continue ?> <? if ($id == $admin) continue ?> <div class="gBlock"> - <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> <h3> <?= $info->name ?> </h3> diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index cfaff01c..bee42a22 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -138,19 +138,19 @@ var self = this; // Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475 (target 1.8?) $(".sf-menu li.sfHover ul").css("z-index", 68); - $("#gDialog").dialog("option", "zIndex", 70); - $("#gDialog").bind("dialogopen", function(event, ui) { - $("#gOrganize").height($("#gDialog").innerHeight() - 20); - $("#gOrganizeMicroThumbPanel").height($("#gDialog").innerHeight() - 90); - $("#gOrganizeTreeContainer").height($("#gDialog").innerHeight() - 59); + $("#g-dialog").dialog("option", "zIndex", 70); + $("#g-dialog").bind("dialogopen", function(event, ui) { + $("#gOrganize").height($("#g-dialog").innerHeight() - 20); + $("#gOrganizeMicroThumbPanel").height($("#g-dialog").innerHeight() - 90); + $("#gOrganizeTreeContainer").height($("#g-dialog").innerHeight() - 59); }); - $("#gDialog").bind("dialogclose", function(event, ui) { + $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); - $("#gDialog #gOrganizeClose").click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog #gOrganizeClose").click(function(event) { + $("#g-dialog").dialog("close"); }); $("#gOrganizeSortColumn,#gOrganizeSortOrder").change(function(event) { diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 87f12be9..09720fe4 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -5,7 +5,7 @@ var sort_order_url = "<?= url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") ?>"; var tree_url = "<?= url::site("organize/tree/__ALBUM_ID__") ?>"; </script> -<div id="gOrganize" class="gDialogPanel"> +<div id="gOrganize" class="g-dialogPanel"> <h1 style="display:none"><?= t("Organize %name", array("name" => html::purify($album->title))) ?></h1> <div id="bd"> <div class="yui-gf"> diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php index 0080b4ce..c73eda08 100644 --- a/modules/search/helpers/search.php +++ b/modules/search/helpers/search.php @@ -57,7 +57,7 @@ class search_Core { list ($remaining) = search::stats(); if ($remaining) { site_status::warning( - t('Your search index needs to be updated. <a href="%url" class="gDialogLink">Fix this now</a>', + t('Your search index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>', array("url" => html::mark_clean(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))), "search_index_out_of_date"); } diff --git a/modules/server_add/js/server_add.js b/modules/server_add/js/server_add.js index 50a8c36b..86bff079 100644 --- a/modules/server_add/js/server_add.js +++ b/modules/server_add/js/server_add.js @@ -21,7 +21,7 @@ self.run_add(); }); $("#gServerAddCloseButton", this.element).click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog").dialog("close"); window.location.reload(); }); $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { @@ -33,7 +33,7 @@ $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { self.open_dir(event); }); - $("#gDialog").bind("dialogclose", function(event, ui) { + $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); }, diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 52c695c6..ab3691a6 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -24,7 +24,7 @@ function closeEditInPlaceForms() { $("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert")); li.height(""); $(".gEditable", li).bind("click", editInPlace); - $(".gDialogLink", li).gallery_dialog(); + $(".g-dialogLink", li).gallery_dialog(); } } diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index b7344cda..a4bd5d8f 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -50,7 +50,7 @@ <span id="gTag-<?= $tag->id ?>" class="gEditable tag-name"><?= html::clean($tag->name) ?></span> <span class="g-understate">(<?= $tag->count ?>)</span> <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" - class="gDialogLink delete-link g-button"> + class="g-dialogLink delete-link g-button"> <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> </li> diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index 04e6efd6..e0dfac8e 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -86,6 +86,7 @@ class group_Core { static function get_add_form_admin() { $form = new Forge("admin/users/add_group", "", "post", array("id" => "gAddGroupForm")); + $form->set_attr('class', "g-narrow"); $form_group = $form->group("add_group")->label(t("Add Group")); $form_group->input("name")->label(t("Name"))->id("gName"); $form_group->inputs["name"]->error_messages( diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index b9162b92..93c385a3 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -26,6 +26,7 @@ class user_Core { static function get_edit_form($user) { $form = new Forge("users/$user->id?_method=put", "", "post", array("id" => "gEditUserForm")); + $form->set_attr("class", "g-narrow"); $group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name))); $group->input("full_name")->label(t("Full Name"))->id("gFullName")->value($user->full_name); self::_add_locale_dropdown($group, $user); @@ -66,6 +67,7 @@ class user_Core { static function get_add_form_admin() { $form = new Forge("admin/users/add_user", "", "post", array("id" => "gAddUserForm")); + $form->set_attr('class', "g-narrow"); $group = $form->group("add_user")->label(t("Add User")); $group->input("name")->label(t("Username"))->id("gUsername") ->error_messages("in_use", t("There is already a user with that username")); @@ -112,6 +114,7 @@ class user_Core { static function get_login_form($url) { $form = new Forge($url, "", "post", array("id" => "gLoginForm")); + $form->set_attr('class', "g-narrow"); $group = $form->group("login")->label(t("Login")); $group->input("name")->label(t("Username"))->id("gUsername")->class(null); $group->password("password")->label(t("Password"))->id("gPassword")->class(null); diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 0741a932..a46e402f 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -28,7 +28,7 @@ {}, function(data) { $("#group-" + group_id).html(data); - $("#group-" + group_id + " .gDialogLink").gallery_dialog(); + $("#group-" + group_id + " .g-dialogLink").gallery_dialog(); }); } @@ -43,7 +43,7 @@ </script> <div class="gBlock"> <a href="<?= url::site("admin/users/add_user_form") ?>" - class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" + class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new user")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new user") ?> @@ -89,7 +89,7 @@ <span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?= t("edit") ?></span></a> <? if (user::active()->id != $user->id && !$user->guest): ?> <a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>" - class="gDialogLink g-button ui-state-default ui-corner-all ui-icon-left"> + class="g-dialogLink g-button ui-state-default ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> <? else: ?> <span title="<?= t("This user cannot be deleted")->for_html_attr() ?>" @@ -105,7 +105,7 @@ <div id="gGroupAdmin" class="gBlock"> <a href="<?= url::site("admin/users/add_group_form") ?>" - class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" + class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new group")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new group") ?> diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index 6f2496f8..e5c9fcee 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -4,11 +4,11 @@ <? if (!$group->special): ?> <a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>" title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>" - class="gDialogLink g-button ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? else: ?> <a title="<?= t("This default group cannot be deleted")->for_html_attr() ?>" - class="gDialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> + class="g-dialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? endif ?> </h4> diff --git a/modules/user/views/login.html.php b/modules/user/views/login.html.php index bb670d51..c814bbfa 100644 --- a/modules/user/views/login.html.php +++ b/modules/user/views/login.html.php @@ -11,7 +11,7 @@ <?= t('Logged in as %name', array('name' => html::mark_clean( '<a href="' . url::site("form/edit/users/{$user->id}") . '" title="' . t("Edit Your Profile")->for_html_attr() . - '" id="gUserProfileLink" class="gDialogLink">' . + '" id="gUserProfileLink" class="g-dialogLink">' . html::clean($user->display_name()) . '</a>'))) ?> </li> <li> diff --git a/modules/user/views/login_ajax.html.php b/modules/user/views/login_ajax.html.php index a7530134..d3364b46 100644 --- a/modules/user/views/login_ajax.html.php +++ b/modules/user/views/login_ajax.html.php @@ -1,12 +1,12 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> - $("#gLoginForm").ready(function() { - $("#gForgotPasswordLink").click(function() { + $("#g-login-form").ready(function() { + $("#g-password-reset").click(function() { $.ajax({ url: "<?= url::site("password/reset") ?>", success: function(data) { - $("div#gLoginView").html(data); - $("#ui-dialog-title-gDialog").html(<?= t("Reset Password")->for_js() ?>); + $("#g-login").html(data); + $("#ui-dialog-title-g-dialog").html(<?= t("Reset Password")->for_js() ?>); $(".submit").addClass("g-button ui-state-default ui-corner-all"); $(".submit").gallery_hover_init(); ajaxify_login_reset_form(); @@ -16,30 +16,28 @@ }); function ajaxify_login_reset_form() { - $("#gLoginView form").ajaxForm({ + $("#g-login form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gLoginView form").replaceWith(data.form); + $("#g-login form").replaceWith(data.form); ajaxify_login_reset_form(); } if (data.result == "success") { - $("#gDialog").dialog("close"); + $("#g-dialog").dialog("close"); window.location.reload(); } } }); }; </script> -<div id="gLoginView"> +<div id="g-login"> <ul> - <li> - <div id="gLoginViewForm"> - <?= $form ?> - </div> + <li id="g-login-form"> + <?= $form ?> </li> <li> - <a href="#" id="gForgotPasswordLink"><?= t("Forgot Your Password?") ?></a> + <a href="#" id="g-password-reset" class="g-right g-txt-small"><?= t("Forgot Your Password?") ?></a> </li> </ul> </div> diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index 3790030d..285f6407 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -8,7 +8,7 @@ <? if (empty($name)): ?> <a href="<?= url::site("admin/watermarks/form_add") ?>" title="<?= t("Upload a watermark")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> <? else: ?> <h2> <?= t("Active Watermark") ?> </h2> <p> @@ -27,10 +27,10 @@ <div class="controls"> <a href="<?= url::site("admin/watermarks/form_edit") ?>" title="<?= t("Edit Watermark")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> <a href="<?= url::site("admin/watermarks/form_delete") ?>" title="<?= t("Delete Watermark")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> </div> </div> <? endif ?> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 2679386b..24c63756 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -67,7 +67,7 @@ h3 { a, .gMenu a, -#gDialog a, +#g-dialog a, .g-button, .g-button:hover, .g-button:active, @@ -80,7 +80,7 @@ button.ui-state-hover { } a:hover, -#gDialog a:hover { +#g-dialog a:hover { text-decoration: underline; } @@ -88,21 +88,6 @@ a:hover, text-decoration: none; } -#gDialog .gCancel { - clear: none; - float: left; - margin: .3em 1em; -} - -#gForgotPasswordLink { - float: right; - font-size: .9em; -} - -#gDialog .gCancel { - float: left; -} - /* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ table { @@ -782,7 +767,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { font-size: 0; } -.gDialogLoadingLarge { +.g-dialogLoadingLarge { background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; font-size: 0; } @@ -836,34 +821,6 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { opacity: .7; } -#gDialog { - text-align: left; -} - -#gDialog li { - padding-left: 0; -} - -#gDialog form input[type="text"], -#gDialog form input[type="password"] { - width: 100%; -} - -#gDialog #gLoginForm, -#gDialog #gAddUserForm, -#gDialog #gAddGroupForm { - margin: 0 auto; - width: 270px; -} - -#gDialog fieldset { - border: none; -} - -#gDialog legend { - display: none; -} - /* jQuery UI ThemeRoller buttons */ .gButtonSet { @@ -1056,7 +1013,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: right; } -#gTaskLogDialog h1 { +#gTaskLog-dialog h1 { font-size: 1.1em; } @@ -1143,7 +1100,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { .rtl caption, .rtl th, -.rtl #gDialog { +.rtl #g-dialog { text-align: right; } @@ -1159,7 +1116,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: left; } -.rtl #gDialog .gCancel, +.rtl #g-dialog .g-cancel, .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], diff --git a/themes/admin_wind/js/ui.init.js b/themes/admin_wind/js/ui.init.js index d9b011bd..a603f87f 100644 --- a/themes/admin_wind/js/ui.init.js +++ b/themes/admin_wind/js/ui.init.js @@ -17,7 +17,7 @@ $(document).ready(function(){ $("#gMessage li").gallery_show_message(); // Initialize modal dialogs - $(".gDialogLink").gallery_dialog(); + $(".g-dialogLink").gallery_dialog(); // Initialize ajax links $(".gAjaxLink").gallery_ajax(); diff --git a/themes/wind/css/fix-ie.css b/themes/wind/css/fix-ie.css index 4c13764f..8899ec59 100644 --- a/themes/wind/css/fix-ie.css +++ b/themes/wind/css/fix-ie.css @@ -23,7 +23,7 @@ input.submit { width: 110px; } -#gDialog a.gCancel { +#g-dialog a.g-cancel { display: inline-block !important; float: none !important; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 8f17e310..ec75d310 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -67,7 +67,7 @@ h3 { a, .gMenu a, -#gDialog a, +#g-dialog a, .g-button, .g-button:hover, .g-button:active, @@ -81,7 +81,7 @@ button.ui-state-hover { } a:hover, -#gDialog a:hover { +#g-dialog a:hover { text-decoration: underline; } @@ -89,22 +89,7 @@ a:hover, text-decoration: none; } -#gDialog .gCancel { - clear: none; - float: left; - margin: .3em 1em; -} - -#gForgotPasswordLink { - float: right; - font-size: .9em; -} - -#gDialog .gCancel { - float: left; -} - -#gDialog #gMessage li { +#g-dialog #gMessage li { width: 400px; white-space: normal; padding-left: 32px; @@ -685,13 +670,13 @@ form .gError, font-weight: bold; } -#gDialog ul.gBreadcrumbs { +#g-dialog ul.gBreadcrumbs { clear: both; margin-left: 0; padding-left: 0; } -#gDialog .gBreadcrumbs li { +#g-dialog .gBreadcrumbs li { font-size: .9em; } @@ -822,7 +807,7 @@ form .gError, font-size: 0; } -.gDialogLoadingLarge { +.g-dialogLoadingLarge { background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; font-size: 0; } @@ -850,38 +835,6 @@ form .gError, opacity: .7; } -#gDialog { - text-align: left; -} - -#gDialog li { - padding-left: 0; -} - -#gDialog form input[type="text"], -#gDialog form input[type="password"] { - width: 100%; -} - -#gDialog #gLoginForm, -#gDialog #gAddUserForm, -#gDialog #gAddGroupForm { - margin: 0 auto; - width: 270px; -} - -#gDialog fieldset { - border: none; -} - -#gDialog legend { - display: none; -} - -#gDialog p { - margin: 0; -} - /* jQuery UI ThemeRoller buttons */ .gButtonSet { @@ -1097,7 +1050,7 @@ form .gError, .rtl caption, .rtl th, -.rtl #gDialog { +.rtl #g-dialog { text-align: right; } @@ -1109,7 +1062,7 @@ form .gError, float: left; } -.rtl #gDialog .gCancel, +.rtl #g-dialog .g-cancel, .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index 4a1962c0..4b3b4306 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -26,8 +26,8 @@ $(document).ready(function() { $("#gMessage li").gallery_show_message(); // Initialize dialogs - $("#gLoginLink").addClass("gDialogLink"); - $(".gDialogLink").gallery_dialog(); + $("#gLoginLink").addClass("g-dialogLink"); + $(".g-dialogLink").gallery_dialog(); // Initialize view menu if ($("#gViewMenu").length) { diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php index 01f7be50..fd647f81 100644 --- a/themes/wind/views/album.html.php +++ b/themes/wind/views/album.html.php @@ -30,7 +30,7 @@ <? if ($user->admin || access::can("add", $item)): ?> <? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?> <li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.", - array("attrs" => html::mark_clean("href=\"$addurl\" class=\"gDialogLink\""))) ?></li> + array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialogLink\""))) ?></li> <? else: ?> <li><?= t("There aren't any photos here yet!") ?></li> <? endif; ?> -- cgit v1.2.3 From 3e6ba7acc3291f2268cbe9c9bef0a492b557babb Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Sun, 4 Oct 2009 00:27:22 -0600 Subject: Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. --- lib/gallery.common.css | 57 ++- lib/gallery.common.js | 24 +- lib/gallery.dialog.js | 4 +- lib/gallery.panel.js | 24 +- lib/gallery.show_full_size.js | 20 +- lib/images/ico-separator.gif | Bin 0 -> 106 bytes modules/akismet/helpers/akismet.php | 2 +- modules/akismet/views/admin_akismet.html.php | 4 +- modules/akismet/views/admin_akismet_stats.html.php | 6 +- modules/comment/helpers/comment.php | 20 +- modules/comment/helpers/comment_block.php | 2 +- modules/comment/helpers/comment_event.php | 2 +- modules/comment/helpers/comment_theme.php | 2 +- modules/comment/js/comment.js | 26 +- .../views/admin_block_recent_comments.html.php | 4 +- modules/comment/views/admin_comments.html.php | 20 +- modules/comment/views/comment.html.php | 6 +- modules/comment/views/comments.html.php | 14 +- modules/digibug/helpers/digibug_event.php | 7 +- modules/digibug/js/digibug.js | 7 +- modules/digibug/views/admin_digibug.html.php | 8 +- modules/exif/helpers/exif.php | 2 +- modules/exif/views/exif_dialog.html.php | 22 +- modules/exif/views/exif_sidebar.html.php | 5 +- modules/g2_import/controllers/admin_g2_import.php | 2 +- modules/g2_import/helpers/g2_import.php | 6 +- modules/g2_import/views/admin_g2_import.html.php | 18 +- modules/gallery/controllers/admin_dashboard.php | 2 +- modules/gallery/controllers/admin_languages.php | 2 +- modules/gallery/controllers/l10n_client.php | 4 +- modules/gallery/css/debug.css | 8 +- modules/gallery/css/l10n_client.css | 28 +- modules/gallery/helpers/album.php | 10 +- modules/gallery/helpers/gallery_block.php | 16 +- modules/gallery/helpers/gallery_event.php | 2 +- modules/gallery/helpers/graphics.php | 2 +- modules/gallery/helpers/item.php | 2 +- modules/gallery/helpers/log.php | 8 +- modules/gallery/helpers/message.php | 10 +- modules/gallery/helpers/movie.php | 2 +- modules/gallery/helpers/photo.php | 4 +- modules/gallery/helpers/site_status.php | 10 +- modules/gallery/helpers/theme.php | 14 +- modules/gallery/js/albums_form_add.js | 20 +- modules/gallery/js/l10n_client.js | 44 +- modules/gallery/libraries/Admin_View.php | 2 +- modules/gallery/libraries/Menu.php | 8 +- modules/gallery/libraries/Theme_View.php | 6 +- modules/gallery/models/item.php | 2 +- modules/gallery/tests/DrawForm_Test.php | 12 +- modules/gallery/tests/selenium/Add_Comment.html | 8 +- modules/gallery/tests/selenium/Login.html | 8 +- modules/gallery/tests/xss_data.txt | 62 +-- .../gallery/views/admin_advanced_settings.html.php | 8 +- .../views/admin_block_photo_stream.html.php | 2 +- modules/gallery/views/admin_dashboard.html.php | 22 +- modules/gallery/views/admin_graphics.html.php | 10 +- modules/gallery/views/admin_graphics_gd.html.php | 8 +- .../views/admin_graphics_graphicsmagick.html.php | 6 +- .../views/admin_graphics_imagemagick.html.php | 6 +- modules/gallery/views/admin_graphics_none.html.php | 2 +- modules/gallery/views/admin_languages.html.php | 12 +- modules/gallery/views/admin_maintenance.html.php | 26 +- .../views/admin_maintenance_show_log.html.php | 8 +- .../gallery/views/admin_maintenance_task.html.php | 24 +- modules/gallery/views/admin_modules.html.php | 4 +- modules/gallery/views/admin_sidebar.html.php | 24 +- .../gallery/views/admin_sidebar_blocks.html.php | 2 +- modules/gallery/views/admin_theme_options.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 20 +- modules/gallery/views/form.html.php | 4 +- modules/gallery/views/l10n_client.html.php | 6 +- modules/gallery/views/move_browse.html.php | 14 +- modules/gallery/views/permissions_browse.html.php | 14 +- modules/gallery/views/permissions_form.html.php | 10 +- modules/gallery/views/simple_uploader.html.php | 28 +- modules/gallery/views/welcome_message.html.php | 6 +- .../gallery/views/welcome_message_loader.html.php | 4 +- modules/image_block/helpers/image_block_block.php | 2 +- .../image_block/views/image_block_block.html.php | 4 +- modules/info/helpers/info_block.php | 2 +- modules/info/views/info_block.html.php | 2 +- .../notification/helpers/notification_event.php | 2 +- modules/organize/css/organize.css | 50 +-- modules/organize/helpers/organize_event.php | 4 +- modules/organize/js/organize.js | 84 ++-- modules/organize/views/organize_dialog.html.php | 28 +- .../organize/views/organize_thumb_grid.html.php | 10 +- modules/organize/views/organize_tree.html.php | 8 +- modules/recaptcha/helpers/recaptcha.php | 2 +- modules/recaptcha/helpers/recaptcha_event.php | 2 +- modules/recaptcha/views/admin_recaptcha.html.php | 8 +- modules/recaptcha/views/form_recaptcha.html.php | 4 +- modules/rss/helpers/rss_block.php | 2 +- modules/rss/views/rss_block.html.php | 2 +- modules/search/helpers/search.php | 2 +- modules/search/helpers/search_installer.php | 2 +- modules/search/views/search.html.php | 12 +- modules/search/views/search_link.html.php | 6 +- .../server_add/controllers/admin_server_add.php | 2 +- modules/server_add/js/admin.js | 2 +- modules/server_add/js/server_add.js | 58 +-- modules/server_add/views/admin_server_add.html.php | 10 +- modules/server_add/views/server_add_tree.html.php | 6 +- .../views/server_add_tree_dialog.html.php | 26 +- modules/slideshow/helpers/slideshow_event.php | 6 +- modules/tag/helpers/tag.php | 6 +- modules/tag/helpers/tag_block.php | 2 +- modules/tag/js/tag.js | 38 +- modules/tag/views/admin_tags.html.php | 14 +- modules/tag/views/tag_block.html.php | 10 +- modules/user/controllers/password.php | 10 +- modules/user/helpers/group.php | 10 +- modules/user/helpers/user.php | 52 +-- modules/user/helpers/user_block.php | 2 +- modules/user/views/admin_users.html.php | 36 +- modules/user/views/admin_users_group.html.php | 6 +- modules/user/views/login.html.php | 8 +- modules/user/views/user_languages_block.html.php | 4 +- modules/watermark/helpers/watermark.php | 6 +- modules/watermark/views/admin_watermarks.html.php | 8 +- themes/admin_wind/css/fix-ie.css | 12 +- themes/admin_wind/css/screen.css | 453 ++++++++++----------- themes/admin_wind/images/avatar.jpg | Bin 914 -> 0 bytes themes/admin_wind/images/ico-album.png | Bin 397 -> 0 bytes themes/admin_wind/images/ico-print.png | Bin 989 -> 0 bytes themes/admin_wind/images/ico-separator.gif | Bin 106 -> 0 bytes themes/admin_wind/images/ico-view-comments.png | Bin 768 -> 0 bytes themes/admin_wind/images/ico-view-fullsize.png | Bin 1046 -> 0 bytes themes/admin_wind/images/ico-view-hybrid.png | Bin 494 -> 0 bytes themes/admin_wind/images/ico-view-slideshow.png | Bin 960 -> 0 bytes themes/admin_wind/js/ui.init.js | 38 +- themes/admin_wind/views/admin.html.php | 20 +- themes/admin_wind/views/block.html.php | 6 +- themes/admin_wind/views/pager.html.php | 4 +- themes/wind/css/fix-ie.css | 18 +- themes/wind/css/screen.css | 432 +++++++++----------- themes/wind/images/ico-separator.gif | Bin 106 -> 0 bytes themes/wind/images/ico-view-hybrid.png | Bin 494 -> 0 bytes themes/wind/js/ui.init.js | 72 ++-- themes/wind/views/album.html.php | 20 +- themes/wind/views/block.html.php | 4 +- themes/wind/views/dynamic.html.php | 12 +- themes/wind/views/movie.html.php | 12 +- themes/wind/views/no_sidebar.html.php | 2 +- themes/wind/views/page.html.php | 22 +- themes/wind/views/pager.html.php | 4 +- themes/wind/views/photo.html.php | 18 +- themes/wind/views/sidebar.html.php | 4 +- 149 files changed, 1278 insertions(+), 1317 deletions(-) create mode 100644 lib/images/ico-separator.gif delete mode 100644 themes/admin_wind/images/avatar.jpg delete mode 100644 themes/admin_wind/images/ico-album.png delete mode 100644 themes/admin_wind/images/ico-print.png delete mode 100644 themes/admin_wind/images/ico-separator.gif delete mode 100644 themes/admin_wind/images/ico-view-comments.png delete mode 100644 themes/admin_wind/images/ico-view-fullsize.png delete mode 100644 themes/admin_wind/images/ico-view-hybrid.png delete mode 100644 themes/admin_wind/images/ico-view-slideshow.png delete mode 100644 themes/wind/images/ico-separator.gif delete mode 100644 themes/wind/images/ico-view-hybrid.png (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 5768e1cf..c422fe6e 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -133,11 +133,11 @@ form .g-error { .g-last { } -.g-even-row { +.g-even { background-color: #fff; } -.g-odd-row { +.g-odd { background-color: #eee; } @@ -211,7 +211,60 @@ form .g-error { margin-bottom: .4em; } +/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-breadcrumbs { + padding: 0 20px; +} + +.g-breadcrumbs li { + background: transparent url('images/ico-separator.gif') no-repeat scroll left center; + float: left; + padding: 10px 6px 10px 16px !important; +} + +.g-breadcrumbs li.root { + background: transparent; +} + +.g-breadcrumbs li a, +.g-breadcrumbs li span { + display: block; +} + +.g-breadcrumbs li.active, +.g-breadcrumbs li.active span { + font-weight: bold; +} + +#g-dialog ul.g-breadcrumbs { + clear: both; + margin-left: 0; + padding-left: 0; +} + +#g-dialog .g-breadcrumbs li { + font-size: .9em; +} + +/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + .g-pager { + clear: both; + margin: 0; + padding: 5px 0 !important; + width: 100%; +} + +.g-pager li { + float: left; + margin: 0; + width: 30%; +} + +.g-pager .g-info { + text-align: center; + width: 40%; } .g-list-horizontal { diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 59482b22..f2de74ad 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -24,8 +24,8 @@ if (container == null) { container = 'div'; } - $(this).html("<" + container + " class=\"gValign\">" + $(this).html() + "</" + container + ">"); - var el = $(this).children(container + ".gValign"); + $(this).html("<" + container + " class=\"g-valign\">" + $(this).html() + "</" + container + ">"); + var el = $(this).children(container + ".g-valign"); var elh = $(el).height(); var ph = $(this).height(); var nh = (ph - elh) / 2; @@ -47,21 +47,21 @@ /** * Toggle the processing indicator, both large and small - * @param elementID Target ID, including #, to apply .gLoadingSize + * @param elementID Target ID, including #, to apply .g-loading-size */ $.fn.gallery_show_loading = function() { return this.each(function(i){ var size; switch ($(this).attr("id")) { case "#g-dialog": - case "#gPanel": - size = "Large"; + case "#g-panel": + size = "large"; break; default: - size = "Small"; + size = "small"; break; } - $(this).toggleClass("gLoading" + size); + $(this).toggleClass("g-loading" + size); }); }; @@ -89,7 +89,7 @@ */ $.fn.gallery_get_photo = function() { var photo = $(this).find("img").filter(function() { - return this.id.match(/gPhotoId-\d+/); + return this.id.match(/g-photoId-\d+/); }); return photo; }; @@ -124,8 +124,8 @@ }; $.fn.gallery_context_menu = function() { - if ($(".gContextMenu li").length) { - var hover_target = ".gContextMenu"; + if ($(".g-context-menu li").length) { + var hover_target = ".g-context-menu"; var in_progress = 0; $(hover_target + " *").removeAttr('title'); $(hover_target + " ul").hide(); @@ -133,8 +133,8 @@ function() { if (in_progress == 0) { $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); - $(this).find(".g-dialogLink").gallery_dialog(); - $(this).find(".gAjaxLink").gallery_ajax(); + $(this).find(".g-dialog-link").gallery_dialog(); + $(this).find(".g-ajax-link").gallery_ajax(); } }, function() { diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index a70200f9..c162ab2a 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -36,7 +36,7 @@ $("#g-dialog").dialog("open"); // Remove titlebar for progress dialogs or set title - if ($("#g-dialog #gProgress").length) { + if ($("#g-dialog #g-progress").length) { $(".ui-dialog-titlebar").remove(); } else if ($("#g-dialog h1").length) { $("#g-dialog").dialog('option', 'title', $("#g-dialog h1:eq(0)").html()); @@ -61,7 +61,7 @@ dialogWidth = size.width() - 100; // Set the iframe width and height $("#g-dialog iframe").width("100%").height(size.height() - 100); - } else if ($("#g-dialog .g-dialogPanel").length) { + } else if ($("#g-dialog .g-dialog-panel").length) { dialogWidth = size.width() - 100; $("#g-dialog").dialog("option", "height", size.height() - 100); } else if (childWidth == "" || childWidth > 300) { diff --git a/lib/gallery.panel.js b/lib/gallery.panel.js index 6115297d..8530dd9f 100644 --- a/lib/gallery.panel.js +++ b/lib/gallery.panel.js @@ -8,7 +8,7 @@ var parent = $(element).parent().parent(); var sHref = $(element).attr("href"); var parentClass = $(parent).attr("class"); - var ePanel = "<tr id=\"gPanel\"><td colspan=\"6\"></td></tr>"; + var ePanel = "<tr id=\"g-panel\"><td colspan=\"6\"></td></tr>"; // We keep track of the open vs. closed state by looking to see if there' // an orig_text attr. If that attr is missing, then the panel is closed @@ -16,12 +16,12 @@ var should_open = !$(element).attr("orig_text"); // Close any open panels and reset their button text - if ($("#gPanel").length) { - $("#gPanel").slideUp("slow").remove(); - $.each($(".gPanelLink"), + if ($("#g-panel").length) { + $("#g-panel").slideUp("slow").remove(); + $.each($(".g-panel-link"), function() { if ($(this).attr("orig_text")) { - $(this).children(".gButtonText").text($(this).attr("orig_text")); + $(this).children(".g-button-text").text($(this).attr("orig_text")); $(this).attr("orig_text", ""); } } @@ -30,15 +30,15 @@ if (should_open) { $(parent).after(ePanel); - $("#gPanel td").html(sHref); + $("#g-panel td").html(sHref); $.get(sHref, function(data) { - $("#gPanel td").html(data); + $("#g-panel td").html(data); self._ajaxify_panel(); if ($(element).attr("open_text")) { - $(element).attr("orig_text", $(element).children(".gButtonText").text()); - $(element).children(".gButtonText").text($(element).attr("open_text")); + $(element).attr("orig_text", $(element).children(".g-button-text").text()); + $(element).children(".g-button-text").text($(element).attr("open_text")); } - $("#gPanel").addClass(parentClass).show().slideDown("slow"); + $("#g-panel").addClass(parentClass).show().slideDown("slow"); }); } @@ -48,11 +48,11 @@ _ajaxify_panel: function () { var self = this; - $("#gPanel td form").ajaxForm({ + $("#g-panel td form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gPanel td form").replaceWith(data.form); + $("#g-panel td form").replaceWith(data.form); self._ajaxify_panel(); } if (data.result == "success") { diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 360ecdc2..49dc620a 100644 --- a/lib/gallery.show_full_size.js +++ b/lib/gallery.show_full_size.js @@ -7,7 +7,7 @@ var height = $(document).height(); var size = $.gallery_get_viewport_size(); - $("body").append('<div id="gFullsizeOverlay" class="ui-dialog-overlay" ' + + $("body").append('<div id="g-fullsize-overlay" class="ui-dialog-overlay" ' + 'style="border: none; margin: 0; padding: 0; background-color: #000; ' + 'position: absolute; top: 0px; left: 0px; ' + 'width: ' + width + 'px; height: ' + height + 'px;' + @@ -26,32 +26,32 @@ } - $("body").append('<div id="gFullsize" class="ui-dialog ui-widget" ' + + $("body").append('<div id="g-fullsize" class="ui-dialog ui-widget" ' + 'style="overflow: hidden; display: block; ' + 'position: absolute; z-index: 1002; outline-color: -moz-use-text-color; ' + 'outline-style: none; outline-width: 0px; ' + 'height: ' + image_size.height + 'px; ' + 'width: ' + image_size.width + 'px; ' + 'top: ' + image_size.top + 'px; left: ' + image_size.left + 'px;">' + - '<img id="gFullSizeImage" src="' + image_url + '"' + + '<img id="g-fullsize-image" src="' + image_url + '"' + 'height="' + image_size.height + '" width="' + image_size.width + '"/></div>'); $().click(function() { - $("#gFullsizeOverlay*").remove(); - $("#gFullsize").remove(); + $("#g-fullsize-overlay*").remove(); + $("#g-fullsize").remove(); }); $().bind("keypress", function() { - $("#gFullsizeOverlay*").remove(); - $("#gFullsize").remove(); + $("#g-fullsize-overlay*").remove(); + $("#g-fullsize").remove(); }); $(window).resize(function() { - $("#gFullsizeOverlay").width($(document).width()).height($(document).height()); + $("#g-fullsize-overlay").width($(document).width()).height($(document).height()); image_size = $.gallery_auto_fit_window(image_width, image_height); - $("#gFullsize").height(image_size.height) + $("#g-fullsize").height(image_size.height) .width(image_size.width) .css("top", image_size.top) .css("left", image_size.left); - $("#gFullSizeImage").height(image_size.height).width(image_size.width); + $("#g-fullsize-image").height(image_size.height).width(image_size.width); }); }; })(jQuery); diff --git a/lib/images/ico-separator.gif b/lib/images/ico-separator.gif new file mode 100644 index 00000000..3de2d0d3 Binary files /dev/null and b/lib/images/ico-separator.gif differ diff --git a/modules/akismet/helpers/akismet.php b/modules/akismet/helpers/akismet.php index acd5cb3e..43549ffa 100644 --- a/modules/akismet/helpers/akismet.php +++ b/modules/akismet/helpers/akismet.php @@ -21,7 +21,7 @@ class akismet_Core { public static $test_mode = TEST_MODE; static function get_configure_form() { - $form = new Forge("admin/akismet", "", "post", array("id" => "gConfigureAkismetForm")); + $form = new Forge("admin/akismet", "", "post", array("id" => "g-configure-akismet-form")); $group = $form->group("configure_akismet")->label(t("Configure Akismet")); $group->input("api_key")->label(t("API Key"))->value(module::get_var("akismet", "api_key")); $group->api_key->error_messages("invalid", t("The API key you provided is invalid.")); diff --git a/modules/akismet/views/admin_akismet.html.php b/modules/akismet/views/admin_akismet.html.php index 009d8810..22c60c97 100644 --- a/modules/akismet/views/admin_akismet.html.php +++ b/modules/akismet/views/admin_akismet.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAdminAkismet"> +<div id="g-admin-akismet"> <h1> <?= t("Akismet Spam Filtering") ?> </h1> <p> <?= t("Akismet is a free, automated spam filtering service. In order to use it, you need to sign up for a <a href=\"%api_key_url\">Wordpress.com API Key</a>, which is also free. Your comments will be automatically relayed to <a href=\"%akismet_url\">Akismet.com</a> where they'll be scanned for spam. Spam messages will be flagged accordingly and hidden from your vistors until you approve or delete them.", @@ -8,7 +8,7 @@ </p> <? if ($valid_key): ?> - <div class="gModuleStatus gSuccess"> + <div class="g-module-status g-success"> <?= t("Your API Key is valid. Your comments will be filtered!") ?> </div> <? endif ?> diff --git a/modules/akismet/views/admin_akismet_stats.html.php b/modules/akismet/views/admin_akismet_stats.html.php index 41bad15b..32908ba0 100644 --- a/modules/akismet/views/admin_akismet_stats.html.php +++ b/modules/akismet/views/admin_akismet_stats.html.php @@ -1,11 +1,11 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javscript"> $(document).ready(function() { - $("#gAkismetExternalStats").css("height", "600"); + $("#g-akismet-external-stats").css("height", "600"); }); </script> -<div id="gAkismetStats"> - <iframe id="gAkismetExternalStats" width="100%" height="500" frameborder="0" +<div id="g-akismet-stats"> + <iframe id="g-akismet-external-stats" width="100%" height="500" frameborder="0" src="http://<?= $api_key ?>.web.akismet.com/1.0/user-stats.php?blog=<?= urlencode($blog_url) ?>"> </iframe> </div> diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index f74a8644..7b2332a8 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -65,12 +65,12 @@ class comment_Core { } static function get_add_form($item) { - $form = new Forge("comments", "", "post", array("id" => "gAddCommentForm")); + $form = new Forge("comments", "", "post", array("id" => "g-comment-form")); $group = $form->group("add_comment")->label(t("Add comment")); - $group->input("name") ->label(t("Name")) ->id("gAuthor"); - $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); - $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); - $group->textarea("text")->label(t("Comment")) ->id("gText"); + $group->input("name") ->label(t("Name")) ->id("g-author"); + $group->input("email") ->label(t("Email (hidden)")) ->id("g-email"); + $group->input("url") ->label(t("Website (hidden)"))->id("g-url"); + $group->textarea("text")->label(t("Comment")) ->id("g-text"); $group->hidden("item_id")->value($item->id); module::event("comment_add_form", $form); $group->submit("")->value(t("Add")); @@ -90,12 +90,12 @@ class comment_Core { static function get_edit_form($comment) { $form = new Forge("comments/{$comment->id}?_method=put", "", "post", - array("id" => "gEditCommentForm")); + array("id" => "g-edit-comment-form")); $group = $form->group("edit_comment")->label(t("Edit comment")); - $group->input("name") ->label(t("Author")) ->id("gAuthor"); - $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); - $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); - $group->textarea("text")->label(t("Comment")) ->id("gText"); + $group->input("name") ->label(t("Author")) ->id("g-author"); + $group->input("email") ->label(t("Email (hidden)")) ->id("g-email"); + $group->input("url") ->label(t("Website (hidden)"))->id("g-url"); + $group->textarea("text")->label(t("Comment")) ->id("g-text"); $group->submit("")->value(t("Edit")); $group->text = $comment->text; diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index b989be6b..c00c6c51 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -26,7 +26,7 @@ class comment_block_Core { $block = new Block(); switch ($block_id) { case "recent_comments": - $block->css_id = "gRecentComments"; + $block->css_id = "g-recent-comments"; $block->title = t("Recent Comments"); $block->content = new View("admin_block_recent_comments.html"); $block->content->comments = diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php index 0234aea9..2199eb7f 100644 --- a/modules/comment/helpers/comment_event.php +++ b/modules/comment/helpers/comment_event.php @@ -36,7 +36,7 @@ class comment_event_Core { ->id("comments") ->label(t("View comments on this item")) ->url("#comments") - ->css_id("gCommentsLink")); + ->css_id("g-comments-link")); } static function item_index_data($item, $data) { diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php index e9b402f6..10c855db 100644 --- a/modules/comment/helpers/comment_theme.php +++ b/modules/comment/helpers/comment_theme.php @@ -25,7 +25,7 @@ class comment_theme_Core { static function photo_bottom($theme) { $block = new Block; - $block->css_id = "gComments"; + $block->css_id = "g-comments"; $block->title = t("Comments"); $block->anchor = "comments"; diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index 6e985626..96370fb1 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -1,43 +1,43 @@ $("document").ready(function() { - $("#gAddCommentButton").click(function(event) { + $("#g-admin-comment-button").click(function(event) { event.preventDefault(); - if (!$("#gAddCommentForm").length) { + if (!$("#g-comment-form").length) { $.get($(this).attr("href"), {}, function(data) { - $("#gCommentDetail").append(data); + $("#g-comment-detail").append(data); ajaxify_comment_form(); }); } }); - $("#gNoComments").click(function(event) { + $("#g-no-comments").click(function(event) { event.preventDefault(); - if (!$("#gAddCommentForm").length) { + if (!$("#g-comment-form").length) { $.get($(this).attr("href"), {}, function(data) { - $("#gCommentDetail").append(data); + $("#g-comment-detail").append(data); ajaxify_comment_form(); }); - $("#gNoCommentsYet").remove(); + $("#g-no-comments-yet").remove(); } }); }); function ajaxify_comment_form() { - $("#gComments form").ajaxForm({ + $("#g-comments form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gComments form").replaceWith(data.form); + $("#g-comments form").replaceWith(data.form); ajaxify_comment_form(); } if (data.result == "success") { $.get(data.resource, function(data, textStatus) { - $("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>"); - $("#gComments .gBlockContent ul:first li:last").effect("highlight", {color: "#cfc"}, 8000); - $("#gAddCommentForm").hide(2000).remove(); - $("#gNoCommentsYet").hide(2000); + $("#g-comments .g-block-content ul:first").append("<li>"+data+"</li>"); + $("#g-comments .g-block-content ul:first li:last").effect("highlight", {color: "#cfc"}, 8000); + $("#g-comment-form").hide(2000).remove(); + $("#g-no-comments-yet").hide(2000); }); } } diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index ca0d1c0b..7941e02d 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -1,9 +1,9 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <ul> <? foreach ($comments as $i => $comment): ?> - <li class="<?= ($i % 2 == 0) ? "g-even-row" : "g-odd-row" ?>"> + <li class="<?= ($i % 2 == 0) ? "g-even" : "g-odd" ?>"> <img src="<?= $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true)) ?>" - class="gAvatar" + class="g-avatar" alt="<?= html::clean_attribute($comment->author_name()) ?>" width="32" height="32" /> diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 82de378c..0e8dd525 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -6,7 +6,7 @@ $.get(set_state_url.replace("__STATE__", state).replace("__ID__", id), {}, function() { - $("#gComment-" + id).slideUp(); + $("#g-comment-" + id).slideUp(); update_menu(); }); } @@ -18,7 +18,7 @@ $.get(delete_url.replace("__ID__", id), {}, function() { - $("#gComment-" + id).slideUp(); + $("#g-comment-" + id).slideUp(); update_menu(); }); } @@ -27,18 +27,18 @@ $.get(<?= html::js_string(url::site("admin/comments/menu_labels")) ?>, {}, function(data) { for (var i = 0; i < data.length; i++) { - $("#gAdminCommentsMenu li:eq(" + i + ") a").html(data[i]); + $("#g-admin-comments-menu li:eq(" + i + ") a").html(data[i]); } }, "json"); } </script> -<div id="gAdminComments"> +<div id="g-admin-comments"> <h1> <?= t("Manage Comments") ?> </h1> <!-- @todo: Highlight active menu option --> - <div id="gAdminCommentsMenu"> + <div id="g-admin-comments-menu"> <?= $menu ?> </div> @@ -90,7 +90,7 @@ </div> <? endif ?> - <table id="gAdminCommentsList"> + <table id="g-admin-commentsList"> <tr> <th> <?= t("Author") ?> @@ -103,11 +103,11 @@ </th> </tr> <? foreach ($comments as $i => $comment): ?> - <tr id="gComment-<?= $comment->id ?>" class="<?= ($i % 2 == 0) ? "g-odd-row" : "g-even-row" ?>"> + <tr id="g-comment-<?= $comment->id ?>" class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>"> <td> <a href="#"> <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" - class="gAvatar" + class="g-avatar" alt="<?= html::clean_attribute($comment->author_name()) ?>" width="40" height="40" /> @@ -118,7 +118,7 @@ <td> <div class="g-right"> <? $item = $comment->item() ?> - <div class="gItem gPhoto"> + <div class="g-item g-photo"> <a href="<?= $item->url() ?>"> <? if ($item->has_thumb()): ?> <img src="<?= $item->thumb_url() ?>" @@ -135,7 +135,7 @@ <?= nl2br(html::purify($comment->text)) ?> </td> <td> - <ul class="gButtonSetVertical"> + <ul class="g-buttonset-vertical"> <? if ($comment->state != "unpublished"): ?> <li> <a href="javascript:set_state('unpublished',<?=$comment->id?>)" diff --git a/modules/comment/views/comment.html.php b/modules/comment/views/comment.html.php index ce4e197d..c7957c15 100644 --- a/modules/comment/views/comment.html.php +++ b/modules/comment/views/comment.html.php @@ -1,9 +1,9 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<li id="gComment-<?= $comment->id; ?>"> - <p class="gAuthor"> +<li id="g-comment-<?= $comment->id; ?>"> + <p class="g-author"> <a href="#"> <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" - class="gAvatar" + class="g-avatar" alt="<?= html::clean_attribute($comment->author_name()) ?>" width="40" height="40" /> diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index ee4a8ad6..636f1522 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -1,23 +1,23 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> - <a href="<?= url::site("form/add/comments/{$item->id})") ?>" id="gAddCommentButton" + <a href="<?= url::site("form/add/comments/{$item->id})") ?>" id="g-admin-comment-button" class="g-button ui-corner-all ui-icon-left ui-state-default right"> <span class="ui-icon ui-icon-comment"></span> <?= t("Add a comment") ?> </a> -<div id="gCommentDetail"> +<div id="g-comment-detail"> <? if (!$comments->count()): ?> -<p id="gNoCommentsYet"> +<p id="g-no-comments-yet"> <?= t("No comments yet. Be the first to <a %attrs>comment</a>!", - array("attrs" => html::mark_clean("id= \"gNoComments\" href=\"" . url::site("form/add/comments/{$item->id}") . "\" class=\"showCommentForm\""))) ?> + array("attrs" => html::mark_clean("id= \"g-no-comments\" href=\"" . url::site("form/add/comments/{$item->id}") . "\" class=\"showCommentForm\""))) ?> </p> <? endif ?> <ul> <? foreach ($comments as $comment): ?> - <li id="gComment-<?= $comment->id ?>"> - <p class="gAuthor"> + <li id="g-comment-<?= $comment->id ?>"> + <p class="g-author"> <a href="#"> <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" - class="gAvatar" + class="g-avatar" alt="<?= html::clean_attribute($comment->author_name()) ?>" width="40" height="40" /> diff --git a/modules/digibug/helpers/digibug_event.php b/modules/digibug/helpers/digibug_event.php index d2830b80..37fa57e5 100644 --- a/modules/digibug/helpers/digibug_event.php +++ b/modules/digibug/helpers/digibug_event.php @@ -32,8 +32,8 @@ class digibug_event_Core { ->id("digibug") ->label(t("Print with Digibug")) ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) - ->css_id("gDigibugLink") - ->css_class("ui-icon-print")); + ->css_id("g-print-digibug-link") + ->css_class("g-print-digibug-link ui-icon-print")); } static function context_menu($menu, $theme, $item) { @@ -43,8 +43,7 @@ class digibug_event_Core { ->id("digibug") ->label(t("Print with Digibug")) ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) - ->css_id("gDigibugLink") - ->css_class("ui-icon-print")); + ->css_class("g-print-digibug-link ui-icon-print")); } } } diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js index 30bff47d..46ddac52 100644 --- a/modules/digibug/js/digibug.js +++ b/modules/digibug/js/digibug.js @@ -1,10 +1,5 @@ $(document).ready(function() { - $(".gDigibugPrintButton a").click(function(e) { - e.preventDefault(); - return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); - }); - - $("#gDigibugLink").click(function(e) { + $(".g-print-digibug-link").click(function(e) { e.preventDefault(); return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); }); diff --git a/modules/digibug/views/admin_digibug.html.php b/modules/digibug/views/admin_digibug.html.php index cb952a8a..f75adc60 100644 --- a/modules/digibug/views/admin_digibug.html.php +++ b/modules/digibug/views/admin_digibug.html.php @@ -1,14 +1,14 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAdminDigibug"> - <div class="gAdminDigibugIntro"> - <img id="DigibugLogo" src="<?= url::file("modules/digibug/images/digibug_logo.png") ?>"> +<div id="g-admin-digibug"> + <div class="g-admin-digibug-intro"> + <img id="Digibug-logo" src="<?= url::file("modules/digibug/images/digibug_logo.png") ?>"> <h2> <?= t("Digibug Photo Printing") ?> </h2> <p> <?= t("Turn your photos into a wide variety of prints, gifts and games!") ?> </p> <ul> - <li class="gModuleStatus gSuccess"> + <li class="g-module-status g-success"> <?= t("You're ready to print photos!") ?> </li> </ul> diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 453690ea..5ddd09d4 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -163,7 +163,7 @@ class exif_Core { list ($remaining) = exif::stats(); if ($remaining) { site_status::warning( - t('Your Exif index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>', + t('Your Exif index needs to be updated. <a href="%url" class="g-dialog-link">Fix this now</a>', array("url" => html::mark_clean(url::site("admin/maintenance/start/exif_task::update_index?csrf=__CSRF__")))), "exif_index_out_of_date"); } diff --git a/modules/exif/views/exif_dialog.html.php b/modules/exif/views/exif_dialog.html.php index 11d1e212..b50eea1d 100644 --- a/modules/exif/views/exif_dialog.html.php +++ b/modules/exif/views/exif_dialog.html.php @@ -1,30 +1,30 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<style> - #gExifData {font-size: .85em;} - .gOdd {background: #BDD2FF;} - .gEven {background: #DFEFFC;} +<style type="text/css"> + #g-exif-data { font-size: .85em; } + .g-odd { background: #bdd2ff; } + .g-even { background: #dfeffc; } </style> <h1 style="display: none;"><?= t("Photo Detail") ?></h1> -<div id="gExifData"> - <table class="gMetadata" > +<div id="g-exif-data"> + <table class="g-metadata" > <tbody> <? for ($i = 0; $i < count($details); $i++): ?> <tr> - <td class="gEven"> + <td class="g-even"> <?= $details[$i]["caption"] ?> </td> - <td class="gOdd"> + <td class="g-odd"> <?= html::clean($details[$i]["value"]) ?> </td> <? if (!empty($details[++$i])): ?> - <td class="gEven"> + <td class="g-even"> <?= $details[$i]["caption"] ?> </td> - <td class="gOdd"> + <td class="g-odd"> <?= html::clean($details[$i]["value"]) ?> </td> <? else: ?> - <td class="gEven"></td><td class="gOdd"></td> + <td class="g-even"></td><td class="g-odd"></td> <? endif ?> </tr> <? endfor ?> diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 3c7bb517..04f72b02 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,7 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<a id="gExifDataLink" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>" - class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> +<a id="g-exif-data-link" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>" + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-info"></span> <?= t("View more information") ?> </a> - diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php index 18d09363..1c65f482 100644 --- a/modules/g2_import/controllers/admin_g2_import.php +++ b/modules/g2_import/controllers/admin_g2_import.php @@ -68,7 +68,7 @@ class Admin_g2_import_Controller extends Admin_Controller { private function _get_import_form() { $form = new Forge( - "admin/g2_import/save", "", "post", array("id" => "gAdminConfigureG2ImportForm")); + "admin/g2_import/save", "", "post", array("id" => "g-admin-configure-g2-import-form")); $group = $form->group("configure_g2_import")->label(t("Configure Gallery 2 Import")); $group->input("embed_path")->label(t("Filesystem path to your Gallery 2 embed.php file")) ->value(module::get_var("g2_import", "embed_path", "")); diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 7e5c6f75..99d56d5d 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -201,7 +201,7 @@ class g2_import_Core { if (g2_import::g2_module_active("tags") && module::is_active("tag")) { $result = - g2($gallery->search("SELECT COUNT(DISTINCT([TagItemMap::itemId])) FROM [TagItemMap]")) + g2($gallery->search("SELECT COUNT(DISTINCT([Tag-itemMap::itemId])) FROM [Tag-itemMap]")) ->nextResult(); $stats["tags"] = $result[0]; } else { @@ -853,8 +853,8 @@ class g2_import_Core { $ids = array(); $results = g2($gallery->search( - "SELECT DISTINCT([TagItemMap::itemId]) FROM [TagItemMap] " . - "WHERE [TagItemMap::itemId] > ?", + "SELECT DISTINCT([Tag-itemMap::itemId]) FROM [Tag-itemMap] " . + "WHERE [Tag-itemMap::itemId] > ?", array($min_id), array("limit" => array("count" => 100)))); while ($result = $results->nextResult()) { diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 314f030b..51a1e245 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -1,11 +1,11 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAdminG2Import"> +<div id="g-admin-g2-import"> <h1> <?= t("Gallery 2 Import") ?> </h1> <p> <?= t("Import your Gallery 2 users, photos, movies, comments and tags into your new Gallery 3 installation.") ?> </p> - <div id="gAdminG2ImportNotes"> + <div id="g-admin-g2-import-notes"> <h2> <?= t("Notes") ?> </h2> <p> <?= t("The import process is a work in progress with some known issues:") ?> @@ -28,14 +28,14 @@ <?= $form ?> <? if (g2_import::is_initialized()): ?> - <div id="gAdminG2ImportDetails"> + <div id="g-admin-g2-import-details"> <h2> <?= t("Import") ?> </h2> - <ul id="gMessage"> - <li class="gSuccess"> + <ul id="g-action-status"> + <li class="g-success"> <?= t("Gallery version %version detected", array("version" => g2_import::version())) ?> </li> <? if ($g2_sizes["thumb"]["size"] && $thumb_size != $g2_sizes["thumb"]["size"]): ?> - <li class="gWarning"> + <li class="g-warning"> <?= t("Your most common thumbnail size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.", array("g2_pixels" => $g2_sizes["thumb"]["size"], "g3_pixels" => $thumb_size, @@ -44,7 +44,7 @@ <? endif ?> <? if ($g2_sizes["resize"]["size"] && $resize_size != $g2_sizes["resize"]["size"]): ?> - <li class="gWarning"> + <li class="g-warning"> <?= t("Your most common intermediate size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.", array("g2_pixels" => $g2_sizes["resize"]["size"], "g3_pixels" => $resize_size, @@ -53,7 +53,7 @@ <? endif ?> </ul> - <div class="gInfo"> + <div class="g-info"> <p> <?= t("Your Gallery 2 has the following importable data in it") ?> </p> @@ -84,7 +84,7 @@ </div> <p> - <a class="g-button g-dialogLink ui-state-default ui-corner-all" + <a class="g-button g-dialog-link ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/start/g2_import_task::import?csrf=$csrf") ?>"> <?= t("Begin import!") ?> </a> diff --git a/modules/gallery/controllers/admin_dashboard.php b/modules/gallery/controllers/admin_dashboard.php index 6bf3b966..7e28f625 100644 --- a/modules/gallery/controllers/admin_dashboard.php +++ b/modules/gallery/controllers/admin_dashboard.php @@ -22,7 +22,7 @@ class Admin_Dashboard_Controller extends Admin_Controller { $view = new Admin_View("admin.html"); $view->content = new View("admin_dashboard.html"); $view->content->blocks = block_manager::get_html("dashboard_center"); - $view->sidebar = "<div id=\"gAdminDashboardSidebar\">" . + $view->sidebar = "<div id=\"g-admin-dashboard-sidebar\">" . block_manager::get_html("dashboard_sidebar") . "</div>"; print $view; diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index a9693d21..8af1dd85 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -105,7 +105,7 @@ class Admin_Languages_Controller extends Admin_Controller { } private function _share_translations_form() { - $form = new Forge("admin/languages/share", "", "post", array("id" => "gShareTranslationsForm")); + $form = new Forge("admin/languages/share", "", "post", array("id" => "g-share-translations-form")); $group = $form->group("sharing") ->label(t("Sharing your own translations with the Gallery community is easy. Please do!")); $api_key = l10n_client::api_key(); diff --git a/modules/gallery/controllers/l10n_client.php b/modules/gallery/controllers/l10n_client.php index 6e19310b..6fdbb3a1 100644 --- a/modules/gallery/controllers/l10n_client.php +++ b/modules/gallery/controllers/l10n_client.php @@ -102,9 +102,9 @@ class L10n_Client_Controller extends Controller { } private static function _l10n_client_search_form() { - $form = new Forge("l10n_client/search", "", "post", array("id" => "gL10nSearchForm")); + $form = new Forge("l10n_client/search", "", "post", array("id" => "g-l10n-search-form")); $group = $form->group("l10n_search"); - $group->input("l10n-search")->id("gL10nSearch"); + $group->input("l10n-search")->id("g-l10n-search"); $group->submit("l10n-search-filter-clear")->value(t("X")); return $form; diff --git a/modules/gallery/css/debug.css b/modules/gallery/css/debug.css index fe5665ad..6808da09 100644 --- a/modules/gallery/css/debug.css +++ b/modules/gallery/css/debug.css @@ -1,4 +1,4 @@ -.gAnnotatedThemeBlock { +.g-annotated-theme-block { border: 1px solid #C00; clear: both; margin: 1em; @@ -6,15 +6,15 @@ position: relative; } -.gAnnotatedThemeBlock_album_top { +.g-annotated-theme-block_album_top { float: right; } -.gAnnotatedThemeBlock_header_bottom { +.g-annotated-theme-block_header_bottom { float: right; } -.gAnnotatedThemeBlock div.title { +.g-annotated-theme-block div.title { background: #C00; border: 1px solid black; color: white; diff --git a/modules/gallery/css/l10n_client.css b/modules/gallery/css/l10n_client.css index 9c1b12d0..542da8e6 100644 --- a/modules/gallery/css/l10n_client.css +++ b/modules/gallery/css/l10n_client.css @@ -1,6 +1,8 @@ -// TODO(andy_st): Add original copyright notice from Drupal l10_client. -// TODO(andy_st): Add G3 copyright notice. -// TODO(andy_st): clean up formatting to match our other CSS files. +/** + * TODO(andy_st): Add original copyright notice from Drupal l10_client. + * TODO(andy_st): Add G3 copyright notice. + * TODO(andy_st): clean up formatting to match our other CSS files. + */ /* $Id: l10n_client.css,v 1.6 2008/09/09 10:48:20 goba Exp $ */ @@ -50,7 +52,7 @@ font-size: 1em; padding: .5em; } -#l10n-client-toggler #gMinimizeL10n { +#l10n-client-toggler #g-minimize-l10n { border-right: 1px solid #ffffff; } @@ -126,31 +128,31 @@ #l10n-client .string-list li.active { font-weight:bold;} -#l10n-client #gL10nSearchForm { +#l10n-client #g-l10n-search-form { background:#eee; text-align:center; height:2em; line-height:2em; margin:0em; padding:.5em .5em; } -#l10n-client #gL10nSearchForm .form-item, -#l10n-client #gL10nSearchForm input.form-text, -#l10n-client #gL10nSearchForm #search-filter-go, -#l10n-client #gL10nSearchForm #search-filter-clear { +#l10n-client #g-l10n-search-form .form-item, +#l10n-client #g-l10n-search-form input.form-text, +#l10n-client #g-l10n-search-form #search-filter-go, +#l10n-client #g-l10n-search-form #search-filter-clear { display:inline; vertical-align:middle; } -#l10n-client #gL10nSearchForm .form-item { +#l10n-client #g-l10n-search-form .form-item { margin:0em; padding:0em; } -#l10n-client #gL10nSearchForm input.form-text { +#l10n-client #g-l10n-search-form input.form-text { width:80%; } -#l10n-client #gL10nSearchForm #search-filter-clear { +#l10n-client #g-l10n-search-form #search-filter-clear { width:10%; margin:0em; } @@ -178,7 +180,7 @@ overflow:hidden; width:49%; float:right;} -#gL10nClientSaveForm { +#g-l10n-client-save-form { padding:0em;} #l10n-client form ul, diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index 65868cf2..72a79a75 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -92,7 +92,7 @@ class album_Core { } static function get_add_form($parent) { - $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddAlbumForm")); + $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "g-add-album-form")); $group = $form->group("add_album") ->label(t("Add an album to %album_title", array("album_title" => $parent->title))); $group->input("title")->label(t("Title")); @@ -114,7 +114,7 @@ class album_Core { } static function get_edit_form($parent) { - $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gEditAlbumForm")); + $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "g-edit-album-form")); $form->hidden("_method")->value("put"); $group = $form->group("edit_item")->label(t("Edit Album")); @@ -141,14 +141,14 @@ class album_Core { $group->hidden("slug")->value($parent->slug); } - $sort_order = $group->group("sort_order", array("id" => "gAlbumSortOrder")) + $sort_order = $group->group("sort_order", array("id" => "g-album-sort-order")) ->label(t("Sort Order")); - $sort_order->dropdown("column", array("id" => "gAlbumSortColumn")) + $sort_order->dropdown("column", array("id" => "g-album-sort-column")) ->label(t("Sort by")) ->options(album::get_sort_order_options()) ->selected($parent->sort_column); - $sort_order->dropdown("direction", array("id" => "gAlbumSortDirection")) + $sort_order->dropdown("direction", array("id" => "g-album-sort-direction")) ->label(t("Order")) ->options(array("ASC" => t("Ascending"), "DESC" => t("Descending"))) diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index f2cb8ded..5d49a9de 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -32,13 +32,13 @@ class gallery_block_Core { $block = new Block(); switch($block_id) { case "welcome": - $block->css_id = "gWelcome"; + $block->css_id = "g-welcome"; $block->title = t("Welcome to Gallery 3"); $block->content = new View("admin_block_welcome.html"); break; case "photo_stream": - $block->css_id = "gPhotoStream"; + $block->css_id = "g-photo-stream"; $block->title = t("Photo Stream"); $block->content = new View("admin_block_photo_stream.html"); $block->content->photos = @@ -46,7 +46,7 @@ class gallery_block_Core { break; case "log_entries": - $block->css_id = "gLogEntries"; + $block->css_id = "g-log-entries"; $block->title = t("Log Entries"); $block->content = new View("admin_block_log_entries.html"); $block->content->entries = ORM::factory("log") @@ -54,7 +54,7 @@ class gallery_block_Core { break; case "stats": - $block->css_id = "gStats"; + $block->css_id = "g-stats"; $block->title = t("Gallery Stats"); $block->content = new View("admin_block_stats.html"); $block->content->album_count = @@ -63,7 +63,7 @@ class gallery_block_Core { break; case "platform_info": - $block->css_id = "gPlatform"; + $block->css_id = "g-platform"; $block->title = t("Platform Information"); $block->content = new View("admin_block_platform.html"); if (is_readable("/proc/loadavg")) { @@ -75,14 +75,14 @@ class gallery_block_Core { break; case "project_news": - $block->css_id = "gProjectNews"; + $block->css_id = "g-project-news"; $block->title = t("Gallery Project News"); $block->content = new View("admin_block_news.html"); $block->content->feed = feed::parse("http://gallery.menalto.com/node/feed", 3); break; case "block_adder": - $block->css_id = "gBlockAdder"; + $block->css_id = "g-block-adder"; $block->title = t("Dashboard Content"); $block->content = self::get_add_block_form(); } @@ -92,7 +92,7 @@ class gallery_block_Core { static function get_add_block_form() { $form = new Forge("admin/dashboard/add_block", "", "post", - array("id" => "gAddDashboardBlockForm")); + array("id" => "g-add-dashboard-block-form")); $group = $form->group("add_block")->label(t("Add Block")); $group->dropdown("id")->label(t("Available Blocks")) ->options(block_manager::get_available_admin_blocks()); diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index c01f4135..290d7d12 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -281,7 +281,7 @@ class gallery_event_Core { ->id("delete") ->label($delete_title) ->css_class("ui-icon-trash") - ->css_id("gQuickDelete") + ->css_id("g-quick-delete") ->url(url::site("quick/form_delete/$item->id?csrf=$csrf&page_type=$page_type"))); } diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index f9b88638..ecddd86b 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -249,7 +249,7 @@ class graphics_Core { "%count of your photos are out of date. <a %attrs>Click here to fix them</a>", $count, array("attrs" => html::mark_clean(sprintf( - 'href="%s" class="g-dialogLink"', + 'href="%s" class="g-dialog-link"', url::site("admin/maintenance/start/gallery_task::rebuild_dirty_images?csrf=__CSRF__"))))), "graphics_dirty"); } diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 588c08d4..084bbc15 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -130,7 +130,7 @@ class item_Core { $page_type = "photo"; } $form = new Forge( - "quick/delete/$item->id?page_type=$page_type", "", "post", array("id" => "gConfirmDelete")); + "quick/delete/$item->id?page_type=$page_type", "", "post", array("id" => "g-confirm-delete")); $form->hidden("_method")->value("put"); $group = $form->group("confirm_delete")->label(t("Confirm Deletion")); $group->submit("")->value(t("Delete")); diff --git a/modules/gallery/helpers/log.php b/modules/gallery/helpers/log.php index 451f985a..c8e94b45 100644 --- a/modules/gallery/helpers/log.php +++ b/modules/gallery/helpers/log.php @@ -93,16 +93,16 @@ class log_Core { static function severity_class($severity) { switch($severity) { case self::SUCCESS: - return "gSuccess"; + return "g-success"; case self::INFO: - return "gInfo"; + return "g-info"; case self::WARNING: - return "gWarning"; + return "g-warning"; case self::ERROR: - return "gError"; + return "g-error"; } } } diff --git a/modules/gallery/helpers/message.php b/modules/gallery/helpers/message.php index af3b96cc..0d638571 100644 --- a/modules/gallery/helpers/message.php +++ b/modules/gallery/helpers/message.php @@ -81,7 +81,7 @@ class message_Core { $buf[] = "<li class=\"" . self::severity_class($msg[1]) . "\">$msg[0]</li>"; } if ($buf) { - return "<ul id=\"gMessage\">" . implode("", $buf) . "</ul>"; + return "<ul id=\"g-action-status\">" . implode("", $buf) . "</ul>"; } } @@ -93,16 +93,16 @@ class message_Core { static function severity_class($severity) { switch($severity) { case self::SUCCESS: - return "gSuccess"; + return "g-success"; case self::INFO: - return "gInfo"; + return "g-info"; case self::WARNING: - return "gWarning"; + return "g-warning"; case self::ERROR: - return "gError"; + return "g-error"; } } } diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 6c8c6c88..2190fc94 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -129,7 +129,7 @@ class movie_Core { } static function get_edit_form($movie) { - $form = new Forge("movies/$movie->id", "", "post", array("id" => "gEditMovieForm")); + $form = new Forge("movies/$movie->id", "", "post", array("id" => "g-edit-movie-form")); $form->hidden("_method")->value("put"); $group = $form->group("edit_item")->label(t("Edit Movie")); $group->input("title")->label(t("Title"))->value($movie->title); diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php index 065d2d31..692f7111 100644 --- a/modules/gallery/helpers/photo.php +++ b/modules/gallery/helpers/photo.php @@ -138,7 +138,7 @@ class photo_Core { } static function get_add_form($parent) { - $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddPhotoForm")); + $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "g-add-photo-form")); $group = $form->group("add_photo")->label( t("Add Photo to %album_title", array("album_title" => $parent->title))); $group->input("title")->label(t("Title")); @@ -157,7 +157,7 @@ class photo_Core { } static function get_edit_form($photo) { - $form = new Forge("photos/$photo->id", "", "post", array("id" => "gEditPhotoForm")); + $form = new Forge("photos/$photo->id", "", "post", array("id" => "g-edit-photo-form")); $form->hidden("_method")->value("put"); $group = $form->group("edit_item")->label(t("Edit Photo")); $group->input("title")->label(t("Title"))->value($photo->title); diff --git a/modules/gallery/helpers/site_status.php b/modules/gallery/helpers/site_status.php index 6d47e565..b7c6de9a 100644 --- a/modules/gallery/helpers/site_status.php +++ b/modules/gallery/helpers/site_status.php @@ -105,7 +105,7 @@ class site_status_Core { } if ($buf) { - return "<ul id=\"gSiteStatus\">" . implode("", $buf) . "</ul>"; + return "<ul id=\"g-site-status\">" . implode("", $buf) . "</ul>"; } } @@ -117,16 +117,16 @@ class site_status_Core { static function severity_class($severity) { switch($severity) { case self::SUCCESS: - return "gSuccess"; + return "g-success"; case self::INFO: - return "gInfo"; + return "g-info"; case self::WARNING: - return "gWarning"; + return "g-warning"; case self::ERROR: - return "gError"; + return "g-error"; } } } diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php index b46a2c14..fb8f7ca7 100644 --- a/modules/gallery/helpers/theme.php +++ b/modules/gallery/helpers/theme.php @@ -40,22 +40,22 @@ class theme_Core { } static function get_edit_form_admin() { - $form = new Forge("admin/theme_options/save/", "", null, array("id" =>"gThemeOptionsForm")); + $form = new Forge("admin/theme_options/save/", "", null, array("id" =>"g-theme-options-form")); $group = $form->group("edit_theme"); - $group->input("page_size")->label(t("Items per page"))->id("gPageSize") + $group->input("page_size")->label(t("Items per page"))->id("g-page-size") ->rules("required|valid_digit") ->value(module::get_var("gallery", "page_size")); - $group->input("thumb_size")->label(t("Thumbnail size (in pixels)"))->id("gThumbSize") + $group->input("thumb_size")->label(t("Thumbnail size (in pixels)"))->id("g-thumb-size") ->rules("required|valid_digit") ->value(module::get_var("gallery", "thumb_size")); - $group->input("resize_size")->label(t("Resized image size (in pixels)"))->id("gResizeSize") + $group->input("resize_size")->label(t("Resized image size (in pixels)"))->id("g-resize-size") ->rules("required|valid_digit") ->value(module::get_var("gallery", "resize_size")); - $group->textarea("header_text")->label(t("Header text"))->id("gHeaderText") + $group->textarea("header_text")->label(t("Header text"))->id("g-header-text") ->value(module::get_var("gallery", "header_text")); - $group->textarea("footer_text")->label(t("Footer text"))->id("gFooterText") + $group->textarea("footer_text")->label(t("Footer text"))->id("g-footer-text") ->value(module::get_var("gallery", "footer_text")); - $group->checkbox("show_credits")->label(t("Show site credits"))->id("gFooterText") + $group->checkbox("show_credits")->label(t("Show site credits"))->id("g-footer-text") ->checked(module::get_var("gallery", "show_credits")); $group->submit("")->value(t("Save")); return $form; diff --git a/modules/gallery/js/albums_form_add.js b/modules/gallery/js/albums_form_add.js index 43166f27..a568f35d 100644 --- a/modules/gallery/js/albums_form_add.js +++ b/modules/gallery/js/albums_form_add.js @@ -1,22 +1,22 @@ -$("#gAddAlbumForm input[name=title]").change( +$("#g-add-album-form input[name=title]").change( function() { - $("#gAddAlbumForm input[name=name]").attr( - "value", $("#gAddAlbumForm input[name=title]").attr("value") + $("#g-add-album-form input[name=name]").attr( + "value", $("#g-add-album-form input[name=title]").attr("value") .replace(/[\s\/]+/g, "-").replace(/\.+$/, "")); - $("#gAddAlbumForm input[name=slug]").attr( - "value", $("#gAddAlbumForm input[name=title]").attr("value") + $("#g-add-album-form input[name=slug]").attr( + "value", $("#g-add-album-form input[name=title]").attr("value") .replace(/[^A-Za-z0-9-_]+/g, "-") .replace(/^-+/, "") .replace(/-+$/, "")); }); -$("#gAddAlbumForm input[name=title]").keyup( +$("#g-add-album-form input[name=title]").keyup( function() { - $("#gAddAlbumForm input[name=name]").attr( - "value", $("#gAddAlbumForm input[name=title]").attr("value") + $("#g-add-album-form input[name=name]").attr( + "value", $("#g-add-album-form input[name=title]").attr("value") .replace(/[\s\/]+/g, "-") .replace(/\.+$/, "")); - $("#gAddAlbumForm input[name=slug]").attr( - "value", $("#gAddAlbumForm input[name=title]").attr("value") + $("#g-add-album-form input[name=slug]").attr( + "value", $("#g-add-album-form input[name=title]").attr("value") .replace(/[^A-Za-z0-9-_]+/g, "-") .replace(/^-+/, "") .replace(/-+$/, "")); diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js index 35986e5a..9acb6ca8 100644 --- a/modules/gallery/js/l10n_client.js +++ b/modules/gallery/js/l10n_client.js @@ -35,12 +35,12 @@ jQuery.extend(Gallery, { if(userSelection.length > 0) { Gallery.l10nClient.filter(userSelection); Gallery.l10nClient.toggle(1); - $('#l10n-client #gL10nSearch').focus(); + $('#l10n-client #g-l10n-search').focus(); } else { if($('#l10n-client').is('.hidden')) { Gallery.l10nClient.toggle(1); if(!$.browser.safari) { - $('#l10n-client #gL10nSearch').focus(); + $('#l10n-client #g-l10n-search').focus(); } } else { Gallery.l10nClient.toggle(0); @@ -59,7 +59,7 @@ jQuery.extend(Gallery, { $('#l10n-client-string-select, #l10n-client-string-editor, #l10n-client .labels .label').show(); $('#l10n-client').height('22em').removeClass('hidden'); //$('#l10n-client').slideUp(); - $('#gMinimizeL10n').text("_"); + $('#g-minimize-l10n').text("_"); /* * This CSS clashes with Gallery's CSS, probably due to * YUI's grid / floats. @@ -73,7 +73,7 @@ jQuery.extend(Gallery, { $('#l10n-client-string-select, #l10n-client-string-editor, #l10n-client .labels .label').hide(); $('#l10n-client').height('2em').addClass('hidden'); // TODO: Localize this message - $('#gMinimizeL10n').text(MSG_TRANSLATE_TEXT); + $('#g-minimize-l10n').text(MSG_TRANSLATE_TEXT); /* if(!$.browser.msie) { $('body').css('border-bottom', '0px'); @@ -131,13 +131,13 @@ jQuery.extend(Gallery, { if(search == false || search == '') { $('#l10n-client #l10n-search-filter-clear').focus(); $('#l10n-client-string-select li').show(); - $('#l10n-client #gL10nSearch').val(''); - $('#l10n-client #gL10nSearch').focus(); + $('#l10n-client #g-l10n-search').val(''); + $('#l10n-client #g-l10n-search').focus(); } else { if(search.length > 0) { $('#l10n-client-string-select li').hide(); $('#l10n-client-string-select li:contains('+search+')').show(); - $('#l10n-client #gL10nSearch').val(search); + $('#l10n-client #g-l10n-search').val(search); } } } @@ -193,12 +193,12 @@ Gallery.behaviors.l10nClient = function(context) { var is_plural = Gallery.l10nClient.isPluralMessage(source); Gallery.l10nClient.showSourceMessage(source, is_plural); Gallery.l10nClient.updateTranslationForm(Gallery.l10nClient.getString(index, 'translation'), is_plural); - $("#gL10nClientSaveForm input[name='l10n-message-key']").val(key); + $("#g-l10n-client-save-form input[name='l10n-message-key']").val(key); Gallery.l10nClient.selected = index; }); // When l10n_client window is clicked, toggle based on current state. - $('#gMinimizeL10n').click(function() { + $('#g-minimize-l10n').click(function() { if($('#l10n-client').is('.hidden')) { Gallery.l10nClient.toggle(1); } else { @@ -207,7 +207,7 @@ Gallery.behaviors.l10nClient = function(context) { }); // Close the l10n client using an AJAX call and refreshing the page - $('#gCloseL10n').click(function(event) { + $('#g-close-l10n').click(function(event) { $.ajax({ type: "GET", url: toggle_l10n_mode_url, @@ -223,12 +223,12 @@ Gallery.behaviors.l10nClient = function(context) { // TODO: Either remove hotkeys code or add query.hotkeys.js. if($.hotkeys) { $.hotkeys.add(Gallery.l10nClient.keys['toggle'], function(){Gallery.l10nClient.key('toggle')}); - $.hotkeys.add(Gallery.l10nClient.keys['clear'], {target:'#l10n-client #gL10nSearch', type:'keyup'}, function(){Gallery.l10nClient.key('clear')}); + $.hotkeys.add(Gallery.l10nClient.keys['clear'], {target:'#l10n-client #g-l10n-search', type:'keyup'}, function(){Gallery.l10nClient.key('clear')}); } // Custom listener for l10n_client livesearch - $('#l10n-client #gL10nSearch').keyup(function(key) { - Gallery.l10nClient.filter($('#l10n-client #gL10nSearch').val()); + $('#l10n-client #g-l10n-search').keyup(function(key) { + Gallery.l10nClient.filter($('#l10n-client #g-l10n-search').val()); }); // Clear search @@ -238,7 +238,7 @@ Gallery.behaviors.l10nClient = function(context) { }); // Send AJAX POST data on form submit. - $('#gL10nClientSaveForm').ajaxForm({ + $('#g-l10n-client-save-form').ajaxForm({ dataType: "json", success: function(data) { var source = Gallery.l10nClient.getString(Gallery.l10nClient.selected, 'source'); @@ -250,7 +250,7 @@ Gallery.behaviors.l10nClient = function(context) { var translation = {}; for (var i = 0; i < num_plural_forms; i++) { var form = plural_forms[i]; - translation[form] = $('#gL10nClientSaveForm #l10n-edit-plural-translation-' + form).attr('value'); + translation[form] = $('#g-l10n-client-save-form #l10n-edit-plural-translation-' + form).attr('value'); } } else { translation = $('#l10n-edit-translation').attr('value'); @@ -262,13 +262,13 @@ Gallery.behaviors.l10nClient = function(context) { // Clear the translation form fields Gallery.l10nClient.showSourceMessage('', false); - $('#gL10nClientSaveForm #l10n-edit-translation').val(''); + $('#g-l10n-client-save-form #l10n-edit-translation').val(''); for (var i = 0; i < num_plural_forms; i++) { var form = plural_forms[i]; - $('#gL10nClientSaveForm #l10n-edit-plural-translation-' + form).val(''); + $('#g-l10n-client-save-form #l10n-edit-plural-translation-' + form).val(''); } - $("#gL10nClientSaveForm input[name='l10n-message-key']").val(''); + $("#g-l10n-client-save-form input[name='l10n-message-key']").val(''); }, error: function(xmlhttp) { // TODO: Localize this message @@ -283,12 +283,12 @@ Gallery.behaviors.l10nClient = function(context) { // TODO: Handle plurals in copy button // Copy source text to translation field on button click. - $('#gL10nClientSaveForm #l10n-edit-copy').click(function() { - $('#gL10nClientSaveForm #l10n-edit-target').val($('#l10n-client-string-editor .source-text').text()); + $('#g-l10n-client-save-form #l10n-edit-copy').click(function() { + $('#g-l10n-client-save-form #l10n-edit-target').val($('#l10n-client-string-editor .source-text').text()); }); // Clear translation field on button click. - $('#gL10nClientSaveForm #l10n-edit-clear').click(function() { - $('#gL10nClientSaveForm #l10n-edit-target').val(''); + $('#g-l10n-client-save-form #l10n-edit-clear').click(function() { + $('#g-l10n-client-save-form #l10n-edit-target').val(''); }); }; diff --git a/modules/gallery/libraries/Admin_View.php b/modules/gallery/libraries/Admin_View.php index 9b12df7e..fa6d1dd3 100644 --- a/modules/gallery/libraries/Admin_View.php +++ b/modules/gallery/libraries/Admin_View.php @@ -96,7 +96,7 @@ class Admin_View_Core extends Gallery_View { if (Session::instance()->get("debug")) { if ($function != "admin_head") { array_unshift( - $blocks, "<div class=\"gAnnotatedThemeBlock gAnnotatedThemeBlock_$function\">" . + $blocks, "<div class=\"g-annotated-theme-block g-annotated-theme-block_$function\">" . "<div class=\"title\">$function</div>"); $blocks[] = "</div>"; } diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index 4be374a2..47af8531 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -91,7 +91,7 @@ class Menu_Element_Link extends Menu_Element { } else { $css_class = ""; } - return "<li><a$css_id class=\"gMenuLink $css_class\" href=\"$this->url\" " . + return "<li><a$css_id class=\"g-menu-link $css_class\" href=\"$this->url\" " . "title=\"$this->label\">$this->label</a></li>"; } } @@ -122,7 +122,7 @@ class Menu_Element_Ajax_Link extends Menu_Element { } else { $css_class = ""; } - return "<li><a$css_id class=\"gAjaxLink $css_class\" href=\"$this->url\" " . + return "<li><a$css_id class=\"g-ajax-link $css_class\" href=\"$this->url\" " . "title=\"$this->label\" ajax_handler=\"$this->ajax_handler\">$this->label</a></li>"; } } @@ -142,7 +142,7 @@ class Menu_Element_Dialog extends Menu_Element { } else { $css_class = ""; } - return "<li><a$css_id class=\"g-dialogLink $css_class\" href=\"$this->url\" " . + return "<li><a$css_id class=\"g-dialog-link $css_class\" href=\"$this->url\" " . "title=\"$this->label\">$this->label</a></li>"; } } @@ -171,7 +171,7 @@ class Menu_Core extends Menu_Element { case "root": $menu = new Menu("root"); - $menu->css_class("gMenu"); + $menu->css_class("g-menu"); return $menu; case "submenu": diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index ab25a4b6..cba436e8 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -103,7 +103,7 @@ class Theme_View_Core extends Gallery_View { ->id("fullsize") ->label(t("View full size")) ->url($this->item()->file_url()) - ->css_class("gFullSizeLink")); + ->css_class("g-fullsize-link")); } module::event("photo_menu", $menu, $this); @@ -121,7 +121,7 @@ class Theme_View_Core extends Gallery_View { ->append(Menu::factory("submenu") ->id("context_menu") ->label(t("Options"))) - ->css_class("gContextMenu"); + ->css_class("g-context-menu"); module::event("context_menu", $menu, $this, $item, $thumbnail_css_selector); return $menu->compact(); @@ -231,7 +231,7 @@ class Theme_View_Core extends Gallery_View { if (Session::instance()->get("debug")) { if ($function != "head") { array_unshift( - $blocks, "<div class=\"gAnnotatedThemeBlock gAnnotatedThemeBlock_$function gClearFix\">" . + $blocks, "<div class=\"g-annotated-theme-block g-annotated-theme-block_$function g-clear-fix\">" . "<div class=\"title\">$function</div>"); $blocks[] = "</div>"; } diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index ff02daf8..246d5fcd 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -567,7 +567,7 @@ class Item_Model extends ORM_MPTT { $v->attrs = array_merge($extra_attrs, array("style" => "display:block;width:{$this->width}px;height:{$this->height}px")); if (empty($v->attrs["id"])) { - $v->attrs["id"] = "gMovieId-{$this->id}"; + $v->attrs["id"] = "g-movie-id-{$this->id}"; } return $v; } diff --git a/modules/gallery/tests/DrawForm_Test.php b/modules/gallery/tests/DrawForm_Test.php index dde54257..7ee80ca2 100644 --- a/modules/gallery/tests/DrawForm_Test.php +++ b/modules/gallery/tests/DrawForm_Test.php @@ -19,14 +19,14 @@ */ class DrawForm_Test extends Unit_Test_Case { function no_group_test() { - $form = new Forge("test/controller", "", "post", array("id" => "gTestGroupForm")); + $form = new Forge("test/controller", "", "post", array("id" => "g-test-group-form")); $form->input("title")->label(t("Title")); $form->textarea("description")->label(t("Text Area")); $form->submit("")->value(t("Submit")); $rendered = $form->__toString(); $expected = "<form action=\"http://./index.php/test/controller\" method=\"post\" " . - "id=\"gTestGroupForm\">\n" . + "id=\"g-test-group-form\">\n" . "<input type=\"hidden\" name=\"csrf\" value=\"" . access::csrf_token() . "\" />\n" . " <ul>\n" . " <li>\n" . @@ -48,7 +48,7 @@ class DrawForm_Test extends Unit_Test_Case { } function group_test() { - $form = new Forge("test/controller", "", "post", array("id" => "gTestGroupForm")); + $form = new Forge("test/controller", "", "post", array("id" => "g-test-group-form")); $group = $form->group("test_group")->label(t("Test Group")); $group->input("title")->label(t("Title")); $group->textarea("description")->label(t("Text Area")); @@ -56,7 +56,7 @@ class DrawForm_Test extends Unit_Test_Case { $rendered = $form->__toString(); $expected = "<form action=\"http://./index.php/test/controller\" method=\"post\" " . - "id=\"gTestGroupForm\">\n" . + "id=\"g-test-group-form\">\n" . "<input type=\"hidden\" name=\"csrf\" value=\"" . access::csrf_token() . "\" />\n" . " <fieldset>\n" . " <legend>Test Group</legend>\n" . @@ -81,7 +81,7 @@ class DrawForm_Test extends Unit_Test_Case { } function form_script_test() { - $form = new Forge("test/controller", "", "post", array("id" => "gTestGroupForm")); + $form = new Forge("test/controller", "", "post", array("id" => "g-test-group-form")); $group = $form->group("test_group")->label(t("Test Group")); $group->input("title")->label(t("Title")); $group->textarea("description")->label(t("Text Area")); @@ -92,7 +92,7 @@ class DrawForm_Test extends Unit_Test_Case { $rendered = $form->__toString(); $expected = "<form action=\"http://./index.php/test/controller\" method=\"post\" " . - "id=\"gTestGroupForm\">\n" . + "id=\"g-test-group-form\">\n" . "<input type=\"hidden\" name=\"csrf\" value=\"" . access::csrf_token() . "\" />\n" . " <fieldset>\n" . " <legend>Test Group</legend>\n" . diff --git a/modules/gallery/tests/selenium/Add_Comment.html b/modules/gallery/tests/selenium/Add_Comment.html index b4b96ed2..dff653da 100644 --- a/modules/gallery/tests/selenium/Add_Comment.html +++ b/modules/gallery/tests/selenium/Add_Comment.html @@ -18,22 +18,22 @@ </tr> <tr> <td>clickAndWait</td> - <td>gPhotoId-2</td> + <td>g-photoId-2</td> <td></td> </tr> <tr> <td>type</td> - <td>gAuthor</td> + <td>g-author</td> <td>Test</td> </tr> <tr> <td>type</td> - <td>gEmail</td> + <td>g-email</td> <td>test@gmail.com</td> </tr> <tr> <td>type</td> - <td>gText</td> + <td>g-text</td> <td>This is a selenium test comment.</td> </tr> <tr> diff --git a/modules/gallery/tests/selenium/Login.html b/modules/gallery/tests/selenium/Login.html index 5e17a3c7..d2e45c63 100644 --- a/modules/gallery/tests/selenium/Login.html +++ b/modules/gallery/tests/selenium/Login.html @@ -18,17 +18,17 @@ </tr> <tr> <td>click</td> - <td>gLoginLink</td> + <td>g-login-link</td> <td></td> </tr> <tr> <td>type</td> - <td>gName</td> + <td>g-name</td> <td>admin</td> </tr> <tr> <td>type</td> - <td>gPassword</td> + <td>g-password</td> <td>admin</td> </tr> <tr> @@ -38,7 +38,7 @@ </tr> <tr> <td>clickAndWait</td> - <td>gUserProfileLink</td> + <td>g-user-profile-link</td> <td></td> </tr> diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index 5fd6a390..c8ba3770 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -1,12 +1,12 @@ modules/akismet/views/admin_akismet.html.php 16 DIRTY $form modules/akismet/views/admin_akismet_stats.html.php 9 DIRTY_ATTR $api_key modules/akismet/views/admin_akismet_stats.html.php 9 DIRTY_ATTR urlencode($blog_url) -modules/comment/views/admin_block_recent_comments.html.php 4 DIRTY_ATTR ($i%2==0)?"g-even-row":"g-odd-row" +modules/comment/views/admin_block_recent_comments.html.php 4 DIRTY_ATTR ($i%2==0)?"g-even":"g-odd" modules/comment/views/admin_block_recent_comments.html.php 5 DIRTY_ATTR $comment->author()->avatar_url(32,$theme->url(,true)) modules/comment/views/admin_block_recent_comments.html.php 10 DIRTY gallery::date_time($comment->created) modules/comment/views/admin_comments.html.php 42 DIRTY $menu modules/comment/views/admin_comments.html.php 106 DIRTY_ATTR $comment->id -modules/comment/views/admin_comments.html.php 106 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" +modules/comment/views/admin_comments.html.php 106 DIRTY_ATTR ($i%2==0)?"g-odd":"g-even" modules/comment/views/admin_comments.html.php 109 DIRTY_ATTR $comment->author()->avatar_url(40,$theme->url(,true)) modules/comment/views/admin_comments.html.php 122 DIRTY_JS $item->url() modules/comment/views/admin_comments.html.php 124 DIRTY_ATTR $item->thumb_url() @@ -56,14 +56,14 @@ modules/gallery/views/admin_dashboard.html.php 35 DIRTY $block modules/gallery/views/admin_graphics.html.php 22 DIRTY newView("admin_graphics_none.html") modules/gallery/views/admin_graphics.html.php 24 DIRTY newView("admin_graphics_$active.html",array("tk"=>$tk->$active,"is_active"=>true)) modules/gallery/views/admin_graphics.html.php 31 DIRTY newView("admin_graphics_$id.html",array("tk"=>$tk->$id,"is_active"=>false)) -modules/gallery/views/admin_graphics_gd.html.php 2 DIRTY_ATTR $is_active?" gSelected":"" -modules/gallery/views/admin_graphics_gd.html.php 2 DIRTY_ATTR $tk->installed?" gInstalledToolkit":" gUnavailable" +modules/gallery/views/admin_graphics_gd.html.php 2 DIRTY_ATTR $is_active?" g-selected":"" +modules/gallery/views/admin_graphics_gd.html.php 2 DIRTY_ATTR $tk->installed?" g-installed-toolkit":" g-unavailable" modules/gallery/views/admin_graphics_gd.html.php 19 DIRTY $tk->error -modules/gallery/views/admin_graphics_graphicsmagick.html.php 2 DIRTY_ATTR $is_active?" gSelected":"" -modules/gallery/views/admin_graphics_graphicsmagick.html.php 2 DIRTY_ATTR $tk->installed?" gInstalledToolkit":" gUnavailable" +modules/gallery/views/admin_graphics_graphicsmagick.html.php 2 DIRTY_ATTR $is_active?" g-selected":"" +modules/gallery/views/admin_graphics_graphicsmagick.html.php 2 DIRTY_ATTR $tk->installed?" g-installed-toolkit":" g-unavailable" modules/gallery/views/admin_graphics_graphicsmagick.html.php 18 DIRTY $tk->error -modules/gallery/views/admin_graphics_imagemagick.html.php 2 DIRTY_ATTR $is_active?" gSelected":"" -modules/gallery/views/admin_graphics_imagemagick.html.php 2 DIRTY_ATTR $tk->installed?" gInstalledToolkit":" gUnavailable" +modules/gallery/views/admin_graphics_imagemagick.html.php 2 DIRTY_ATTR $is_active?" g-selected":"" +modules/gallery/views/admin_graphics_imagemagick.html.php 2 DIRTY_ATTR $tk->installed?" g-installed-toolkit":" g-unavailable" modules/gallery/views/admin_graphics_imagemagick.html.php 18 DIRTY $tk->error modules/gallery/views/admin_languages.html.php 9 DIRTY access::csrf_form_field() modules/gallery/views/admin_languages.html.php 27 DIRTY_ATTR (isset($installed_locales[$code]))?"installed":"" @@ -72,20 +72,20 @@ modules/gallery/views/admin_languages.html.php 28 DIRTY form:: modules/gallery/views/admin_languages.html.php 29 DIRTY $display_name modules/gallery/views/admin_languages.html.php 31 DIRTY form::radio("default_locale",$code,($default_locale==$code),((isset($installed_locales[$code]))?'':'disabled="disabled"')) modules/gallery/views/admin_languages.html.php 102 DIRTY $share_translations_form -modules/gallery/views/admin_maintenance.html.php 24 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" +modules/gallery/views/admin_maintenance.html.php 24 DIRTY_ATTR ($i%2==0)?"g-odd":"g-even" modules/gallery/views/admin_maintenance.html.php 24 DIRTY_ATTR log::severity_class($task->severity) modules/gallery/views/admin_maintenance.html.php 25 DIRTY_ATTR log::severity_class($task->severity) modules/gallery/views/admin_maintenance.html.php 26 DIRTY $task->name modules/gallery/views/admin_maintenance.html.php 29 DIRTY $task->description -modules/gallery/views/admin_maintenance.html.php 72 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" -modules/gallery/views/admin_maintenance.html.php 72 DIRTY_ATTR $task->state=="stalled"?"gWarning":"" -modules/gallery/views/admin_maintenance.html.php 73 DIRTY_ATTR $task->state=="stalled"?"gWarning":"" +modules/gallery/views/admin_maintenance.html.php 72 DIRTY_ATTR ($i%2==0)?"g-odd":"g-even" +modules/gallery/views/admin_maintenance.html.php 72 DIRTY_ATTR $task->state=="stalled"?"g-warning":"" +modules/gallery/views/admin_maintenance.html.php 73 DIRTY_ATTR $task->state=="stalled"?"g-warning":"" modules/gallery/views/admin_maintenance.html.php 74 DIRTY gallery::date_time($task->updated) modules/gallery/views/admin_maintenance.html.php 77 DIRTY $task->name modules/gallery/views/admin_maintenance.html.php 92 DIRTY $task->status -modules/gallery/views/admin_maintenance.html.php 145 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" -modules/gallery/views/admin_maintenance.html.php 145 DIRTY_ATTR $task->state=="success"?"gSuccess":"gError" -modules/gallery/views/admin_maintenance.html.php 146 DIRTY_ATTR $task->state=="success"?"gSuccess":"gError" +modules/gallery/views/admin_maintenance.html.php 145 DIRTY_ATTR ($i%2==0)?"g-odd":"g-even" +modules/gallery/views/admin_maintenance.html.php 145 DIRTY_ATTR $task->state=="success"?"g-success":"g-error" +modules/gallery/views/admin_maintenance.html.php 146 DIRTY_ATTR $task->state=="success"?"g-success":"g-error" modules/gallery/views/admin_maintenance.html.php 147 DIRTY gallery::date_time($task->updated) modules/gallery/views/admin_maintenance.html.php 150 DIRTY $task->name modules/gallery/views/admin_maintenance.html.php 162 DIRTY $task->status @@ -93,7 +93,7 @@ modules/gallery/views/admin_maintenance_show_log.html.php 8 DIRTY_JS url::s modules/gallery/views/admin_maintenance_show_log.html.php 13 DIRTY $task->name modules/gallery/views/admin_maintenance_task.html.php 55 DIRTY $task->name modules/gallery/views/admin_modules.html.php 9 DIRTY access::csrf_form_field() -modules/gallery/views/admin_modules.html.php 19 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" +modules/gallery/views/admin_modules.html.php 19 DIRTY_ATTR ($i%2==0)?"g-odd":"g-even" modules/gallery/views/admin_modules.html.php 22 DIRTY form::checkbox($data,'1',module::is_active($module_name)) modules/gallery/views/admin_modules.html.php 24 DIRTY $module_info->version modules/gallery/views/admin_theme_options.html.php 5 DIRTY $form @@ -178,7 +178,7 @@ modules/gallery/views/upgrader.html.php 45 DIRTY_ATTR $id modules/gallery/views/upgrader.html.php 49 DIRTY $module->version modules/gallery/views/upgrader.html.php 52 DIRTY $module->code_version modules/image_block/views/image_block_block.html.php 3 DIRTY_JS $item->url() -modules/image_block/views/image_block_block.html.php 4 DIRTY $item->thumb_img(array("class"=>"gThumbnail")) +modules/image_block/views/image_block_block.html.php 4 DIRTY $item->thumb_img(array("class"=>"g-thumbnail")) modules/info/views/info_block.html.php 22 DIRTY date("M j, Y H:i:s",$item->captured) modules/info/views/info_block.html.php 29 DIRTY_JS $item->owner->url modules/notification/views/comment_published.html.php 28 DIRTY_JS $comment->item()->abs_url() @@ -195,19 +195,19 @@ modules/organize/views/organize_dialog.html.php 5 DIRTY_JS url::s modules/organize/views/organize_dialog.html.php 6 DIRTY_JS url::site("organize/tree/__ALBUM_ID__") modules/organize/views/organize_dialog.html.php 22 DIRTY $album_tree modules/organize/views/organize_dialog.html.php 29 DIRTY $micro_thumb_grid -modules/organize/views/organize_dialog.html.php 37 DIRTY form::dropdown(array("id"=>"gOrganizeSortColumn"),album::get_sort_order_options(),$album->sort_column) -modules/organize/views/organize_dialog.html.php 38 DIRTY form::dropdown(array("id"=>"gOrganizeSortOrder"),array("ASC"=>"Ascending","DESC"=>"Descending"),$album->sort_order) +modules/organize/views/organize_dialog.html.php 37 DIRTY form::dropdown(array("id"=>"g-organize-sort-column"),album::get_sort_order_options(),$album->sort_column) +modules/organize/views/organize_dialog.html.php 38 DIRTY form::dropdown(array("id"=>"g-organize-sort-order"),array("ASC"=>"Ascending","DESC"=>"Descending"),$album->sort_order) modules/organize/views/organize_thumb_grid.html.php 3 DIRTY_ATTR $child->id modules/organize/views/organize_thumb_grid.html.php 4 DIRTY_ATTR $child->id -modules/organize/views/organize_thumb_grid.html.php 5 DIRTY_ATTR $child->is_album()?"gAlbum":"gPhoto" -modules/organize/views/organize_thumb_grid.html.php 6 DIRTY $child->thumb_img(array("class"=>"gThumbnail","ref"=>$child->id),90,true) +modules/organize/views/organize_thumb_grid.html.php 5 DIRTY_ATTR $child->is_album()?"g-album":"g-photo" +modules/organize/views/organize_thumb_grid.html.php 6 DIRTY $child->thumb_img(array("class"=>"g-thumbnail","ref"=>$child->id),90,true) modules/organize/views/organize_thumb_grid.html.php 14 DIRTY_JS url::site("organize/album/$album->id/".($offset+25)) -modules/organize/views/organize_tree.html.php 2 DIRTY_ATTR access::can("edit",$album)?"":"gViewOnly" +modules/organize/views/organize_tree.html.php 2 DIRTY_ATTR access::can("edit",$album)?"":"g-view-only" modules/organize/views/organize_tree.html.php 3 DIRTY_ATTR $album->id modules/organize/views/organize_tree.html.php 6 DIRTY_ATTR $selected&&$album->id==$selected->id?"selected":"" modules/organize/views/organize_tree.html.php 7 DIRTY_ATTR $album->id modules/organize/views/organize_tree.html.php 13 DIRTY View::factory("organize_tree.html",array("selected"=>$selected,"album"=>$child)); -modules/organize/views/organize_tree.html.php 15 DIRTY_ATTR access::can("edit",$child)?"":"gViewOnly" +modules/organize/views/organize_tree.html.php 15 DIRTY_ATTR access::can("edit",$child)?"":"g-view-only" modules/organize/views/organize_tree.html.php 16 DIRTY_ATTR $child->id modules/organize/views/organize_tree.html.php 19 DIRTY_ATTR $child->id modules/recaptcha/views/admin_recaptcha.html.php 10 DIRTY $form @@ -252,7 +252,7 @@ modules/search/views/search.html.php 32 DIRTY $item- modules/server_add/views/admin_server_add.html.php 15 DIRTY_ATTR $id modules/server_add/views/admin_server_add.html.php 24 DIRTY $form modules/server_add/views/server_add_tree.html.php 20 DIRTY_ATTR is_dir($file)?"ui-icon-folder-collapsed":"ui-icon-document" -modules/server_add/views/server_add_tree.html.php 21 DIRTY_ATTR is_dir($file)?"gDirectory":"gFile" +modules/server_add/views/server_add_tree.html.php 21 DIRTY_ATTR is_dir($file)?"g-directory":"g-file" modules/server_add/views/server_add_tree_dialog.html.php 3 DIRTY_JS url::site("server_add/children?path=__PATH__") modules/server_add/views/server_add_tree_dialog.html.php 4 DIRTY_JS url::site("server_add/start?item_id={$item->id}&csrf=$csrf") modules/server_add/views/server_add_tree_dialog.html.php 23 DIRTY $tree @@ -267,19 +267,19 @@ modules/user/views/admin_users.html.php 3 DIRTY_JS url::s modules/user/views/admin_users.html.php 26 DIRTY_JS url::site("admin/users/group/__GROUPID__") modules/user/views/admin_users.html.php 36 DIRTY_JS url::site("admin/users/remove_user_from_group/__USERID__/__GROUPID__?csrf=$csrf") modules/user/views/admin_users.html.php 67 DIRTY_ATTR $user->id -modules/user/views/admin_users.html.php 67 DIRTY_ATTR text::alternate("g-odd-row","g-even-row") +modules/user/views/admin_users.html.php 67 DIRTY_ATTR text::alternate("g-odd","g-even") modules/user/views/admin_users.html.php 67 DIRTY_ATTR $user->admin?"admin":"" modules/user/views/admin_users.html.php 68 DIRTY_ATTR $user->id modules/user/views/admin_users.html.php 69 DIRTY_ATTR $user->avatar_url(20,$theme->url(,true)) modules/user/views/admin_users.html.php 83 DIRTY ($user->last_login==0)?"":gallery::date($user->last_login) modules/user/views/admin_users.html.php 121 DIRTY_ATTR $group->id -modules/user/views/admin_users.html.php 121 DIRTY_ATTR ($group->special?"gDefaultGroup":"") +modules/user/views/admin_users.html.php 121 DIRTY_ATTR ($group->special?"g-default-group":"") modules/user/views/admin_users.html.php 123 DIRTY $v modules/user/views/admin_users_group.html.php 22 DIRTY_JS $user->id modules/user/views/admin_users_group.html.php 22 DIRTY_JS $group->id modules/user/views/login_ajax.html.php 6 DIRTY_JS url::site("password/reset") modules/user/views/login_ajax.html.php 37 DIRTY $form -modules/user/views/user_languages_block.html.php 2 DIRTY form::dropdown("gSelectSessionLocale",$installed_locales,$selected) +modules/user/views/user_languages_block.html.php 2 DIRTY form::dropdown("g-select-session-locale",$installed_locales,$selected) modules/watermark/views/admin_watermarks.html.php 19 DIRTY_ATTR $width modules/watermark/views/admin_watermarks.html.php 19 DIRTY_ATTR $height modules/watermark/views/admin_watermarks.html.php 19 DIRTY_ATTR $url @@ -308,13 +308,13 @@ themes/admin_wind/views/pager.html.php 37 DIRTY_JS str_re themes/wind/views/album.html.php 16 DIRTY_ATTR $child->id themes/wind/views/album.html.php 16 DIRTY_ATTR $item_class themes/wind/views/album.html.php 18 DIRTY_JS $child->url() -themes/wind/views/album.html.php 19 DIRTY $child->thumb_img(array("class"=>"gThumbnail")) +themes/wind/views/album.html.php 19 DIRTY $child->thumb_img(array("class"=>"g-thumbnail")) themes/wind/views/album.html.php 23 DIRTY_JS $child->url() themes/wind/views/block.html.php 3 DIRTY_ATTR $anchor themes/wind/views/block.html.php 5 DIRTY_ATTR $css_id themes/wind/views/block.html.php 6 DIRTY $title themes/wind/views/block.html.php 8 DIRTY $content -themes/wind/views/dynamic.html.php 11 DIRTY_ATTR $child->is_album()?"gAlbum":"" +themes/wind/views/dynamic.html.php 11 DIRTY_ATTR $child->is_album()?"g-album":"" themes/wind/views/dynamic.html.php 13 DIRTY_JS $child->url() themes/wind/views/dynamic.html.php 14 DIRTY_ATTR $child->id themes/wind/views/dynamic.html.php 15 DIRTY_ATTR $child->thumb_url() @@ -322,7 +322,7 @@ themes/wind/views/dynamic.html.php 16 DIRTY_ATTR $chi themes/wind/views/dynamic.html.php 17 DIRTY_ATTR $child->thumb_height themes/wind/views/movie.html.php 8 DIRTY_JS $previous_item->url() themes/wind/views/movie.html.php 18 DIRTY_JS $next_item->url() -themes/wind/views/movie.html.php 28 DIRTY $item->movie_img(array("class"=>"gMovie","id"=>"gMovieId-{$item->id}")) +themes/wind/views/movie.html.php 28 DIRTY $item->movie_img(array("class"=>"g-movie","id"=>"g-movie-id-{$item->id}")) themes/wind/views/page.html.php 9 DIRTY $page_title themes/wind/views/page.html.php 32 DIRTY_JS $theme->url() themes/wind/views/page.html.php 41 DIRTY $new_width @@ -344,4 +344,4 @@ themes/wind/views/photo.html.php 8 DIRTY_JS $theme themes/wind/views/photo.html.php 21 DIRTY_JS $previous_item->url() themes/wind/views/photo.html.php 31 DIRTY_JS $next_item->url() themes/wind/views/photo.html.php 43 DIRTY_JS $item->file_url() -themes/wind/views/photo.html.php 45 DIRTY $item->resize_img(array("id"=>"gPhotoId-{$item->id}","class"=>"gResize")) +themes/wind/views/photo.html.php 45 DIRTY $item->resize_img(array("id"=>"g-photoId-{$item->id}","class"=>"g-resize")) diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 6ad265ac..422bd8f7 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -1,11 +1,11 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAdminAdvancedSettings"> +<div id="g-admin-advanced-settings"> <h1> <?= t("Advanced Settings") ?> </h1> <p> <?= t("Here are internal Gallery configuration settings. Most of these settings are accessible elsewhere in the administrative console.") ?> </p> - <ul id="gMessage"> - <li class="gWarning"> + <ul id="g-action-status"> + <li class="g-warning"> <b><?= t("Change these values at your own risk!") ?></b> </li> </ul> @@ -23,7 +23,7 @@ <td> <?= html::clean($var->name) ?> </td> <td> <a href="<?= url::site("admin/advanced_settings/edit/$var->module_name/" . html::clean($var->name)) ?>" - class="g-dialogLink" + class="g-dialog-link" title="<?= t("Edit %var (%module_name)", array("var" => $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> <? if ($var->value): ?> <?= html::clean($var->value) ?> diff --git a/modules/gallery/views/admin_block_photo_stream.html.php b/modules/gallery/views/admin_block_photo_stream.html.php index 4968c39b..f9725eee 100644 --- a/modules/gallery/views/admin_block_photo_stream.html.php +++ b/modules/gallery/views/admin_block_photo_stream.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <ul> <? foreach ($photos as $photo): ?> - <li class="gItem gPhoto"> + <li class="g-item g-photo"> <a href="<?= $photo->url() ?>" title="<?= html::purify($photo->title)->for_html_attr() ?>"> <img <?= photo::img_dimensions($photo->width, $photo->height, 72) ?> src="<?= $photo->thumb_url() ?>" alt="<?= html::purify($photo->title)->for_html_attr() ?>" /> diff --git a/modules/gallery/views/admin_dashboard.html.php b/modules/gallery/views/admin_dashboard.html.php index 148de65f..154aa172 100644 --- a/modules/gallery/views/admin_dashboard.html.php +++ b/modules/gallery/views/admin_dashboard.html.php @@ -3,34 +3,34 @@ update_blocks = function() { $.get(<?= html::js_string(url::site("admin/dashboard/reorder")) ?>, {"csrf": "<?= $csrf ?>", - "dashboard_center[]": $("#gAdminDashboard").sortable( + "dashboard_center[]": $("#g-admin-dashboard").sortable( "toArray", {attribute: "block_id"}), - "dashboard_sidebar[]": $("#gAdminDashboardSidebar").sortable( + "dashboard_sidebar[]": $("#g-admin-dashboard-sidebar").sortable( "toArray", {attribute: "block_id"})}); }; $(document).ready(function(){ - $("#gAdminDashboard .gBlock .ui-widget-header").addClass("gDraggable"); - $("#gAdminDashboard").sortable({ - connectWith: ["#gAdminDashboardSidebar"], + $("#g-admin-dashboard .g-block .ui-widget-header").addClass("g-draggable"); + $("#g-admin-dashboard").sortable({ + connectWith: ["#g-admin-dashboard-sidebar"], cursor: "move", handle: $(".ui-widget-header"), opacity: 0.6, - placeholder: "gDropTarget", + placeholder: "g-drop-target", stop: update_blocks }); - $("#gAdminDashboardSidebar .gBlock .ui-widget-header").addClass("gDraggable"); - $("#gAdminDashboardSidebar").sortable({ - connectWith: ["#gAdminDashboard"], + $("#g-admin-dashboard-sidebar .g-block .ui-widget-header").addClass("g-draggable"); + $("#g-admin-dashboard-sidebar").sortable({ + connectWith: ["#g-admin-dashboard"], cursor: "move", handle: $(".ui-widget-header"), opacity: 0.6, - placeholder: "gDropTarget", + placeholder: "g-drop-target", stop: update_blocks }); }); </script> -<div id="gAdminDashboard"> +<div id="g-admin-dashboard"> <?= $blocks ?> </div> diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index f4c300ae..95d0618c 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -1,18 +1,18 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> $(document).ready(function() { - $(".gAvailable .gBlock").equal_heights(); + $(".g-available .g-block").equal_heights(); select_toolkit = function(el) { - if (!$(this).hasClass("gUnavailable")) { + if (!$(this).hasClass("g-unavailable")) { window.location = <?= html::js_string(url::site("admin/graphics/choose/__TK__?csrf=$csrf")) ?> .replace("__TK__", $(this).attr("id")); } }; - $("#gAdminGraphics div.gAvailable .gBlock").click(select_toolkit); + $("#g-admin-graphics div.g-available .g-block").click(select_toolkit); }); </script> -<div id="gAdminGraphics"> +<div id="g-admin-graphics"> <h1> <?= t("Graphics Settings") ?> </h1> <p> <?= t("Gallery needs a graphics toolkit in order to manipulate your photos. Please choose one from the list below.") ?> @@ -25,7 +25,7 @@ <?= new View("admin_graphics_$active.html", array("tk" => $tk->$active, "is_active" => true)) ?> <? endif ?> - <div class="gAvailable"> + <div class="g-available"> <h2> <?= t("Available Toolkits") ?> </h2> <? foreach (array_keys((array)$tk) as $id): ?> <? if ($id != $active): ?> diff --git a/modules/gallery/views/admin_graphics_gd.html.php b/modules/gallery/views/admin_graphics_gd.html.php index 08c19234..1cc9dc9e 100644 --- a/modules/gallery/views/admin_graphics_gd.html.php +++ b/modules/gallery/views/admin_graphics_gd.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gd" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>"> +<div id="gd" class="g-block<?= $is_active ? " g-selected" : "" ?><?= $tk->installed ? " g-installed-toolkit" : " g-unavailable" ?>"> <img class="logo" width="170" height="110" src="<?= url::file("modules/gallery/images/gd.png"); ?>" alt="<? t("Visit the GD lib project site") ?>" /> <h3> <?= t("GD") ?> </h3> <p> @@ -7,7 +7,7 @@ array("url" => "http://www.boutell.com/gd")) ?> </p> <? if ($tk->installed && $tk->rotate): ?> - <div class="gModuleStatus gInfo"> + <div class="g-module-status g-info"> <?= t("You have GD version %version.", array("version" => $tk->version)) ?> </div> <p> @@ -15,7 +15,7 @@ </p> <? elseif ($tk->installed): ?> <? if ($tk->error): ?> - <p class="gModuleStatus gWarning"> + <p class="g-module-status g-warning"> <?= $tk->error ?> </p> <? endif ?> @@ -23,7 +23,7 @@ <a class="g-button ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> </p> <? else: ?> - <div class="gModuleStatus gInfo"> + <div class="g-module-status g-info"> <?= t("You do not have GD installed.") ?> </div> <? endif ?> diff --git a/modules/gallery/views/admin_graphics_graphicsmagick.html.php b/modules/gallery/views/admin_graphics_graphicsmagick.html.php index 6ee15bc3..5dae1442 100644 --- a/modules/gallery/views/admin_graphics_graphicsmagick.html.php +++ b/modules/gallery/views/admin_graphics_graphicsmagick.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="graphicsmagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>"> +<div id="graphicsmagick" class="g-block<?= $is_active ? " g-selected" : "" ?><?= $tk->installed ? " g-installed-toolkit" : " g-unavailable" ?>"> <img class="logo" width="107" height="76" src="<?= url::file("modules/gallery/images/graphicsmagick.png"); ?>" alt="<? t("Visit the GraphicsMagick project site") ?>" /> <h3> <?= t("GraphicsMagick") ?> </h3> <p> @@ -7,14 +7,14 @@ array("url" => "http://www.graphicsmagick.org")) ?> </p> <? if ($tk->installed): ?> - <div class="gModuleStatus gInfo"> + <div class="g-module-status g-info"> <?= t("GraphicsMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </div> <p> <a class="g-button ui-state-default ui-corner-all"><?= t("Activate Graphics Magic") ?></a> </p> <? else: ?> - <div class="gModuleStatus gWarning"> + <div class="g-module-status g-warning"> <?= $tk->error ?> </div> <? endif ?> diff --git a/modules/gallery/views/admin_graphics_imagemagick.html.php b/modules/gallery/views/admin_graphics_imagemagick.html.php index aeef4919..9c1a9909 100644 --- a/modules/gallery/views/admin_graphics_imagemagick.html.php +++ b/modules/gallery/views/admin_graphics_imagemagick.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>"> +<div id="imagemagick" class="g-block<?= $is_active ? " g-selected" : "" ?><?= $tk->installed ? " g-installed-toolkit" : " g-unavailable" ?>"> <img class="logo" width="114" height="118" src="<?= url::file("modules/gallery/images/imagemagick.jpg"); ?>" alt="<? t("Visit the ImageMagick project site") ?>" /> <h3> <?= t("ImageMagick") ?> </h3> <p> @@ -7,14 +7,14 @@ array("url" => "http://www.imagemagick.org")) ?> </p> <? if ($tk->installed): ?> - <div class="gModuleStatus gInfo"> + <div class="g-module-status g-info"> <?= t("ImageMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </div> <p> <a class="g-button ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a> </p> <? elseif ($tk->error): ?> - <div class="gModuleStatus gWarning"> + <div class="g-module-status g-warning"> <?= $tk->error ?> </div> <? endif ?> diff --git a/modules/gallery/views/admin_graphics_none.html.php b/modules/gallery/views/admin_graphics_none.html.php index e6923a5a..3ac6b4fb 100644 --- a/modules/gallery/views/admin_graphics_none.html.php +++ b/modules/gallery/views/admin_graphics_none.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="none" class="gModuleStatus gWarning gBlock"> +<div id="none" class="g-module-status g-warning g-block"> <h3> <?= t("No Active Toolkit") ?> </h3> <p> <?= t("We were unable to detect a graphics program. You must install one of the toolkits below in order to use many Gallery features.") ?> diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index d6f50516..74f48b76 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -1,11 +1,11 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gLanguages"> +<div id="g-languages"> <h1> <?= t("Languages") ?> </h1> <p> <?= t("Install new languages, update installed ones and set the default language for your Gallery.") ?> </p> - <form id="gLanguagesForm" method="post" action="<?= url::site("admin/languages/save") ?>"> + <form id="g-languages-form" method="post" action="<?= url::site("admin/languages/save") ?>"> <?= access::csrf_form_field() ?> <table> <tr> @@ -52,7 +52,7 @@ } }); - $("#gLanguagesForm").ajaxForm({ + $("g-languages-form").ajaxForm({ dataType: "json", success: function(data) { if (data.result == "success") { @@ -65,7 +65,7 @@ </script> </div> -<div id="gTranslations"> +<div id="g-translations"> <h1> <?= t("Translations") ?> </h1> <p> <?= t("Create your own translations and share them with the rest of the Gallery community.") ?> @@ -73,9 +73,9 @@ <h3><?= t("Translating Gallery") ?></h3> - <div class="gBlock"> + <div class="g-block"> <a href="http://codex.gallery2.org/Gallery3:Localization" target="_blank" - class="gDocLink ui-state-default ui-corner-all ui-icon ui-icon-help" + class="g-doc-link ui-state-default ui-corner-all ui-icon ui-icon-help" title="<?= t("Localization documentation")->for_html_attr() ?>"> <?= t("Localization documentation") ?> </a> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 4c79c25b..94582dc8 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,11 +1,11 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAdminMaintenance"> +<div id="g-admin-maintenance"> <h1> <?= t("Maintenance Tasks") ?> </h1> <p> <?= t("Occasionally your Gallery will require some maintenance. Here are some tasks you can use to keep it running smoothly.") ?> </p> - <div id="gAvailableTasks"> + <div id="g-available-tasks"> <h2> <?= t("Available Tasks") ?> </h2> <table> <tr> @@ -21,7 +21,7 @@ </tr> <? $i = 0; ?> <? foreach ($task_definitions as $task): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd-row" : "g-even-row" ?> <?= log::severity_class($task->severity) ?>"> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= log::severity_class($task->severity) ?>"> <td class="<?= log::severity_class($task->severity) ?>"> <?= $task->name ?> </td> @@ -30,7 +30,7 @@ </td> <td> <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" - class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> <?= t("run") ?> </a> </td> @@ -41,7 +41,7 @@ </div> <? if ($running_tasks->count()): ?> - <div id="gRunningTasks"> + <div id="g-running-tasks"> <h2> <?= t("Running Tasks") ?> </h2> <table> <tr> @@ -69,8 +69,8 @@ </tr> <? $i = 0; ?> <? foreach ($running_tasks as $task): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd-row" : "g-even-row" ?> <?= $task->state == "stalled" ? "gWarning" : "" ?>"> - <td class="<?= $task->state == "stalled" ? "gWarning" : "" ?>"> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "stalled" ? "g-warning" : "" ?>"> + <td class="<?= $task->state == "stalled" ? "g-warning" : "" ?>"> <?= gallery::date_time($task->updated) ?> </td> <td> @@ -100,7 +100,7 @@ <?= t("cancel") ?> </a> <? if ($task->state == "stalled"): ?> - <a class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all" + <a class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>"> <?= t("resume") ?> </a> @@ -114,7 +114,7 @@ <? endif ?> <? if ($finished_tasks->count()): ?> - <div id="gFinishedTasks"> + <div id="g-finished-tasks"> <h2> <?= t("Finished Tasks") ?> </h2> <table> <tr> @@ -142,8 +142,8 @@ </tr> <? $i = 0; ?> <? foreach ($finished_tasks as $task): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd-row" : "g-even-row" ?> <?= $task->state == "success" ? "gSuccess" : "gError" ?>"> - <td class="<?= $task->state == "success" ? "gSuccess" : "gError" ?>"> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "success" ? "g-success" : "g-error" ?>"> + <td class="<?= $task->state == "success" ? "g-success" : "g-error" ?>"> <?= gallery::date_time($task->updated) ?> </td> <td> @@ -170,12 +170,12 @@ <?= t("remove") ?> </a> <? if ($task->get_log()): ?> - <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="g-dialog-link g-button ui-state-default ui-corner-all"> <?= t("browse log") ?> </a> <? endif ?> <? else: ?> - <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button" ui-state-default ui-corner-all> + <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="g-dialog-link g-button" ui-state-default ui-corner-all> <?= t("resume") ?> </a> <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> diff --git a/modules/gallery/views/admin_maintenance_show_log.html.php b/modules/gallery/views/admin_maintenance_show_log.html.php index c61db871..e6ed97b3 100644 --- a/modules/gallery/views/admin_maintenance_show_log.html.php +++ b/modules/gallery/views/admin_maintenance_show_log.html.php @@ -9,11 +9,11 @@ appendTo('body').submit().remove(); }; </script> -<div id="gTaskLog-dialog"> +<div id="g-task-log-dialog"> <h1> <?= $task->name ?> </h1> - <div class="gTaskLog"> + <div class="g-task-log"> <pre><?= html::purify($task->get_log()) ?></pre> </div> - <button id="gCloseButton" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Close") ?></button> - <button id="gSaveButton" class="ui-state-default ui-corner-all" onclick="download()"><?= t("Save") ?></button> + <button id="g-close" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Close") ?></button> + <button id="g-save" class="ui-state-default ui-corner-all" onclick="download()"><?= t("Save") ?></button> </div> diff --git a/modules/gallery/views/admin_maintenance_task.html.php b/modules/gallery/views/admin_maintenance_task.html.php index c0bc0d43..53972b70 100644 --- a/modules/gallery/views/admin_maintenance_task.html.php +++ b/modules/gallery/views/admin_maintenance_task.html.php @@ -4,7 +4,7 @@ var animation = null; var delta = 1; animate_progress_bar = function() { - var current_value = parseInt($(".gProgressBar div").css("width").replace("%", "")); + var current_value = parseInt($(".g-progress-bar div").css("width").replace("%", "")); if (target_value > current_value) { // speed up delta = Math.min(delta + 0.04, 3); @@ -14,10 +14,10 @@ } if (target_value == 100) { - $(".gProgressBar").progressbar("value", 100); + $(".g-progress-bar").progressbar("value", 100); } else if (current_value != target_value || delta != 1) { var new_value = Math.min(current_value + delta, target_value); - $(".gProgressBar").progressbar("value", new_value); + $(".g-progress-bar").progressbar("value", new_value); animation = setTimeout(function() { animate_progress_bar(target_value); }, 100); } else { animation = null; @@ -35,30 +35,30 @@ if (!animation) { animate_progress_bar(); } - $("#gStatus").html("" + data.task.status); + $("#g-status").html("" + data.task.status); if (data.task.done) { - $("#gPauseButton").hide(); - $("#gDoneButton").show(); + $("#g-pause-button").hide(); + $("#g-done-button").show(); } else { setTimeout(update, 100); } } }); } - $(".gProgressBar").progressbar({value: 0}); + $(".g-progress-bar").progressbar({value: 0}); update(); dismiss = function() { window.location.reload(); } </script> -<div id="gProgress"> +<div id="g-progress"> <h1> <?= $task->name ?> </h1> - <div class="gProgressBar"></div> - <div id="gStatus"> + <div class="g-progress-bar"></div> + <div id="g-status"> <?= t("Starting up...") ?> </div> <div class="g-txt-right"> - <button id="gPauseButton" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Pause") ?></button> - <button id="gDoneButton" class="ui-state-default ui-corner-all" style="display: none" onclick="dismiss()"><?= t("Close") ?></button> + <button id="g-pause-button" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Pause") ?></button> + <button id="g-done-button" class="ui-state-default ui-corner-all" style="display: none" onclick="dismiss()"><?= t("Close") ?></button> </div> </div> diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 058844b4..75f4f0c5 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gModules"> +<div id="g-modules"> <h1> <?= t("Gallery Modules") ?> </h1> <p> <?= t("Power up your Gallery by adding more modules! Each module provides new cool features.") ?> @@ -16,7 +16,7 @@ </tr> <? $i = 0 ?> <? foreach ($available as $module_name => $module_info): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd-row" : "g-even-row" ?>"> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>"> <? $data = array("name" => $module_name); ?> <? if ($module_info->locked) $data["disabled"] = 1; ?> <td> <?= form::checkbox($data, '1', module::is_active($module_name)) ?> </td> diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 62b59ac1..3137a2a6 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,20 +1,20 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> $(function() { - $(".gAdminBlocksList ul").sortable({ - connectWith: ".sortableBlocks", + $(".g-admin-blocks-list ul").sortable({ + connectWith: ".g-sortable-blocks", opacity: .7, placeholder: "ui-state-highlight", update: function(event,ui) { - if ($(this).attr("id") == "gActiveBlocks") { + if ($(this).attr("id") == "g-active-blocks") { var active_blocks = ""; - $("ul#gActiveBlocks li").each(function(i) { + $("ul#g-active-blocks li").each(function(i) { active_blocks += "&block["+i+"]="+$(this).attr("ref"); }); - $.getJSON($("#gSiteBlocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { + $.getJSON($("#g-site-blocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { if (data.result == "success") { - $("ul#gAvailableBlocks").html(data.available); - $("ul#gActiveBlocks").html(data.active); + $("ul#g-available-blocks").html(data.available); + $("ul#g-active-blocks").html(data.active); } }); } @@ -26,19 +26,19 @@ <p> <?= t("Select and drag blocks from the available column to the active column to add to the sidebar; remove by dragging the other way.") ?> </p> - <div id="gSiteBlocks" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> - <div class="gAdminBlocksList"> + <div id="g-site-blocks" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> + <div class="g-admin-blocks-list"> <div><h3><?= t("Available Blocks") ?></h3></div> <div> - <ul id="gAvailableBlocks" class="sortableBlocks"> + <ul id="g-available-blocks" class="g-sortable-blocks"> <?= $available ?> </ul> </div> </div> - <div class="gAdminBlocksList"> + <div class="g-admin-blocks-list"> <div><h3><?= t("Active Blocks") ?></h3></div> <div> - <ul id="gActiveBlocks" class="sortableBlocks"> + <ul id="g-active-blocks" class="g-sortable-blocks"> <?= $active ?> </ul> </div> diff --git a/modules/gallery/views/admin_sidebar_blocks.html.php b/modules/gallery/views/admin_sidebar_blocks.html.php index a1a71743..48aa3f05 100644 --- a/modules/gallery/views/admin_sidebar_blocks.html.php +++ b/modules/gallery/views/admin_sidebar_blocks.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? foreach ($blocks as $ref => $text): ?> -<li class="gDraggable" ref="<?= $ref ?>"><?= $text ?></li> +<li class="g-draggable" ref="<?= $ref ?>"><?= $text ?></li> <? endforeach ?> diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index 724e6438..ed091d4b 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAdminThemeOptions"> +<div id="g-admin-themeOptions"> <h1> <?= t("Theme Options") ?> </h1> <?= $form ?> diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index d0ffc414..714b3af8 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -12,9 +12,9 @@ <?= t("Gallery allows you to choose a theme for browsing your Gallery, as well as a special theme for the administration interface. Click a theme to preview and activate it.") ?> </p> -<div id="gSiteTheme"> +<div id="g-site-theme"> <h2> <?= t("Gallery theme") ?> </h2> - <div class="gBlock gSelected"> + <div class="g-block g-selected"> <img src="<?= url::file("themes/{$site}/thumbnail.png") ?>" alt="<?= html::clean_attribute($themes[$site]->name) ?>" /> <h3> <?= $themes[$site]->name ?> </h3> @@ -24,13 +24,13 @@ </div> <h2> <?= t("Available Gallery themes") ?> </h2> - <div class="gAvailable"> + <div class="g-available"> <? $count = 0 ?> <? foreach ($themes as $id => $info): ?> <? if (!$info->site) continue ?> <? if ($id == $site) continue ?> - <div class="gBlock"> - <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <div class="g-block"> + <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> <h3> <?= $info->name ?> </h3> @@ -50,9 +50,9 @@ </div> </div> -<div id="gAdminTheme"> +<div id="g-admin-theme"> <h2> <?= t("Admin theme") ?> </h2> - <div class="gBlock gSelected"> + <div class="g-block g-selected"> <img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>" alt="<?= html::clean_attribute($themes[$admin]->name) ?>" /> <h3> <?= $themes[$admin]->name ?> </h3> @@ -62,13 +62,13 @@ </div> <h2> <?= t("Available admin themes") ?> </h2> - <div class="gAvailable"> + <div class="g-available"> <? $count = 0 ?> <? foreach ($themes as $id => $info): ?> <? if (!$info->admin) continue ?> <? if ($id == $admin) continue ?> - <div class="gBlock"> - <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <div class="g-block"> + <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> <h3> <?= $info->name ?> </h3> diff --git a/modules/gallery/views/form.html.php b/modules/gallery/views/form.html.php index 730d77cb..6bc622fd 100644 --- a/modules/gallery/views/form.html.php +++ b/modules/gallery/views/form.html.php @@ -44,7 +44,7 @@ if (!function_exists("DrawForm")) { print $input->render(); } else { if ($input->error_messages()) { - print "$prefix<li class=\"gError\">\n"; + print "$prefix<li class=\"g-error\">\n"; } else { print "$prefix<li>\n"; } @@ -58,7 +58,7 @@ if (!function_exists("DrawForm")) { } if ($input->error_messages()) { foreach ($input->error_messages() as $error_message) { - print "$prefix <p class=\"gError\">\n"; + print "$prefix <p class=\"g-error\">\n"; print "$prefix $error_message\n"; print "$prefix </p>\n"; } diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index a7f001aa..f4da52dc 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -2,8 +2,8 @@ <div id="l10n-client" class="hidden"> <div class="labels"> <span id="l10n-client-toggler"> - <a id="gMinimizeL10n">_</a> - <a id="gCloseL10n" title="<?= t("Stop the translation mode")->for_html_attr() ?>" + <a id="g-minimize-l10n">_</a> + <a id="g-close-l10n" title="<?= t("Stop the translation mode")->for_html_attr() ?>" href="<?= html::clean_attribute(url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token())) ?>">X</a> </span> <div class="label strings"><h2><?= t("Page Text") ?> @@ -37,7 +37,7 @@ <p id="source-text-tmp-space" style="display:none"></p> </div> <div class="translation"> - <form method="post" action="<?= url::site("l10n_client/save") ?>" id="gL10nClientSaveForm"> + <form method="post" action="<?= url::site("l10n_client/save") ?>" id="g-l10n-client-save-form"> <?= access::csrf_form_field() ?> <?= form::hidden("l10n-message-key") ?> <?= form::textarea("l10n-edit-translation", "", ' rows="5" class="translationField"') ?> diff --git a/modules/gallery/views/move_browse.html.php b/modules/gallery/views/move_browse.html.php index 99728ecc..ce3fc2fd 100644 --- a/modules/gallery/views/move_browse.html.php +++ b/modules/gallery/views/move_browse.html.php @@ -3,14 +3,14 @@ var load_tree = function(target_id, locked) { var load_url = "<?= url::site("move/show_sub_tree/{$source->id}/__TARGETID__") ?>"; var node = $("#node_" + target_id); - $("#gMove .node a").removeClass("selected"); + $("#g-move .node a").removeClass("selected"); node.find("a:first").addClass("selected"); if (locked) { - $("#gMoveButton").attr("disabled", "disabled"); - $("#gMove form input[name=target_id]").attr("value", ""); + $("#g-move-button").attr("disabled", "disabled"); + $("#g-move form input[name=target_id]").attr("value", ""); } else { - $("#gMoveButton").removeAttr("disabled"); - $("#gMove form input[name=target_id]").attr("value", target_id); + $("#g-move-button").removeAttr("disabled"); + $("#g-move form input[name=target_id]").attr("value", target_id); } var sub_tree = $("#tree_" + target_id); if (sub_tree.length) { @@ -33,7 +33,7 @@ <? t("Move this album to a new album") ?> <? endif ?> </h1> -<div id="gMove"> +<div id="g-move"> <ul id="tree_0"> <li id="node_1" class="node"> <?= $tree ?> @@ -42,6 +42,6 @@ <form method="post" action="<?= url::site("move/save/$source->id") ?>"> <?= access::csrf_form_field() ?> <input type="hidden" name="target_id" value="" /> - <input type="submit" id="gMoveButton" value="<?= t("Move")->for_html_attr() ?>" disabled="disabled"/> + <input type="submit" id="g-move-button" value="<?= t("Move")->for_html_attr() ?>" disabled="disabled"/> </form> </div> diff --git a/modules/gallery/views/permissions_browse.html.php b/modules/gallery/views/permissions_browse.html.php index 519734d6..540f2735 100644 --- a/modules/gallery/views/permissions_browse.html.php +++ b/modules/gallery/views/permissions_browse.html.php @@ -5,7 +5,7 @@ $.ajax({ url: form_url.replace("__ITEM__", id), success: function(data) { - $("#gEditPermissionForm").html(data); + $("#g-edit-permissions-form").html(data); $(".active").removeClass("active"); $("#item-" + id).addClass("active"); } @@ -19,15 +19,15 @@ url: action_url.replace("__CMD__", cmd).replace("__GROUP__", group_id). replace("__PERM__", perm_id).replace("__ITEM__", item_id), success: function(data) { - $("#gEditPermissionForm").load(form_url.replace("__ITEM__", item_id)); + $("#g-edit-permissions-form").load(form_url.replace("__ITEM__", item_id)); } }); } </script> -<div id="gPermissions"> +<div id="g-permissions"> <? if (!$htaccess_works): ?> - <ul id="gMessage"> - <li class="gError"> + <ul id="g-action-status"> + <li class="g-error"> <?= t("Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable <a %mod_rewrite_attrs>mod_rewrite</a> and set <a %apache_attrs><i>AllowOverride FileInfo Options</i></a> to fix this.", array("mod_rewrite_attrs" => html::mark_clean('href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html" target="_blank"'), "apache_attrs" => html::mark_clean('href="http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride" target="_blank"'))) ?> @@ -37,7 +37,7 @@ <p><?= t("Edit permissions for album:") ?></p> - <ul class="gBreadcrumbs"> + <ul class="g-breadcrumbs"> <? foreach ($parents as $parent): ?> <li id="item-<?= $parent->id ?>"> <? if (access::can("edit", $parent)): ?> @@ -56,7 +56,7 @@ </li> </ul> - <div id="gEditPermissionForm"> + <div id="g-edit-permissions-form"> <?= $form ?> </div> </div> diff --git a/modules/gallery/views/permissions_form.html.php b/modules/gallery/views/permissions_form.html.php index f5639439..e2871adb 100644 --- a/modules/gallery/views/permissions_form.html.php +++ b/modules/gallery/views/permissions_form.html.php @@ -19,7 +19,7 @@ <? $lock = access::locked_by($group, $permission->name, $item) ?> <? if ($lock): ?> - <td class="gDenied"> + <td class="g-denied"> <img src="<?= url::file(gallery::find_file("images", "ico-denied.png")) ?>" title="<?= t('denied and locked through parent album')->for_html_attr() ?>" alt="<?= t('denied icon')->for_html_attr() ?>" /> @@ -30,7 +30,7 @@ <? else: ?> <? if ($intent === access::INHERIT): ?> <? if ($allowed): ?> - <td class="gAllowed"> + <td class="g-allowed"> <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)" title="<?= t('allowed through parent album, click to allow explicitly')->for_html_attr() ?>"> <img src="<?= url::file(gallery::find_file("images", "ico-success-pale.png")) ?>" alt="<?= t('passive allowed icon')->for_html_attr() ?>" /> </a> @@ -40,7 +40,7 @@ </a> </td> <? else: ?> - <td class="gDenied"> + <td class="g-denied"> <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)" title="<?= t('click to allow')->for_html_attr() ?>"> <img src="<?= url::file(gallery::find_file("images", "ico-success-gray.png")) ?>" alt="<?= t('inactive allowed icon')->for_html_attr() ?>" /> @@ -53,7 +53,7 @@ <? endif ?> <? elseif ($intent === access::DENY): ?> - <td class="gDenied"> + <td class="g-denied"> <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)" title="<?= t('click to allow')->for_html_attr() ?>"> <img src="<?= url::file(gallery::find_file("images", "ico-success-gray.png")) ?>" alt="<?= t('inactive allowed icon')->for_html_attr() ?>" /> @@ -68,7 +68,7 @@ <? endif ?> </td> <? elseif ($intent === access::ALLOW): ?> - <td class="gAllowed"> + <td class="g-allowed"> <? if ($item->id == 1): ?> <img src="<?= url::file(gallery::find_file("images", "ico-success.png")) ?>" title="<?= t("allowed")->for_html_attr() ?>" alt="<?= t('allowed icon')->for_html_attr() ?>" /> <? else: ?> diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php index 6e66d241..ddad1fc4 100644 --- a/modules/gallery/views/simple_uploader.html.php +++ b/modules/gallery/views/simple_uploader.html.php @@ -4,16 +4,16 @@ <script type="text/javascript" src="<?= url::file("lib/jquery.scrollTo.js") ?>"></script> <!-- hack to set the title for the dialog --> -<form id="gAddPhotosForm" action="<?= url::site("simple_uploader/finish?csrf=$csrf") ?>"> +<form id="g-add-photos-form" action="<?= url::site("simple_uploader/finish?csrf=$csrf") ?>"> <fieldset> <legend> <?= t("Add photos to %album_title", array("album_title" => html::purify($item->title))) ?> </legend> </fieldset> </form> -<div id="gAddPhotos"> +<div id="g-add-photos"> <? if (ini_get("suhosin.session.encrypt")): ?> - <ul id="gMessage"> - <li class="gError"> + <ul id="g-action-status"> + <li class="g-error"> <?= t("Error: your server is configured to use the <a href=\"%encrypt_url\"><code>suhosin.session.encrypt</code></a> setting from <a href=\"%suhosin_url\">Suhosin</a>. You must disable this setting to upload photos.", array("encrypt_url" => "http://www.hardened-php.net/suhosin/configuration.html#suhosin.session.encrypt", "suhosin_url" => "http://www.hardened-php.net/suhosin/")) ?> @@ -24,7 +24,7 @@ <p> <?= t("Photos will be uploaded to album: ") ?> </p> - <ul class="gBreadcrumbs"> + <ul class="g-breadcrumbs"> <? foreach ($item->parents() as $parent): ?> <li> <?= html::clean($parent->title) ?> </li> <? endforeach ?> @@ -36,14 +36,14 @@ <span id="g-uploadstatus"></span> <a id="g-cancelupload" title="<?= t("Cancel all the pending uploads")->for_html_attr() ?>" onclick="swfu.cancelQueue();"><?= t("cancel") ?></a> </div> - <div id="gAddPhotosCanvas" style="text-align: center;"> - <div id="gAddPhotosQueue"></div> - <div id="gEditPhotosQueue"></div> + <div id="g-add-photos-canvas" style="text-align: center;"> + <div id="g-add-photos-queue"></div> + <div id="g-edit-photos-queue"></div> </div> - <span id="gChooseFilesButtonPlaceholder"></span> + <span id="g-choose-files-placeholder"></span> <!-- Proxy the done request back to our form, since its been ajaxified --> - <button class="ui-state-default ui-corner-all" onclick="$('#gAddPhotosForm').submit()"> + <button class="ui-state-default ui-corner-all" onclick="$('#g-add-photos-form').submit()"> <?= t("Done") ?> </button> </div> @@ -68,7 +68,7 @@ button_image_url: <?= html::js_string(url::file(gallery::find_file("images", "select-photos-backg.png"))) ?>, button_width: "202", button_height: "45", - button_placeholder_id: "gChooseFilesButtonPlaceholder", + button_placeholder_id: "g-choose-files-placeholder", button_text: <?= json_encode('<span class="swfUploadFont">' . t("Select photos...") . '</span>') ?>, button_text_style: ".swfUploadFont { color: #2E6E9E; font-size: 16px; font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; font-weight: bold; }", button_text_left_padding: 30, @@ -91,7 +91,7 @@ function File_Progress(file) { this.box = $("#" + file.id); if (!this.box.length) { - $("#gAddPhotosQueue").append( + $("#g-add-photos-queue").append( "<div class=\"box\" id=\"" + file.id + "\">" + "<div class=\"title\"></div>" + "<div class=\"status\"></div>" + @@ -163,7 +163,7 @@ var fp = new File_Progress(file); fp.title.html(file.name); fp.set_status("uploading", <?= t("Uploading...")->for_js() ?>); - $("#gAddPhotosCanvas").scrollTo(fp.box, 1000); + $("#g-add-photos-canvas").scrollTo(fp.box, 1000); // move file select button $("#SWFUpload_0").css({'left': '0', 'top': '0'}); @@ -243,6 +243,6 @@ // This event comes from the Queue Plugin function queue_complete(num_files_uploaded) { var status_msg = <?= t("Uploaded: __COUNT__")->for_js() ?>; - $("#gUploadStatus").html(status_msg.replace("__COUNT__", num_files_uploaded)); + $("#g-upload-status").html(status_msg.replace("__COUNT__", num_files_uploaded)); } </script> diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php index 021e5772..4acdb156 100644 --- a/modules/gallery/views/welcome_message.html.php +++ b/modules/gallery/views/welcome_message.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gWelcomeMessage"> +<div id="g-welcome-message"> <h1 style="display: none"> <?= t("Welcome to Gallery 3!") ?> </h1> @@ -17,12 +17,12 @@ <p> <a href="<?= url::site("form/edit/users/{$user->id}") ?>" title="<?= t("Edit Your Profile")->for_html_attr() ?>" - id="gAfterInstallChangePasswordLink" + id="g-after-install-change-password-link" class="g-button ui-state-default ui-corners-all"> <?= t("Change Password Now") ?> </a> <script> - $("#gAfterInstallChangePasswordLink").gallery_dialog(); + $("#g-after-install-change-password-link").gallery_dialog(); </script> </p> diff --git a/modules/gallery/views/welcome_message_loader.html.php b/modules/gallery/views/welcome_message_loader.html.php index 2c6bffca..818e2072 100644 --- a/modules/gallery/views/welcome_message_loader.html.php +++ b/modules/gallery/views/welcome_message_loader.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<span id="gWelcomeMessageLink" +<span id="g-welcome-messageLink" title="<?= t("Welcome to Gallery 3")->for_html_attr() ?>" href="<?= url::site("welcome_message") ?>"/> <script type="text/javascript"> - $(document).ready(function(){$("#gWelcomeMessageLink").gallery_dialog({immediate: true});}); + $(document).ready(function(){$("#g-welcome-messageLink").gallery_dialog({immediate: true});}); </script> diff --git a/modules/image_block/helpers/image_block_block.php b/modules/image_block/helpers/image_block_block.php index d0402eb6..eb4f7aab 100644 --- a/modules/image_block/helpers/image_block_block.php +++ b/modules/image_block/helpers/image_block_block.php @@ -27,7 +27,7 @@ class image_block_block_Core { switch ($block_id) { case "random_image": $block = new Block(); - $block->css_id = "gImageBlock"; + $block->css_id = "g-image-block"; $block->title = t("Random Image"); $block->content = new View("image_block_block.html"); diff --git a/modules/image_block/views/image_block_block.html.php b/modules/image_block/views/image_block_block.html.php index c51c1b4a..68d5fa89 100644 --- a/modules/image_block/views/image_block_block.html.php +++ b/modules/image_block/views/image_block_block.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div class="gImageBlock"> +<div class="g-image-block"> <a href="<?= $item->url() ?>"> - <?= $item->thumb_img(array("class" => "gThumbnail")) ?> + <?= $item->thumb_img(array("class" => "g-thumbnail")) ?> </a> </div> diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 3a853609..d28b02e7 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -28,7 +28,7 @@ class info_block_Core { case "metadata": if ($theme->item()) { $block = new Block(); - $block->css_id = "gMetadata"; + $block->css_id = "g-metadata"; $block->title = $theme->item()->is_album() ? t("Album Info") : t("Photo Info"); $block->content = new View("info_block.html"); } diff --git a/modules/info/views/info_block.html.php b/modules/info/views/info_block.html.php index d8f36984..ac177ee7 100644 --- a/modules/info/views/info_block.html.php +++ b/modules/info/views/info_block.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<ul class="gMetadata"> +<ul class="g-metadata"> <li> <strong class="caption"><?= t("Title:") ?></strong> <?= html::purify($item->title) ?> diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php index c50b04c4..06c5bc44 100644 --- a/modules/notification/helpers/notification_event.php +++ b/modules/notification/helpers/notification_event.php @@ -107,7 +107,7 @@ class notification_event_Core { ->append(Menu::factory("link") ->id("watch") ->label($label) - ->css_id("gNotifyLink") + ->css_id("g-notify-link") ->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token()))); } } diff --git a/modules/organize/css/organize.css b/modules/organize/css/organize.css index b1cef33c..fbf3c383 100644 --- a/modules/organize/css/organize.css +++ b/modules/organize/css/organize.css @@ -2,33 +2,33 @@ /******************************************************************* * Dialog wide styles */ -#gOrganize { +#g-organize { overflow: hidden; } -#gOrganize #bd { +#g-organize #bd { height: 100%; } -#gOrganize .yui-u { +#g-organize .yui-u { width: 75%; } -#gOrganize .yui-gf .first { +#g-organize .yui-gf .first { width: 25%; } -#gMessage { +#g-action-status { margin-bottom: .4em; width: 75%; white-space: nowrap; } -#gOrganizeDetail { +#g-organizeDetail { height: 100%; } -#gMessage .gInfo { +#g-action-status .g-info { font-weight: bold; padding-left: 2em; } @@ -36,42 +36,42 @@ /******************************************************************* * Album Tree styles */ -#gOrganizeTreeContainer { +#g-organizeTreeContainer { height: 100%; overflow: auto; margin: 0 !important; padding: 0 !important; } -#gOrganizeAlbumTree .selected { +#g-organize-albumTree .selected { background-color: #cfdeff; border-bottom: 1px solid #999; margin-right: 0px; } -#gOrganizeAlbumTree ul li { +#g-organize-albumTree ul li { padding-left: 1.2em; } -.gOrganizeAlbum span { +.g-organize-album span { cursor: pointer; } -.gOrganizeAlbumText { +.g-organize-album-text { cursor: pointer; width: auto; margin: 2px 0px 1px 2px; display: block; } -.gOrganizeAlbumText:hover { +.g-organize-album-text:hover { background: #eee; } /******************************************************************* * Album panel styles */ -#gOrganizeMicroThumbPanel { +#g-organize-microthumb-panel { margin: 0 !important; padding: 0 !important; background-color: #cfdeff; @@ -82,11 +82,11 @@ overflow-y: auto; } -#gOrganizeMicroThumbGrid { +#g-organize-microthumb-grid { padding: 1em; } -.gOrganizeMicroThumbGridCell { +.g-organize-microthumb-grid-cell { float: left; font-size: 0.8em; padding: .5em !important; @@ -95,15 +95,15 @@ margin: 4px; } -.gOrganizeMicroThumb { +.g-organize-microthumb { display: block; height: 9em; text-align: center; width: 9em; } -.gOrganizeMicroThumbGridCell.ui-selecting, -.gOrganizeMicroThumbGridCell.ui-selected { +.g-organize-microthumb-grid-cell.ui-selecting, +.g-organize-microthumb-grid-cell.ui-selected { margin: 2px; border: 2px solid #13A; } @@ -115,15 +115,15 @@ background: #13A; } -.gThumbnail { +.g-thumbnail { padding: .5em; } -#gOrganizeMicroThumbGrid .gAlbum { +#g-organize-microthumb-grid .g-album { background-color: #e8e8e8; } -.gOrganizeMicroThumbGridCell:hover { +.g-organize-microthumb-grid-cell:hover { margin: 2px; border: 2px solid #13A; } @@ -131,18 +131,18 @@ /**************************************************************** * Controls styles */ -#gOrganizeControls { +#g-organizeControls { padding-left: 8px; background-color: #13A; color: #ccc; width: 100% !important; } -#gOrganizeControls select { +#g-organizeControls select { display: inline; } -#gOrganizeClose { +#g-organizeClose { float: right; margin-right: 12px; } diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index d6043116..a33b2f2e 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("gOrganizeLink") + ->css_id("g-organize-link") ->url(url::site("organize/dialog/{$item->id}"))); } } @@ -37,7 +37,7 @@ class organize_event_Core { ->append(Menu::factory("dialog") ->id("organize") ->label(t("Organize album")) - ->css_id("gOrganizeLink") + ->css_id("g-organize-link") ->css_class("ui-icon-folder-open") ->url(url::site("organize/dialog/{$item->id}"))); } diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index bee42a22..960d75e2 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -4,11 +4,11 @@ handle: ".ui-selected", distance: 10, cursorAt: { left: -10, top: -10}, - appendTo: "#gOrganizeMicroThumbPanel", + appendTo: "#g-organize-microthumb-panel", helper: function(event, ui) { var selected = $(".ui-draggable.ui-selected img"); if (selected.length) { - var set = $('<div class="gDragHelper"></div>') + var set = $('<div class="g-drag-helper"></div>') .css({ zIndex: 2000, width: 80, @@ -37,16 +37,16 @@ }, start: function(event, ui) { - $("#gOrganizeMicroThumbPanel .ui-selected").hide(); + $("#g-organize-microthumb-panel .ui-selected").hide(); }, drag: function(event, ui) { - var top = $("#gOrganizeMicroThumbPanel").offset().top; - var height = $("#gOrganizeMicroThumbPanel").height(); + var top = $("#g-organize-microthumb-panel").offset().top; + var height = $("#g-organize-microthumb-panel").height(); if (ui.offset.top > height + top - 20) { - $("#gOrganizeMicroThumbPanel").get(0).scrollTop += 100; + $("#g-organize-microthumb-panel").get(0).scrollTop += 100; } else if (ui.offset.top < top + 20) { - $("#gOrganizeMicroThumbPanel").get(0).scrollTop = Math.max(0, $("#gOrganizeMicroThumbPanel").get(0).scrollTop - 100); + $("#g-organize-microthumb-panel").get(0).scrollTop = Math.max(0, $("#g-organize-microthumb-panel").get(0).scrollTop - 100); } } }, @@ -63,7 +63,7 @@ target_id = $(".currentDropTarget").attr("ref"); } else { before_or_after = "after"; - target_id = $("#gOrganizeMicroThumbGrid li:last").attr("ref"); + target_id = $("#g-organize-microthumb-grid li:last").attr("ref"); } $.organize.do_drop({ url: rearrange_url @@ -79,9 +79,9 @@ tolerance: "pointer", greedy: true, drop: function(event, ui) { - if ($(event.target).hasClass("gViewOnly")) { + if ($(event.target).hasClass("g-view-only")) { $(".ui-selected").show(); - $(".gOrganizeMicroThumbGridCell").css("borderStyle", "none"); + $(".g-organize-microthumb-grid-cell").css("borderStyle", "none"); } else { $.organize.do_drop({ url: move_url.replace("__ALBUM_ID__", $(event.target).attr("ref")), @@ -92,7 +92,7 @@ }, do_drop: function(options) { - $("#gOrganizeMicroThumbPanel").selectable("destroy"); + $("#g-organize-microthumb-panel").selectable("destroy"); var source_ids = []; $(options.source).each(function(i) { source_ids.push($(this).attr("ref")); @@ -110,19 +110,19 @@ _refresh: function(data) { if (data.tree) { - $("#gOrganizeAlbumTree").html(data.tree); + $("#g-organize-albumTree").html(data.tree); } if (data.grid) { - $("#gOrganizeMicroThumbGrid").html(data.grid); - $("#gOrganizeSortColumn").attr("value", data.sort_column); - $("#gOrganizeSortOrder").attr("value", data.sort_order); + $("#g-organize-microthumb-grid").html(data.grid); + $("#g-organize-sort-column").attr("value", data.sort_column); + $("#g-organize-sort-order").attr("value", data.sort_order); } $.organize.set_handlers(); }, mouse_move_handler: function(event) { - if ($(".gDragHelper").length) { - $(".gOrganizeMicroThumbGridCell").css({borderStyle: "hidden", margin: "4px"}); + if ($(".g-drag-helper").length) { + $(".g-organize-microthumb-grid-cell").css({borderStyle: "hidden", margin: "4px"}); $(".currentDropTarget").removeClass("currentDropTarget"); var borderStyle = event.pageX < $(this).offset().left + $(this).width() / 2 ? {borderLeftStyle: "solid", marginLeft: "2px"} : {borderRightStyle: "solid", marginRight: "2px"}; @@ -140,37 +140,37 @@ $(".sf-menu li.sfHover ul").css("z-index", 68); $("#g-dialog").dialog("option", "zIndex", 70); $("#g-dialog").bind("dialogopen", function(event, ui) { - $("#gOrganize").height($("#g-dialog").innerHeight() - 20); - $("#gOrganizeMicroThumbPanel").height($("#g-dialog").innerHeight() - 90); - $("#gOrganizeTreeContainer").height($("#g-dialog").innerHeight() - 59); + $("#g-organize").height($("#g-dialog").innerHeight() - 20); + $("#g-organize-microthumb-panel").height($("#g-dialog").innerHeight() - 90); + $("#g-organizeTreeContainer").height($("#g-dialog").innerHeight() - 59); }); $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); - $("#g-dialog #gOrganizeClose").click(function(event) { + $("#g-dialog #g-organizeClose").click(function(event) { $("#g-dialog").dialog("close"); }); - $("#gOrganizeSortColumn,#gOrganizeSortOrder").change(function(event) { - $.organize.resort($("#gOrganizeSortColumn").attr("value"), $("#gOrganizeSortOrder").attr("value")); + $("#g-organize-sort-column,#g-organize-sort-order").change(function(event) { + $.organize.resort($("#g-organize-sort-column").attr("value"), $("#g-organize-sort-order").attr("value")); }); $.organize.set_handlers(); }, set_handlers: function() { - $("#gOrganizeMicroThumbPanel") - .selectable({filter: ".gOrganizeMicroThumbGridCell"}) + $("#g-organize-microthumb-panel") + .selectable({filter: ".g-organize-microthumb-grid-cell"}) .droppable($.organize.content_droppable); - $(".gOrganizeMicroThumbGridCell") + $(".g-organize-microthumb-grid-cell") .draggable($.organize.micro_thumb_draggable) .mouseleave($.organize.mouse_leave_handler) .mousemove($.organize.mouse_move_handler); - $(".gOrganizeAlbum").droppable($.organize.branch_droppable); - $(".gOrganizeAlbumText").click($.organize.show_album); - $("#gOrganizeAlbumTree .ui-icon-plus,#gOrganizeAlbumTree .ui-icon-minus").click($.organize.toggle_branch); + $(".g-organize-album").droppable($.organize.branch_droppable); + $(".g-organize-album-text").click($.organize.show_album); + $("#g-organize-albumTree .ui-icon-plus,#g-organize-albumTree .ui-icon-minus").click($.organize.toggle_branch); }, toggle_branch: function(event) { @@ -207,20 +207,20 @@ if ($(event.currentTarget).hasClass("selected")) { return; } - var parent = $(event.currentTarget).parents(".gOrganizeBranch"); - if ($(parent).hasClass("gViewOnly")) { + var parent = $(event.currentTarget).parents(".g-organizeBranch"); + if ($(parent).hasClass("g-view-only")) { return; } - $("#gOrganizeMicroThumbPanel").selectable("destroy"); + $("#g-organize-microthumb-panel").selectable("destroy"); var id = $(event.currentTarget).attr("ref"); - $("#gOrganizeAlbumTree .selected").removeClass("selected"); - $(".gOrganizeAlbumText[ref=" + id + "]").addClass("selected"); - var url = $("#gOrganizeMicroThumbPanel").attr("ref").replace("__ITEM_ID__", id).replace("__OFFSET__", 0); + $("#g-organize-albumTree .selected").removeClass("selected"); + $(".g-organize-album-text[ref=" + id + "]").addClass("selected"); + var url = $("#g-organize-microthumb-panel").attr("ref").replace("__ITEM_ID__", id).replace("__OFFSET__", 0); $.get(url, {}, function(data) { - $("#gOrganizeMicroThumbGrid").html(data.grid); - $("#gOrganizeSortColumn").attr("value", data.sort_column); - $("#gOrganizeSortOrder").attr("value", data.sort_order); + $("#g-organize-microthumb-grid").html(data.grid); + $("#g-organize-sort-column").attr("value", data.sort_column); + $("#g-organize-sort-order").attr("value", data.sort_order); $.organize.set_handlers(); }, "json"); @@ -231,14 +231,14 @@ */ resort: function(column, dir) { var url = sort_order_url - .replace("__ALBUM_ID__", $("#gOrganizeAlbumTree .selected").attr("ref")) + .replace("__ALBUM_ID__", $("#g-organize-albumTree .selected").attr("ref")) .replace("__COL__", column) .replace("__DIR__", dir); $.get(url, {}, function(data) { - $("#gOrganizeMicroThumbGrid").html(data.grid); - $("#gOrganizeSortColumn").attr("value", data.sort_column); - $("#gOrganizeSortOrder").attr("value", data.sort_order); + $("#g-organize-microthumb-grid").html(data.grid); + $("#g-organize-sort-column").attr("value", data.sort_column); + $("#g-organize-sort-order").attr("value", data.sort_order); $.organize.set_handlers(); }, "json"); diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 09720fe4..858c794c 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -5,37 +5,37 @@ var sort_order_url = "<?= url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") ?>"; var tree_url = "<?= url::site("organize/tree/__ALBUM_ID__") ?>"; </script> -<div id="gOrganize" class="g-dialogPanel"> +<div id="g-organize" class="g-dialog-panel"> <h1 style="display:none"><?= t("Organize %name", array("name" => html::purify($album->title))) ?></h1> <div id="bd"> <div class="yui-gf"> <div class="yui-u first"> <h3><?= t("Albums") ?></h3> </div> - <div id="gMessage" class="yui-u"> - <div class="gInfo"><?= t("Drag and drop photos to re-order or move between albums") ?></div> + <div id="g-action-status" class="yui-u"> + <div class="g-info"><?= t("Drag and drop photos to re-order or move between albums") ?></div> </div> </div> - <div id="gOrganizeContentPane" class="yui-gf"> - <div id="gOrganizeTreeContainer" class="yui-u first"> - <ul id="gOrganizeAlbumTree"> + <div id="g-organizeContentPane" class="yui-gf"> + <div id="g-organizeTreeContainer" class="yui-u first"> + <ul id="g-organize-albumTree"> <?= $album_tree ?> </ul> </div> - <div id="gOrganizeDetail" class="yui-u"> - <div id="gOrganizeMicroThumbPanel" + <div id="g-organizeDetail" class="yui-u"> + <div id="g-organize-microthumb-panel" ref="<?= url::site("organize/album/__ITEM_ID__/__OFFSET__") ?>"> - <ul id="gOrganizeMicroThumbGrid"> + <ul id="g-organize-microthumb-grid"> <?= $micro_thumb_grid ?> </ul> </div> - <div id="gOrganizeControls"> - <a id="gOrganizeClose" href="#" ref="done" + <div id="g-organizeControls"> + <a id="g-organizeClose" href="#" ref="done" class="g-button ui-corner-all ui-state-default"><?= t("Close") ?></a> <form> <?= t("Sort order") ?> - <?= form::dropdown(array("id" => "gOrganizeSortColumn"), album::get_sort_order_options(), $album->sort_column) ?> - <?= form::dropdown(array("id" => "gOrganizeSortOrder"), array("ASC" => "Ascending", "DESC" => "Descending"), $album->sort_order) ?> + <?= form::dropdown(array("id" => "g-organize-sort-column"), album::get_sort_order_options(), $album->sort_column) ?> + <?= form::dropdown(array("id" => "g-organize-sort-order"), array("ASC" => "Ascending", "DESC" => "Descending"), $album->sort_order) ?> </form> </div> </div> @@ -44,5 +44,5 @@ </div> <script type="text/javascript"> - $("#gOrganize").ready($.organize.init); + $("#g-organize").ready($.organize.init); </script> diff --git a/modules/organize/views/organize_thumb_grid.html.php b/modules/organize/views/organize_thumb_grid.html.php index af7136fc..553fc493 100644 --- a/modules/organize/views/organize_thumb_grid.html.php +++ b/modules/organize/views/organize_thumb_grid.html.php @@ -1,9 +1,9 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? foreach ($album->children(25, $offset) as $child): ?> -<li class="gOrganizeMicroThumbGridCell" ref="<?= $child->id ?>"> - <div id="gOrganizeMicroThumb_<?= $child->id ?>" - class="gOrganizeMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>"> - <?= $child->thumb_img(array("class" => "gThumbnail", "ref" => $child->id), 90, true) ?> +<li class="g-organize-microthumb-grid-cell" ref="<?= $child->id ?>"> + <div id="g-organize-microthumb_<?= $child->id ?>" + class="g-organize-microthumb <?= $child->is_album() ? "g-album" : "g-photo" ?>"> + <?= $child->thumb_img(array("class" => "g-thumbnail", "ref" => $child->id), 90, true) ?> </div> </li> <? endforeach ?> @@ -14,7 +14,7 @@ $.get("<?= url::site("organize/album/$album->id/" . ($offset + 25)) ?>", {}, function(data) { - $("#gOrganizeMicroThumbGrid").append(data.grid); + $("#g-organize-microthumb-grid").append(data.grid); $.organize.set_handlers(); }, "json"); diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index e5d91c04..924a1bd6 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -1,9 +1,9 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $album) ? "" : "gViewOnly" ?>" +<li class="g-organize-album ui-icon-left <?= access::can("edit", $album) ? "" : "g-view-only" ?>" ref="<?= $album->id ?>"> <span class="ui-icon ui-icon-minus"> </span> - <span class="gOrganizeAlbumText <?= $selected && $album->id == $selected->id ? "selected" : "" ?>" + <span class="g-organize-album-text <?= $selected && $album->id == $selected->id ? "selected" : "" ?>" ref="<?= $album->id ?>"> <?= html::clean($album->title) ?> </span> @@ -12,11 +12,11 @@ <? if ($selected && $child->contains($selected)): ?> <?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?> <? else: ?> - <li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $child) ? "" : "gViewOnly" ?>" + <li class="g-organize-album ui-icon-left <?= access::can("edit", $child) ? "" : "g-view-only" ?>" ref="<?= $child->id ?>"> <span class="ui-icon ui-icon-plus"> </span> - <span class="gOrganizeAlbumText" ref="<?= $child->id ?>"> + <span class="g-organize-album-text" ref="<?= $child->id ?>"> <?= html::clean($child->title) ?> </span> </li> diff --git a/modules/recaptcha/helpers/recaptcha.php b/modules/recaptcha/helpers/recaptcha.php index bead6156..789bae85 100644 --- a/modules/recaptcha/helpers/recaptcha.php +++ b/modules/recaptcha/helpers/recaptcha.php @@ -19,7 +19,7 @@ */ class recaptcha_Core { static function get_configure_form() { - $form = new Forge("admin/recaptcha", "", "post", array("id" => "gConfigureRecaptchaForm")); + $form = new Forge("admin/recaptcha", "", "post", array("id" => "g-configure-recaptcha-form")); $group = $form->group("configure_recaptcha") ->label(t("Configure reCAPTCHA")); $group->input("public_key") diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php index d23a0c74..feedced4 100644 --- a/modules/recaptcha/helpers/recaptcha_event.php +++ b/modules/recaptcha/helpers/recaptcha_event.php @@ -20,7 +20,7 @@ class recaptcha_event_Core { static function comment_add_form($form) { if (module::get_var("recaptcha", "public_key")) { - $form->add_comment->recaptcha("recaptcha")->label("")->id("gRecaptcha"); + $form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha"); } } diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php index 0a4b1f8f..3e964801 100644 --- a/modules/recaptcha/views/admin_recaptcha.html.php +++ b/modules/recaptcha/views/admin_recaptcha.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAdminRecaptcha"> +<div id="g-admin-recaptcha"> <h1> <?= t("reCAPTCHA Challenge Filtering") ?> </h1> <p> <?= t("reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. In order to use it, you need to sign up for a <a href=\"%domain_url\">reCAPTCHA Public/Private Key pair</a>, which is also free. Once registered, the challenge and response strings are evaluated at <a href=\"%recaptcha_url\">recaptcha.net</a> to determine if the form content has been entered by a bot.", @@ -11,16 +11,16 @@ </div> <? if ($public_key && $private_key): ?> -<div id="gAdminRecaptchaTest" class="gBlock"> +<div id="g-admin-recaptcha-test" class="g-block"> <h2> <?= t("reCAPTCHA Test") ?> </h2> <p> <?= t("If you see a CAPTCHA form below, then reCAPTCHA is functioning properly.") ?> </p> - <div id="gRecaptcha"/> + <div id="g-recaptcha"/> <script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js"></script> <script type="text/javascript"> - Recaptcha.create("<?= $public_key ?>", "gRecaptcha", { + Recaptcha.create("<?= $public_key ?>", "g-recaptcha", { callback: Recaptcha.focus_response_field, lang: "en", custom_translations : { instructions_visual : <?= t("Type words to check:")->for_js() ?>}, diff --git a/modules/recaptcha/views/form_recaptcha.html.php b/modules/recaptcha/views/form_recaptcha.html.php index 4ec04c49..f26ebdf6 100644 --- a/modules/recaptcha/views/form_recaptcha.html.php +++ b/modules/recaptcha/views/form_recaptcha.html.php @@ -1,11 +1,11 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gRecaptcha"></div> +<div id="g-recaptcha"></div> <script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js"></script> <script type="text/javascript"> setTimeout(function() { Recaptcha.create( "<?= $public_key ?>", - "gRecaptcha", + "g-recaptcha", { theme: "white", custom_translations : { instructions_visual : <?= t("Type words to check:")->for_js() ?>}, diff --git a/modules/rss/helpers/rss_block.php b/modules/rss/helpers/rss_block.php index 43043f5f..cfd3098d 100644 --- a/modules/rss/helpers/rss_block.php +++ b/modules/rss/helpers/rss_block.php @@ -36,7 +36,7 @@ class rss_block_Core { } if (!empty($feeds)) { $block = new Block(); - $block->css_id = "gRss"; + $block->css_id = "g-rss"; $block->title = t("Available RSS Feeds"); $block->content = new View("rss_block.html"); $block->content->feeds = $feeds; diff --git a/modules/rss/views/rss_block.html.php b/modules/rss/views/rss_block.html.php index 737731b6..210c72a5 100644 --- a/modules/rss/views/rss_block.html.php +++ b/modules/rss/views/rss_block.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<ul id="gFeeds"> +<ul id="g-feeds"> <? foreach($feeds as $url => $title): ?> <li style="clear: both;"> <span class="ui-icon-left"> diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php index c73eda08..20d26b61 100644 --- a/modules/search/helpers/search.php +++ b/modules/search/helpers/search.php @@ -57,7 +57,7 @@ class search_Core { list ($remaining) = search::stats(); if ($remaining) { site_status::warning( - t('Your search index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>', + t('Your search index needs to be updated. <a href="%url" class="g-dialog-link">Fix this now</a>', array("url" => html::mark_clean(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))), "search_index_out_of_date"); } diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php index f3225b4e..60ea83b7 100644 --- a/modules/search/helpers/search_installer.php +++ b/modules/search/helpers/search_installer.php @@ -24,7 +24,7 @@ class search_installer { `id` int(9) NOT NULL auto_increment, `item_id` int(9), `dirty` boolean default 1, - `data` LONGTEXT default NULL, + `data` LONg-text default NULL, PRIMARY KEY (`id`), KEY(`item_id`), FULLTEXT INDEX (`data`)) diff --git a/modules/search/views/search.html.php b/modules/search/views/search.html.php index 91d9eec8..f243ed87 100644 --- a/modules/search/views/search.html.php +++ b/modules/search/views/search.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // @todo Set hover on AlbumGrid list items ?> -<form action="<?= url::site("/search") ?>" id="gSearchForm"> +<form action="<?= url::site("/search") ?>" id="g-search-form"> <fieldset> <legend> <?= t("Search") ?> @@ -17,17 +17,17 @@ </fieldset> </form> -<div id="gSearchResults"> +<div id="g-search-results"> <h1><?= t("Search Results") ?></h1> <? if (count($items)): ?> - <ul id="gAlbumGrid"> + <ul id="g-album-grid"> <? foreach ($items as $item): ?> - <? $item_class = "gPhoto"; ?> + <? $item_class = "g-photo"; ?> <? if ($item->is_album()): ?> - <? $item_class = "gAlbum"; ?> + <? $item_class = "g-album"; ?> <? endif ?> - <li class="gItem <?= $item_class ?>"> + <li class="g-item <?= $item_class ?>"> <a href="<?= $item->url() ?>"> <?= $item->thumb_img() ?> <p> diff --git a/modules/search/views/search_link.html.php b/modules/search/views/search_link.html.php index 51bb4e14..d0b93bba 100644 --- a/modules/search/views/search_link.html.php +++ b/modules/search/views/search_link.html.php @@ -1,9 +1,9 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<form action="<?= url::site("search") ?>" id="gQuickSearchForm"> +<form action="<?= url::site("search") ?>" id="g-quick-search-form"> <ul> <li> - <label for="gSearch"><?= t("Search the gallery") ?></label> - <input type="text" name="q" id="gSearch"/> + <label for="g-search"><?= t("Search the gallery") ?></label> + <input type="text" name="q" id="g-search"/> </li> <li> <input type="submit" value="<?= t("Go")->for_html_attr() ?>" /> diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php index 38190fee..098f6f71 100644 --- a/modules/server_add/controllers/admin_server_add.php +++ b/modules/server_add/controllers/admin_server_add.php @@ -83,7 +83,7 @@ class Admin_Server_Add_Controller extends Admin_Controller { private function _get_admin_form() { $form = new Forge("admin/server_add/add_path", "", "post", - array("id" => "gServerAddAdminForm")); + array("id" => "g-server-add-adminForm")); $add_path = $form->group("add_path"); $add_path->input("path")->label(t("Path"))->rules("required") ->error_messages("not_readable", t("This directory is not readable by the webserver")) diff --git a/modules/server_add/js/admin.js b/modules/server_add/js/admin.js index 5440af2a..edbddf33 100644 --- a/modules/server_add/js/admin.js +++ b/modules/server_add/js/admin.js @@ -3,6 +3,6 @@ * */ $("document").ready(function() { - $("#gServerAddAdmin input:text").autocomplete( + $("#g-server-add-admin input:text").autocomplete( base_url.replace("__ARGS__", "admin/server_add/autocomplete"), {max: 256}); }); diff --git a/modules/server_add/js/server_add.js b/modules/server_add/js/server_add.js index 86bff079..a2a831c9 100644 --- a/modules/server_add/js/server_add.js +++ b/modules/server_add/js/server_add.js @@ -2,35 +2,35 @@ $.widget("ui.gallery_server_add", { _init: function() { var self = this; - $("#gServerAddAddButton", this.element).click(function(event) { + $("#g-server-add-add-button", this.element).click(function(event) { event.preventDefault(); - $(".gProgressBar", this.element). + $(".g-progress-bar", this.element). progressbar(). progressbar("value", 0); - $("#gServerAddProgress", this.element).slideDown("fast", function() { self.start_add(); }); + $("#g-server-add-progress", this.element).slideDown("fast", function() { self.start_add(); }); }); - $("#gServerAddPauseButton", this.element).click(function(event) { + $("#g-server-add-pause-button", this.element).click(function(event) { self.pause = true; - $("#gServerAddPauseButton", this.element).hide(); - $("#gServerAddContinueButton", this.element).show(); + $("#g-server-add-pause-button", this.element).hide(); + $("#g-server-add-continue-button", this.element).show(); }); - $("#gServerAddContinueButton", this.element).click(function(event) { + $("#g-server-add-continue-button", this.element).click(function(event) { self.pause = false; - $("#gServerAddPauseButton", this.element).show(); - $("#gServerAddContinueButton", this.element).hide(); + $("#g-server-add-pause-button", this.element).show(); + $("#g-server-add-continue-button", this.element).hide(); self.run_add(); }); - $("#gServerAddCloseButton", this.element).click(function(event) { + $("#g-server-addCloseButton", this.element).click(function(event) { $("#g-dialog").dialog("close"); window.location.reload(); }); - $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { + $("#g-server-add-tree span.g-directory", this.element).dblclick(function(event) { self.open_dir(event); }); - $("#gServerAddTree span.gFile, #gServerAddTree span.gDirectory", this.element).click(function(event) { + $("#g-server-add-tree span.g-file, #g-server-add-tree span.g-directory", this.element).click(function(event) { self.select_file(event); }); - $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { + $("#g-server-add-tree span.g-directory", this.element).dblclick(function(event) { self.open_dir(event); }); $("#g-dialog").bind("dialogclose", function(event, ui) { @@ -48,8 +48,8 @@ paths.push($(this).attr("ref")); }); - $("#gServerAddAddButton", this.element).hide(); - $("#gServerAddPauseButton", this.element).show(); + $("#g-server-add-add-button", this.element).hide(); + $("#g-server-add-pause-button", this.element).show(); $.ajax({ url: START_URL, @@ -58,8 +58,8 @@ data: { "paths[]": paths }, dataType: "json", success: function(data, textStatus) { - $("#gStatus").html(data.status); - $(".gProgressBar", self.element).progressbar("value", data.percent_complete); + $("#g-status").html(data.status); + $(".g-progress-bar", self.element).progressbar("value", data.percent_complete); self.taskURL = data.url; setTimeout(function() { self.run_add(); }, 25); } @@ -74,13 +74,13 @@ async: false, dataType: "json", success: function(data, textStatus) { - $("#gStatus").html(data.status); - $(".gProgressBar", self.element).progressbar("value", data.percent_complete); + $("#g-status").html(data.status); + $(".g-progress-bar", self.element).progressbar("value", data.percent_complete); if (data.done) { - $("#gServerAddProgress", this.element).slideUp(); - $("#gServerAddAddButton", this.element).show(); - $("#gServerAddPauseButton", this.element).hide(); - $("#gServerAddContinueButton", this.element).hide(); + $("#g-server-add-progress", this.element).slideUp(); + $("#g-server-add-add-button", this.element).show(); + $("#g-server-add-pause-button", this.element).hide(); + $("#g-server-add-continue-button", this.element).hide(); } else { if (!self.pause) { setTimeout(function() { self.run_add(); }, 25); @@ -99,11 +99,11 @@ $.ajax({ url: GET_CHILDREN_URL.replace("__PATH__", path), success: function(data, textStatus) { - $("#gServerAddTree", self.element).html(data); - $("#gServerAddTree span.gDirectory", self.element).dblclick(function(event) { + $("#g-server-add-tree", self.element).html(data); + $("#g-server-add-tree span.g-directory", self.element).dblclick(function(event) { self.open_dir(event); }); - $("#gServerAddTree span.gFile, #gServerAddTree span.gDirectory", this.element).click(function(event) { + $("#g-server-add-tree span.g-file, #g-server-add-tree span.g-directory", this.element).click(function(event) { self.select_file(event); }); } @@ -115,10 +115,10 @@ */ select_file: function (event) { $(event.target).toggleClass("selected"); - if ($("#gServerAdd span.selected").length) { - $("#gServerAddAddButton").enable(true).removeClass("ui-state-disabled"); + if ($("#g-server-add span.selected").length) { + $("#g-server-add-add-button").enable(true).removeClass("ui-state-disabled"); } else { - $("#gServerAddAddButton").enable(false).addClass("ui-state-disabled"); + $("#g-server-add-add-button").enable(false).addClass("ui-state-disabled"); } } }); diff --git a/modules/server_add/views/admin_server_add.html.php b/modules/server_add/views/admin_server_add.html.php index 4fd7f257..e447ee6d 100644 --- a/modules/server_add/views/admin_server_add.html.php +++ b/modules/server_add/views/admin_server_add.html.php @@ -1,19 +1,19 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gServerAddAdmin"> +<div id="g-server-add-admin"> <h2> <?= t("Add From Server Admininstration") ?> </h2> - <div id="gAuthorizedPath"> + <div id="g-authorized-path"> <h3><?= t("Authorized Paths") ?></h3> <ul<? if (!empty($paths)): ?> style="display: none;"<? endif ?>> - <li class="gModuleStatus gInfo"><?= t("No Authorized image source paths defined yet") ?></li> + <li class="g-module-status g-info"><?= t("No Authorized image source paths defined yet") ?></li> </ul> - <ul id="gPathList"> + <ul id="g-path-list"> <? foreach ($paths as $id => $path): ?> <li class="ui-icon-left"> <a href="<?= url::site("admin/server_add/remove_path?path=" . urlencode($path) . "&csrf=$csrf") ?>" id="icon_<?= $id?>" - class="gRemoveDir ui-icon ui-icon-trash"> + class="g-remove-dir ui-icon ui-icon-trash"> X </a> <?= html::clean($path) ?> diff --git a/modules/server_add/views/server_add_tree.html.php b/modules/server_add/views/server_add_tree.html.php index 4e5bf601..91354329 100644 --- a/modules/server_add/views/server_add_tree.html.php +++ b/modules/server_add/views/server_add_tree.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <li class="ui-icon-left"> <span class="ui-icon ui-icon-folder-open"></span> - <span class="gDirectory" ref=""> + <span class="g-directory" ref=""> <?= t("All") ?> </span> <ul> @@ -9,7 +9,7 @@ <? foreach ($parents as $dir): ?> <li class="ui-icon-left"> <span class="ui-icon ui-icon-folder-open"></span> - <span class="gDirectory" ref="<?= html::clean_attribute($dir) ?>"> + <span class="g-directory" ref="<?= html::clean_attribute($dir) ?>"> <?= html::clean(basename($dir)) ?> </span> <ul> @@ -18,7 +18,7 @@ <? foreach ($files as $file): ?> <li class="ui-icon-left"> <span class="ui-icon <?= is_dir($file) ? "ui-icon-folder-collapsed" : "ui-icon-document" ?>"></span> - <span class="<?= is_dir($file) ? "gDirectory" : "gFile" ?>" + <span class="<?= is_dir($file) ? "g-directory" : "g-file" ?>" ref="<?= html::clean_attribute($file) ?>" > <?= html::clean(basename($file)) ?> </span> diff --git a/modules/server_add/views/server_add_tree_dialog.html.php b/modules/server_add/views/server_add_tree_dialog.html.php index fdb66d1c..31648a70 100644 --- a/modules/server_add/views/server_add_tree_dialog.html.php +++ b/modules/server_add/views/server_add_tree_dialog.html.php @@ -4,11 +4,11 @@ var START_URL = "<?= url::site("server_add/start?item_id={$item->id}&csrf=$csrf") ?>"; </script> -<div id="gServerAdd"> +<div id="g-server-add"> <h1 style="display: none;"><?= t("Add Photos to '%title'", array("title" => html::purify($item->title))) ?></h1> - <p id="gDescription"><?= t("Photos will be added to album:") ?></p> - <ul class="gBreadcrumbs"> + <p id="g-description"><?= t("Photos will be added to album:") ?></p> + <ul class="g-breadcrumbs"> <? foreach ($item->parents() as $parent): ?> <li> <?= html::purify($parent->title) ?> @@ -19,35 +19,35 @@ </li> </ul> - <ul id="gServerAddTree" class="gCheckboxTree"> + <ul id="g-server-add-tree" class="g-checkbox-tree"> <?= $tree ?> </ul> - <div id="gServerAddProgress" style="display: none"> - <div class="gProgressBar"></div> - <div id="gStatus"></div> + <div id="g-server-add-progress" style="display: none"> + <div class="g-progress-bar"></div> + <div id="g-status"></div> </div> <span> - <button id="gServerAddAddButton" class="ui-state-default ui-state-disabled ui-corner-all" + <button id="g-server-add-add-button" class="ui-state-default ui-state-disabled ui-corner-all" disabled="disabled"> <?= t("Add") ?> </button> - <button id="gServerAddPauseButton" class="ui-state-default ui-corner-all" style="display:none"> + <button id="g-server-add-pause-button" class="ui-state-default ui-corner-all" style="display:none"> <?= t("Pause") ?> </button> - <button id="gServerAddContinueButton" class="ui-state-default ui-corner-all" style="display:none"> + <button id="g-server-add-continue-button" class="ui-state-default ui-corner-all" style="display:none"> <?= t("Continue") ?> </button> - <button id="gServerAddCloseButton" class="ui-state-default ui-corner-all"> + <button id="g-server-addCloseButton" class="ui-state-default ui-corner-all"> <?= t("Close") ?> </button> </span> <script type="text/javascript"> - $("#gServerAdd").ready(function() { - $("#gServerAdd").gallery_server_add(); + $("#g-server-add").ready(function() { + $("#g-server-add").gallery_server_add(); }); </script> diff --git a/modules/slideshow/helpers/slideshow_event.php b/modules/slideshow/helpers/slideshow_event.php index ce26b189..0afe8126 100644 --- a/modules/slideshow/helpers/slideshow_event.php +++ b/modules/slideshow/helpers/slideshow_event.php @@ -39,7 +39,7 @@ class slideshow_event_Core { ->label(t("View slideshow")) ->url("javascript:PicLensLite.start(" . "{maxScale:0,feedUrl:'" . self::_feed_url($theme) . "'})") - ->css_id("gSlideshowLink")); + ->css_id("g-slideshow-link")); } } @@ -49,7 +49,7 @@ class slideshow_event_Core { ->label(t("View slideshow")) ->url("javascript:PicLensLite.start(" . "{maxScale:0,feedUrl:'" . self::_feed_url($theme) . "'})") - ->css_id("gSlideshowLink")); + ->css_id("g-slideshow-link")); } static function tag_menu($menu, $theme) { @@ -58,7 +58,7 @@ class slideshow_event_Core { ->label(t("View slideshow")) ->url("javascript:PicLensLite.start(" . "{maxScale:0,feedUrl:'" . self::_feed_url($theme) . "'})") - ->css_id("gSlideshowLink")); + ->css_id("g-slideshow-link")); } private static function _feed_url($theme) { diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index be5461a4..d4278802 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -98,7 +98,7 @@ class tag_Core { } static function get_add_form($item) { - $form = new Forge("tags", "", "post", array("id" => "gAddTagForm")); + $form = new Forge("tags", "", "post", array("id" => "g-add-tag-form")); $label = $item->is_album() ? t("Add tag to album") : ($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie")); @@ -111,7 +111,7 @@ class tag_Core { } static function get_rename_form($tag) { - $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "gRenameTagForm")); + $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "g-rename-tag-form")); $group = $form->group("rename_tag")->label(t("Rename Tag")); $group->input("name")->label(t("Tag name"))->value($tag->name)->rules("required|length[1,64]"); $group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name")); @@ -120,7 +120,7 @@ class tag_Core { } static function get_delete_form($tag) { - $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "gDeleteTagForm")); + $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "g-delete-tag-form")); $group = $form->group("delete_tag") ->label(t("Really delete tag %tag_name?", array("tag_name" => $tag->name))); $group->submit("")->value(t("Delete Tag")); diff --git a/modules/tag/helpers/tag_block.php b/modules/tag/helpers/tag_block.php index bbcc5fd1..37da0b16 100644 --- a/modules/tag/helpers/tag_block.php +++ b/modules/tag/helpers/tag_block.php @@ -27,7 +27,7 @@ class tag_block_Core { switch ($block_id) { case "tag": $block = new Block(); - $block->css_id = "gTag"; + $block->css_id = "g-tag"; $block->title = t("Popular Tags"); $block->content = new View("tag_block.html"); $block->content->cloud = tag::cloud(30); diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index bc2331c9..e2e6b782 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -3,28 +3,28 @@ $("document").ready(function() { }); function ajaxify_tag_form() { - $("#gTag form").ajaxForm({ + $("#g-tag form").ajaxForm({ dataType: "json", success: function(data) { if (data.result == "success") { - $.get($("#gTagCloud").attr("title"), function(data, textStatus) { - $("#gTagCloud").html(data); + $.get($("#g-tag-cloud").attr("title"), function(data, textStatus) { + $("#g-tag-cloud").html(data); }); } - $("#gTag form").resetForm(); + $("#g-tag form").resetForm(); } }); } function closeEditInPlaceForms() { // closes currently open inplace edit forms - if ($("#gRenameTagForm").length) { - $("#gEditErrorMessage").remove(); - var li = $("#gRenameTagForm").parent(); - $("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert")); + if ($("#g-rename-tag-form").length) { + $("#g-edit-error-message").remove(); + var li = $("#g-rename-tag-form").parent(); + $("#g-rename-tag-form").parent().html($("#g-rename-tag-form").parent().data("revert")); li.height(""); - $(".gEditable", li).bind("click", editInPlace); - $(".g-dialogLink", li).gallery_dialog(); + $(".g-editable", li).bind("click", editInPlace); + $(".g-dialog-link", li).gallery_dialog(); } } @@ -41,7 +41,7 @@ function editInPlace(element) { var tag_name = $(this).html(); var tag_width = $(this).width(); $(this).parent().data("revert", $(this).parent().html()); - var form = '<form id="gRenameTagForm" method="post" class="ui-helper-clearfix" '; + var form = '<form id="g-rename-tag-form" method="post" class="ui-helper-clearfix" '; form += 'action="' + TAG_RENAME_URL.replace('__ID__', tag_id) + '">'; form += '<input name="csrf" type="hidden" value="' + csrf_token + '" />'; form += '<input id="name" name="name" type="text" class="textbox" value="' + @@ -52,26 +52,26 @@ function editInPlace(element) { // add edit form $(this).parent().html(form); - $("#gRenameTagForm #name") + $("#g-rename-tag-form #name") .width(tag_width+30) .focus(); - //$("#gRenameTagForm").parent().height( $("#gRenameTagForm").height() ); - $("#gRenameTagForm a").bind("click", closeEditInPlaceForms); + //$("#g-rename-tag-form").parent().height( $("#g-rename-tag-form").height() ); + $("#g-rename-tag-form a").bind("click", closeEditInPlaceForms); ajaxify_editInPlaceForm = function() { - $("#gRenameTagForm").ajaxForm({ + $("#g-rename-tag-form").ajaxForm({ dataType: "json", success: function(data) { if (data.result == "success") { closeEditInPlaceForms(); // close form - $("#gTag-" + data.tag_id).text(data.new_tagname); // update tagname + $("#g-tag-" + data.tag_id).text(data.new_tagname); // update tagname console.log(data); window.location.reload(); } else if (data.result == "error") { - $("#gRenameTagForm #name") - .addClass("gError") + $("#g-rename-tag-form #name") + .addClass("g-error") .focus(); - $("#gTagAdmin").before("<p id=\"gEditErrorMessage\" class=\"gError\">" + data.message + "</p>"); + $("#g-tag-admin").before("<p id=\"g-edit-error-message\" class=\"g-error\">" + data.message + "</p>"); } } }); diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index a4bd5d8f..27813a91 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -3,18 +3,18 @@ var TAG_RENAME_URL = <?= html::js_string(url::site("admin/tags/rename/__ID__")) ?>; $("document").ready(function() { // using JS for adding link titles to avoid running t() for each tag - $("#gTagAdmin .tag-name").attr("title", <?= t("Click to edit this tag")->for_js() ?>); - $("#gTagAdmin .delete-link").attr("title", $(".delete-link:first span").html()); + $("#g-tag-admin .tag-name").attr("title", <?= t("Click to edit this tag")->for_js() ?>); + $("#g-tag-admin .delete-link").attr("title", $(".delete-link:first span").html()); // In-place editing for tag admin - $(".gEditable").bind("click", editInPlace); + $(".g-editable").bind("click", editInPlace); }); // make some values available within tag.js var csrf_token = "<?= $csrf ?>"; var save_i18n = <?= html::js_string(t("save")->for_html_attr()) ?>; var cancel_i18n = <?= html::js_string(t("cancel")->for_html_attr()) ?>; </script> -<div class="gBlock"> +<div class="g-block"> <h2> <?= t("Tag Admin") ?> </h2> @@ -22,7 +22,7 @@ <? $tags_per_column = $tags->count()/5 ?> <? $column_tag_count = 0 ?> - <table id="gTagAdmin" class="gBlockContent"> + <table id="g-tag-admin" class="g-block-content"> <caption class="g-understate"> <?= t2("There is one tag", "There are %count tags", $tags->count()) ?> </caption> @@ -47,10 +47,10 @@ <? endif ?> <li> - <span id="gTag-<?= $tag->id ?>" class="gEditable tag-name"><?= html::clean($tag->name) ?></span> + <span id="g-tag-<?= $tag->id ?>" class="g-editable tag-name"><?= html::clean($tag->name) ?></span> <span class="g-understate">(<?= $tag->count ?>)</span> <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" - class="g-dialogLink delete-link g-button"> + class="g-dialog-link delete-link g-button"> <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> </li> diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php index 59a4ef88..8c79b74a 100644 --- a/modules/tag/views/tag_block.html.php +++ b/modules/tag/views/tag_block.html.php @@ -1,8 +1,8 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<script> - $("#gAddTagForm").ready(function() { - var url = $("#gTagCloud").attr("title") + "/autocomplete"; - $("#gAddTagForm input:text").autocomplete( +<script language="text/javascript"> + $("#g-add-tag-form").ready(function() { + var url = $("#g-tag-cloud").attr("title") + "/autocomplete"; + $("#g-add-tag-form input:text").autocomplete( url, { max: 30, multiple: true, @@ -11,7 +11,7 @@ ); }); </script> -<div id="gTagCloud" title="<?= url::site("tags") ?>"> +<div id="g-tag-cloud" title="<?= url::site("tags") ?>"> <?= $cloud ?> </div> <?= $form ?> \ No newline at end of file diff --git a/modules/user/controllers/password.php b/modules/user/controllers/password.php index 92608dcd..4629bbf2 100644 --- a/modules/user/controllers/password.php +++ b/modules/user/controllers/password.php @@ -85,9 +85,9 @@ class Password_Controller extends Controller { } private function _reset_form() { - $form = new Forge(url::current(true), "", "post", array("id" => "gResetForm")); + $form = new Forge(url::current(true), "", "post", array("id" => "g-reset-form")); $group = $form->group("reset")->label(t("Reset Password")); - $group->input("name")->label(t("Username"))->id("gName")->class(null)->rules("required"); + $group->input("name")->label(t("Username"))->id("g-name")->class(null)->rules("required"); $group->inputs["name"]->error_messages("no_email", t("No email, unable to reset password")); $group->submit("")->value(t("Reset")); @@ -97,15 +97,15 @@ class Password_Controller extends Controller { private function _new_password_form($hash=null) { $template = new Theme_View("page.html", "reset"); - $form = new Forge("password/do_reset", "", "post", array("id" => "gChangePasswordForm")); + $form = new Forge("password/do_reset", "", "post", array("id" => "g-change-password-form")); $group = $form->group("reset")->label(t("Change Password")); $hidden = $group->hidden("hash"); if (!empty($hash)) { $hidden->value($hash); } - $group->password("password")->label(t("Password"))->id("gPassword") + $group->password("password")->label(t("Password"))->id("g-password") ->rules("required|length[1,40]"); - $group->password("password2")->label(t("Confirm Password"))->id("gPassword2") + $group->password("password2")->label(t("Confirm Password"))->id("g-password2") ->matches($group->password); $group->inputs["password2"]->error_messages( "mistyped", t("The password and the confirm password must match")); diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index e0dfac8e..b13895bc 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -74,9 +74,9 @@ class group_Core { } static function get_edit_form_admin($group) { - $form = new Forge("admin/users/edit_group/$group->id", "", "post", array("id" => "gEditGroupForm")); + $form = new Forge("admin/users/edit_group/$group->id", "", "post", array("id" => "g-edit-group-form")); $form_group = $form->group("edit_group")->label(t("Edit Group")); - $form_group->input("name")->label(t("Name"))->id("gName")->value($group->name); + $form_group->input("name")->label(t("Name"))->id("g-name")->value($group->name); $form_group->inputs["name"]->error_messages( "in_use", t("There is already a group with that name")); $form_group->submit("")->value(t("Save")); @@ -85,10 +85,10 @@ class group_Core { } static function get_add_form_admin() { - $form = new Forge("admin/users/add_group", "", "post", array("id" => "gAddGroupForm")); + $form = new Forge("admin/users/add_group", "", "post", array("id" => "g-add-group-form")); $form->set_attr('class', "g-narrow"); $form_group = $form->group("add_group")->label(t("Add Group")); - $form_group->input("name")->label(t("Name"))->id("gName"); + $form_group->input("name")->label(t("Name"))->id("g-name"); $form_group->inputs["name"]->error_messages( "in_use", t("There is already a group with that name")); $form_group->submit("")->value(t("Add Group")); @@ -99,7 +99,7 @@ class group_Core { static function get_delete_form_admin($group) { $form = new Forge("admin/users/delete_group/$group->id", "", "post", - array("id" => "gDeleteGroupForm")); + array("id" => "g-delete-group-form")); $form_group = $form->group("delete_group")->label( t("Are you sure you want to delete group %group_name?", array("group_name" => $group->name))); $form_group->submit("")->value(t("Delete")); diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index 93c385a3..6ae9203d 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -25,16 +25,16 @@ */ class user_Core { static function get_edit_form($user) { - $form = new Forge("users/$user->id?_method=put", "", "post", array("id" => "gEditUserForm")); + $form = new Forge("users/$user->id?_method=put", "", "post", array("id" => "g-edit-user-form")); $form->set_attr("class", "g-narrow"); $group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name))); - $group->input("full_name")->label(t("Full Name"))->id("gFullName")->value($user->full_name); + $group->input("full_name")->label(t("Full Name"))->id("g-fullname")->value($user->full_name); self::_add_locale_dropdown($group, $user); - $group->password("password")->label(t("Password"))->id("gPassword"); - $group->password("password2")->label(t("Confirm Password"))->id("gPassword2") + $group->password("password")->label(t("Password"))->id("g-password"); + $group->password("password2")->label(t("Confirm Password"))->id("g-password2") ->matches($group->password); - $group->input("email")->label(t("Email"))->id("gEmail")->value($user->email); - $group->input("url")->label(t("URL"))->id("gUrl")->value($user->url); + $group->input("email")->label(t("Email"))->id("g-email")->value($user->email); + $group->input("url")->label(t("URL"))->id("g-url")->value($user->url); $form->add_rules_from($user); module::event("user_edit_form", $user, $form); @@ -44,19 +44,19 @@ class user_Core { static function get_edit_form_admin($user) { $form = new Forge( - "admin/users/edit_user/$user->id", "", "post", array("id" => "gEditUserForm")); + "admin/users/edit_user/$user->id", "", "post", array("id" => "g-edit-user-form")); $group = $form->group("edit_user")->label(t("Edit User")); - $group->input("name")->label(t("Username"))->id("gUsername")->value($user->name); + $group->input("name")->label(t("Username"))->id("g-username")->value($user->name); $group->inputs["name"]->error_messages( "in_use", t("There is already a user with that username")); - $group->input("full_name")->label(t("Full Name"))->id("gFullName")->value($user->full_name); + $group->input("full_name")->label(t("Full Name"))->id("g-fullname")->value($user->full_name); self::_add_locale_dropdown($group, $user); - $group->password("password")->label(t("Password"))->id("gPassword"); - $group->password("password2")->label(t("Confirm Password"))->id("gPassword2") + $group->password("password")->label(t("Password"))->id("g-password"); + $group->password("password2")->label(t("Confirm Password"))->id("g-password2") ->matches($group->password); - $group->input("email")->label(t("Email"))->id("gEmail")->value($user->email); - $group->input("url")->label(t("URL"))->id("gUrl")->value($user->url); - $group->checkbox("admin")->label(t("Admin"))->id("gAdmin")->checked($user->admin); + $group->input("email")->label(t("Email"))->id("g-email")->value($user->email); + $group->input("url")->label(t("URL"))->id("g-url")->value($user->url); + $group->checkbox("admin")->label(t("Admin"))->id("g-admin")->checked($user->admin); $form->add_rules_from($user); $form->edit_user->password->rules("-required"); @@ -66,19 +66,19 @@ class user_Core { } static function get_add_form_admin() { - $form = new Forge("admin/users/add_user", "", "post", array("id" => "gAddUserForm")); + $form = new Forge("admin/users/add_user", "", "post", array("id" => "g-add-user-form")); $form->set_attr('class', "g-narrow"); $group = $form->group("add_user")->label(t("Add User")); - $group->input("name")->label(t("Username"))->id("gUsername") + $group->input("name")->label(t("Username"))->id("g-username") ->error_messages("in_use", t("There is already a user with that username")); - $group->input("full_name")->label(t("Full Name"))->id("gFullName"); - $group->password("password")->label(t("Password"))->id("gPassword"); - $group->password("password2")->label(t("Confirm Password"))->id("gPassword2") + $group->input("full_name")->label(t("Full Name"))->id("g-fullname"); + $group->password("password")->label(t("Password"))->id("g-password"); + $group->password("password2")->label(t("Confirm Password"))->id("g-password2") ->matches($group->password); - $group->input("email")->label(t("Email"))->id("gEmail"); - $group->input("url")->label(t("URL"))->id("gUrl"); + $group->input("email")->label(t("Email"))->id("g-email"); + $group->input("url")->label(t("URL"))->id("g-url"); self::_add_locale_dropdown($group); - $group->checkbox("admin")->label(t("Admin"))->id("gAdmin"); + $group->checkbox("admin")->label(t("Admin"))->id("g-admin"); $user = ORM::factory("user"); $form->add_rules_from($user); @@ -105,7 +105,7 @@ class user_Core { static function get_delete_form_admin($user) { $form = new Forge("admin/users/delete_user/$user->id", "", "post", - array("id" => "gDeleteUserForm")); + array("id" => "g-delete-user-form")); $group = $form->group("delete_user")->label( t("Are you sure you want to delete user %name?", array("name" => $user->name))); $group->submit("")->value(t("Delete user %name", array("name" => $user->name))); @@ -113,11 +113,11 @@ class user_Core { } static function get_login_form($url) { - $form = new Forge($url, "", "post", array("id" => "gLoginForm")); + $form = new Forge($url, "", "post", array("id" => "g-login-form")); $form->set_attr('class', "g-narrow"); $group = $form->group("login")->label(t("Login")); - $group->input("name")->label(t("Username"))->id("gUsername")->class(null); - $group->password("password")->label(t("Password"))->id("gPassword")->class(null); + $group->input("name")->label(t("Username"))->id("g-username")->class(null); + $group->password("password")->label(t("Password"))->id("g-password")->class(null); $group->inputs["name"]->error_messages("invalid_login", t("Invalid name or password")); $group->submit("")->value(t("Login")); return $form; diff --git a/modules/user/helpers/user_block.php b/modules/user/helpers/user_block.php index e7671f06..f1f8e5eb 100644 --- a/modules/user/helpers/user_block.php +++ b/modules/user/helpers/user_block.php @@ -32,7 +32,7 @@ class user_block_Core { } if (count($locales) > 1) { $block = new Block(); - $block->css_id = "gUserLanguageBlock"; + $block->css_id = "g-userLanguageBlock"; $block->title = t("Language Preference"); $block->content = new View("user_languages_block.html"); $block->content->installed_locales = diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 46bdb65e..28daff29 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -2,12 +2,12 @@ <script type="text/javascript"> var add_user_to_group_url = "<?= url::site("admin/users/add_user_to_group/__USERID__/__GROUPID__?csrf=$csrf") ?>"; $(document).ready(function(){ - $("#gUserAdminList .core-info").draggable({ + $("#g-user-admin-list .core-info").draggable({ helper: "clone" }); - $("#gGroupAdmin .gGroup").droppable({ + $("#g-group-admin .g-group").droppable({ accept: ".core-info", - hoverClass: "gSelected", + hoverClass: "g-selected", drop: function(ev, ui) { var user_id = $(ui.draggable).attr("id").replace("user-", ""); var group_id = $(this).attr("id").replace("group-", ""); @@ -28,7 +28,7 @@ {}, function(data) { $("#group-" + group_id).html(data); - $("#group-" + group_id + " .g-dialogLink").gallery_dialog(); + $("#group-" + group_id + " .g-dialog-link").gallery_dialog(); }); } @@ -41,9 +41,9 @@ }); } </script> -<div class="gBlock"> +<div class="g-block"> <a href="<?= url::site("admin/users/add_user_form") ?>" - class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" + class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new user")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new user") ?> @@ -53,8 +53,8 @@ <?= t("User Admin") ?> </h2> - <div class="gBlockContent"> - <table id="gUserAdminList"> + <div class="g-block-content"> + <table id="g-user-admin-list"> <tr> <th><?= t("Username") ?></th> <th><?= t("Full name") ?></th> @@ -64,8 +64,8 @@ </tr> <? foreach ($users as $i => $user): ?> - <tr id="gUser-<?= $user->id ?>" class="<?= text::alternate("g-odd-row", "g-even-row") ?> user <?= $user->admin ? "admin" : "" ?>"> - <td id="user-<?= $user->id ?>" class="core-info gDraggable"> + <tr id="g-user-<?= $user->id ?>" class="<?= text::alternate("g-odd", "g-even") ?> user <?= $user->admin ? "admin" : "" ?>"> + <td id="user-<?= $user->id ?>" class="core-info g-draggable"> <img src="<?= $user->avatar_url(20, $theme->url("images/avatar.jpg", true)) ?>" title="<?= t("Drag user onto group below to add as a new member")->for_html_attr() ?>" alt="<?= html::clean_attribute($user->name) ?>" @@ -82,14 +82,14 @@ <td> <?= ($user->last_login == 0) ? "" : gallery::date($user->last_login) ?> </td> - <td class="gActions"> + <td class="g-actions"> <a href="<?= url::site("admin/users/edit_user_form/$user->id") ?>" open_text="<?= t("close") ?>" - class="gPanelLink g-button ui-state-default ui-corner-all ui-icon-left"> - <span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?= t("edit") ?></span></a> + class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> + <span class="ui-icon ui-icon-pencil"></span><span class="g-button-text"><?= t("edit") ?></span></a> <? if (user::active()->id != $user->id && !$user->guest): ?> <a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>" - class="g-dialogLink g-button ui-state-default ui-corner-all ui-icon-left"> + class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> <? else: ?> <span title="<?= t("This user cannot be deleted")->for_html_attr() ?>" @@ -103,9 +103,9 @@ </div> </div> -<div id="gGroupAdmin" class="gBlock"> +<div id="g-group-admin" class="g-block"> <a href="<?= url::site("admin/users/add_group_form") ?>" - class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" + class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new group")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new group") ?> @@ -115,10 +115,10 @@ <?= t("Group Admin") ?> </h2> - <div class="gBlockContent"> + <div class="g-block-content"> <ul> <? foreach ($groups as $i => $group): ?> - <li id="group-<?= $group->id ?>" class="gGroup <?= ($group->special ? "gDefaultGroup" : "") ?>" /> + <li id="group-<?= $group->id ?>" class="g-group <?= ($group->special ? "g-default-group" : "") ?>" /> <? $v = new View("admin_users_group.html"); $v->group = $group; ?> <?= $v ?> </li> diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index e5c9fcee..db3645a0 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -4,11 +4,11 @@ <? if (!$group->special): ?> <a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>" title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>" - class="g-dialogLink g-button ui-state-default ui-corner-all"> + class="g-dialog-link g-button ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? else: ?> <a title="<?= t("This default group cannot be deleted")->for_html_attr() ?>" - class="g-dialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> + class="g-dialog-link g-button ui-state-disabled ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? endif ?> </h4> @@ -16,7 +16,7 @@ <? if ($group->users->count() > 0): ?> <ul> <? foreach ($group->users as $i => $user): ?> - <li class="gUser"> + <li class="g-user"> <?= html::clean($user->name) ?> <? if (!$group->special): ?> <a href="javascript:remove_user(<?= $user->id ?>, <?= $group->id ?>)" diff --git a/modules/user/views/login.html.php b/modules/user/views/login.html.php index c814bbfa..65eaab8c 100644 --- a/modules/user/views/login.html.php +++ b/modules/user/views/login.html.php @@ -1,22 +1,22 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<ul id="gLoginMenu"> +<ul id="g-login-menu"> <? if ($user->guest): ?> <li class="first"> <a href="<?= url::site("login/ajax") ?>" title="<?= t("Login to Gallery")->for_html_attr() ?>" - id="gLoginLink"><?= t("Login") ?></a> + id="g-login-link"><?= t("Login") ?></a> </li> <? else: ?> <li class="first"> <?= t('Logged in as %name', array('name' => html::mark_clean( '<a href="' . url::site("form/edit/users/{$user->id}") . '" title="' . t("Edit Your Profile")->for_html_attr() . - '" id="gUserProfileLink" class="g-dialogLink">' . + '" id="g-user-profile-link" class="g-dialog-link">' . html::clean($user->display_name()) . '</a>'))) ?> </li> <li> <a href="<?= url::site("logout?csrf=$csrf&continue=" . urlencode(url::current(true))) ?>" - id="gLogoutLink"><?= t("Logout") ?></a> + id="g-logoutLink"><?= t("Logout") ?></a> </li> <? endif ?> </ul> diff --git a/modules/user/views/user_languages_block.html.php b/modules/user/views/user_languages_block.html.php index b5ae674c..89185967 100644 --- a/modules/user/views/user_languages_block.html.php +++ b/modules/user/views/user_languages_block.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<?= form::dropdown("gSelectSessionLocale", $installed_locales, $selected) ?> +<?= form::dropdown("g-select-session-locale", $installed_locales, $selected) ?> <script type="text/javascript"> - $("#gSelectSessionLocale").change(function() { + $("#g-select-session-locale").change(function() { var old_locale_preference = <?= html::js_string($selected) ?>; var locale = $(this).val(); if (old_locale_preference == locale) { diff --git a/modules/watermark/helpers/watermark.php b/modules/watermark/helpers/watermark.php index 170ee64c..60d5cb5d 100644 --- a/modules/watermark/helpers/watermark.php +++ b/modules/watermark/helpers/watermark.php @@ -23,7 +23,7 @@ class watermark_Core { $range[$i] = "$i%"; } - $form = new Forge("admin/watermarks/add", "", "post", array("id" => "gAddWatermarkForm")); + $form = new Forge("admin/watermarks/add", "", "post", array("id" => "g-add-watermark-form")); $group = $form->group("add_watermark")->label(t("Upload Watermark")); $group->upload("file")->label(t("Watermark"))->rules("allow[jpg,png,gif]|size[1MB]|required"); $group->dropdown("position")->label(t("Watermark Position")) @@ -41,7 +41,7 @@ class watermark_Core { $range[$i] = "$i%"; } - $form = new Forge("admin/watermarks/edit", "", "post", array("id" => "gEditWatermarkForm")); + $form = new Forge("admin/watermarks/edit", "", "post", array("id" => "g-edit-watermark-form")); $group = $form->group("edit_watermark")->label(t("Edit Watermark")); $group->dropdown("position")->label(t("Watermark Position")) ->options(self::positions()) @@ -54,7 +54,7 @@ class watermark_Core { } static function get_delete_form() { - $form = new Forge("admin/watermarks/delete", "", "post", array("id" => "gDeleteWatermarkForm")); + $form = new Forge("admin/watermarks/delete", "", "post", array("id" => "g-delete-watermark-form")); $group = $form->group("delete_watermark")->label(t("Really delete Watermark?")); $group->submit("")->value(t("Delete")); return $form; diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index 285f6407..d034066a 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="#gWatermarks"> +<div id="#g-watermarks"> <h1> <?= t("Watermarks") ?> </h1> <p> <?= t("You can have one watermark for your Gallery. This watermark will be applied to all thumbnails and resized images, but it will not be applied to your full size images. To make sure that your guests can only see watermarked images, you should restrict access to your full size images.") ?> @@ -8,7 +8,7 @@ <? if (empty($name)): ?> <a href="<?= url::site("admin/watermarks/form_add") ?>" title="<?= t("Upload a watermark")->for_html_attr() ?>" - class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> <? else: ?> <h2> <?= t("Active Watermark") ?> </h2> <p> @@ -27,10 +27,10 @@ <div class="controls"> <a href="<?= url::site("admin/watermarks/form_edit") ?>" title="<?= t("Edit Watermark")->for_html_attr() ?>" - class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> <a href="<?= url::site("admin/watermarks/form_delete") ?>" title="<?= t("Delete Watermark")->for_html_attr() ?>" - class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> </div> </div> <? endif ?> diff --git a/themes/admin_wind/css/fix-ie.css b/themes/admin_wind/css/fix-ie.css index 6bc2334c..708ac782 100644 --- a/themes/admin_wind/css/fix-ie.css +++ b/themes/admin_wind/css/fix-ie.css @@ -2,17 +2,17 @@ * Fix display in IE 6 and 7 */ -#gHeader, -#gGroupAdmin, -#gDeveloperTools, -.gAvailable .gBlock { +#g-header, +#g-group-admin, +#g-developer-tools, +.g-available .g-block { zoom: 1; } -.gUnavailable { +.g-unavailable { filter: alpha(opacity=40); } -.gUnavailable:hover { +.g-unavailable:hover { filter: alpha(opacity=100); } diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 61161967..f23472b8 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -39,11 +39,11 @@ h1 { font-size: 1.7em; } -#gSearchResults h1 { +#g-search-results h1 { margin-bottom: 1em; } -#gProgress h1 { +#g-progress h1 { font-size: 1.1em; } @@ -51,11 +51,11 @@ h2 { font-size: 1.4em; } -#gSidebar .gBlock h2 { +#g-sidebar .g-block h2 { font-size: 1.2em; } -#gSidebar .gBlock li { +#g-sidebar .g-block li { margin-bottom: .6em; } @@ -66,7 +66,7 @@ h3 { /* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ a, -.gMenu a, +.g-menu a, #g-dialog a, .g-button, .g-button:hover, @@ -84,7 +84,7 @@ a:hover, text-decoration: underline; } -.gMenu a:hover { +.g-menu a:hover { text-decoration: none; } @@ -94,7 +94,7 @@ table { width: 100%; } -#gContent table { +#g-content table { margin: 1em 0 3em 0; } @@ -111,7 +111,7 @@ td { vertical-align: top; } -#gAdminMaintenance td { +#g-admin-maintenance td { vertical-align: middle; } @@ -122,9 +122,9 @@ fieldset { padding-bottom: .8em; } -#gHeader fieldset, -#gSidebar fieldset, -.gShortForm fieldset { +#g-header fieldset, +#g-sidebar fieldset, +.g-short-form fieldset { border: none; } @@ -133,11 +133,11 @@ legend { margin-left: 1em; } -#gHeader legend, -#gSidebar legend, -#gContent #gSearchForm legend, +#g-header legend, +#g-sidebar legend, +#g-content #g-search-form legend, input[type="hidden"], -.gShortForm label { +.g-short-form label { display: none; } @@ -203,23 +203,18 @@ input[type="reset"] { /* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */ -.gValidationRule { - font-size: 80%; - margin-top: .5em; -} - -form.gError input[type="text"], -li.gError input[type="text"], -form.gError input[type="password"], -li.gError input[type="password"], -form.gError input[type="checkbox"], -li.gError input[type="checkbox"], -form.gError input[type="radio"], -li.gError input[type="radio"], -form.gError textarea, -li.gError textarea, -form.gError select, -li.gError select { +form.g-error input[type="text"], +li.g-error input[type="text"], +form.g-error input[type="password"], +li.g-error input[type="password"], +form.g-error input[type="checkbox"], +li.g-error input[type="checkbox"], +form.g-error input[type="radio"], +li.g-error input[type="radio"], +form.g-error textarea, +li.g-error textarea, +form.g-error select, +li.g-error select { border: 2px solid red; } @@ -227,7 +222,7 @@ li.gError select { * 3) Reusable content blocks *********************************************************************/ -.gBlock { +.g-block { background-color: #fff; border: 1px solid #ccc; clear: both; @@ -235,138 +230,138 @@ li.gError select { padding: 1em; } -#gSidebar .gBlockContent { +#g-sidebar .g-block-content { padding: 0; } -.gBlock h2 { +.g-block h2 { background-color: #e8e8e8; padding: .3em .8em; } -.gBlockContent { +.g-block-content { margin-top: 1em; } -.gSelected img, -.gAvailable .gBlock img { +.g-selected img, +.g-available .g-block img { float: left; margin: 0 1em 1em 0; } -.rtl .gSelected img, -.rtl .gAvailable .gBlock img { +.rtl .g-selected img, +.rtl .g-available .g-block img { float: right; } -.gSelected { +.g-selected { background: #e8e8e8; } -.gAvailable .gInstalledToolkit:hover { +.g-available .g-installed-toolkit:hover { cursor: pointer; background: #eee; } -.gAvailable .g-button { +.g-available .g-button { width: 96%; } -.gSelected .g-button { +.g-selected .g-button { display: none; } -.gUnavailable { +.g-unavailable { border-color: #999; opacity: 0.4; } /* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ -#gMessage { +#g-action-status { width: 100%; } -#gSiteStatus li, -#gMessage li, -.gModuleStatus { +#g-site-status li, +#g-action-status li, +.g-module-status { border: 1px solid #ccc; margin-bottom: .4em; } -#gSiteStatus li { +#g-site-status li { margin-bottom: 0; border: none; border-bottom: 1px solid #ccc; } -.gModuleStatus { +.g-module-status { clear: both; margin-bottom: 1em; } -.gError, -.gInfo, -.gSuccess, -.gWarning { +.g-error, +.g-info, +.g-success, +.g-warning { padding: .4em .5em .4em 30px; } -.gError, tr.gError td.gError { +.g-error, tr.g-error td.g-error { background: #f6cbca url('../../../lib/images/ico-error.png') no-repeat .4em 50%; } -.gInfo { +.g-info { background: #e8e8e8 url('../../../lib/images/ico-info.png') no-repeat .4em 50%; } -.gSuccess { +.g-success { background: #d9efc2 url('../../../lib/images/ico-success.png') no-repeat .4em 50%; } -.gWarning, tr.gWarning td.gWarning { +.g-warning, tr.g-warning td.g-warning { background: #fcf9ce url('../../../lib/images/ico-warning.png') no-repeat .4em 50%; } -.gPager .gInfo, -tr.gError, -tr.gInfo, -tr.gSuccess, -tr.gWarning { +.g-pager .g-info, +tr.g-error, +tr.g-info, +tr.g-success, +tr.g-warning { background: none; } -.gInfo td.gInfo { +.g-info td.g-info { background-color: transparent; } -.gSuccess td.gSuccess { +.g-success td.g-success { background-color: transparent; } -.gError td { +.g-error td { background-color: #f6cbca; } -.gWarning td { +.g-warning td { background-color: #fcf9ce; } -.gModuleStatus.gInfo, -#gLogEntries .gInfo, -.gModuleStatus.gSuccess, -#gLogEntries .gSuccess { +.g-module-status.g-info, +#g-log-entries .g-info, +.g-module-status.g-success, +#g-log-entries .g-success { background-color: #fff; } /* Inline layout (forms, lists) ~~~~~~~~~~ */ -.gShortForm li { +.g-short-form li { float: left; padding: .4em 0; } -.gShortForm input[type="text"] { +.g-short-form input[type="text"] { color: #666; padding: .3em .6em; width: 11em; @@ -378,7 +373,7 @@ tr.gWarning { /* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ -.gView { +.g-view { background-color: #fff; border: 1px solid #ccc; border-bottom: none; @@ -387,7 +382,7 @@ tr.gWarning { /* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader { +#g-header { background-color: #e8e8e8; border-bottom: 1px solid #ccc; font-size: .8em; @@ -396,20 +391,20 @@ tr.gWarning { position: relative; } -#gContent { +#g-content { font-size: 1.1em; padding-left: 20px; width: 96%; } -#gSidebar { +#g-sidebar { background-color: #fff; font-size: .9em; padding: 0 20px; width: 220px; } -#gFooter { +#g-footer { background-color: #e8e8e8; border-top: 1px solid #ccc; font-size: .8em; @@ -423,7 +418,7 @@ tr.gWarning { /* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader #gLogo { +#g-header #g-logo { background: transparent url('../../../lib/images/logo.png') no-repeat 0 .5em; color: #A5A5A5 !important; display: block; @@ -432,63 +427,63 @@ tr.gWarning { width: 105px; } -#gHeader #gLogo:hover { +#g-header #g-logo:hover { color: #f60 !important; text-decoration: none; } -#gHeader #gQuickSearchForm { +#g-header #g-quick-search-form { clear: right; float: right; margin: 1em 0; } -#gHeader #gQuickSearchForm input[type='text'] { +#g-header #g-quick-search-form input[type='text'] { width: 17em; } -#gContent .gBlock h2 { +#g-content .g-block h2 { background-color: transparent; padding-left: 0; } -#gSidebar .gBlockContent { +#g-sidebar .g-block-content { padding-left: 1em; } /* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader #gLoginMenu li, -#gFooter #gCredits li { +#g-header #g-login-menu li, +#g-footer #g-credits li { display: inline; } -#gHeader #gLoginMenu li { +#g-header #g-login-menu li { padding-left: 1.2em; } -#gFooter #gCredits li { +#g-footer #g-credits li { padding-right: 1.2em; } -#gContent #gSearchResults { +#g-content #g-search-results { margin-top: 1em; padding-top: 1em; } -.gBlock .ui-dialog-titlebar { +.g-block .ui-dialog-titlebar { margin: -1em -1em 0; } -#gSidebar .gBlock h2 { +#g-sidebar .g-block h2 { background: none; } -#gPhotoStream { +#g-photo-stream { background-color: #e8e8e8; } -#gPhotoStream .gBlockContent ul { +#g-photo-stream .g-block-content ul { border-right: 1px solid #e8e8e8; height: 135px; overflow: auto; @@ -497,7 +492,7 @@ tr.gWarning { overflow-y: hidden; /* Hide vertical*/ } -#gContent #gPhotoStream .gItem { +#g-content #g-photo-stream .g-item { background-color: #fff; border: 1px solid #e8e8e8; border-right-color: #ccc; @@ -509,15 +504,15 @@ tr.gWarning { width: 90px; } -.rtl #gContent #gPhotoStream .gItem { +.rtl #g-content #g-photo-stream .g-item { float: right; } -#gSiteStatus { +#g-site-status { margin-bottom: 0; } -#gContent .gItem { +#g-content .g-item { background-color: #fff; border: 1px solid #e8e8e8; border-right-color: #ccc; @@ -528,65 +523,65 @@ tr.gWarning { width: 90px; } -#gAdminCommentsMenu { +#g-admin-comments-menu { margin: 1em 0; } -#gAdminCommentsMenu a { +#g-admin-comments-menu a { margin: 0; padding: .2em .6em; } -#gAdminGraphics .gAvailable .gBlock { +#g-admin-graphics .g-available .g-block { clear: none; float: left; margin-right: 1em; width: 30%; } -.rtl #gAdminGraphics .gAvailable .gBlock { +.rtl #g-admin-graphics .g-available .g-block { float: right; margin-left: 1em; margin-right: 0em; } -#gSiteTheme, -#gAdminTheme { +#g-site-theme, +#g-admin-theme { float: left; width: 48%; } -.rtl #gSiteTheme, -.rtl #gAdminTheme { +.rtl #g-site-theme, +.rtl #g-admin-theme { float: right; } -#gSiteTheme { +#g-site-theme { margin-right: 1em; } -#gUserAdminList { +#g-user-admin-list { margin-bottom: 1em; } -#gUserAdminList td { +#g-user-admin-list td { vertical-align: bottom; } -#gUserAdminList .gDraggable:hover { +#g-user-admin-list .g-draggable:hover { border: 1px dashed black; } -#gUserAdminList .admin { +#g-user-admin-list .admin { color: #55f; font-weight: bold; } -.gActions a, -.gActions span { +.g-actions a, +.g-actions span { margin-right: 3em; } -li.gGroup { +li.g-group { float: left; display: block; width: 200px; @@ -595,65 +590,65 @@ li.gGroup { margin: 0 1em 1em 0; } -.rtl li.gGroup { +.rtl li.g-group { float: right; } -li.gGroup h4 { +li.g-group h4 { background-color: #eee; border-bottom: 1px dashed #ccc; padding: .5em 0 .5em .5em; } -li.gGroup .g-button { +li.g-group .g-button { padding: 0; } -li.gGroup ul, li.gGroup div { +li.g-group ul, li.g-group div { height: 180px; margin: 1px; overflow: auto; padding-top: .2em; } -li.gGroup div p { +li.g-group div p { color: gray; text-align: center; padding: 2em .5em 0 .5em } -li.gGroup .gUser { +li.g-group .g-user { padding: .2em 0 0 .5em; } -li.gGroup .gUser .g-button { +li.g-group .g-user .g-button { vertical-align: middle; } -li.gDefaultGroup h4, li.gDefaultGroup .gUser { +li.g-default-group h4, li.g-default-group .g-user { color: gray; } -#gAdminAdvancedSettings tr.setting:hover { +#g-admin-advanced-settings tr.setting:hover { background: #ffc; } /* admin/sidebar ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.gAdminBlocksList { +.g-admin-blocks-list { float: left; height: 300px; margin-left: 20px; width: 30%; } -.gAdminBlocksList div:last-child { +.g-admin-blocks-list div:last-child { border: .1em solid; height: 100%; overflow-y: auto; } -.gAdminBlocksList ul { +.g-admin-blocks-list ul { height: 98%; margin: .1em .1em; padding: .1em; } -.gAdminBlocksList ul li { +.g-admin-blocks-list ul li { background-color: #e8e8e8; font-size: 1em; font-weight: bold; @@ -666,27 +661,27 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { * 5) Navigation and menus *********************************************************************/ -#gSiteAdminMenu, -#gTagCloud ul { +#g-site-admin-menu, +#g-tag-cloud ul { font-size: 1.2em; } /* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader #gLoginMenu { +#g-header #g-login-menu { color: #999; float: right; margin: 0; padding: 5px 0; } -.rtl #gHeader #gLoginMenu { +.rtl #g-header #g-login-menu { text-align: left; } /* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gSiteAdminMenu { +#g-site-admin-menu { bottom: 0; display: none; font-size: 1.2em; @@ -694,44 +689,24 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { position: absolute; } -#gSiteAdminMenu ul { +#g-site-admin-menu ul { margin-bottom: 0; } -/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.gPager { - clear: both; - margin: 0; - padding: 5px 0 !important; - width: 100%; -} - -.gPager li { - float: left; - margin: 0; - width: 30%; -} - -.gPager .gInfo { - text-align: center; - width: 40%; -} - /** ******************************************************************* * 6) Browser hacks *********************************************************************/ -#gSiteAdminMenu:after, -#gHeader:after, -#gAdminCommentsMenu:after, -#gGroupAdmin:after, -.gSelected:after, -.gAvailable .gBlock:after, -#gModuleCreateForm ul li ul:after, -#gDeveloperTools:after, -#gPhotoStream:after, -#gViewMenu:after { +#g-site-admin-menu:after, +#g-header:after, +#g-admin-comments-menu:after, +#g-group-admin:after, +.g-selected:after, +.g-available .g-block:after, +#g-module-create-form ul li ul:after, +#g-developer-tools:after, +#g-photo-stream:after, +#g-view-menu:after { clear: both; content: "."; display: block; @@ -755,26 +730,22 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { /* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ -.gLoadingLarge { - background: #e8e8e8 url('../../../lib/images/loading-large.gif') no-repeat center center; - font-size: 0; -} - -.g-dialogLoadingLarge { +.g-loading-large, +.g-dialog-loading-large { background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; font-size: 0; } -.gLoadingSmall { +.g-loading-small { background: #e8e8e8 url('../../../lib/images/loading-small.gif') no-repeat center center; font-size: 0; } -.gDraggable { +.g-draggable { cursor: move; } -.gDropTarget { +.g-drop-target { background-color: #cfdeff; border: 1px dotted #999; height: 100px; @@ -783,16 +754,16 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { /* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ -#gPanel { +#g-panel { display: none; padding: 1em; } -#gPanel legend { +#g-panel legend { display: none; } -#gPanel fieldset { +#g-panel fieldset { border: none; } @@ -800,12 +771,12 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { cursor: move; } -.gButtonSetVertical a { +.g-buttonset-vertical a { width: 8em !important; } -#gAdminDashboard .ui-dialog-titlebar, -#gAdminDashboardSidebar .ui-dialog-titlebar { +#g-admin-dashboard .ui-dialog-titlebar, +#g-admin-dashboard-sidebar .ui-dialog-titlebar { padding: .2em .4em; } @@ -816,15 +787,15 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { /* jQuery UI ThemeRoller buttons */ -.gButtonSet { +.g-buttonset { padding-left: 1px; } -.gButtonSet li { +.g-buttonset li { float: left; } -.gButtonSet .g-button { +.g-buttonset .g-button { margin: 0; } @@ -848,169 +819,169 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { /*************** STUFF THAT NEEDS A HOME ****************/ -#gMove ul { +#g-move ul { padding-left: 1em; } -#gMove .selected { +#g-move .selected { background: #999; } -.gProgressBar { +.g-progress-bar { height: 1em; width: 100%; margin-top: .5em; display: inline-block; } -#gAddPhotos p { +#g-add-photos p { margin: 0; padding: 0; } -#gAddPhotosCanvas { +#g-add-photos-canvas { height: 325px; width: 450px; overflow: auto; } -#gAddPhotosQueue .progressbar { +#g-add-photos-queue .progressbar { height: 4px; } -#gAddPhotosQueue .title { +#g-add-photos-queue .title { font-size: 1.25em; } -#gAddPhotosQueue .status { +#g-add-photos-queue .status { font-size: .75em; } -#gAddPhotosQueue .box { +#g-add-photos-queue .box { margin-bottom: 8px; padding: 4px; } -#gAddPhotosQueue .pending { +#g-add-photos-queue .pending { background-color: #e8e8e8; border: 1px solid #d7d7d7; } -#gAddPhotosQueue .error { +#g-add-photos-queue .error { background-color: #fcc; border: 1px solid #ebb; } -#gAddPhotosQueue .uploading { +#g-add-photos-queue .uploading { background-color: #ff9; border: 1px solid #ee8; } -#gAddPhotosQueue .complete { +#g-add-photos-queue .complete { background-color: #cfc; border: 1px solid #beb; } -#gAdminG2ImportNotes { +#g-admin-g2-import-notes { padding-bottom: 20px; } -#gAdminG2ImportDetails { +#g-admin-g2-import-details { padding-top: 20px; } -#gAdminG2ImportDetails .gWarning { +#g-admin-g2-import-details .g-warning { margin-top: 4px; } -#gAdminG2ImportDetails .gInfo { +#g-admin-g2-import-details .g-info { padding: 2px; border: 1px solid #999; margin-bottom: 10px; } -#gAdminG2ImportNotes p, -#gAdminG2ImportDetails .gInfo p { +#g-admin-g2-import-notes p, +#g-admin-g2-import-details .g-info p { padding: 0; margin: 0; } -#gAdminG2ImportNotes ul li, -#gAdminG2Import .gInfo ul li { +#g-admin-g2-import-notes ul li, +#g-admin-g2-import .g-info ul li { padding-left: 0; margin-left: 20px; list-style-type: disc; } -#gTagAdmin { +#g-tag-admin { table-layout: fixed; } -#gTagAdmin td { +#g-tag-admin td { border: 0; } -#gTagAdmin ul { +#g-tag-admin ul { padding-bottom: .3em; } -#gTagAdmin li { +#g-tag-admin li { padding: .1em 0 .2em .3em; } -#gTagAdmin .gColumn { +#g-tag-admin .g-column { float: left; width: 200px; } -.rtl #gTagAdmin .gColumn { +.rtl #g-tag-admin .g-column { float: right; } -.gEditable { +.g-editable { padding: .1em .3em .2em .3em; } -.gEditable:hover { +.g-editable:hover { background-color: #ffc; cursor: text; } -#gRenameTagForm input { +#g-rename-tag-form input { padding: 0 .2em 0 .2em; clear: none; float: left; margin: 0 .2em 0 0; } -.rtl #gRenameTagForm input { +.rtl #g-rename-tag-form input { float: right; } -#gRenameTagForm input[type="text"].gError { +#g-rename-tag-form input[type="text"].g-error { border: 2px solid red; background: none; } -#gRenameTagForm input[type="submit"] { +#g-rename-tag-form input[type="submit"] { height: 25px; } -#gRenameTagForm a, #gRenameTagForm span { +#g-rename-tag-form a, #g-rename-tag-form span { display: block; float: left; padding: .2em .2em 0 .1em; } -.rtl #gRenameTagForm a, #gRenameTagForm span { +.rtl #g-rename-tag-form a, #g-rename-tag-form span { float: right; } -#gTaskLog-dialog h1 { +#g-task-log-dialog h1 { font-size: 1.1em; } -.gTaskLog { +.g-task-log { border: 1pt solid; font-size: .9em; height: 400px; @@ -1019,69 +990,69 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { padding: .5em } -#gServerAddAdmin { +#g-server-add-admin { margin:auto; text-align: left; } -.rtl #gServerAddAdmin { +.rtl #g-server-add-admin { text-align: right; } -#gServerAddAdmin form fieldset { +#g-server-add-admin form fieldset { border: medium none; } -#gServerAddAdmin legend { +#g-server-add-admin legend { display: none; } -#gServerAddAdmin .gWarning { +#g-server-add-admin .g-warning { background-color: #FFFF99; } -#gAuthorizedPath { +#g-authorized-path { margin: 0 !important; padding: 0.3em 1.5em 0.3em 1em; } -#gServerAdd Admin #path { +#g-server-add-admin #path { width: 80%; } -.gRemoveDir:hover { +.g-remove-dir:hover { cursor: pointer; } -#gLanguagesForm table { +g-languages-form table { width: 400px; float: left; margin: 0 3em 1em 0; } -#gLanguagesForm .installed { +g-languages-form .installed { background-color: #EEEEEE; } -#gLanguagesForm .default { +g-languages-form .default { background-color: #C5DBEC; font-weight: bold; } -#gLanguagesForm input { +g-languages-form input { clear: both; } -#gTranslations { +#g-translations { padding: 2em 0 0 0; clear: both; } -#gTranslations .g-button { +#g-translations .g-button { padding: .5em; } -.gDocLink { +.g-doc-link { float: right; } @@ -1101,9 +1072,9 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { text-align: left; } -.rtl #gHeader #gQuickSearchForm, -.rtl #gForgotPasswordLink, -.rtl #gHeader #gLoginMenu, +.rtl #g-header #g-quick-search-form, +.rtl #g-reset-password, +.rtl #g-header #g-login-menu, .rtl .ui-icon-right .ui-icon { clear: left; float: left; @@ -1113,11 +1084,11 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], -.rtl .gShortForm li, -.rtl #gContent #gAlbumGrid .gItem, -.rtl #gSiteAdminMenu, -.rtl .gPager li, -.rtl .gButtonSet li, +.rtl .g-short-form li, +.rtl #g-content #g-album-grid .g-item, +.rtl #g-site-admin-menu, +.rtl .g-pager li, +.rtl .g-buttonset li, .rtl .ui-icon-left .ui-icon { float: right; } diff --git a/themes/admin_wind/images/avatar.jpg b/themes/admin_wind/images/avatar.jpg deleted file mode 100644 index 2e76b12b..00000000 Binary files a/themes/admin_wind/images/avatar.jpg and /dev/null differ diff --git a/themes/admin_wind/images/ico-album.png b/themes/admin_wind/images/ico-album.png deleted file mode 100644 index affa1b84..00000000 Binary files a/themes/admin_wind/images/ico-album.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-print.png b/themes/admin_wind/images/ico-print.png deleted file mode 100644 index b82a8e1e..00000000 Binary files a/themes/admin_wind/images/ico-print.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-separator.gif b/themes/admin_wind/images/ico-separator.gif deleted file mode 100644 index 3de2d0d3..00000000 Binary files a/themes/admin_wind/images/ico-separator.gif and /dev/null differ diff --git a/themes/admin_wind/images/ico-view-comments.png b/themes/admin_wind/images/ico-view-comments.png deleted file mode 100644 index e5d3630f..00000000 Binary files a/themes/admin_wind/images/ico-view-comments.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-view-fullsize.png b/themes/admin_wind/images/ico-view-fullsize.png deleted file mode 100644 index 0be23e9b..00000000 Binary files a/themes/admin_wind/images/ico-view-fullsize.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-view-hybrid.png b/themes/admin_wind/images/ico-view-hybrid.png deleted file mode 100644 index ee902e55..00000000 Binary files a/themes/admin_wind/images/ico-view-hybrid.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-view-slideshow.png b/themes/admin_wind/images/ico-view-slideshow.png deleted file mode 100644 index 82f61f63..00000000 Binary files a/themes/admin_wind/images/ico-view-slideshow.png and /dev/null differ diff --git a/themes/admin_wind/js/ui.init.js b/themes/admin_wind/js/ui.init.js index a603f87f..8d34241f 100644 --- a/themes/admin_wind/js/ui.init.js +++ b/themes/admin_wind/js/ui.init.js @@ -1,7 +1,7 @@ $(document).ready(function(){ // Initialize Superfish menus - $("#gSiteAdminMenu ul.gMenu").addClass("sf-menu"); - $("ul.gMenu").addClass("sf-menu"); + $("#g-site-admin-menu ul.g-menu").addClass("sf-menu"); + $("ul.g-menu").addClass("sf-menu"); $("ul.sf-menu").superfish({ delay: 500, animation: { @@ -11,41 +11,41 @@ $(document).ready(function(){ pathClass: "current", speed: "fast" }); - $("#gSiteAdminMenu").css("display", "block"); + $("#g-site-admin-menu").css("display", "block"); // Initialize status message effects - $("#gMessage li").gallery_show_message(); + $("#g-action-status li").gallery_show_message(); // Initialize modal dialogs - $(".g-dialogLink").gallery_dialog(); + $(".g-dialog-link").gallery_dialog(); // Initialize ajax links - $(".gAjaxLink").gallery_ajax(); + $(".g-ajax-link").gallery_ajax(); // Initialize panels - $(".gPanelLink").gallery_panel(); + $(".g-panel-link").gallery_panel(); - if ($("#gPhotoStream").length) { + if ($("#g-photo-stream").length) { // Vertically align thumbs in photostream - $(".gItem").gallery_valign(); + $(".g-item").gallery_valign(); } // Apply jQuery UI button css to submit inputs - $("input[type=submit]:not(.gShortForm input)").addClass("ui-state-default ui-corner-all"); + $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); // Round view menu buttons - if ($("#gAdminCommentsMenu").length) { - $("#gAdminCommentsMenu ul").removeClass("gMenu").removeClass("sf-menu"); - $("#gAdminCommentsMenu").addClass("gButtonSet"); - $("#gAdminCommentsMenu a").addClass("g-button ui-state-default"); - $("#gAdminCommentsMenu ul li:first a").addClass("ui-corner-left"); - $("#gAdminCommentsMenu ul li:last a").addClass("ui-corner-right"); + if ($("#g-admin-comments-menu").length) { + $("#g-admin-comments-menu ul").removeClass("g-menu").removeClass("sf-menu"); + $("#g-admin-comments-menu").addClass("g-buttonset"); + $("#g-admin-comments-menu a").addClass("g-button ui-state-default"); + $("#g-admin-comments-menu ul li:first a").addClass("ui-corner-left"); + $("#g-admin-comments-menu ul li:last a").addClass("ui-corner-right"); } // Round corners - $(".gSelected").addClass("ui-corner-all"); - $(".gAvailable .gBlock").addClass("ui-corner-all"); - $(".gUnavailable").addClass("ui-corner-all"); + $(".g-selected").addClass("ui-corner-all"); + $(".g-available .g-block").addClass("ui-corner-all"); + $(".g-unavailable").addClass("ui-corner-all"); // Add hover state for buttons $(".ui-state-default").hover( diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index b18f010a..5b2d41ad 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -36,21 +36,21 @@ <body <?= $theme->body_attributes() ?>> <?= $theme->admin_page_top() ?> <? if ($sidebar): ?> - <div id="doc3" class="yui-t5 gView"> + <div id="doc3" class="yui-t5 g-view"> <? else: ?> - <div id="doc3" class="yui-t7 gView"> + <div id="doc3" class="yui-t7 g-view"> <? endif; ?> <?= $theme->site_status() ?> - <div id="gHeader"> + <div id="g-header"> <?= $theme->admin_header_top() ?> - <ul id="gLoginMenu"> + <ul id="g-login-menu"> <li class="first"><?= html::anchor(item::root()->abs_url(), "← ".t("Back to the Gallery")) ?></li> - <li id="gLogoutLink"><a href="<?= url::site("logout?csrf=$csrf&continue=" . urlencode(item::root()->url())) ?>"><?= t("Logout") ?></a></li> + <li id="g-logoutLink"><a href="<?= url::site("logout?csrf=$csrf&continue=" . urlencode(item::root()->url())) ?>"><?= t("Logout") ?></a></li> </ul> - <a id="gLogo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery")->for_html_attr() ?>"> + <a id="g-logo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery")->for_html_attr() ?>"> ← <?= t("back to the ...") ?> </a> - <div id="gSiteAdminMenu" style="display: none;"> + <div id="g-site-admin-menu" style="display: none;"> <?= $theme->admin_menu() ?> </div> <?= $theme->admin_header_bottom() ?> @@ -58,19 +58,19 @@ <div id="bd"> <div id="yui-main"> <div class="yui-b"> - <div id="gContent" class="yui-g"> + <div id="g-content" class="yui-g"> <?= $theme->messages() ?> <?= $content ?> </div> </div> </div> <? if ($sidebar): ?> - <div id="gSidebar" class="yui-b"> + <div id="g-sidebar" class="yui-b"> <?= $sidebar ?> </div> <? endif ?> </div> - <div id="gFooter"> + <div id="g-footer"> <?= $theme->admin_footer() ?> <div> <?= $theme->admin_credits() ?> diff --git a/themes/admin_wind/views/block.html.php b/themes/admin_wind/views/block.html.php index 6cbea76e..d1d2d088 100644 --- a/themes/admin_wind/views/block.html.php +++ b/themes/admin_wind/views/block.html.php @@ -2,9 +2,9 @@ <? if ($anchor): ?> <a name="<?= $anchor ?>"></a> <? endif ?> -<div block_id="<?= $id ?>" id="<?= $css_id ?>" class="gBlock ui-widget"> +<div block_id="<?= $id ?>" id="<?= $css_id ?>" class="g-block ui-widget"> <div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-icon-right"> - <? if ($css_id != "gBlockAdder"): ?> + <? if ($css_id != "g-block-adder"): ?> <a href="<?= url::site("admin/dashboard/remove_block/$id?csrf=$csrf") ?>" class="ui-dialog-titlebar-close ui-corner-all"> <span class="ui-icon ui-icon-closethick">remove</span> @@ -12,7 +12,7 @@ <? endif ?> <?= $title ?> </div> - <div class="gBlockContent"> + <div class="g-block-content"> <?= $content ?> </div> </div> diff --git a/themes/admin_wind/views/pager.html.php b/themes/admin_wind/views/pager.html.php index 29b9f9d0..555a4950 100644 --- a/themes/admin_wind/views/pager.html.php +++ b/themes/admin_wind/views/pager.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // See http://docs.kohanaphp.com/libraries/pagination ?> -<ul class="gPager"> +<ul class="g-pager"> <? /* @todo This message isn't easily localizable */ $from_to_msg = t2("Item %from_number of %count", "Items %from_number - %to_number of %count", @@ -24,7 +24,7 @@ <span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a> <? endif ?> </li> - <li class="gInfo"><?= $from_to_msg ?></li> + <li class="g-info"><?= $from_to_msg ?></li> <li class="g-txt-right"> <? if ($next_page): ?> <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> diff --git a/themes/wind/css/fix-ie.css b/themes/wind/css/fix-ie.css index 8899ec59..d6405c36 100644 --- a/themes/wind/css/fix-ie.css +++ b/themes/wind/css/fix-ie.css @@ -2,15 +2,15 @@ * Fix display in IE 6, 7 */ -#gBanner, -.gBreadcrumbs, -#gAlbumGrid, -#gPager, -#gViewMenu { +#g-banner, +.g-breadcrumbs, +#g-album-grid, +#g-pager, +#g-view-menu { zoom: 1; } -#gBanner { +#g-banner { z-index: 2; } @@ -19,7 +19,7 @@ input.submit { display: inline !important; } -#gAddTagForm input.textbox { +#g-add-tag-form input.textbox { width: 110px; } @@ -28,10 +28,10 @@ input.submit { float: none !important; } -.gPager .g-txt-right { +.g-pager .g-txt-right { width: 29%; } -.gPager .ui-icon-right { +.g-pager .ui-icon-right { width: 60px; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index ec75d310..dac6a899 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -39,11 +39,11 @@ h1 { font-size: 1.7em; } -#gSearchResults h1 { +#g-search-results h1 { margin-bottom: 1em; } -#gProgress h1 { +#g-progress h1 { font-size: 1.1em; } @@ -51,11 +51,11 @@ h2 { font-size: 1.4em; } -#gSidebar .gBlock h2 { +#g-sidebar .g-block h2 { font-size: 1.2em; } -#gSidebar .gBlock li { +#g-sidebar .g-block li { margin-bottom: .6em; } @@ -66,7 +66,7 @@ h3 { /* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ a, -.gMenu a, +.g-menu a, #g-dialog a, .g-button, .g-button:hover, @@ -85,11 +85,11 @@ a:hover, text-decoration: underline; } -.gMenu a:hover { +.g-menu a:hover { text-decoration: none; } -#g-dialog #gMessage li { +#g-dialog #g-action-status li { width: 400px; white-space: normal; padding-left: 32px; @@ -101,7 +101,7 @@ table { width: 100%; } -#gContent table { +#g-content table { margin: 1em 0; } @@ -125,9 +125,9 @@ fieldset { padding-bottom: .8em; } -#gBanner fieldset, -#gSidebar fieldset, -.gShortForm fieldset { +#g-banner fieldset, +#g-sidebar fieldset, +.g-short-form fieldset { border: none; } @@ -136,11 +136,11 @@ legend { margin-left: 1em; } -#gBanner legend, -#gSidebar legend, -#gContent #gSearchForm legend, +#g-banner legend, +#g-sidebar legend, +#g-content #g-search-form legend, input[type="hidden"], -.gShortForm label { +.g-short-form label { display: none; } @@ -206,23 +206,18 @@ input[type="reset"] { /* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */ -.gValidationRule { - font-size: 80%; - margin-top: .5em; -} - -form.gError input[type="text"], -li.gError input[type="text"], -form.gError input[type="password"], -li.gError input[type="password"], -form.gError input[type="checkbox"], -li.gError input[type="checkbox"], -form.gError input[type="radio"], -li.gError input[type="radio"], -form.gError textarea, -li.gError textarea, -form.gError select, -li.gError select { +form.g-error input[type="text"], +li.g-error input[type="text"], +form.g-error input[type="password"], +li.g-error input[type="password"], +form.g-error input[type="checkbox"], +li.g-error input[type="checkbox"], +form.g-error input[type="radio"], +li.g-error input[type="radio"], +form.g-error textarea, +li.g-error textarea, +form.g-error select, +li.g-error select { border: 2px solid red; } @@ -230,91 +225,91 @@ li.gError select { * 3) Reusable content blocks *********************************************************************/ -.gBlock { +.g-block { clear: both; margin-bottom: 2.5em; } -.gBlock h2 { +.g-block h2 { background-color: #e8e8e8; padding: .3em .8em; } -.gBlockContent { +.g-block-content { margin-top: 1em; } /* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ -#gContent #gMessage { +#g-content #g-action-status { width: 100%; } -#gSiteStatus li, -#gMessage li, -.gModuleStatus { +#g-site-status li, +#g-action-status li, +.g-module-status { border: 1px solid #ccc; margin-bottom: .4em; } -#gSiteStatus li { +#g-site-status li { margin-bottom: 0; border: none; border-bottom: 1px solid #ccc; } -.gModuleStatus { +.g-module-status { clear: both; margin-bottom: 1em; } -.gError, -.gInfo, -.gSuccess, -.gWarning { +.g-error, +.g-info, +.g-success, +.g-warning { background-position: .4em 50%; background-repeat: no-repeat; padding: .4em .5em .4em 30px; } -.gError { +.g-error { background-color: #f6cbca; background-image: url('../../../lib/images/ico-error.png'); } -.gInfo { +.g-info { background-color: #e8e8e8; background-image: url('../../../lib/images/ico-info.png'); } -.gSuccess { +.g-success { background-color: #d9efc2; background-image: url('../../../lib/images/ico-success.png'); } -.gWarning { +.g-warning { background-color: #fcf9ce; background-image: url('../../../lib/images/ico-warning.png'); } -form .gError, -.gPager .gInfo { +form .g-error, +.g-pager .g-info { background-color: #fff !important; } -.gPager .gInfo { +.g-pager .g-info { background-image: none !important; padding: 0 !important; } /* Inline layout (forms, lists) ~~~~~~~~~~ */ -.gShortForm li { +.g-short-form li { float: left; padding: .4em 0; } -.gShortForm input[type="text"] { +.g-short-form input[type="text"] { color: #666; padding: .3em .6em; width: 11em; @@ -326,7 +321,7 @@ form .gError, /* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ -.gView { +.g-view { background-color: #fff; border: 1px solid #ccc; border-bottom: none; @@ -334,11 +329,11 @@ form .gError, /* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader { +#g-header { margin-bottom: 1em; } -#gBanner { +#g-banner { background-color: #e8e8e8; border-bottom: 1px solid #ccc; font-size: .8em; @@ -347,20 +342,20 @@ form .gError, position: relative; } -#gContent { +#g-content { font-size: 1.2em; padding-left: 20px; position: relative; width: 696px; } -#gSidebar { +#g-sidebar { font-size: .9em; padding: 0 20px; width: 220px; } -#gFooter { +#g-footer { background-color: #e8e8e8; border-top: 1px solid #ccc; font-size: .8em; @@ -374,38 +369,38 @@ form .gError, /* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gBanner #gLogo img { +#g-banner #g-logo img { margin: 0; } -#gBanner #gQuickSearchForm { +#g-banner #g-quick-search-form { clear: right; float: right; margin-top: 1em; } -#gBanner #gQuickSearchForm input[type='text'] { +#g-banner #g-quick-search-form input[type='text'] { width: 17em; } -#gContent .gBlock h2 { +#g-content .g-block h2 { background-color: transparent; padding-left: 0; } -#gSidebar .gBlockContent { +#g-sidebar .g-block-content { padding-left: 1em; } /* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gContent #gAlbumGrid { +#g-content #g-album-grid { margin: 1em 0; position: relative; z-index: 1; } -#gContent #gAlbumGrid .gItem { +#g-content #g-album-grid .g-item { background-color: #fff; border: 1px solid #fff; float: left; @@ -417,21 +412,21 @@ form .gError, z-index: 1; } -#gContent #gAlbumGrid .gItem h2 { +#g-content #g-album-grid .g-item h2 { margin: 5px 0; } -#gContent .gPhoto h2, -#gContent .gItem .gMetadata { +#g-content .g-photo h2, +#g-content .g-item .g-metadata { display: none; margin-bottom: .6em; } -#gContent #gAlbumGrid .gAlbum { +#g-content #g-album-grid .g-album { background-color: #e8e8e8; } -#gContent #gAlbumGrid .gAlbum h2 span { +#g-content #g-album-grid .g-album h2 span { background: transparent url('../images/ico-album.png') no-repeat top left; display: inline-block; height: 16px; @@ -439,18 +434,18 @@ form .gError, width: 16px; } -#gContent #gAlbumGrid .gHoverItem { +#g-content #g-album-grid .g-hover-item { border: 1px solid #000; position: absolute !important; z-index: 1000 !important; } -#gContent .gHoverItem h2, -#gContent .gHoverItem .gMetadata { +#g-content .g-hover-item h2, +#g-content .g-hover-item .g-metadata { display: block; } -#gContent #gAlbumGrid #gPlaceHolder { +#g-content #g-album-grid #g-place-holder { position: relative; visibility: hidden; z-index: 1; @@ -458,80 +453,80 @@ form .gError, /* Individual photo content ~~~~~~~~~~~~~~ */ -#gContent #gItem { +#g-content #g-item { position: relative; width: 99%; } -#gContent #gPhoto { +#g-content #g-photo { position: relative; } -#gContent #gItem .gFullSizeLink img { +#g-content #g-item .g-fullsize-link img { display: block; margin: 1em auto !important; } -#gContent #gComments { +#g-content #g-comments { margin-top: 2em; position: relative; } -#gContent #gComments ul li { +#g-content #g-comments ul li { margin: 1em 0; } -#gContent #gComments .gAuthor { +#g-content #g-comments .g-author { border-bottom: 1px solid #ccc; color: #999; height: 32px; line-height: 32px; } -#gContent #gComments ul li div { +#g-content #g-comments ul li div { padding: 0 8px 8px 43px; } -#gContent #gComments ul li #gRecaptcha { +#g-content #g-comments ul li #g-recaptcha { padding: 0; } -#gContent #gComments ul li #gRecaptcha div { +#g-content #g-comments ul li #g-recaptcha div { padding: 0; } -#gContent #gComments .gAvatar { +#g-content #g-comments .g-avatar { height: 32px; margin-right: .4em; width: 32px; } -#gAddCommentButton { +#g-admin-comment-button { position: absolute; right: 0; top: 2px; } -#gContent #gAddCommentForm { +#g-content #g-comment-form { margin-top: 2em; } /* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gBanner #gLoginMenu li, -#gFooter #gCredits li { +#g-banner #g-login-menu li, +#g-footer #g-credits li { display: inline; } -#gBanner #gLoginMenu li { +#g-banner #g-login-menu li { padding-left: 1.2em; } -#gFooter #gCredits li { +#g-footer #g-credits li { padding-right: 1.2em; } -#gContent #gSearchResults { +#g-content #g-search-results { margin-top: 1em; padding-top: 1em; } @@ -540,245 +535,185 @@ form .gError, * 5) Navigation and menus *********************************************************************/ -#gSiteMenu, -#gTagCloud ul { +#g-site-menu, +#g-tag-cloud ul { font-size: 1.2em; } /* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gBanner #gLoginMenu { +#g-banner #g-login-menu { color: #999; float: right; } /* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gSiteMenu { +#g-site-menu { bottom: 0; display: none; left: 140px; position: absolute; } -#gSiteMenu ul { +#g-site-menu ul { margin-bottom: 0 !important; } /* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.gContextMenu { +.g-context-menu { background-color: #fff; bottom: 0; left: 0; position: absolute; } -.gItem .gContextMenu { +.g-item .g-context-menu { display: none; margin-top: 2em; width: 100%; } -#gItem .gContextMenu { +#g-item .g-context-menu { font-size: .7em; } -#gItem .gContextMenu ul { +#g-item .g-context-menu ul { display: none; } -.gContextMenu li { +.g-context-menu li { border-left: none; border-right: none; border-bottom: none; } -.gContextMenu li a { +.g-context-menu li a { display: block; line-height: 1.6em; } -.gHoverItem .gContextMenu { +.g-hover-item .g-context-menu { display: block; } -.gHoverItem .gContextMenu li { +.g-hover-item .g-context-menu li { text-align: left; } -.gHoverItem .gContextMenu a:hover { +.g-hover-item .g-context-menu a:hover { text-decoration: none; } /* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gViewMenu { +#g-view-menu { margin-bottom: 1em; } -#gViewMenu a { +#g-view-menu a { background-repeat: no-repeat; background-position: 50% 50%; height: 28px !important; width: 43px !important; } -#gViewMenu #gHybridLink { - background-image: url('../images/ico-view-hybrid.png'); -} - -#gViewMenu #gSlideshowLink { +#g-view-menu #g-slideshow-link { background-image: url('../images/ico-view-slideshow.png'); } -#gViewMenu .gFullSizeLink { +#g-view-menu .g-fullsize-link { background-image: url('../images/ico-view-fullsize.png'); } -#gViewMenu #gCommentsLink { +#g-view-menu #g-comments-link { background-image: url('../images/ico-view-comments.png'); } -#gViewMenu #gDigibugLink { +#g-view-menu #g-print-digibug-link { background-image: url('../images/ico-print.png'); } -/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.gBreadcrumbs { - padding: 0 20px; -} - -.gBreadcrumbs li { - background: transparent url('../images/ico-separator.gif') no-repeat scroll left center; - float: left; - padding: 10px 6px 10px 16px !important; -} - -.gBreadcrumbs li.root { - background: transparent; -} - -.gBreadcrumbs li a, -.gBreadcrumbs li span { - display: block; -} - -.gBreadcrumbs li.active, -.gBreadcrumbs li.active span { - font-weight: bold; -} - -#g-dialog ul.gBreadcrumbs { - clear: both; - margin-left: 0; - padding-left: 0; -} - -#g-dialog .gBreadcrumbs li { - font-size: .9em; -} - /* Tags and cloud ~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gTagCloud ul { +#g-tag-cloud ul { text-align: justify; } -#gTagCloud ul li { +#g-tag-cloud ul li { display: inline; line-height: 1.5em; text-align: justify; } -#gTagCloud ul li a { +#g-tag-cloud ul li a { text-decoration: none; } -#gTagCloud ul li span { +#g-tag-cloud ul li span { display: none; } -#gTagCloud ul li.size1 a { +#g-tag-cloud ul li.size1 a { color: #9cf; font-size: 80%; font-weight: 100; } -#gTagCloud ul li.size2 a { +#g-tag-cloud ul li.size2 a { color: #69f; font-size: 90%; font-weight: 300; } -#gTagCloud ul li.size3 a { +#g-tag-cloud ul li.size3 a { color: #69c; font-size: 100%; font-weight: 500; } -#gTagCloud ul li.size4 a { +#g-tag-cloud ul li.size4 a { color: #369; font-size: 110%; font-weight: 700; } -#gTagCloud ul li.size5 a { +#g-tag-cloud ul li.size5 a { color: #0e2b52; font-size: 120%; font-weight: 900; } -#gTagCloud ul li.size6 a { +#g-tag-cloud ul li.size6 a { color: #0e2b52; font-size: 130%; font-weight: 900; } -#gTagCloud ul li.size7 a { +#g-tag-cloud ul li.size7 a { color: #0e2b52; font-size: 140%; font-weight: 900; } -#gTagCloud ul li a:hover { +#g-tag-cloud ul li a:hover { color: #f30; text-decoration: underline; } -#gWelcomeMessage p { +#g-welcome-message p { padding-bottom: 1em; } -/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -.gPager { - clear: both; - margin: 0; - padding: 5px 0 !important; - width: 100%; -} - -.gPager li { - float: left; - margin: 0; - width: 30%; -} - -.gPager .gInfo { - text-align: center; - width: 40%; -} - /** ******************************************************************* * 6) Browser hacks *********************************************************************/ -#gHeader:after, -#gAlbumGrid:after, -.gPager:after, -#gViewMenu:after { +#g-header:after, +#g-album-grid:after, +.g-pager:after, +#g-view-menu:after { clear: both; content: "."; display: block; @@ -802,26 +737,26 @@ form .gError, /* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ -.gLoadingLarge { +.g-loading-large { background: #e8e8e8 url('../../../lib/images/loading-large.gif') no-repeat center center; font-size: 0; } -.g-dialogLoadingLarge { +.g-dialog-loading-large { background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; font-size: 0; } -.gLoadingSmall { +.g-loading-small { background: #e8e8e8 url('../../../lib/images/loading-small.gif') no-repeat center center; font-size: 0; } -.gDraggable { +.g-draggable { cursor: move; } -.gDropTarget { +.g-drop-target { background-color: #cfdeff; border: 1px dotted #999; height: 100px; @@ -837,15 +772,15 @@ form .gError, /* jQuery UI ThemeRoller buttons */ -.gButtonSet { +.g-buttonset { padding-left: 1px; } -.gButtonSet li { +.g-buttonset li { float: left; } -.gButtonSet .g-button { +.g-buttonset .g-button { margin: 0; } @@ -869,36 +804,36 @@ form .gError, /* STUFF THAT NEEDS A HOME */ -#gMove ul { +#g-move ul { padding-left: 1em; } -#gMove .selected { +#g-move .selected { background: #999; } /* Server Add */ -#gServerAdd button { +#g-server-add button { margin-bottom: .5em; } -#gServerAddTree { +#g-server-add-tree { cursor: pointer; padding-left: 4px; width: 95%; } -#gServerAddTree li { +#g-server-add-tree li { padding: 0; float: none; } -#gServerAddTree span.selected { +#g-server-add-tree span.selected { background: #ddd; } -#gServerAddTree { +#g-server-add-tree { border: 1px solid #ccc; height: 20em; overflow: auto; @@ -906,59 +841,66 @@ form .gError, padding: .5em; } -#gServerAdd ul ul li { +#g-server-add ul ul li { padding-left: 1.2em; } /* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gEditPermissionForm { +#g-edit-permissions-form { clear: both; } -#gEditPermissionForm fieldset { - border: 1px solid #cccccc; + +#g-edit-permissions-form td { + background-image: none; +} + +#g-edit-permissions-form fieldset { + border: 1px solid #ccc; padding: 0; } -#gPermissions .gDenied, -#gPermissions .gAllowed { +#g-permissions .g-denied, +#g-permissions .g-allowed { text-align: center; vertical-align: middle; } -#gPermissions .gDenied { + +#g-permissions .g-denied { background-color: #fcc; } -#gPermissions .gAllowed { + +#g-permissions .g-allowed { background-color: #cfc; } /*************** STUFF THAT NEEDS A HOME ****************/ -.gProgressBar { +.g-progress-bar { height: 1em; width: 100%; margin-top: .5em; display: inline-block; } -#gAddPhotos #SWFUpload_0 { +#g-add-photos #SWFUpload_0 { position: relative; top: -200px; left: 134px; } -#gAddPhotos .gBreadcrumbs { +#g-add-photos .g-breadcrumbs { border: 0; margin: 0; padding-left:10px; } -#gAddPhotosCanvas { +#g-add-photos-canvas { border: 1px solid #CCCCCC; margin: .5em 0 .5em 0; width: 469px; height: 325px; overflow: auto; } -#gAddPhotos button { +#g-add-photos button { margin-bottom: .5em; float: right; } @@ -970,73 +912,73 @@ form .gError, cursor: pointer; } -#gAddPhotosCanvas { +#g-add-photos-canvas { } -#gAddPhotosQueue .progressbar { +#g-add-photos-queue .progressbar { height: 4px; } -#gAddPhotosQueue .title { +#g-add-photos-queue .title { font-size: 1.25em; } -#gAddPhotosQueue .status { +#g-add-photos-queue .status { font-size: .75em; } -#gAddPhotosQueue .box { +#g-add-photos-queue .box { margin-bottom: 8px; padding: 4px; } -#gAddPhotosQueue .pending { +#g-add-photos-queue .pending { background-color: #e8e8e8; border: 1px solid #d7d7d7; } -#gAddPhotosQueue .error { +#g-add-photos-queue .error { background-color: #fcc; border: 1px solid #ebb; } -#gAddPhotosQueue .uploading { +#g-add-photos-queue .uploading { background-color: #ff9; border: 1px solid #ee8; } -#gAddPhotosQueue .complete { +#g-add-photos-queue .complete { background-color: #cfc; border: 1px solid #beb; } -#gAdminG2ImportNotes { +#g-admin-g2-import-notes { padding-bottom: 20px; } -#gAdminG2ImportDetails { +#g-admin-g2-import-details { padding-top: 20px; } -#gAdminG2ImportDetails .gWarning { +#g-admin-g2-import-details .g-warning { margin-top: 4px; } -#gAdminG2ImportDetails .gInfo { +#g-admin-g2-import-details .g-info { padding: 2px; border: 1px solid #999; margin-bottom: 10px; } -#gAdminG2ImportNotes p, -#gAdminG2ImportDetails .gInfo p { +#g-admin-g2-import-notes p, +#g-admin-g2-import-details .g-info p { padding: 0; margin: 0; } -#gAdminG2ImportNotes ul li, -#gAdminG2Import .gInfo ul li { +#g-admin-g2-import-notes ul li, +#g-admin-g2-import .g-info ul li { padding-left: 0; margin-left: 20px; list-style-type: disc; @@ -1054,9 +996,9 @@ form .gError, text-align: right; } -.rtl #gHeader #gQuickSearchForm, -.rtl #gForgotPasswordLink, -.rtl #gHeader #gLoginMenu, +.rtl #g-header #g-quick-search-form, +.rtl #g-reset-password, +.rtl #g-header #g-login-menu, .rtl .ui-icon-right .ui-icon { clear: left; float: left; @@ -1066,13 +1008,13 @@ form .gError, .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], -.rtl .gShortForm li, -.rtl #gHeader #gLogo img, -.rtl #gContent #gAlbumGrid .gItem, -.rtl #gSiteMenu, -.rtl .gBreadcrumbs li, -.rtl .gPager li, -.rtl .gButtonSet li, +.rtl .g-short-form li, +.rtl #g-header #g-logo img, +.rtl #g-content #g-album-grid .g-item, +.rtl #g-site-menu, +.rtl .g-breadcrumbs li, +.rtl .g-pager li, +.rtl .g-buttonset li, .rtl .ui-icon-left .ui-icon { float: right; } diff --git a/themes/wind/images/ico-separator.gif b/themes/wind/images/ico-separator.gif deleted file mode 100644 index 3de2d0d3..00000000 Binary files a/themes/wind/images/ico-separator.gif and /dev/null differ diff --git a/themes/wind/images/ico-view-hybrid.png b/themes/wind/images/ico-view-hybrid.png deleted file mode 100644 index ee902e55..00000000 Binary files a/themes/wind/images/ico-view-hybrid.png and /dev/null differ diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index 4b3b4306..27fb9664 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -2,16 +2,10 @@ * Initialize jQuery UI and Gallery Plugin elements */ -var short_forms = new Array( - "#gQuickSearchForm", - "#gAddTagForm", - "#gSearchForm" -); - $(document).ready(function() { // Initialize Superfish menus - $("ul.gMenu").addClass("sf-menu"); + $("ul.g-menu").addClass("sf-menu"); $('ul.sf-menu').superfish({ delay: 500, animation: { @@ -20,63 +14,69 @@ $(document).ready(function() { }, speed: 'fast' }); - $("#gSiteMenu").css("display", "block"); + $("#g-site-menu").css("display", "block"); // Initialize status message effects - $("#gMessage li").gallery_show_message(); + $("#g-action-status li").gallery_show_message(); // Initialize dialogs - $("#gLoginLink").addClass("g-dialogLink"); - $(".g-dialogLink").gallery_dialog(); + $("#g-login-link").addClass("g-dialog-link"); + $(".g-dialog-link").gallery_dialog(); // Initialize view menu - if ($("#gViewMenu").length) { - $("#gViewMenu ul").removeClass("gMenu").removeClass("sf-menu"); - $("#gViewMenu a").addClass("ui-icon"); + if ($("#g-view-menu").length) { + $("#g-view-menu ul").removeClass("g-menu").removeClass("sf-menu"); + $("#g-view-menu a").addClass("ui-icon"); } // Initialize short forms + var short_forms = new Array( + "#g-quick-search-form", + "#g-add-tag-form", + "#g-search-form" + ); + for (var i in short_forms) { short_form_init(short_forms[i]); - $(short_forms[i]).addClass("gShortForm"); + $(short_forms[i]).addClass("g-short-form"); } - $(".gShortForm input[type=text]").addClass("ui-corner-left"); - $(".gShortForm input[type=submit]").addClass("ui-state-default ui-corner-right"); + $(".g-short-form input[type=text]").addClass("ui-corner-left"); + $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right"); // Apply jQuery UI button css to submit inputs - $("input[type=submit]:not(.gShortForm input)").addClass("ui-state-default ui-corner-all"); - - // Apply styles and icon classes to gContextMenu - if ($(".gContextMenu").length) { - $(".gContextMenu li").addClass("ui-state-default"); - $(".gContextMenu a").addClass("g-button ui-icon-left"); - $(".gContextMenu a").prepend("<span class=\"ui-icon\"></span>"); - $(".gContextMenu a span").each(function() { + $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); + + // Apply styles and icon classes to g-context-menu + if ($(".g-context-menu").length) { + $(".g-context-menu li").addClass("ui-state-default"); + $(".g-context-menu a").addClass("g-button ui-icon-left"); + $(".g-context-menu a").prepend("<span class=\"ui-icon\"></span>"); + $(".g-context-menu a span").each(function() { var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString(); $(this).addClass(iconClass); }); } // Album view only - if ($("#gAlbumGrid").length) { + if ($("#g-album-grid").length) { // Set equal height for album items and vertically align thumbnails/metadata - $('.gItem').equal_heights().gallery_valign(); + $('.g-item').equal_heights().gallery_valign(); // Initialize thumbnail hover effect - $(".gItem").hover( + $(".g-item").hover( function() { // Insert a placeholder to hold the item's position in the grid - var placeHolder = $(this).clone().attr("id", "gPlaceHolder"); + var placeHolder = $(this).clone().attr("id", "g-place-holder"); $(this).after($(placeHolder)); // Style and position the hover item var position = $(this).position(); $(this).css("top", position.top).css("left", position.left); - $(this).addClass("gHoverItem"); + $(this).addClass("g-hover-item"); // Initialize the contextual menu $(this).gallery_context_menu(); // Set the hover item's height $(this).height("auto"); - var context_menu = $(this).find(".gContextMenu"); + var context_menu = $(this).find(".g-context-menu"); var adj_height = $(this).height() + context_menu.height(); $(this).height(adj_height); }, @@ -94,19 +94,19 @@ $(document).ready(function() { $(this).css("position", "relative"); $(this).css("top", 0).css("left", 0); // Remove the placeholder and hover class from the item - $(this).removeClass("gHoverItem"); - $("#gPlaceHolder").remove(); + $(this).removeClass("g-hover-item"); + $("#g-place-holder").remove(); } ); } // Photo/Item item view - if ($("#gItem").length) { + if ($("#g-item").length) { // Ensure the resized image fits within its container - $("#gItem").gallery_fit_photo(); + $("#g-item").gallery_fit_photo(); // Initialize context menus - var resize = $("#gItem").gallery_get_photo(); + var resize = $("#g-item").gallery_get_photo(); $(resize).hover(function(){ $(this).gallery_context_menu(); }); diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php index fd647f81..57760de4 100644 --- a/themes/wind/views/album.html.php +++ b/themes/wind/views/album.html.php @@ -1,27 +1,27 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // @todo Set hover on AlbumGrid list items for guest users ?> -<div id="gInfo"> +<div id="g-info"> <?= $theme->album_top() ?> <h1><?= html::purify($item->title) ?></h1> - <div class="gDescription"><?= nl2br(html::purify($item->description)) ?></div> + <div class="g-description"><?= nl2br(html::purify($item->description)) ?></div> </div> -<ul id="gAlbumGrid"> +<ul id="g-album-grid"> <? if (count($children)): ?> <? foreach ($children as $i => $child): ?> - <? $item_class = "gPhoto"; ?> + <? $item_class = "g-photo"; ?> <? if ($child->is_album()): ?> - <? $item_class = "gAlbum"; ?> + <? $item_class = "g-album"; ?> <? endif ?> - <li id="gItemId-<?= $child->id ?>" class="gItem <?= $item_class ?>"> + <li id="g-itemId-<?= $child->id ?>" class="g-item <?= $item_class ?>"> <?= $theme->thumb_top($child) ?> <a href="<?= $child->url() ?>"> - <?= $child->thumb_img(array("class" => "gThumbnail")) ?> + <?= $child->thumb_img(array("class" => "g-thumbnail")) ?> </a> <?= $theme->thumb_bottom($child) ?> - <?= $theme->context_menu($child, "#gItemId-{$child->id} .gThumbnail") ?> + <?= $theme->context_menu($child, "#g-itemId-{$child->id} .g-thumbnail") ?> <h2><span></span><a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2> - <ul class="gMetadata"> + <ul class="g-metadata"> <?= $theme->thumb_info($child) ?> </ul> </li> @@ -30,7 +30,7 @@ <? if ($user->admin || access::can("add", $item)): ?> <? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?> <li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.", - array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialogLink\""))) ?></li> + array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li> <? else: ?> <li><?= t("There aren't any photos here yet!") ?></li> <? endif; ?> diff --git a/themes/wind/views/block.html.php b/themes/wind/views/block.html.php index e8cff833..699d7c22 100644 --- a/themes/wind/views/block.html.php +++ b/themes/wind/views/block.html.php @@ -2,9 +2,9 @@ <? if ($anchor): ?> <a name="<?= $anchor ?>"></a> <? endif ?> -<div id="<?= $css_id ?>" class="gBlock"> +<div id="<?= $css_id ?>" class="g-block"> <h2><?= $title ?></h2> - <div class="gBlockContent"> + <div class="g-block-content"> <?= $content ?> </div> </div> diff --git a/themes/wind/views/dynamic.html.php b/themes/wind/views/dynamic.html.php index 9ed9d69b..9d50f8a8 100644 --- a/themes/wind/views/dynamic.html.php +++ b/themes/wind/views/dynamic.html.php @@ -1,24 +1,24 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gAlbumHeader"> - <div id="gAlbumHeaderButtons"> +<div id="g-albumHeader"> + <div id="g-albumHeaderButtons"> <?= $theme->dynamic_top() ?> </div> <h1><?= html::clean($title) ?></h1> </div> -<ul id="gAlbumGrid"> +<ul id="g-album-grid"> <? foreach ($children as $i => $child): ?> - <li class="gItem <?= $child->is_album() ? "gAlbum" : "" ?>"> + <li class="g-item <?= $child->is_album() ? "g-album" : "" ?>"> <?= $theme->thumb_top($child) ?> <a href="<?= $child->url() ?>"> - <img id="gPhotoId-<?= $child->id ?>" class="gThumbnail" + <img id="g-photoId-<?= $child->id ?>" class="g-thumbnail" alt="photo" src="<?= $child->thumb_url() ?>" width="<?= $child->thumb_width ?>" height="<?= $child->thumb_height ?>" /> </a> <h2><?= html::purify($child->title) ?></h2> <?= $theme->thumb_bottom($child) ?> - <ul class="gMetadata"> + <ul class="g-metadata"> <?= $theme->thumb_info($child) ?> </ul> </li> diff --git a/themes/wind/views/movie.html.php b/themes/wind/views/movie.html.php index cf7c9b7f..17b519ba 100644 --- a/themes/wind/views/movie.html.php +++ b/themes/wind/views/movie.html.php @@ -1,8 +1,8 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gItem"> +<div id="g-item"> <?= $theme->photo_top() ?> - <ul class="gPager"> + <ul class="g-pager"> <li> <? if ($previous_item): ?> <a href="<?= $previous_item->url() ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> @@ -12,7 +12,7 @@ <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> <? endif; ?> </li> - <li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> + <li class="g-info"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> <li class="g-txt-right"> <? if ($next_item): ?> <a href="<?= $next_item->url() ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> @@ -25,13 +25,13 @@ </ul> - <?= $item->movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?> + <?= $item->movie_img(array("class" => "g-movie", "id" => "g-movie-id-{$item->id}")) ?> - <div id="gInfo"> + <div id="g-info"> <h1><?= html::purify($item->title) ?></h1> <div><?= nl2br(html::purify($item->description)) ?></div> </div> <?= $theme->photo_bottom() ?> - <?= $theme->context_menu($item, "#gMovieId-{$item->id}") ?> + <?= $theme->context_menu($item, "#g-movie-id-{$item->id}") ?> </div> diff --git a/themes/wind/views/no_sidebar.html.php b/themes/wind/views/no_sidebar.html.php index 7324cf9e..c609d4d9 100644 --- a/themes/wind/views/no_sidebar.html.php +++ b/themes/wind/views/no_sidebar.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div class="gWarning"> +<div class="g-warning"> <?= t("No active sidebar panels. <a href=\"%url\">Add panels</a>", array("url" => html::mark_clean(url::site("admin/sidebar")))) ?> </div> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 414174b6..6e1e3a53 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -38,7 +38,7 @@ <? $new_width = $thumb_proportion * 213 ?> <? $new_height = $thumb_proportion * 240 ?> <style type="text/css"> - #gContent #gAlbumGrid .gItem { + #g-content #g-album-grid .g-item { width: <?= $new_width ?>px; height: <?= $new_height ?>px; /* <?= $thumb_proportion ?> */ @@ -74,26 +74,26 @@ <body <?= $theme->body_attributes() ?>> <?= $theme->page_top() ?> - <div id="doc4" class="yui-t5 gView"> + <div id="doc4" class="yui-t5 g-view"> <?= $theme->site_status() ?> - <div id="gHeader"> - <div id="gBanner"> + <div id="g-header"> + <div id="g-banner"> <?= $theme->header_top() ?> <? if ($header_text = module::get_var("gallery", "header_text")): ?> <?= $header_text ?> <? else: ?> - <a id="gLogo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>"> + <a id="g-logo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>"> <img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= url::file("lib/images/logo.png") ?>" /> </a> <? endif ?> - <div id="gSiteMenu"> + <div id="g-site-menu"> <?= $theme->site_menu() ?> </div> <?= $theme->header_bottom() ?> </div> <? if (!empty($parents)): ?> - <ul class="gBreadcrumbs"> + <ul class="g-breadcrumbs"> <? foreach ($parents as $parent): ?> <li> <!-- Adding ?show=<id> causes Gallery3 to display the page @@ -113,26 +113,26 @@ <div id="bd"> <div id="yui-main"> <div class="yui-b"> - <div id="gContent" class="yui-g"> + <div id="g-content" class="yui-g"> <?= $theme->messages() ?> <?= $content ?> </div> </div> </div> - <div id="gSidebar" class="yui-b"> + <div id="g-sidebar" class="yui-b"> <? if ($theme->page_type != "login"): ?> <?= new View("sidebar.html") ?> <? endif ?> </div> </div> - <div id="gFooter"> + <div id="g-footer"> <?= $theme->footer() ?> <? if ($footer_text = module::get_var("gallery", "footer_text")): ?> <?= $footer_text ?> <? endif ?> <? if (module::get_var("gallery", "show_credits")): ?> - <ul id="gCredits"> + <ul id="g-credits"> <?= $theme->credits() ?> </ul> <? endif ?> diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php index 155c8d16..5e79add6 100644 --- a/themes/wind/views/pager.html.php +++ b/themes/wind/views/pager.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // See http://docs.kohanaphp.com/libraries/pagination ?> -<ul class="gPager"> +<ul class="g-pager"> <? /* @todo This message isn't easily localizable */ $from_to_msg = t2("Photo %from_number of %count", "Photos %from_number - %to_number of %count", @@ -24,7 +24,7 @@ <span class="ui-icon ui-icon-seek-prev"></span><?= t("previous") ?></a> <? endif ?> </li> - <li class="gInfo"><?= $from_to_msg ?></li> + <li class="g-info"><?= $from_to_msg ?></li> <li class="g-txt-right"> <? if ($next_page): ?> <a href="<?= str_replace('{page}', $next_page, $url) ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index def3d8b7..497c61bc 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -4,7 +4,7 @@ <!-- Use javascript to show the full size as an overlay on the current page --> <script> $(document).ready(function() { - $(".gFullSizeLink").click(function() { + $(".g-fullsize-link").click(function() { $.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>"); return false; }); @@ -12,10 +12,10 @@ </script> <? endif ?> -<div id="gItem"> +<div id="g-item"> <?= $theme->photo_top() ?> - <ul class="gPager"> + <ul class="g-pager"> <li> <? if ($previous_item): ?> <a href="<?= $previous_item->url() ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> @@ -25,7 +25,7 @@ <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> <? endif; ?> </li> - <li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> + <li class="g-info"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> <li class="g-txt-right"> <? if ($next_item): ?> <a href="<?= $next_item->url() ?>" class="g-button ui-icon-right ui-state-default ui-corner-all"> @@ -37,20 +37,20 @@ </li> </ul> - <div id="gPhoto"> + <div id="g-photo"> <?= $theme->resize_top($item) ?> <? if (access::can("view_full", $item)): ?> - <a href="<?= $item->file_url() ?>" class="gFullSizeLink" title="<?= t("View full size")->for_html_attr() ?>"> + <a href="<?= $item->file_url() ?>" class="g-fullsize-link" title="<?= t("View full size")->for_html_attr() ?>"> <? endif ?> - <?= $item->resize_img(array("id" => "gPhotoId-{$item->id}", "class" => "gResize")) ?> + <?= $item->resize_img(array("id" => "g-photoId-{$item->id}", "class" => "g-resize")) ?> <? if (access::can("view_full", $item)): ?> </a> <? endif ?> <?= $theme->resize_bottom($item) ?> - <?= $theme->context_menu($item, "#gPhotoId-{$item->id}") ?> + <?= $theme->context_menu($item, "#g-photoId-{$item->id}") ?> </div> - <div id="gInfo"> + <div id="g-info"> <h1><?= html::purify($item->title) ?></h1> <div><?= nl2br(html::purify($item->description)) ?></div> </div> diff --git a/themes/wind/views/sidebar.html.php b/themes/wind/views/sidebar.html.php index 04379eb6..d2551c52 100644 --- a/themes/wind/views/sidebar.html.php +++ b/themes/wind/views/sidebar.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= $theme->sidebar_top() ?> -<div class="gToolbar"> - <div id="gViewMenu" class="gButtonSet"> +<div class="g-toolbar"> + <div id="g-view-menu" class="g-buttonset"> <? if ($page_type == "album"):?> <?= $theme->album_menu() ?> <? elseif ($page_type == "photo") : ?> -- cgit v1.2.3 From d581bbbd1eaeb242b7279e5a6d75f015dd5a5e6f Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Sun, 4 Oct 2009 15:53:00 -0600 Subject: Renamed more CSS selectors from gName to g-name. --- lib/gallery.common.js | 2 +- modules/comment/views/admin_comments.html.php | 4 ++-- modules/gallery/tests/selenium/Add_Comment.html | 2 +- modules/gallery/tests/xss_data.txt | 2 +- modules/gallery/views/admin_theme_options.html.php | 2 +- modules/gallery/views/welcome_message_loader.html.php | 4 ++-- modules/organize/css/organize.css | 14 +++++++------- modules/organize/js/organize.js | 14 +++++++------- modules/organize/views/organize_dialog.html.php | 12 ++++++------ modules/server_add/controllers/admin_server_add.php | 2 +- modules/server_add/js/server_add.js | 2 +- modules/server_add/views/server_add_tree_dialog.html.php | 2 +- modules/user/helpers/user_block.php | 2 +- modules/user/views/login.html.php | 2 +- themes/admin_wind/views/admin.html.php | 2 +- themes/wind/views/album.html.php | 4 ++-- themes/wind/views/dynamic.html.php | 6 +++--- themes/wind/views/photo.html.php | 4 ++-- 18 files changed, 41 insertions(+), 41 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index f2de74ad..4ac6de70 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -89,7 +89,7 @@ */ $.fn.gallery_get_photo = function() { var photo = $(this).find("img").filter(function() { - return this.id.match(/g-photoId-\d+/); + return this.id.match(/g-photo-id-\d+/); }); return photo; }; diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 0e8dd525..62c64d12 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -90,7 +90,7 @@ </div> <? endif ?> - <table id="g-admin-commentsList"> + <table id="g-admin-comments-list"> <tr> <th> <?= t("Author") ?> @@ -192,7 +192,7 @@ <? endforeach ?> </table> - <div class="pager"> + <div class="g-pager"> <?= $pager ?> </div> </div> diff --git a/modules/gallery/tests/selenium/Add_Comment.html b/modules/gallery/tests/selenium/Add_Comment.html index dff653da..054e7597 100644 --- a/modules/gallery/tests/selenium/Add_Comment.html +++ b/modules/gallery/tests/selenium/Add_Comment.html @@ -18,7 +18,7 @@ </tr> <tr> <td>clickAndWait</td> - <td>g-photoId-2</td> + <td>g-photo-id-2</td> <td></td> </tr> <tr> diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index c8ba3770..eaa8c99c 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -344,4 +344,4 @@ themes/wind/views/photo.html.php 8 DIRTY_JS $theme themes/wind/views/photo.html.php 21 DIRTY_JS $previous_item->url() themes/wind/views/photo.html.php 31 DIRTY_JS $next_item->url() themes/wind/views/photo.html.php 43 DIRTY_JS $item->file_url() -themes/wind/views/photo.html.php 45 DIRTY $item->resize_img(array("id"=>"g-photoId-{$item->id}","class"=>"g-resize")) +themes/wind/views/photo.html.php 45 DIRTY $item->resize_img(array("id"=>"g-photo-id-{$item->id}","class"=>"g-resize")) diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index ed091d4b..e09be728 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="g-admin-themeOptions"> +<div id="g-admin-theme-options"> <h1> <?= t("Theme Options") ?> </h1> <?= $form ?> diff --git a/modules/gallery/views/welcome_message_loader.html.php b/modules/gallery/views/welcome_message_loader.html.php index 818e2072..d1ff2f3f 100644 --- a/modules/gallery/views/welcome_message_loader.html.php +++ b/modules/gallery/views/welcome_message_loader.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<span id="g-welcome-messageLink" +<span id="g-welcome-message-link" title="<?= t("Welcome to Gallery 3")->for_html_attr() ?>" href="<?= url::site("welcome_message") ?>"/> <script type="text/javascript"> - $(document).ready(function(){$("#g-welcome-messageLink").gallery_dialog({immediate: true});}); + $(document).ready(function(){$("#g-welcome-message-link").gallery_dialog({immediate: true});}); </script> diff --git a/modules/organize/css/organize.css b/modules/organize/css/organize.css index fbf3c383..afa89229 100644 --- a/modules/organize/css/organize.css +++ b/modules/organize/css/organize.css @@ -24,7 +24,7 @@ white-space: nowrap; } -#g-organizeDetail { +#g-organize-detail { height: 100%; } @@ -36,20 +36,20 @@ /******************************************************************* * Album Tree styles */ -#g-organizeTreeContainer { +#g-organize-tree-container { height: 100%; overflow: auto; margin: 0 !important; padding: 0 !important; } -#g-organize-albumTree .selected { +#g-organize-album-tree .selected { background-color: #cfdeff; border-bottom: 1px solid #999; margin-right: 0px; } -#g-organize-albumTree ul li { +#g-organize-album-tree ul li { padding-left: 1.2em; } @@ -131,18 +131,18 @@ /**************************************************************** * Controls styles */ -#g-organizeControls { +#g-organize-controls { padding-left: 8px; background-color: #13A; color: #ccc; width: 100% !important; } -#g-organizeControls select { +#g-organize-controls select { display: inline; } -#g-organizeClose { +#g-organize-close { float: right; margin-right: 12px; } diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index 960d75e2..d1e9420b 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -110,7 +110,7 @@ _refresh: function(data) { if (data.tree) { - $("#g-organize-albumTree").html(data.tree); + $("#g-organize-album-tree").html(data.tree); } if (data.grid) { $("#g-organize-microthumb-grid").html(data.grid); @@ -142,14 +142,14 @@ $("#g-dialog").bind("dialogopen", function(event, ui) { $("#g-organize").height($("#g-dialog").innerHeight() - 20); $("#g-organize-microthumb-panel").height($("#g-dialog").innerHeight() - 90); - $("#g-organizeTreeContainer").height($("#g-dialog").innerHeight() - 59); + $("#g-organize-tree-container").height($("#g-dialog").innerHeight() - 59); }); $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); - $("#g-dialog #g-organizeClose").click(function(event) { + $("#g-dialog #g-organize-close").click(function(event) { $("#g-dialog").dialog("close"); }); @@ -170,7 +170,7 @@ .mousemove($.organize.mouse_move_handler); $(".g-organize-album").droppable($.organize.branch_droppable); $(".g-organize-album-text").click($.organize.show_album); - $("#g-organize-albumTree .ui-icon-plus,#g-organize-albumTree .ui-icon-minus").click($.organize.toggle_branch); + $("#g-organize-album-tree .ui-icon-plus,#g-organize-album-tree .ui-icon-minus").click($.organize.toggle_branch); }, toggle_branch: function(event) { @@ -207,13 +207,13 @@ if ($(event.currentTarget).hasClass("selected")) { return; } - var parent = $(event.currentTarget).parents(".g-organizeBranch"); + var parent = $(event.currentTarget).parents(".g-organize-branch"); if ($(parent).hasClass("g-view-only")) { return; } $("#g-organize-microthumb-panel").selectable("destroy"); var id = $(event.currentTarget).attr("ref"); - $("#g-organize-albumTree .selected").removeClass("selected"); + $("#g-organize-album-tree .selected").removeClass("selected"); $(".g-organize-album-text[ref=" + id + "]").addClass("selected"); var url = $("#g-organize-microthumb-panel").attr("ref").replace("__ITEM_ID__", id).replace("__OFFSET__", 0); $.get(url, {}, @@ -231,7 +231,7 @@ */ resort: function(column, dir) { var url = sort_order_url - .replace("__ALBUM_ID__", $("#g-organize-albumTree .selected").attr("ref")) + .replace("__ALBUM_ID__", $("#g-organize-album-tree .selected").attr("ref")) .replace("__COL__", column) .replace("__DIR__", dir); $.get(url, {}, diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 858c794c..dc627d10 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -16,21 +16,21 @@ <div class="g-info"><?= t("Drag and drop photos to re-order or move between albums") ?></div> </div> </div> - <div id="g-organizeContentPane" class="yui-gf"> - <div id="g-organizeTreeContainer" class="yui-u first"> - <ul id="g-organize-albumTree"> + <div id="g-organize-content-pane" class="yui-gf"> + <div id="g-organize-tree-container" class="yui-u first"> + <ul id="g-organize-album-tree"> <?= $album_tree ?> </ul> </div> - <div id="g-organizeDetail" class="yui-u"> + <div id="g-organize-detail" class="yui-u"> <div id="g-organize-microthumb-panel" ref="<?= url::site("organize/album/__ITEM_ID__/__OFFSET__") ?>"> <ul id="g-organize-microthumb-grid"> <?= $micro_thumb_grid ?> </ul> </div> - <div id="g-organizeControls"> - <a id="g-organizeClose" href="#" ref="done" + <div id="g-organize-controls"> + <a id="g-organize-close" href="#" ref="done" class="g-button ui-corner-all ui-state-default"><?= t("Close") ?></a> <form> <?= t("Sort order") ?> diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php index 098f6f71..837a2c00 100644 --- a/modules/server_add/controllers/admin_server_add.php +++ b/modules/server_add/controllers/admin_server_add.php @@ -83,7 +83,7 @@ class Admin_Server_Add_Controller extends Admin_Controller { private function _get_admin_form() { $form = new Forge("admin/server_add/add_path", "", "post", - array("id" => "g-server-add-adminForm")); + array("id" => "g-server-add-admin-form")); $add_path = $form->group("add_path"); $add_path->input("path")->label(t("Path"))->rules("required") ->error_messages("not_readable", t("This directory is not readable by the webserver")) diff --git a/modules/server_add/js/server_add.js b/modules/server_add/js/server_add.js index a2a831c9..02dda4c0 100644 --- a/modules/server_add/js/server_add.js +++ b/modules/server_add/js/server_add.js @@ -20,7 +20,7 @@ $("#g-server-add-continue-button", this.element).hide(); self.run_add(); }); - $("#g-server-addCloseButton", this.element).click(function(event) { + $("#g-server-add-close-button", this.element).click(function(event) { $("#g-dialog").dialog("close"); window.location.reload(); }); diff --git a/modules/server_add/views/server_add_tree_dialog.html.php b/modules/server_add/views/server_add_tree_dialog.html.php index 31648a70..cd3b09cc 100644 --- a/modules/server_add/views/server_add_tree_dialog.html.php +++ b/modules/server_add/views/server_add_tree_dialog.html.php @@ -40,7 +40,7 @@ <?= t("Continue") ?> </button> - <button id="g-server-addCloseButton" class="ui-state-default ui-corner-all"> + <button id="g-server-add-close-button" class="ui-state-default ui-corner-all"> <?= t("Close") ?> </button> </span> diff --git a/modules/user/helpers/user_block.php b/modules/user/helpers/user_block.php index f1f8e5eb..f920b4c5 100644 --- a/modules/user/helpers/user_block.php +++ b/modules/user/helpers/user_block.php @@ -32,7 +32,7 @@ class user_block_Core { } if (count($locales) > 1) { $block = new Block(); - $block->css_id = "g-userLanguageBlock"; + $block->css_id = "g-user-language-block"; $block->title = t("Language Preference"); $block->content = new View("user_languages_block.html"); $block->content->installed_locales = diff --git a/modules/user/views/login.html.php b/modules/user/views/login.html.php index 65eaab8c..049ba043 100644 --- a/modules/user/views/login.html.php +++ b/modules/user/views/login.html.php @@ -16,7 +16,7 @@ </li> <li> <a href="<?= url::site("logout?csrf=$csrf&continue=" . urlencode(url::current(true))) ?>" - id="g-logoutLink"><?= t("Logout") ?></a> + id="g-logout-link"><?= t("Logout") ?></a> </li> <? endif ?> </ul> diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index 5b2d41ad..fc86e1c9 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -45,7 +45,7 @@ <?= $theme->admin_header_top() ?> <ul id="g-login-menu"> <li class="first"><?= html::anchor(item::root()->abs_url(), "← ".t("Back to the Gallery")) ?></li> - <li id="g-logoutLink"><a href="<?= url::site("logout?csrf=$csrf&continue=" . urlencode(item::root()->url())) ?>"><?= t("Logout") ?></a></li> + <li id="g-logout-link"><a href="<?= url::site("logout?csrf=$csrf&continue=" . urlencode(item::root()->url())) ?>"><?= t("Logout") ?></a></li> </ul> <a id="g-logo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery")->for_html_attr() ?>"> ← <?= t("back to the ...") ?> diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php index 57760de4..5d928b2e 100644 --- a/themes/wind/views/album.html.php +++ b/themes/wind/views/album.html.php @@ -13,13 +13,13 @@ <? if ($child->is_album()): ?> <? $item_class = "g-album"; ?> <? endif ?> - <li id="g-itemId-<?= $child->id ?>" class="g-item <?= $item_class ?>"> + <li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>"> <?= $theme->thumb_top($child) ?> <a href="<?= $child->url() ?>"> <?= $child->thumb_img(array("class" => "g-thumbnail")) ?> </a> <?= $theme->thumb_bottom($child) ?> - <?= $theme->context_menu($child, "#g-itemId-{$child->id} .g-thumbnail") ?> + <?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?> <h2><span></span><a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2> <ul class="g-metadata"> <?= $theme->thumb_info($child) ?> diff --git a/themes/wind/views/dynamic.html.php b/themes/wind/views/dynamic.html.php index 9d50f8a8..aa347402 100644 --- a/themes/wind/views/dynamic.html.php +++ b/themes/wind/views/dynamic.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="g-albumHeader"> - <div id="g-albumHeaderButtons"> +<div id="g-album-header"> + <div id="g-album-header-buttons"> <?= $theme->dynamic_top() ?> </div> <h1><?= html::clean($title) ?></h1> @@ -11,7 +11,7 @@ <li class="g-item <?= $child->is_album() ? "g-album" : "" ?>"> <?= $theme->thumb_top($child) ?> <a href="<?= $child->url() ?>"> - <img id="g-photoId-<?= $child->id ?>" class="g-thumbnail" + <img id="g-photo-id-<?= $child->id ?>" class="g-thumbnail" alt="photo" src="<?= $child->thumb_url() ?>" width="<?= $child->thumb_width ?>" height="<?= $child->thumb_height ?>" /> diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index 497c61bc..2520cb0c 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -42,12 +42,12 @@ <? if (access::can("view_full", $item)): ?> <a href="<?= $item->file_url() ?>" class="g-fullsize-link" title="<?= t("View full size")->for_html_attr() ?>"> <? endif ?> - <?= $item->resize_img(array("id" => "g-photoId-{$item->id}", "class" => "g-resize")) ?> + <?= $item->resize_img(array("id" => "g-photo-id-{$item->id}", "class" => "g-resize")) ?> <? if (access::can("view_full", $item)): ?> </a> <? endif ?> <?= $theme->resize_bottom($item) ?> - <?= $theme->context_menu($item, "#g-photoId-{$item->id}") ?> + <?= $theme->context_menu($item, "#g-photo-id-{$item->id}") ?> </div> <div id="g-info"> -- cgit v1.2.3 From 49505f28bb68e84b926d7907a33c7f814e78eb3c Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Mon, 5 Oct 2009 22:27:30 -0600 Subject: Refer to sidebar elements as blocks, rather than panels. --- themes/wind/views/no_sidebar.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/wind/views') diff --git a/themes/wind/views/no_sidebar.html.php b/themes/wind/views/no_sidebar.html.php index c609d4d9..d0d3eba6 100644 --- a/themes/wind/views/no_sidebar.html.php +++ b/themes/wind/views/no_sidebar.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div class="g-warning"> - <?= t("No active sidebar panels. <a href=\"%url\">Add panels</a>", + <?= t("No active sidebar blocks. <a href=\"%url\">Add blocks</a>", array("url" => html::mark_clean(url::site("admin/sidebar")))) ?> </div> -- cgit v1.2.3 From 859f8dc558555cee4c106099c1a44aa6866aaa0f Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Wed, 7 Oct 2009 00:21:23 -0600 Subject: Consolidated the rest of the base message styles into lib/gallery.common.css and applied updates to views. Moved over draggable/droppable styles. Use g-target consistently for drag/drop interactions. Minor re-ordering of selectors in gallery.common.css. Updates to css comments. --- lib/gallery.common.css | 173 ++++++++++++++------- modules/g2_import/views/admin_g2_import.html.php | 2 +- modules/gallery/helpers/message.php | 2 +- .../gallery/views/admin_advanced_settings.html.php | 2 +- modules/gallery/views/admin_dashboard.html.php | 4 +- modules/gallery/views/admin_sidebar.html.php | 4 +- modules/gallery/views/permissions_browse.html.php | 2 +- modules/gallery/views/simple_uploader.html.php | 2 +- modules/organize/views/organize_dialog.html.php | 2 +- themes/admin_wind/css/screen.css | 134 +++------------- themes/wind/css/screen.css | 130 ++-------------- themes/wind/views/no_sidebar.html.php | 9 +- 12 files changed, 169 insertions(+), 297 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index b679fbd2..d100791e 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -7,6 +7,7 @@ * 3) States and interactions * 4) Positioning and order * 5) Containers/widgets + * 6) Browser hacks */ /** ******************************************************************* @@ -61,32 +62,28 @@ .g-info, .g-success, .g-warning { - background-position: .4em 50%; - background-repeat: no-repeat; padding: .4em .5em .4em 30px; } -.g-error, -.g-denied { - background-color: #f6cbca; +.g-error, +.g-denied, +tr.g-error td.g-error { + background: #f6cbca url('images/ico-error.png') no-repeat .4em 50%; color: #f00; - background-image: url('images/ico-error.png'); } .g-info { - background-color: #e8e8e8; - background-image: url('images/ico-info.png'); + background: #e8e8e8 url('images/ico-info.png') no-repeat .4em 50%; } .g-success, .g-allowed { - background-color: #d9efc2; - background-image: url('images/ico-success.png'); + background: #d9efc2 url('images/ico-success.png') no-repeat .4em 50%; } -.g-warning { - background-color: #fcf9ce; - background-image: url('images/ico-warning.png'); +.g-warning, +tr.g-warning td.g-warning { + background: #fcf9ce url('images/ico-warning.png') no-repeat .4em 50%; } form .g-error { @@ -110,7 +107,29 @@ form .g-error { cursor: move; } -.g-target { +.g-draggable:hover { + border: 1px dashed #000; +} + +.ui-sortable .g-target, +.ui-state-highlight { + background-color: #fcf9ce; + border: 2px dotted #999; + height: 2em; + margin: 1em 0; +} + +/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ + +.g-loading-large, +.g-dialog-loading-large { + background: #e8e8e8 url('images/loading-large.gif') no-repeat center center; + font-size: 0; +} + +.g-loading-small { + background: #e8e8e8 url('images/loading-small.gif') no-repeat center center; + font-size: 0; } /** ******************************************************************* @@ -145,41 +164,17 @@ form .g-error { * 5) Containers/widgets **********************************************************************/ -#g-dialog { - text-align: left; -} - -#g-dialog .g-narrow { - margin: 0 auto; - width: 270px; -} - -#g-dialog fieldset { - border: none; -} - -#g-dialog legend { - display: none; -} - -#g-dialog form input[type="text"], -#g-dialog form input[type="password"] { - width: 100%; -} +/* Generic block container ~~~~~~~~~~~~~~~ */ -#g-dialog p { - margin: 0; +.g-block { + clear: both; + margin-bottom: 2.5em; } -#g-dialog li { - padding-left: 0; +.g-block-content { } -#g-dialog .g-cancel { - clear: none; - float: left; - margin: .3em 1em; -} +/* Buttons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .g-button { display: inline-block; @@ -196,22 +191,30 @@ form .g-error { -moz-outline-style: none; } -.g-progressbar { +.g-progress-bar { + height: 1em; + width: 100%; + margin-top: .5em; + display: inline-block; } -.g-block { +/* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-message-block { + border: 1px solid #ccc; } -.g-block-content { +#g-action-status { + width: 100% !important; } -.g-message-box { - width: 100%; +#g-site-status li { + border-bottom: 1px solid #ccc; } -.g-message { - border: 1px solid #ccc; - margin-bottom: .4em; +.g-module-status { + clear: both; + margin-bottom: 1em; } /* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -272,3 +275,69 @@ form .g-error { .g-list-horizontal { } + +/* Dialogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-dialog { + text-align: left; +} + +#g-dialog .g-narrow { + margin: 0 auto; + width: 270px; +} + +#g-dialog fieldset { + border: none; +} + +#g-dialog legend { + display: none; +} + +#g-dialog form input[type="text"], +#g-dialog form input[type="password"] { + width: 100%; +} + +#g-dialog p { + margin: 0; +} + +#g-dialog li { + padding-left: 0; +} + +#g-dialog .g-cancel { + clear: none; + float: left; + margin: .3em 1em; +} + +/** ******************************************************************* + * 6) Browser hacks + * @todo Insert .g-clearfix in context of specific selectors + * listed then delete them + *********************************************************************/ + +.g-clearfix, +#g-header:after, +#g-album-grid:after, +.g-pager:after, +#g-view-menu:after, +#g-site-admin-menu:after, +#g-header:after, +#g-admin-comments-menu:after, +#g-group-admin:after, +.g-selected:after, +.g-available .g-block:after, +#g-module-create-form ul li ul:after, +#g-developer-tools:after, +#g-photo-stream:after, +#g-view-menu:after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; +} diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 51a1e245..fd8ae63c 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -30,7 +30,7 @@ <? if (g2_import::is_initialized()): ?> <div id="g-admin-g2-import-details"> <h2> <?= t("Import") ?> </h2> - <ul id="g-action-status"> + <ul id="g-action-status" class="g-message-block"> <li class="g-success"> <?= t("Gallery version %version detected", array("version" => g2_import::version())) ?> </li> diff --git a/modules/gallery/helpers/message.php b/modules/gallery/helpers/message.php index 0d638571..02680655 100644 --- a/modules/gallery/helpers/message.php +++ b/modules/gallery/helpers/message.php @@ -81,7 +81,7 @@ class message_Core { $buf[] = "<li class=\"" . self::severity_class($msg[1]) . "\">$msg[0]</li>"; } if ($buf) { - return "<ul id=\"g-action-status\">" . implode("", $buf) . "</ul>"; + return "<ul id=\"g-action-status\" class=\"g-message-block\">" . implode("", $buf) . "</ul>"; } } diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 422bd8f7..70ecd261 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -4,7 +4,7 @@ <p> <?= t("Here are internal Gallery configuration settings. Most of these settings are accessible elsewhere in the administrative console.") ?> </p> - <ul id="g-action-status"> + <ul id="g-action-status" class="g-message-block"> <li class="g-warning"> <b><?= t("Change these values at your own risk!") ?></b> </li> diff --git a/modules/gallery/views/admin_dashboard.html.php b/modules/gallery/views/admin_dashboard.html.php index 154aa172..f391547e 100644 --- a/modules/gallery/views/admin_dashboard.html.php +++ b/modules/gallery/views/admin_dashboard.html.php @@ -16,7 +16,7 @@ cursor: "move", handle: $(".ui-widget-header"), opacity: 0.6, - placeholder: "g-drop-target", + placeholder: "g-target", stop: update_blocks }); @@ -26,7 +26,7 @@ cursor: "move", handle: $(".ui-widget-header"), opacity: 0.6, - placeholder: "g-drop-target", + placeholder: "g-target", stop: update_blocks }); }); diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 3137a2a6..b4f339ae 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -4,7 +4,7 @@ $(".g-admin-blocks-list ul").sortable({ connectWith: ".g-sortable-blocks", opacity: .7, - placeholder: "ui-state-highlight", + placeholder: "g-target", update: function(event,ui) { if ($(this).attr("id") == "g-active-blocks") { var active_blocks = ""; @@ -18,7 +18,7 @@ } }); } - }, + } }).disableSelection(); }); </script> diff --git a/modules/gallery/views/permissions_browse.html.php b/modules/gallery/views/permissions_browse.html.php index 540f2735..e432f56b 100644 --- a/modules/gallery/views/permissions_browse.html.php +++ b/modules/gallery/views/permissions_browse.html.php @@ -26,7 +26,7 @@ </script> <div id="g-permissions"> <? if (!$htaccess_works): ?> - <ul id="g-action-status"> + <ul id="g-action-status" class="g-message-block"> <li class="g-error"> <?= t("Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable <a %mod_rewrite_attrs>mod_rewrite</a> and set <a %apache_attrs><i>AllowOverride FileInfo Options</i></a> to fix this.", array("mod_rewrite_attrs" => html::mark_clean('href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html" target="_blank"'), diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php index ddad1fc4..ff73dd6f 100644 --- a/modules/gallery/views/simple_uploader.html.php +++ b/modules/gallery/views/simple_uploader.html.php @@ -12,7 +12,7 @@ <div id="g-add-photos"> <? if (ini_get("suhosin.session.encrypt")): ?> - <ul id="g-action-status"> + <ul id="g-action-status" class="g-message-block"> <li class="g-error"> <?= t("Error: your server is configured to use the <a href=\"%encrypt_url\"><code>suhosin.session.encrypt</code></a> setting from <a href=\"%suhosin_url\">Suhosin</a>. You must disable this setting to upload photos.", array("encrypt_url" => "http://www.hardened-php.net/suhosin/configuration.html#suhosin.session.encrypt", diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index dc627d10..7dcb01d9 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -12,7 +12,7 @@ <div class="yui-u first"> <h3><?= t("Albums") ?></h3> </div> - <div id="g-action-status" class="yui-u"> + <div id="g-action-status" class="g-message-block yui-u"> <div class="g-info"><?= t("Drag and drop photos to re-order or move between albums") ?></div> </div> </div> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index f23472b8..3573df57 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -5,13 +5,12 @@ * * Sheet organization: * 1) Basic HTML elements - * 3) Reusable content blocks - * 4) Page layout containers - * 5) Content blocks in specific layout containers - * 6) Navigation and menus - * 7) Browser hacks - * 8) jQuery and jQuery UI - * 9) Right-to-left language styles + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) Navigation and menus + * 6) jQuery and jQuery UI + * 7) Right-to-left language styles */ /** ******************************************************************* @@ -219,21 +218,15 @@ li.g-error select { } /** ******************************************************************* - * 3) Reusable content blocks + * 2) Reusable content blocks *********************************************************************/ .g-block { background-color: #fff; border: 1px solid #ccc; - clear: both; - margin-bottom: 2.5em; padding: 1em; } -#g-sidebar .g-block-content { - padding: 0; -} - .g-block h2 { background-color: #e8e8e8; padding: .3em .8em; @@ -243,6 +236,10 @@ li.g-error select { margin-top: 1em; } +#g-sidebar .g-block-content { + padding: 0; +} + .g-selected img, .g-available .g-block img { float: left; @@ -276,53 +273,6 @@ li.g-error select { opacity: 0.4; } -/* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ - -#g-action-status { - width: 100%; -} - -#g-site-status li, -#g-action-status li, -.g-module-status { - border: 1px solid #ccc; - margin-bottom: .4em; -} - -#g-site-status li { - margin-bottom: 0; - border: none; - border-bottom: 1px solid #ccc; -} - -.g-module-status { - clear: both; - margin-bottom: 1em; -} - -.g-error, -.g-info, -.g-success, -.g-warning { - padding: .4em .5em .4em 30px; -} - -.g-error, tr.g-error td.g-error { - background: #f6cbca url('../../../lib/images/ico-error.png') no-repeat .4em 50%; -} - -.g-info { - background: #e8e8e8 url('../../../lib/images/ico-info.png') no-repeat .4em 50%; -} - -.g-success { - background: #d9efc2 url('../../../lib/images/ico-success.png') no-repeat .4em 50%; -} - -.g-warning, tr.g-warning td.g-warning { - background: #fcf9ce url('../../../lib/images/ico-warning.png') no-repeat .4em 50%; -} - .g-pager .g-info, tr.g-error, tr.g-info, @@ -368,7 +318,7 @@ tr.g-warning { } /*** ****************************************************************** - * 4) Page layout containers + * 3) Page layout containers *********************************************************************/ /* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -413,7 +363,7 @@ tr.g-warning { } /** ******************************************************************* - * 5) Content blocks in specific layout containers + * 4) Content blocks in specific layout containers *********************************************************************/ /* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -563,14 +513,11 @@ tr.g-warning { #g-user-admin-list { margin-bottom: 1em; } + #g-user-admin-list td { vertical-align: bottom; } -#g-user-admin-list .g-draggable:hover { - border: 1px dashed black; -} - #g-user-admin-list .admin { color: #55f; font-weight: bold; @@ -694,28 +641,7 @@ li.g-default-group h4, li.g-default-group .g-user { } /** ******************************************************************* - * 6) Browser hacks - *********************************************************************/ - -#g-site-admin-menu:after, -#g-header:after, -#g-admin-comments-menu:after, -#g-group-admin:after, -.g-selected:after, -.g-available .g-block:after, -#g-module-create-form ul li ul:after, -#g-developer-tools:after, -#g-photo-stream:after, -#g-view-menu:after { - clear: both; - content: "."; - display: block; - height: 0; - visibility: hidden; -} - -/** ******************************************************************* - * 7) jQuery and jQuery UI + * 6) jQuery and jQuery UI *********************************************************************/ /* Superfish menu overrides ~~~~~~~~~~~~~~ */ @@ -728,30 +654,6 @@ li.g-default-group h4, li.g-default-group .g-user { background-color: #dfe9ff; } -/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ - -.g-loading-large, -.g-dialog-loading-large { - background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; - font-size: 0; -} - -.g-loading-small { - background: #e8e8e8 url('../../../lib/images/loading-small.gif') no-repeat center center; - font-size: 0; -} - -.g-draggable { - cursor: move; -} - -.g-drop-target { - background-color: #cfdeff; - border: 1px dotted #999; - height: 100px; - margin: 1em 0; -} - /* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ #g-panel { @@ -771,6 +673,12 @@ li.g-default-group h4, li.g-default-group .g-user { cursor: move; } +#g-admin-dashboard .ui-state-highlight, +#g-sidebar .ui-state-highlight { + height: 2em; + margin-bottom: 1em; +} + .g-buttonset-vertical a { width: 8em !important; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index dac6a899..fe1025cc 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -5,13 +5,13 @@ * * Sheet organization: * 1) Basic HTML elements - * 3) Reusable content blocks - * 4) Page layout containers - * 5) Content blocks in specific layout containers - * 6) Navigation and menus - * 7) Browser hacks - * 8) jQuery and jQuery UI - * 9) Right-to-left language styles + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) Navigation and menus + * 6) Browser hacks + * 7) jQuery and jQuery UI + * 8) Right-to-left language styles */ /** ******************************************************************* @@ -222,14 +222,9 @@ li.g-error select { } /** ******************************************************************* - * 3) Reusable content blocks + * 2) Reusable content blocks *********************************************************************/ -.g-block { - clear: both; - margin-bottom: 2.5em; -} - .g-block h2 { background-color: #e8e8e8; padding: .3em .8em; @@ -241,57 +236,6 @@ li.g-error select { /* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-content #g-action-status { - width: 100%; -} - -#g-site-status li, -#g-action-status li, -.g-module-status { - border: 1px solid #ccc; - margin-bottom: .4em; -} - -#g-site-status li { - margin-bottom: 0; - border: none; - border-bottom: 1px solid #ccc; -} - -.g-module-status { - clear: both; - margin-bottom: 1em; -} - -.g-error, -.g-info, -.g-success, -.g-warning { - background-position: .4em 50%; - background-repeat: no-repeat; - padding: .4em .5em .4em 30px; -} - -.g-error { - background-color: #f6cbca; - background-image: url('../../../lib/images/ico-error.png'); -} - -.g-info { - background-color: #e8e8e8; - background-image: url('../../../lib/images/ico-info.png'); -} - -.g-success { - background-color: #d9efc2; - background-image: url('../../../lib/images/ico-success.png'); -} - -.g-warning { - background-color: #fcf9ce; - background-image: url('../../../lib/images/ico-warning.png'); -} - form .g-error, .g-pager .g-info { background-color: #fff !important; @@ -316,7 +260,7 @@ form .g-error, } /*** ****************************************************************** - * 4) Page layout containers + * 3) Page layout containers *********************************************************************/ /* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -364,7 +308,7 @@ form .g-error, } /** ******************************************************************* - * 5) Content blocks in specific layout containers + * 4) Content blocks in specific layout containers *********************************************************************/ /* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -455,7 +399,7 @@ form .g-error, #g-content #g-item { position: relative; - width: 99%; + width: 100%; } #g-content #g-photo { @@ -707,22 +651,7 @@ form .g-error, } /** ******************************************************************* - * 6) Browser hacks - *********************************************************************/ - -#g-header:after, -#g-album-grid:after, -.g-pager:after, -#g-view-menu:after { - clear: both; - content: "."; - display: block; - height: 0; - visibility: hidden; -} - -/** ******************************************************************* - * 7) jQuery and jQuery UI + * 6) jQuery and jQuery UI *********************************************************************/ /* Superfish menu overrides ~~~~~~~~~~~~~~ */ @@ -735,34 +664,6 @@ form .g-error, background-color: #dfe9ff; } -/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ - -.g-loading-large { - background: #e8e8e8 url('../../../lib/images/loading-large.gif') no-repeat center center; - font-size: 0; -} - -.g-dialog-loading-large { - background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; - font-size: 0; -} - -.g-loading-small { - background: #e8e8e8 url('../../../lib/images/loading-small.gif') no-repeat center center; - font-size: 0; -} - -.g-draggable { - cursor: move; -} - -.g-drop-target { - background-color: #cfdeff; - border: 1px dotted #999; - height: 100px; - margin: 1em 0; -} - /* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ .ui-widget-overlay { @@ -876,13 +777,6 @@ form .g-error, /*************** STUFF THAT NEEDS A HOME ****************/ -.g-progress-bar { - height: 1em; - width: 100%; - margin-top: .5em; - display: inline-block; -} - #g-add-photos #SWFUpload_0 { position: relative; top: -200px; diff --git a/themes/wind/views/no_sidebar.html.php b/themes/wind/views/no_sidebar.html.php index d0d3eba6..378bd971 100644 --- a/themes/wind/views/no_sidebar.html.php +++ b/themes/wind/views/no_sidebar.html.php @@ -1,5 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div class="g-warning"> - <?= t("No active sidebar blocks. <a href=\"%url\">Add blocks</a>", - array("url" => html::mark_clean(url::site("admin/sidebar")))) ?> -</div> +<ul class="g-message-block"> + <li class="g-warning"><?= t("No active sidebar blocks.<br/> + <a href=\"%url\">Add blocks</a>", + array("url" => html::mark_clean(url::site("admin/sidebar")))) ?></li> +</ul> -- cgit v1.2.3 From 121fcab5c81fd4f942eea11577e4381ab4d86ddc Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Wed, 7 Oct 2009 00:46:02 -0600 Subject: Replaced most clear fix hacks with generic class. --- lib/gallery.common.css | 13 +------------ modules/comment/views/admin_comments.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 8 ++++---- modules/user/views/admin_users.html.php | 2 +- themes/wind/views/album.html.php | 2 +- themes/wind/views/page.html.php | 2 +- themes/wind/views/pager.html.php | 2 +- themes/wind/views/sidebar.html.php | 2 +- 8 files changed, 11 insertions(+), 22 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index d100791e..740d9e87 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -321,20 +321,9 @@ form .g-error { *********************************************************************/ .g-clearfix, -#g-header:after, -#g-album-grid:after, -.g-pager:after, -#g-view-menu:after, #g-site-admin-menu:after, -#g-header:after, -#g-admin-comments-menu:after, -#g-group-admin:after, -.g-selected:after, -.g-available .g-block:after, #g-module-create-form ul li ul:after, -#g-developer-tools:after, -#g-photo-stream:after, -#g-view-menu:after { +#g-developer-tools:after { clear: both; content: "."; display: block; diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 62c64d12..e32a843f 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -38,7 +38,7 @@ <h1> <?= t("Manage Comments") ?> </h1> <!-- @todo: Highlight active menu option --> - <div id="g-admin-comments-menu"> + <div id="g-admin-comments-menu" class="g-clearfix"> <?= $menu ?> </div> diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index 714b3af8..a75d9f04 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -14,7 +14,7 @@ <div id="g-site-theme"> <h2> <?= t("Gallery theme") ?> </h2> - <div class="g-block g-selected"> + <div class="g-block g-selected g-clearfix"> <img src="<?= url::file("themes/{$site}/thumbnail.png") ?>" alt="<?= html::clean_attribute($themes[$site]->name) ?>" /> <h3> <?= $themes[$site]->name ?> </h3> @@ -29,7 +29,7 @@ <? foreach ($themes as $id => $info): ?> <? if (!$info->site) continue ?> <? if ($id == $site) continue ?> - <div class="g-block"> + <div class="g-block g-clearfix"> <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> @@ -52,7 +52,7 @@ <div id="g-admin-theme"> <h2> <?= t("Admin theme") ?> </h2> - <div class="g-block g-selected"> + <div class="g-block g-selected g-clearfix"> <img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>" alt="<?= html::clean_attribute($themes[$admin]->name) ?>" /> <h3> <?= $themes[$admin]->name ?> </h3> @@ -67,7 +67,7 @@ <? foreach ($themes as $id => $info): ?> <? if (!$info->admin) continue ?> <? if ($id == $admin) continue ?> - <div class="g-block"> + <div class="g-block g-clearfix"> <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 28daff29..a127bc15 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -103,7 +103,7 @@ </div> </div> -<div id="g-group-admin" class="g-block"> +<div id="g-group-admin" class="g-block g-clearfix"> <a href="<?= url::site("admin/users/add_group_form") ?>" class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new group")->for_html_attr() ?>"> diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php index 5d928b2e..91646b1e 100644 --- a/themes/wind/views/album.html.php +++ b/themes/wind/views/album.html.php @@ -6,7 +6,7 @@ <div class="g-description"><?= nl2br(html::purify($item->description)) ?></div> </div> -<ul id="g-album-grid"> +<ul id="g-album-grid" class="g-clearfix"> <? if (count($children)): ?> <? foreach ($children as $i => $child): ?> <? $item_class = "g-photo"; ?> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 6e1e3a53..fab4ba9e 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -76,7 +76,7 @@ <?= $theme->page_top() ?> <div id="doc4" class="yui-t5 g-view"> <?= $theme->site_status() ?> - <div id="g-header"> + <div id="g-header" class="g-clearfix"> <div id="g-banner"> <?= $theme->header_top() ?> <? if ($header_text = module::get_var("gallery", "header_text")): ?> diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php index 5e79add6..2075fd95 100644 --- a/themes/wind/views/pager.html.php +++ b/themes/wind/views/pager.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // See http://docs.kohanaphp.com/libraries/pagination ?> -<ul class="g-pager"> +<ul class="g-pager g-clearfix"> <? /* @todo This message isn't easily localizable */ $from_to_msg = t2("Photo %from_number of %count", "Photos %from_number - %to_number of %count", diff --git a/themes/wind/views/sidebar.html.php b/themes/wind/views/sidebar.html.php index d2551c52..c49a7b51 100644 --- a/themes/wind/views/sidebar.html.php +++ b/themes/wind/views/sidebar.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= $theme->sidebar_top() ?> <div class="g-toolbar"> - <div id="g-view-menu" class="g-buttonset"> + <div id="g-view-menu" class="g-buttonset g-clearfix"> <? if ($page_type == "album"):?> <?= $theme->album_menu() ?> <? elseif ($page_type == "photo") : ?> -- cgit v1.2.3 From 80bb78fa4ef3fe718cdee56fc98d5584dcd7d5b2 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Fri, 9 Oct 2009 12:07:27 -0600 Subject: Fixed resized photo float issue, added g-clearfix to g-pager on the photo view. Tightened up g-pager styles. Removed a few unecessary !importants. --- lib/gallery.common.css | 13 ++++++------- lib/gallery.dialog.js | 2 +- themes/admin_wind/css/screen.css | 2 -- themes/wind/css/fix-ie.css | 2 +- themes/wind/css/screen.css | 15 +-------------- themes/wind/views/photo.html.php | 2 +- 6 files changed, 10 insertions(+), 26 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index bb92e409..cc44b663 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -137,11 +137,13 @@ form .g-error { **********************************************************************/ .g-left { + clear: none; float: left; margin: 1em 1em 1em 0; } .g-right { + clear: none; float: right; margin: 1em 0 1em 1em; } @@ -256,19 +258,18 @@ form .g-error { /* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .g-pager { - clear: both; - margin: 0; - padding: 5px 0 !important; + padding: 5px 0; width: 100%; } .g-pager li { float: left; - margin: 0; width: 30%; } .g-pager .g-info { + background: none; + padding: .2em 0; text-align: center; width: 40%; } @@ -309,9 +310,7 @@ form .g-error { } #g-dialog .g-cancel { - clear: none; - float: left; - margin: .3em 1em; + margin: .4em 1em; } /** ******************************************************************* diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index c162ab2a..89470519 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -73,7 +73,7 @@ form_loaded: function(event, ui) { // Should be defined (and localized) in the theme MSG_CANCEL = MSG_CANCEL || 'Cancel'; - var eCancel = '<a href="#" class="g-cancel">' + MSG_CANCEL + '</a>'; + var eCancel = '<a href="#" class="g-cancel g-left">' + MSG_CANCEL + '</a>'; if ($("#g-dialog .submit").length) { $("#g-dialog .submit").addClass("ui-state-default ui-corner-all"); $.fn.gallery_hover_init(); diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index ca2b2752..3c58a282 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -268,7 +268,6 @@ li.g-error select { opacity: 0.4; } -.g-pager .g-info, tr.g-error, tr.g-info, tr.g-success, @@ -951,7 +950,6 @@ g-languages-form input { } .rtl .g-left, -.rtl #g-dialog .g-cancel, .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], diff --git a/themes/wind/css/fix-ie.css b/themes/wind/css/fix-ie.css index be6e22be..60abc08d 100644 --- a/themes/wind/css/fix-ie.css +++ b/themes/wind/css/fix-ie.css @@ -19,7 +19,7 @@ input.submit { width: 110px; } -#g-dialog a.g-cancel { +#g-dialog .g-cancel { display: inline-block !important; float: none !important; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 409cbcad..5c65e344 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -234,18 +234,6 @@ li.g-error select { margin-top: 1em; } -/* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ - -form .g-error, -.g-pager .g-info { - background-color: #fff !important; -} - -.g-pager .g-info { - background-image: none !important; - padding: 0 !important; -} - /* Inline layout (forms, lists) ~~~~~~~~~~ */ .g-short-form li { @@ -408,7 +396,7 @@ form .g-error, #g-content #g-item .g-fullsize-link img { display: block; - margin: 1em auto !important; + margin: 1em auto; } #g-content #g-comments { @@ -899,7 +887,6 @@ form .g-error, } .rtl .g-left, -.rtl #g-dialog .g-cancel, .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index 2520cb0c..c9c30017 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -15,7 +15,7 @@ <div id="g-item"> <?= $theme->photo_top() ?> - <ul class="g-pager"> + <ul class="g-pager g-clearfix"> <li> <? if ($previous_item): ?> <a href="<?= $previous_item->url() ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> -- cgit v1.2.3 From c459482692d816987f5a48ba022b611eef8355be Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Thu, 15 Oct 2009 23:25:55 -0600 Subject: Remove g-toolbar, it serves no purpose for styling or JS. --- themes/night_wind/views/sidebar.html.php | 22 ++++++++++------------ themes/wind/views/sidebar.html.php | 22 ++++++++++------------ 2 files changed, 20 insertions(+), 24 deletions(-) (limited to 'themes/wind/views') diff --git a/themes/night_wind/views/sidebar.html.php b/themes/night_wind/views/sidebar.html.php index c49a7b51..151c6365 100644 --- a/themes/night_wind/views/sidebar.html.php +++ b/themes/night_wind/views/sidebar.html.php @@ -1,17 +1,15 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= $theme->sidebar_top() ?> -<div class="g-toolbar"> - <div id="g-view-menu" class="g-buttonset g-clearfix"> - <? if ($page_type == "album"):?> - <?= $theme->album_menu() ?> - <? elseif ($page_type == "photo") : ?> - <?= $theme->photo_menu() ?> - <? elseif ($page_type == "movie") : ?> - <?= $theme->movie_menu() ?> - <? elseif ($page_type == "tag") : ?> - <?= $theme->tag_menu() ?> - <? endif ?> - </div> +<div id="g-view-menu" class="g-buttonset g-clearfix"> + <? if ($page_type == "album"):?> + <?= $theme->album_menu() ?> + <? elseif ($page_type == "photo") : ?> + <?= $theme->photo_menu() ?> + <? elseif ($page_type == "movie") : ?> + <?= $theme->movie_menu() ?> + <? elseif ($page_type == "tag") : ?> + <?= $theme->tag_menu() ?> + <? endif ?> </div> <?= $theme->sidebar_blocks() ?> diff --git a/themes/wind/views/sidebar.html.php b/themes/wind/views/sidebar.html.php index c49a7b51..f0f29290 100644 --- a/themes/wind/views/sidebar.html.php +++ b/themes/wind/views/sidebar.html.php @@ -1,17 +1,15 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= $theme->sidebar_top() ?> -<div class="g-toolbar"> - <div id="g-view-menu" class="g-buttonset g-clearfix"> - <? if ($page_type == "album"):?> - <?= $theme->album_menu() ?> - <? elseif ($page_type == "photo") : ?> - <?= $theme->photo_menu() ?> - <? elseif ($page_type == "movie") : ?> - <?= $theme->movie_menu() ?> - <? elseif ($page_type == "tag") : ?> - <?= $theme->tag_menu() ?> - <? endif ?> - </div> +<div id="g-view-menu" class="g-clearfix"> + <? if ($page_type == "album"):?> + <?= $theme->album_menu() ?> + <? elseif ($page_type == "photo") : ?> + <?= $theme->photo_menu() ?> + <? elseif ($page_type == "movie") : ?> + <?= $theme->movie_menu() ?> + <? elseif ($page_type == "tag") : ?> + <?= $theme->tag_menu() ?> + <? endif ?> </div> <?= $theme->sidebar_blocks() ?> -- cgit v1.2.3 From b52b2005206928110120bb2ecfbc868abe979040 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Thu, 15 Oct 2009 23:38:39 -0600 Subject: Restored g-buttonset class to the view menu, for now. --- themes/wind/views/sidebar.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/wind/views') diff --git a/themes/wind/views/sidebar.html.php b/themes/wind/views/sidebar.html.php index f0f29290..151c6365 100644 --- a/themes/wind/views/sidebar.html.php +++ b/themes/wind/views/sidebar.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= $theme->sidebar_top() ?> -<div id="g-view-menu" class="g-clearfix"> +<div id="g-view-menu" class="g-buttonset g-clearfix"> <? if ($page_type == "album"):?> <?= $theme->album_menu() ?> <? elseif ($page_type == "photo") : ?> -- cgit v1.2.3 From ad0497a8d2956a73d174445a30d9190b1f970caf Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Sat, 17 Oct 2009 12:58:31 -0600 Subject: Drop our g-clearfix in favor of using jQuery UI's ui-helper-clearfix. --- lib/gallery.common.css | 13 ------------- modules/comment/views/admin_comments.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 8 ++++---- modules/user/views/admin_users.html.php | 2 +- themes/admin_wind/css/fix-ie.css | 2 +- themes/admin_wind/views/admin.html.php | 2 +- themes/night_wind/css/fix-ie.css | 2 +- themes/night_wind/views/album.html.php | 2 +- themes/night_wind/views/page.html.php | 2 +- themes/night_wind/views/pager.html.php | 2 +- themes/night_wind/views/photo.html.php | 2 +- themes/night_wind/views/sidebar.html.php | 2 +- themes/wind/css/fix-ie.css | 2 +- themes/wind/views/album.html.php | 2 +- themes/wind/views/page.html.php | 2 +- themes/wind/views/pager.html.php | 2 +- themes/wind/views/photo.html.php | 2 +- themes/wind/views/sidebar.html.php | 2 +- 18 files changed, 20 insertions(+), 33 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 23262087..74a9642f 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -7,7 +7,6 @@ * 3) States and interactions * 4) Positioning and order * 5) Containers/widgets - * 6) Browser hacks */ /** ******************************************************************* @@ -325,15 +324,3 @@ form .g-error { #g-dialog .g-cancel { margin: .4em 1em; } - -/** ******************************************************************* - * 6) Browser hacks - *********************************************************************/ - -.g-clearfix:after { - clear: both; - content: "."; - display: block; - height: 0; - visibility: hidden; -} diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index e32a843f..8f719f05 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -38,7 +38,7 @@ <h1> <?= t("Manage Comments") ?> </h1> <!-- @todo: Highlight active menu option --> - <div id="g-admin-comments-menu" class="g-clearfix"> + <div id="g-admin-comments-menu" class="ui-helper-clearfix"> <?= $menu ?> </div> diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index a75d9f04..f7e77a01 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -14,7 +14,7 @@ <div id="g-site-theme"> <h2> <?= t("Gallery theme") ?> </h2> - <div class="g-block g-selected g-clearfix"> + <div class="g-block g-selected ui-helper-clearfix"> <img src="<?= url::file("themes/{$site}/thumbnail.png") ?>" alt="<?= html::clean_attribute($themes[$site]->name) ?>" /> <h3> <?= $themes[$site]->name ?> </h3> @@ -29,7 +29,7 @@ <? foreach ($themes as $id => $info): ?> <? if (!$info->site) continue ?> <? if ($id == $site) continue ?> - <div class="g-block g-clearfix"> + <div class="g-block ui-helper-clearfix"> <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> @@ -52,7 +52,7 @@ <div id="g-admin-theme"> <h2> <?= t("Admin theme") ?> </h2> - <div class="g-block g-selected g-clearfix"> + <div class="g-block g-selected ui-helper-clearfix"> <img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>" alt="<?= html::clean_attribute($themes[$admin]->name) ?>" /> <h3> <?= $themes[$admin]->name ?> </h3> @@ -67,7 +67,7 @@ <? foreach ($themes as $id => $info): ?> <? if (!$info->admin) continue ?> <? if ($id == $admin) continue ?> - <div class="g-block g-clearfix"> + <div class="g-block ui-helper-clearfix"> <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index a127bc15..2f8d8673 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -103,7 +103,7 @@ </div> </div> -<div id="g-group-admin" class="g-block g-clearfix"> +<div id="g-group-admin" class="g-block ui-helper-clearfix"> <a href="<?= url::site("admin/users/add_group_form") ?>" class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new group")->for_html_attr() ?>"> diff --git a/themes/admin_wind/css/fix-ie.css b/themes/admin_wind/css/fix-ie.css index 106fe4a1..fe6e32ab 100644 --- a/themes/admin_wind/css/fix-ie.css +++ b/themes/admin_wind/css/fix-ie.css @@ -2,7 +2,7 @@ * Fix display in IE 6 and 7 */ -.g-clearfix, +.ui-helper-clearfix, #g-group-admin, #g-developer-tools { zoom: 1; diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index 4ee08d95..b788eb93 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -50,7 +50,7 @@ <a id="g-logo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery")->for_html_attr() ?>"> ← <?= t("back to the ...") ?> </a> - <div id="g-site-admin-menu" class="g-clearfix"> + <div id="g-site-admin-menu" class="ui-helper-clearfix"> <?= $theme->admin_menu() ?> </div> <?= $theme->admin_header_bottom() ?> diff --git a/themes/night_wind/css/fix-ie.css b/themes/night_wind/css/fix-ie.css index 60abc08d..c32d2cab 100644 --- a/themes/night_wind/css/fix-ie.css +++ b/themes/night_wind/css/fix-ie.css @@ -2,7 +2,7 @@ * Fix display in IE 6, 7 */ -.g-clearfix { +.ui-helper-clearfix { zoom: 1; } diff --git a/themes/night_wind/views/album.html.php b/themes/night_wind/views/album.html.php index 91646b1e..1163630d 100644 --- a/themes/night_wind/views/album.html.php +++ b/themes/night_wind/views/album.html.php @@ -6,7 +6,7 @@ <div class="g-description"><?= nl2br(html::purify($item->description)) ?></div> </div> -<ul id="g-album-grid" class="g-clearfix"> +<ul id="g-album-grid" class="ui-helper-clearfix"> <? if (count($children)): ?> <? foreach ($children as $i => $child): ?> <? $item_class = "g-photo"; ?> diff --git a/themes/night_wind/views/page.html.php b/themes/night_wind/views/page.html.php index fab4ba9e..c8b08129 100644 --- a/themes/night_wind/views/page.html.php +++ b/themes/night_wind/views/page.html.php @@ -76,7 +76,7 @@ <?= $theme->page_top() ?> <div id="doc4" class="yui-t5 g-view"> <?= $theme->site_status() ?> - <div id="g-header" class="g-clearfix"> + <div id="g-header" class="ui-helper-clearfix"> <div id="g-banner"> <?= $theme->header_top() ?> <? if ($header_text = module::get_var("gallery", "header_text")): ?> diff --git a/themes/night_wind/views/pager.html.php b/themes/night_wind/views/pager.html.php index 2075fd95..337d658f 100644 --- a/themes/night_wind/views/pager.html.php +++ b/themes/night_wind/views/pager.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // See http://docs.kohanaphp.com/libraries/pagination ?> -<ul class="g-pager g-clearfix"> +<ul class="g-pager ui-helper-clearfix"> <? /* @todo This message isn't easily localizable */ $from_to_msg = t2("Photo %from_number of %count", "Photos %from_number - %to_number of %count", diff --git a/themes/night_wind/views/photo.html.php b/themes/night_wind/views/photo.html.php index c9c30017..b33e2afa 100644 --- a/themes/night_wind/views/photo.html.php +++ b/themes/night_wind/views/photo.html.php @@ -15,7 +15,7 @@ <div id="g-item"> <?= $theme->photo_top() ?> - <ul class="g-pager g-clearfix"> + <ul class="g-pager ui-helper-clearfix"> <li> <? if ($previous_item): ?> <a href="<?= $previous_item->url() ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> diff --git a/themes/night_wind/views/sidebar.html.php b/themes/night_wind/views/sidebar.html.php index 151c6365..cd50fc01 100644 --- a/themes/night_wind/views/sidebar.html.php +++ b/themes/night_wind/views/sidebar.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= $theme->sidebar_top() ?> -<div id="g-view-menu" class="g-buttonset g-clearfix"> +<div id="g-view-menu" class="g-buttonset ui-helper-clearfix"> <? if ($page_type == "album"):?> <?= $theme->album_menu() ?> <? elseif ($page_type == "photo") : ?> diff --git a/themes/wind/css/fix-ie.css b/themes/wind/css/fix-ie.css index 60abc08d..c32d2cab 100644 --- a/themes/wind/css/fix-ie.css +++ b/themes/wind/css/fix-ie.css @@ -2,7 +2,7 @@ * Fix display in IE 6, 7 */ -.g-clearfix { +.ui-helper-clearfix { zoom: 1; } diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php index 91646b1e..1163630d 100644 --- a/themes/wind/views/album.html.php +++ b/themes/wind/views/album.html.php @@ -6,7 +6,7 @@ <div class="g-description"><?= nl2br(html::purify($item->description)) ?></div> </div> -<ul id="g-album-grid" class="g-clearfix"> +<ul id="g-album-grid" class="ui-helper-clearfix"> <? if (count($children)): ?> <? foreach ($children as $i => $child): ?> <? $item_class = "g-photo"; ?> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index fab4ba9e..c8b08129 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -76,7 +76,7 @@ <?= $theme->page_top() ?> <div id="doc4" class="yui-t5 g-view"> <?= $theme->site_status() ?> - <div id="g-header" class="g-clearfix"> + <div id="g-header" class="ui-helper-clearfix"> <div id="g-banner"> <?= $theme->header_top() ?> <? if ($header_text = module::get_var("gallery", "header_text")): ?> diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php index 2075fd95..337d658f 100644 --- a/themes/wind/views/pager.html.php +++ b/themes/wind/views/pager.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // See http://docs.kohanaphp.com/libraries/pagination ?> -<ul class="g-pager g-clearfix"> +<ul class="g-pager ui-helper-clearfix"> <? /* @todo This message isn't easily localizable */ $from_to_msg = t2("Photo %from_number of %count", "Photos %from_number - %to_number of %count", diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index c9c30017..b33e2afa 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -15,7 +15,7 @@ <div id="g-item"> <?= $theme->photo_top() ?> - <ul class="g-pager g-clearfix"> + <ul class="g-pager ui-helper-clearfix"> <li> <? if ($previous_item): ?> <a href="<?= $previous_item->url() ?>" class="g-button ui-icon-left ui-state-default ui-corner-all"> diff --git a/themes/wind/views/sidebar.html.php b/themes/wind/views/sidebar.html.php index 151c6365..cd50fc01 100644 --- a/themes/wind/views/sidebar.html.php +++ b/themes/wind/views/sidebar.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= $theme->sidebar_top() ?> -<div id="g-view-menu" class="g-buttonset g-clearfix"> +<div id="g-view-menu" class="g-buttonset ui-helper-clearfix"> <? if ($page_type == "album"):?> <?= $theme->album_menu() ?> <? elseif ($page_type == "photo") : ?> -- cgit v1.2.3 From 3387b54fe36b573ec5d9b1fd42844cfd6b8d4ff6 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Sat, 17 Oct 2009 18:43:47 -0600 Subject: Add clearfix to force pager nav below dynamic g-album-grid. --- themes/wind/views/dynamic.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/wind/views') diff --git a/themes/wind/views/dynamic.html.php b/themes/wind/views/dynamic.html.php index aa347402..51e48dc0 100644 --- a/themes/wind/views/dynamic.html.php +++ b/themes/wind/views/dynamic.html.php @@ -6,7 +6,7 @@ <h1><?= html::clean($title) ?></h1> </div> -<ul id="g-album-grid"> +<ul id="g-album-grid" class="ui-helper-clearfix"> <? foreach ($children as $i => $child): ?> <li class="g-item <?= $child->is_album() ? "g-album" : "" ?>"> <?= $theme->thumb_top($child) ?> -- cgit v1.2.3 From c9ccc2461880de141c37c3c7a7df3b26530ce806 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Sun, 18 Oct 2009 10:32:08 -0600 Subject: Moved the short_form init function to gallery.common and made it jQuery plugin. Dropped gallery.form.js. Applied short forms to server_add and tag admin pages. Added tag.css to admin views. Added .g-wide {}. --- lib/gallery.common.css | 42 +++++++++++ lib/gallery.common.js | 36 ++++++++++ lib/gallery.form.js | 34 --------- .../server_add/controllers/admin_server_add.php | 2 +- modules/tag/css/tag.css | 34 ++------- modules/tag/helpers/tag.php | 3 +- modules/tag/js/tag.js | 33 +++++---- modules/tag/views/admin_tags.html.php | 81 +++++++++++----------- themes/admin_wind/css/screen.css | 50 +------------ themes/admin_wind/js/ui.init.js | 16 ++--- themes/night_wind/js/ui.init.js | 14 ---- themes/night_wind/views/page.html.php | 1 - themes/wind/css/screen.css | 25 ++----- themes/wind/js/ui.init.js | 5 +- themes/wind/views/page.html.php | 1 - 15 files changed, 164 insertions(+), 213 deletions(-) delete mode 100644 lib/gallery.form.js (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 74a9642f..1fe85d46 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -33,6 +33,9 @@ .g-narrow { } +.g-wide { +} + /** ******************************************************************* * 3) States and interactions **********************************************************************/ @@ -214,9 +217,15 @@ form .g-error { } #g-action-status { + margin-bottom: 1em; width: 100% !important; } +#g-action-status li { + padding-top: .4em; + padding-bottom: .3em; +} + #g-site-status li { border-bottom: 1px solid #ccc; padding: .3em .3em .3em 30px; @@ -324,3 +333,36 @@ form .g-error { #g-dialog .g-cancel { margin: .4em 1em; } + +/* Inline layout (forms, lists) ~~~~~~~~~~ */ + +.g-short-form label { + display: none; +} + +.g-short-form fieldset { + border: none; + padding: 0 !important; +} + +.g-short-form li { + float: left; + padding: .4em 0; +} + +.g-short-form input[type="text"] { + color: #666; + padding: .3em .6em; + width: auto; +} + +.g-short-form .g-cancel { + display: block; + padding: .2em .8em; +} + +/* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .g-short-form li { + float: right; +} diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 5721c779..7c52fef0 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -172,4 +172,40 @@ }; }; + // Initialize a short form. Short forms may contain only one text input. + $.fn.gallery_short_form = function() { + return this.each(function(i){ + var label = $(this).find("label:first"); + var input = $(this).find("input[type=text]:first"); + var button = $(this).find("input[type=submit]"); + + $(".g-short-form").addClass("ui-helper-clearfix"); + $(".g-short-form input[type=text]").addClass("ui-corner-left"); + $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right"); + + // Set the input value equal to label text + if (input.val() == "") { + input.val(label.html()); + button.enable(false); + } + + // Attach event listeners to the input + input.bind("focus", function(e) { + // Empty input value if it equals it's label + if ($(this).val() == label.html()) { + $(this).val(""); + } + button.enable(true); + }); + + input.bind("blur", function(e){ + // Reset the input value if it's empty + if ($(this).val() == "") { + $(this).val(label.html()); + button.enable(false); + } + }); + }); + }; + })(jQuery); diff --git a/lib/gallery.form.js b/lib/gallery.form.js deleted file mode 100644 index 77ce3b7d..00000000 --- a/lib/gallery.form.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Initialize a short form. Short forms may contain only one text input. - * - * @param form_id string The form's CSS id - */ -function short_form_init(form_id) { - var form = $(form_id); - var label = form.find("label:first"); - var input = form.find("input[type=text]:first"); - var button = form.find("input[type=submit]"); - - // Set the input value equal to label text - if (input.val() == "") { - input.val(label.html()); - button.enable(false); - } - - // Attach event listeners to the input - input.bind("focus", function(e) { - // Empty input value if it equals it's label - if ($(this).val() == label.html()) { - $(this).val(""); - } - button.enable(true); - }); - - input.bind("blur", function(e){ - // Reset the input value if it's empty - if ($(this).val() == "") { - $(this).val(label.html()); - button.enable(false); - } - }); -} diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php index 837a2c00..cb71e1f1 100644 --- a/modules/server_add/controllers/admin_server_add.php +++ b/modules/server_add/controllers/admin_server_add.php @@ -83,7 +83,7 @@ class Admin_Server_Add_Controller extends Admin_Controller { private function _get_admin_form() { $form = new Forge("admin/server_add/add_path", "", "post", - array("id" => "g-server-add-admin-form")); + array("id" => "g-server-add-admin-form", "class" => "g-short-form g-wide")); $add_path = $form->group("add_path"); $add_path->input("path")->label(t("Path"))->rules("required") ->error_messages("not_readable", t("This directory is not readable by the webserver")) diff --git a/modules/tag/css/tag.css b/modules/tag/css/tag.css index b718de05..6dfba946 100644 --- a/modules/tag/css/tag.css +++ b/modules/tag/css/tag.css @@ -1,3 +1,5 @@ +/* Tag cloud ~~~~~~~~~~~~~~ */ + #g-tag-cloud ul { font-size: 1.2em; text-align: justify; @@ -75,40 +77,18 @@ } #g-tag-admin ul { - padding-bottom: .3em; + margin-bottom: 2em; } #g-tag-admin li { - padding: .1em 0 .2em .3em; -} - -#g-tag-admin .g-column { - float: left; - width: 200px; + padding: .1em 0 .2em 0; } -#g-edit-tag-form input { - padding: 0 .2em 0 .2em; - clear: none; - float: left; - margin: 0 .2em 0 0; +#g-rename-tag-form ul { + margin-bottom: 0; } -#g-edit-tag-form input[type="text"].g-error { +#g-rename-tag-form input[type="text"].g-error { border: 2px solid red; background: none; } - -#g-edit-tag-form input[type="submit"] { - height: 25px; -} - -#g-edit-tag-form a, #g-edit-tag-form span { - display: block; - float: left; - padding: .2em .2em 0 .1em; -} - -#g-edit-tag-form span { - float: right; -} diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index b1d79458..01972a65 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -79,7 +79,6 @@ class tag_Core { } } - /** * Return all the tags for a given item. * @return array @@ -111,7 +110,7 @@ class tag_Core { } static function get_rename_form($tag) { - $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "g-edit-tag-form", "class" => "g-short-form")); + $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "g-rename-tag-form", "class" => "g-short-form")); $group = $form->group("rename_tag")->label(t("Rename Tag")); $group->input("name")->label(t("Tag name"))->value($tag->name)->rules("required|length[1,64]"); $group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name")); diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 17845272..41fa4d41 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -18,10 +18,10 @@ function ajaxify_tag_form() { function closeEditInPlaceForms() { // closes currently open inplace edit forms - if ($("#g-edit-tag-form").length) { + if ($("#g-rename-tag-form").length) { $("#g-edit-error-message").remove(); - var li = $("#g-edit-tag-form").parent(); - $("#g-edit-tag-form").parent().html($("#g-edit-tag-form").parent().data("revert")); + var li = $("#g-rename-tag-form").parent(); + $("#g-rename-tag-form").parent().html($("#g-rename-tag-form").parent().data("revert")); li.height(""); $(".g-editable", li).bind("click", editInPlace); $(".g-dialog-link", li).gallery_dialog(); @@ -41,34 +41,37 @@ function editInPlace(element) { var tag_name = $(this).html(); var tag_width = $(this).width(); $(this).parent().data("revert", $(this).parent().html()); - var form = '<form id="g-edit-tag-form" method="post" class="g-inline ui-helper-clearfix" '; + var form = '<form id="g-rename-tag-form" method="post" class="g-short-form" '; form += 'action="' + TAG_RENAME_URL.replace('__ID__', tag_id) + '">'; form += '<input name="csrf" type="hidden" value="' + csrf_token + '" />'; - form += '<input id="name" name="name" type="text" class="textbox" value="' + - str_replace('"', """, tag_name) + '" />'; - form += '<input type="submit" class="submit ui-state-default ui-corner-all" value="' + save_i18n + '" i/>'; - form += '<a href="#">' + cancel_i18n + '</a>'; + form += '<ul>'; + form += '<li><input id="name" name="name" type="text" class="textbox" value="' + + str_replace('"', """, tag_name) + '" /></li>'; + form += '<li><input type="submit" class="submit ui-state-default" value="' + save_i18n + '" /></li>'; + form += '<li><a href="#" class="g-cancel">' + cancel_i18n + '</a></li>'; + form += '</ul>'; form += '</form>'; // add edit form $(this).parent().html(form); - $("#g-edit-tag-form #name") - .width(tag_width+30) + $("#g-rename-tag-form #name") + .width(tag_width) .focus(); - //$("#g-edit-tag-form").parent().height( $("#g-edit-tag-form").height() ); - $("#g-edit-tag-form a").bind("click", closeEditInPlaceForms); + $(".g-short-form").gallery_short_form(); + $("#g-rename-tag-form .g-cancel").bind("click", closeEditInPlaceForms); ajaxify_editInPlaceForm = function() { - $("#g-edit-tag-form").ajaxForm({ + $("#g-rename-tag-form").ajaxForm({ dataType: "json", success: function(data) { + console.log("success"); if (data.result == "success") { closeEditInPlaceForms(); // close form $("#g-tag-" + data.tag_id).text(data.new_tagname); // update tagname - console.log(data); window.location.reload(); } else if (data.result == "error") { - $("#g-edit-tag-form #name") + console.log("error"); + $("#g-rename-tag-form #name") .addClass("g-error") .focus(); $("#g-tag-admin").before("<p id=\"g-edit-error-message\" class=\"g-error\">" + data.message + "</p>"); diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index edc466bb..7771f7fe 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -14,51 +14,50 @@ var save_i18n = <?= html::js_string(t("save")->for_html_attr()) ?>; var cancel_i18n = <?= html::js_string(t("cancel")->for_html_attr()) ?>; </script> -<div class="g-block"> - <h2> - <?= t("Tag Admin") ?> - </h2> - <? $tags_per_column = $tags->count()/5 ?> - <? $column_tag_count = 0 ?> +<h2> + <?= t("Tag Admin") ?> +</h2> - <table id="g-tag-admin" class="g-block-content"> - <caption class="g-understate"> - <?= t2("There is one tag", "There are %count tags", $tags->count()) ?> - </caption> - <tr> - <td> - <? foreach ($tags as $i => $tag): ?> - <? $current_letter = strtoupper(mb_substr($tag->name, 0, 1)) ?> +<? $tags_per_column = $tags->count()/5 ?> +<? $column_tag_count = 0 ?> - <? if ($i == 0): /* first letter */ ?> - <strong><?= html::clean($current_letter) ?></strong> - <ul> - <? elseif ($last_letter != $current_letter): /* new letter */ ?> - <? if ($column_tag_count > $tags_per_column): /* new column */ ?> - </td> - <td> - <? $column_tag_count = 0 ?> - <? endif ?> +<table id="g-tag-admin"> + <caption class="g-understate"> + <?= t2("There is one tag", "There are %count tags", $tags->count()) ?> + </caption> + <tr> + <td> + <? foreach ($tags as $i => $tag): ?> + <? $current_letter = strtoupper(mb_substr($tag->name, 0, 1)) ?> - </ul> - <strong><?= html::clean($current_letter) ?></strong> - <ul> + <? if ($i == 0): /* first letter */ ?> + <strong><?= html::clean($current_letter) ?></strong> + <ul> + <? elseif ($last_letter != $current_letter): /* new letter */ ?> + <? if ($column_tag_count > $tags_per_column): /* new column */ ?> + </td> + <td> + <? $column_tag_count = 0 ?> <? endif ?> - <li> - <span id="g-tag-<?= $tag->id ?>" class="g-editable g-tag-name"><?= html::clean($tag->name) ?></span> - <span class="g-understate">(<?= $tag->count ?>)</span> - <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" - class="g-dialog-link g-delete-link g-button"> - <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> - </li> + </ul> + <strong><?= html::clean($current_letter) ?></strong> + <ul> + <? endif ?> - <? $column_tag_count++ ?> - <? $last_letter = $current_letter ?> - <? endforeach /* $tags */ ?> - </ul> - </td> - </tr> - </table> -</div> + <li> + <span id="g-tag-<?= $tag->id ?>" class="g-editable g-tag-name"><?= html::clean($tag->name) ?></span> + <span class="g-understate">(<?= $tag->count ?>)</span> + <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" + class="g-dialog-link g-delete-link g-button"> + <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> + </li> + + <? $column_tag_count++ ?> + <? $last_letter = $current_letter ?> + <? endforeach /* $tags */ ?> + </ul> + </td> + </tr> +</table> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 78358e84..1d60d392 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -122,8 +122,7 @@ fieldset { } #g-header fieldset, -#g-sidebar fieldset, -.g-short-form fieldset { +#g-sidebar fieldset { border: none; } @@ -135,8 +134,7 @@ legend { #g-header legend, #g-sidebar legend, #g-content #g-search-form legend, -input[type="hidden"], -.g-short-form label { +input[type="hidden"] { display: none; } @@ -298,19 +296,6 @@ tr.g-warning { background-color: #fff; } -/* Inline layout (forms, lists) ~~~~~~~~~~ */ - -.g-short-form li { - float: left; - padding: .4em 0; -} - -.g-short-form input[type="text"] { - color: #666; - padding: .3em .6em; - width: 11em; -} - /*** ****************************************************************** * 3) Page layout containers *********************************************************************/ @@ -811,36 +796,6 @@ li.g-default-group h4, li.g-default-group .g-user { padding: .5em } -#g-server-add-admin { - margin:auto; - text-align: left; -} - -#g-server-add-admin form fieldset { - border: medium none; -} - -#g-server-add-admin legend { - display: none; -} - -#g-server-add-admin .g-warning { - background-color: #FFFF99; -} - -#g-authorized-path { - margin: 0 !important; - padding: 0.3em 1.5em 0.3em 1em; -} - -#g-server-add-admin #path { - width: 80%; -} - -.g-remove-dir:hover { - cursor: pointer; -} - #g-languages-form table { width: 400px; float: left; @@ -904,7 +859,6 @@ li.g-default-group h4, li.g-default-group .g-user { .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], -.rtl .g-short-form li, .rtl #g-content #g-album-grid .g-item, .rtl #g-site-admin-menu, .rtl .g-pager li, diff --git a/themes/admin_wind/js/ui.init.js b/themes/admin_wind/js/ui.init.js index 0954b63c..e0210ce5 100644 --- a/themes/admin_wind/js/ui.init.js +++ b/themes/admin_wind/js/ui.init.js @@ -1,5 +1,6 @@ /** * Initialize jQuery UI and Gallery Plugins + * @todo Move ui-corner-all assignments to theme admin views */ $(document).ready(function(){ @@ -22,6 +23,9 @@ $(document).ready(function(){ // Initialize modal dialogs $(".g-dialog-link").gallery_dialog(); + // Initialize short forms + $(".g-short-form").gallery_short_form(); + // Initialize ajax links $(".g-ajax-link").gallery_ajax(); @@ -50,13 +54,7 @@ $(document).ready(function(){ $(".g-available .g-block").addClass("ui-corner-all"); $(".g-unavailable").addClass("ui-corner-all"); - // Add hover state for buttons - $(".ui-state-default").hover( - function() { - $(this).addClass("ui-state-hover"); - }, - function() { - $(this).removeClass("ui-state-hover"); - } - ); + // Initialize button hover effect + $.fn.gallery_hover_init(); + }); diff --git a/themes/night_wind/js/ui.init.js b/themes/night_wind/js/ui.init.js index 27fb9664..bddf50c3 100644 --- a/themes/night_wind/js/ui.init.js +++ b/themes/night_wind/js/ui.init.js @@ -29,20 +29,6 @@ $(document).ready(function() { $("#g-view-menu a").addClass("ui-icon"); } - // Initialize short forms - var short_forms = new Array( - "#g-quick-search-form", - "#g-add-tag-form", - "#g-search-form" - ); - - for (var i in short_forms) { - short_form_init(short_forms[i]); - $(short_forms[i]).addClass("g-short-form"); - } - $(".g-short-form input[type=text]").addClass("ui-corner-left"); - $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right"); - // Apply jQuery UI button css to submit inputs $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); diff --git a/themes/night_wind/views/page.html.php b/themes/night_wind/views/page.html.php index c8b08129..f5c6b0df 100644 --- a/themes/night_wind/views/page.html.php +++ b/themes/night_wind/views/page.html.php @@ -56,7 +56,6 @@ </script> <?= $theme->script("gallery.ajax.js") ?> <?= $theme->script("gallery.dialog.js") ?> - <?= $theme->script("gallery.form.js") ?> <?= $theme->script("superfish/js/superfish.js") ?> <?= $theme->script("jquery.localscroll.js") ?> <?= $theme->script("ui.init.js") ?> diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 36231b0d..d7eb19e6 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -120,14 +120,18 @@ td { /* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-sidebar form { + padding-left: 0; + padding-right: 0; +} + fieldset { border: 1px solid #ccc; padding: .8em 1em !important; } #g-banner fieldset, -#g-sidebar fieldset, -.g-short-form fieldset { +#g-sidebar fieldset { border: none; } @@ -139,8 +143,7 @@ legend { #g-banner legend, #g-sidebar legend, #g-content #g-search-form legend, -input[type="hidden"], -.g-short-form label { +input[type="hidden"] { display: none; } @@ -234,19 +237,6 @@ li.g-error select { margin-top: 1em; } -/* Inline layout (forms, lists) ~~~~~~~~~~ */ - -.g-short-form li { - float: left; - padding: .4em 0; -} - -.g-short-form input[type="text"] { - color: #666; - padding: .3em .6em; - width: 11em; -} - /*** ****************************************************************** * 3) Page layout containers *********************************************************************/ @@ -821,7 +811,6 @@ li.g-error select { .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], -.rtl .g-short-form li, .rtl #g-header #g-logo img, .rtl #g-content #g-album-grid .g-item, .rtl #g-site-menu, diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index e9dd1dd9..0126c36b 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -22,9 +22,10 @@ $(document).ready(function() { // Initialize dialogs $(".g-dialog-link").gallery_dialog(); + // Initialize short forms + $(".g-short-form").gallery_short_form(); + // Apply jQuery UI icon, hover, and rounded corner styles - $(".g-short-form input[type=text]").addClass("ui-corner-left"); - $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right"); $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); if ($("#g-view-menu").length) { $("#g-view-menu ul").removeClass("g-menu").removeClass("sf-menu"); diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index c8b08129..f5c6b0df 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -56,7 +56,6 @@ </script> <?= $theme->script("gallery.ajax.js") ?> <?= $theme->script("gallery.dialog.js") ?> - <?= $theme->script("gallery.form.js") ?> <?= $theme->script("superfish/js/superfish.js") ?> <?= $theme->script("jquery.localscroll.js") ?> <?= $theme->script("ui.init.js") ?> -- cgit v1.2.3 From 040c840b66e588678a62aea680f80c42bd5f2d4a Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Thu, 22 Oct 2009 22:28:55 -0600 Subject: Make g-inline more specific, replace universal selector with an li since this class will most often be used with order and unordered lists. Apply g-inline to the the login menu and footer credits. --- lib/gallery.common.css | 2 +- modules/gallery/views/login.html.php | 2 +- themes/night_wind/css/screen.css | 13 ++++--------- themes/night_wind/views/page.html.php | 4 ++-- themes/wind/css/screen.css | 15 ++++++--------- themes/wind/views/page.html.php | 4 ++-- 6 files changed, 16 insertions(+), 24 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 2a8eddb2..e87e01a1 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -482,7 +482,7 @@ div#g-action-status { /* Inline layout ~~~~~~~~~~ */ -.g-inline * { +.g-inline li { float: left; margin-right: .4em; } diff --git a/modules/gallery/views/login.html.php b/modules/gallery/views/login.html.php index 961f44fa..ae709c7c 100644 --- a/modules/gallery/views/login.html.php +++ b/modules/gallery/views/login.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<ul id="g-login-menu"> +<ul id="g-login-menu" class="g-inline"> <? if ($user->guest): ?> <li class="first"> <a href="<?= url::site("login/ajax") ?>" diff --git a/themes/night_wind/css/screen.css b/themes/night_wind/css/screen.css index 7711a329..dfc94b6d 100644 --- a/themes/night_wind/css/screen.css +++ b/themes/night_wind/css/screen.css @@ -446,15 +446,6 @@ li.g-error select { /* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-banner #g-login-menu li, -#g-footer #g-credits li { - display: inline; -} - -#g-banner #g-login-menu li { - padding-left: 1.2em; -} - #g-footer #g-credits li { padding-right: 1.2em; } @@ -480,6 +471,10 @@ li.g-error select { float: right; } +#g-banner #g-login-menu li { + padding-left: 1.2em; +} + /* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #g-site-menu { diff --git a/themes/night_wind/views/page.html.php b/themes/night_wind/views/page.html.php index f5c6b0df..a14a3278 100644 --- a/themes/night_wind/views/page.html.php +++ b/themes/night_wind/views/page.html.php @@ -124,14 +124,14 @@ <? endif ?> </div> </div> - <div id="g-footer"> + <div id="g-footer" class="ui-helper-clearfix"> <?= $theme->footer() ?> <? if ($footer_text = module::get_var("gallery", "footer_text")): ?> <?= $footer_text ?> <? endif ?> <? if (module::get_var("gallery", "show_credits")): ?> - <ul id="g-credits"> + <ul id="g-credits" class="g-inline"> <?= $theme->credits() ?> </ul> <? endif ?> diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index fcbf63ea..ef2f1510 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -12,6 +12,8 @@ * 6) Browser hacks * 7) jQuery and jQuery UI * 8) Right-to-left language styles + * + * @todo Move #g-admin-g2-import stuff to g2import module */ /** ******************************************************************* @@ -329,15 +331,6 @@ td { /* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-banner #g-login-menu li, -#g-footer #g-credits li { - display: inline; -} - -#g-banner #g-login-menu li { - padding-left: 1.2em; -} - #g-footer #g-credits li { padding-right: 1.2em; } @@ -362,6 +355,10 @@ td { float: right; } +#g-banner #g-login-menu li { + padding-left: 1.2em; +} + /* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #g-site-menu { diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index f5c6b0df..a14a3278 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -124,14 +124,14 @@ <? endif ?> </div> </div> - <div id="g-footer"> + <div id="g-footer" class="ui-helper-clearfix"> <?= $theme->footer() ?> <? if ($footer_text = module::get_var("gallery", "footer_text")): ?> <?= $footer_text ?> <? endif ?> <? if (module::get_var("gallery", "show_credits")): ?> - <ul id="g-credits"> + <ul id="g-credits" class="g-inline"> <?= $theme->credits() ?> </ul> <? endif ?> -- cgit v1.2.3 From 4241e03d7549d4ebb14a0d8e5e0b830a4e032ce0 Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Tue, 27 Oct 2009 23:03:43 -0600 Subject: Breadcrumb updates. Apply g-first and g-active consistently, use ems instead of px for nicer proportions, make font-size the same whether on the page or in a dialog. --- lib/gallery.common.css | 26 +++++++--------------- modules/gallery/views/permissions_browse.html.php | 14 ++++++------ modules/gallery/views/simple_uploader.html.php | 6 +++-- .../views/server_add_tree_dialog.html.php | 10 ++++----- themes/wind/views/page.html.php | 6 +++-- 5 files changed, 27 insertions(+), 35 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index c5adc3ee..bf30212e 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -467,10 +467,6 @@ ul.sf-menu li li li.sfHover ul { /* Status and validation messages ~~~~ */ -.g-message { - font-size: .8em; -} - .g-message-block { border: 1px solid #ccc; width: 100%; @@ -500,17 +496,19 @@ div#g-action-status { /* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .g-breadcrumbs { + clear: both; padding: 0 20px; } .g-breadcrumbs li { background: transparent url('images/ico-separator.gif') no-repeat scroll left center; float: left; - padding: 10px 6px 10px 16px !important; + padding: 1em .6em 1em 1.4em; } -.g-breadcrumbs li.root { - background: transparent; +.g-breadcrumbs .g-first { + background: none; + padding-left: 0; } .g-breadcrumbs li a, @@ -518,21 +516,11 @@ div#g-action-status { display: block; } -.g-breadcrumbs li.active, -.g-breadcrumbs li.active span { - font-weight: bold; -} - #g-dialog ul.g-breadcrumbs { - clear: both; margin-left: 0; padding-left: 0; } -#g-dialog .g-breadcrumbs li { - font-size: .9em; -} - /* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .g-pager { @@ -570,7 +558,9 @@ div#g-action-status { .g-inline li { float: left; - margin-left: 1em; + margin-left: 1.6em; + padding-left: 0; + border: 1px solid yellow; } .g-inline li.g-first { diff --git a/modules/gallery/views/permissions_browse.html.php b/modules/gallery/views/permissions_browse.html.php index e432f56b..0b27336e 100644 --- a/modules/gallery/views/permissions_browse.html.php +++ b/modules/gallery/views/permissions_browse.html.php @@ -6,8 +6,8 @@ url: form_url.replace("__ITEM__", id), success: function(data) { $("#g-edit-permissions-form").html(data); - $(".active").removeClass("active"); - $("#item-" + id).addClass("active"); + $(".g-active").removeClass("g-active"); + $("#item-" + id).addClass("g-active"); } }); } @@ -38,18 +38,18 @@ <p><?= t("Edit permissions for album:") ?></p> <ul class="g-breadcrumbs"> + <? $i = 0 ?> <? foreach ($parents as $parent): ?> - <li id="item-<?= $parent->id ?>"> + <li id="item-<?= $parent->id ?>"<? if ($i == 0) print " class=\"g-first\"" ?>> <? if (access::can("edit", $parent)): ?> - <a href="javascript:show(<?= $parent->id ?>)"> - <?= html::purify($parent->title) ?> - </a> + <a href="javascript:show(<?= $parent->id ?>)"> <?= html::purify($parent->title) ?> </a> <? else: ?> <?= html::purify($parent->title) ?> <? endif ?> </li> + <? $i++ ?> <? endforeach ?> - <li class="active" id="item-<?= $item->id ?>"> + <li class="g-active" id="item-<?= $item->id ?>"> <a href="javascript:show(<?= $item->id ?>)"> <?= html::purify($item->title) ?> </a> diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php index ff73dd6f..9285fffe 100644 --- a/modules/gallery/views/simple_uploader.html.php +++ b/modules/gallery/views/simple_uploader.html.php @@ -25,10 +25,12 @@ <?= t("Photos will be uploaded to album: ") ?> </p> <ul class="g-breadcrumbs"> + <? $i = 0 ?> <? foreach ($item->parents() as $parent): ?> - <li> <?= html::clean($parent->title) ?> </li> + <li<? if ($i == 0) print " class=\"g-first\"" ?>> <?= html::clean($parent->title) ?> </li> + <? $i++ ?> <? endforeach ?> - <li class="active"> <?= html::purify($item->title) ?> </li> + <li class="g-active"> <?= html::purify($item->title) ?> </li> </ul> <div id="g-uploadqueue-infobar"> diff --git a/modules/server_add/views/server_add_tree_dialog.html.php b/modules/server_add/views/server_add_tree_dialog.html.php index cd3b09cc..824a86a6 100644 --- a/modules/server_add/views/server_add_tree_dialog.html.php +++ b/modules/server_add/views/server_add_tree_dialog.html.php @@ -9,14 +9,12 @@ <p id="g-description"><?= t("Photos will be added to album:") ?></p> <ul class="g-breadcrumbs"> + <? $i = 0 ?> <? foreach ($item->parents() as $parent): ?> - <li> - <?= html::purify($parent->title) ?> - </li> + <li<? if ($i == 0) print " class=\"g-first\"" ?>> <?= html::purify($parent->title) ?> </li> + <? $i++ ?> <? endforeach ?> - <li class="active"> - <?= html::purify($item->title) ?> - </li> + <li class="g-active"> <?= html::purify($item->title) ?> </li> </ul> <ul id="g-server-add-tree" class="g-checkbox-tree"> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index a14a3278..1d0e02ce 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -93,8 +93,9 @@ <? if (!empty($parents)): ?> <ul class="g-breadcrumbs"> + <? $i = 0 ?> <? foreach ($parents as $parent): ?> - <li> + <li<? if ($i == 0) print " class=\"g-first\"" ?>> <!-- Adding ?show=<id> causes Gallery3 to display the page containing that photo. For now, we just do it for the immediate parent so that when you go back up a @@ -104,8 +105,9 @@ <?= html::purify($parent->title) ?> </a> </li> + <? $i++ ?> <? endforeach ?> - <li class="active"><?= html::purify($theme->item()->title) ?></li> + <li class="g-active"><?= html::purify($theme->item()->title) ?></li> </ul> <? endif ?> </div> -- cgit v1.2.3 From fbc551771153a6664da2c3a3a82e22b912bb3cdc Mon Sep 17 00:00:00 2001 From: Chad Kieffer <ckieffer@gmail.com> Date: Wed, 28 Oct 2009 00:15:08 -0600 Subject: Initial RTL update work. Consolidated shared rtl-related css selectors in gallery.common. Applied g-right and g-left to a few banner items, including login menu and the logo. --- lib/gallery.common.css | 39 ++++++++++++++++++++++++++---- modules/gallery/views/login.html.php | 2 +- modules/search/views/search_link.html.php | 2 +- themes/admin_wind/css/screen.css | 35 ++++----------------------- themes/wind/css/screen.css | 40 ++++--------------------------- themes/wind/views/page.html.php | 4 ++-- 6 files changed, 46 insertions(+), 76 deletions(-) (limited to 'themes/wind/views') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 6709e4db..414bae73 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -347,13 +347,11 @@ form .g-error { .g-left { clear: none; float: left; - margin: 1em 1em 1em 0; } .g-right { clear: none; float: right; - margin: 1em 0 1em 1em; } .g-first { @@ -566,14 +564,45 @@ div#g-action-status { margin-left: 0; } -/* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */ +/** ******************************************************************* + * 7) Right to left styles + **********************************************************************/ + +.rtl { + direction: rtl; +} + +.rtl caption, +.rtl th, +.rtl #g-dialog, +.g-message { + text-align: right; +} -.rtl .g-short-form li { +.rtl .g-txt-right { + text-align: left; +} + +.rtl .g-left, +.rtl .g-inline li, +.rtl form ul ul li, +.rtl input[type="submit"], +.rtl input[type="reset"], +.rtl #g-content #g-album-grid .g-item, +.rtl .sf-menu li, +.rtl .g-breadcrumbs li, +.rtl .g-pager li, +.rtl .g-buttonset li, +.rtl .ui-icon-left .ui-icon { float: right; } +.rtl .g-right, +.rtl .ui-icon-right .ui-icon { + float: left; +} + .rtl .g-inline li { - float: right; margin-right: 1em; } diff --git a/modules/gallery/views/login.html.php b/modules/gallery/views/login.html.php index 0e0d9039..971d18b8 100644 --- a/modules/gallery/views/login.html.php +++ b/modules/gallery/views/login.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<ul id="g-login-menu" class="g-inline"> +<ul id="g-login-menu" class="g-inline g-right"> <? if ($user->guest): ?> <li class="g-first"> <a href="<?= url::site("login/ajax") ?>" diff --git a/modules/search/views/search_link.html.php b/modules/search/views/search_link.html.php index 481d0c82..9d1ce83b 100644 --- a/modules/search/views/search_link.html.php +++ b/modules/search/views/search_link.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<form action="<?= url::site("search") ?>" id="g-quick-search-form" class="g-short-form"> +<form action="<?= url::site("search") ?>" id="g-quick-search-form" class="g-short-form g-right"> <ul> <li> <label for="g-search"><?= t("Search the gallery") ?></label> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 38fe50cf..fbcdf4ae 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -457,46 +457,19 @@ th { * 7) Right to left styles *********************************************************************/ -.rtl { - direction: rtl; +.rtl #g-admin-menu { + left: auto; + right: 150px; } -.rtl caption, -.rtl th, -.rtl #g-dialog { - text-align: right; -} - -.rtl #g-header #g-login-menu, -.rtl .g-txt-right { - text-align: left; -} - -.rtl .g-right, -.rtl #g-header #g-quick-search-form, -.rtl #g-header #g-login-menu, -.rtl .ui-icon-right .ui-icon { - clear: left; - float: left; -} - -.rtl .g-left, -.rtl form ul ul li, -.rtl input[type="submit"], -.rtl input[type="reset"], .rtl #g-content #g-album-grid .g-item, -.rtl #g-site-admin-menu, -.rtl .g-pager li, -.rtl .g-buttonset li, -.rtl .ui-icon-left .ui-icon, .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, -.rtl .ui-icon-left .ui-icon { +.rtl #g-server-add-admin { float: right; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 3a24140b..b73c21f0 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -195,10 +195,6 @@ td { /* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-banner #g-logo img { - margin: 0; -} - #g-banner #g-quick-search-form { clear: right; float: right; @@ -311,7 +307,6 @@ td { #g-banner #g-login-menu { color: #999; - float: right; } #g-banner #g-login-menu li { @@ -417,37 +412,10 @@ td { } /** ******************************************************************* - * 6) Right to left styles + * 7) Right to left styles *********************************************************************/ -.rtl { - direction: rtl; -} - -.rtl caption, -.rtl th, -.rtl #g-dialog { - text-align: right; -} - -.rtl .g-right, -.rtl #g-header #g-quick-search-form, -.rtl #g-header #g-login-menu, -.rtl .ui-icon-right .ui-icon { - clear: left; - float: left; -} - -.rtl .g-left, -.rtl form ul ul li, -.rtl input[type="submit"], -.rtl input[type="reset"], -.rtl #g-header #g-logo img, -.rtl #g-content #g-album-grid .g-item, -.rtl #g-site-menu, -.rtl .g-breadcrumbs li, -.rtl .g-pager li, -.rtl .g-buttonset li, -.rtl .ui-icon-left .ui-icon { - float: right; +.rtl #g-site-menu { + left: auto; + right: 150px; } diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 1d0e02ce..a2b2fdd7 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -77,14 +77,14 @@ <?= $theme->site_status() ?> <div id="g-header" class="ui-helper-clearfix"> <div id="g-banner"> - <?= $theme->header_top() ?> <? if ($header_text = module::get_var("gallery", "header_text")): ?> <?= $header_text ?> <? else: ?> - <a id="g-logo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>"> + <a id="g-logo" class="g-left" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>"> <img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= url::file("lib/images/logo.png") ?>" /> </a> <? endif ?> + <?= $theme->header_top() ?> <div id="g-site-menu"> <?= $theme->site_menu() ?> </div> -- cgit v1.2.3 From 7ea13b3869dee33804606a17488bb1cd26759bdb Mon Sep 17 00:00:00 2001 From: Tim Almdal <tnalmdal@shaw.ca> Date: Wed, 28 Oct 2009 12:15:52 -0700 Subject: Normalize capitalization ticket #596 --- modules/akismet/views/admin_akismet.html.php | 4 ++-- modules/comment/helpers/comment_block.php | 4 ++-- modules/comment/helpers/comment_rss.php | 2 +- modules/comment/views/admin_comments.html.php | 12 +++++----- modules/exif/views/exif_dialog.html.php | 2 +- modules/exif/views/exif_sidebar.html.php | 2 +- modules/g2_import/helpers/g2_import.php | 2 +- modules/g2_import/views/admin_g2_import.html.php | 2 +- modules/gallery/controllers/admin_languages.php | 2 +- modules/gallery/helpers/gallery_block.php | 26 +++++++++++----------- modules/gallery/helpers/gallery_installer.php | 4 ++-- modules/gallery/helpers/gallery_rss.php | 4 ++-- .../gallery/views/admin_advanced_settings.html.php | 4 ++-- .../gallery/views/admin_block_platform.html.php | 2 +- modules/gallery/views/admin_graphics.html.php | 6 ++--- modules/gallery/views/admin_graphics_none.html.php | 2 +- modules/gallery/views/admin_identity.html.php | 2 +- modules/gallery/views/admin_languages.html.php | 4 ++-- modules/gallery/views/admin_maintenance.html.php | 12 +++++----- modules/gallery/views/admin_sidebar.html.php | 6 ++--- modules/gallery/views/admin_themes.html.php | 4 ++-- modules/gallery/views/l10n_client.html.php | 6 ++--- modules/gallery/views/login.html.php | 2 +- modules/gallery/views/login_ajax.html.php | 4 ++-- modules/gallery/views/maintenance.html.php | 4 ++-- modules/gallery/views/simple_uploader.html.php | 4 ++-- modules/gallery/views/upgrader.html.php | 2 +- modules/gallery/views/welcome_message.html.php | 4 ++-- modules/image_block/helpers/image_block_block.php | 4 ++-- modules/info/helpers/info_block.php | 2 +- .../notification/views/comment_published.html.php | 4 ++-- modules/notification/views/item_updated.html.php | 4 ++-- modules/recaptcha/views/admin_recaptcha.html.php | 6 ++--- modules/rss/helpers/rss_block.php | 4 ++-- modules/search/views/search.html.php | 2 +- modules/server_add/helpers/server_add_event.php | 2 +- modules/server_add/views/admin_server_add.html.php | 6 ++--- modules/tag/helpers/tag_block.php | 4 ++-- modules/user/views/admin_users.html.php | 14 ++++++------ modules/user/views/admin_users_group.html.php | 8 +++---- modules/user/views/reset_password.html.php | 4 ++-- modules/watermark/views/admin_watermarks.html.php | 6 ++--- themes/admin_wind/views/admin.html.php | 6 ++--- themes/admin_wind/views/pager.html.php | 16 ++++++------- themes/night_wind/views/movie.html.php | 8 +++---- themes/night_wind/views/pager.html.php | 16 ++++++------- themes/wind/views/movie.html.php | 8 +++---- themes/wind/views/pager.html.php | 16 ++++++------- 48 files changed, 137 insertions(+), 137 deletions(-) (limited to 'themes/wind/views') diff --git a/modules/akismet/views/admin_akismet.html.php b/modules/akismet/views/admin_akismet.html.php index d273be5b..399053d8 100644 --- a/modules/akismet/views/admin_akismet.html.php +++ b/modules/akismet/views/admin_akismet.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div id="g-admin-akismet" class="g-block"> - <h1> <?= t("Akismet Spam Filtering") ?> </h1> + <h1> <?= t("Akismet spam filtering") ?> </h1> <p> <?= t("Akismet is a free, automated spam filtering service. In order to use it, you need to sign up for a <a href=\"%api_key_url\">Wordpress.com API Key</a>, which is also free. Your comments will be automatically relayed to <a href=\"%akismet_url\">Akismet.com</a> where they'll be scanned for spam. Spam messages will be flagged accordingly and hidden from your vistors until you approve or delete them.", array("api_key_url" => "http://wordpress.com/api-keys", @@ -9,7 +9,7 @@ <div class="g-block-content"> <? if ($valid_key): ?> <div class="g-module-status g-success"> - <?= t("Your API Key is valid. Your comments will be filtered!") ?> + <?= t("Your API key is valid. Your comments will be filtered!") ?> </div> <? endif ?> diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index c00c6c51..7cd5d429 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -19,7 +19,7 @@ */ class comment_block_Core { static function get_admin_list() { - return array("recent_comments" => t("Recent Comments")); + return array("recent_comments" => t("Recent comments")); } static function get($block_id) { @@ -27,7 +27,7 @@ class comment_block_Core { switch ($block_id) { case "recent_comments": $block->css_id = "g-recent-comments"; - $block->title = t("Recent Comments"); + $block->title = t("Recent comments"); $block->content = new View("admin_block_recent_comments.html"); $block->content->comments = ORM::factory("comment")->orderby("created", "DESC")->limit(5)->find_all(); diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php index 4424981d..3692a30d 100644 --- a/modules/comment/helpers/comment_rss.php +++ b/modules/comment/helpers/comment_rss.php @@ -61,7 +61,7 @@ class comment_rss_Core { $feed->max_pages = ceil($comments->count_all() / $limit); $feed->title = htmlspecialchars(t("Recent Comments")); $feed->uri = url::abs_site("albums/" . (empty($id) ? "1" : $id)); - $feed->description = t("Recent Comments"); + $feed->description = t("Recent comments"); return $feed; } diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 82e071a8..f0f5ab1c 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -35,7 +35,7 @@ </script> <div id="g-admin-comments" class="g-block"> - <h1> <?= t("Manage Comments") ?> </h1> + <h1> <?= t("Manage comments") ?> </h1> <div class="g-block-content"> <!-- @todo: Highlight active menu option --> @@ -46,13 +46,13 @@ <!-- @todo: Remove after setting active option? --> <h2> <? if ($state == "published"): ?> - <?= t("Approved Comments") ?> + <?= t("Approved comments") ?> <? elseif ($state == "unpublished"): ?> - <?= t("Comments Awaiting Moderation") ?> + <?= t("Comments awaiting moderation") ?> <? elseif ($state == "spam"): ?> - <?= t("Spam Comments") ?> + <?= t("Spam comments") ?> <? elseif ($state == "deleted"): ?> - <?= t("Recently Deleted Comments") ?> + <?= t("Recently deleted comments") ?> <? endif ?> </h2> @@ -196,6 +196,6 @@ <div class="g-pager"> <?= $pager ?> </div> - + </div> </div> diff --git a/modules/exif/views/exif_dialog.html.php b/modules/exif/views/exif_dialog.html.php index b50eea1d..22744e2d 100644 --- a/modules/exif/views/exif_dialog.html.php +++ b/modules/exif/views/exif_dialog.html.php @@ -4,7 +4,7 @@ .g-odd { background: #bdd2ff; } .g-even { background: #dfeffc; } </style> -<h1 style="display: none;"><?= t("Photo Detail") ?></h1> +<h1 style="display: none;"><?= t("Photo detail") ?></h1> <div id="g-exif-data"> <table class="g-metadata" > <tbody> diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 04f72b02..8af2eb12 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<a id="g-exif-data-link" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>" +<a id="g-exif-data-link" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo details")->for_html_attr() ?>" class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-info"></span> <?= t("View more information") ?> diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index f55e7f32..248f8017 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -271,7 +271,7 @@ class g2_import_Core { if (g2(GalleryCoreApi::isAnonymousUser($g2_user_id))) { self::set_map($g2_user_id, identity::guest()->id); - return t("Skipping Anonymous User"); + return t("Skipping anonymous user"); } $g2_admin_group_id = diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index e1443aa7..b2665a5f 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div id="g-admin-g2-import" class="g-block"> - <h1> <?= t("Gallery 2 Import") ?> </h1> + <h1> <?= t("Gallery 2 import") ?> </h1> <p> <?= t("Import your Gallery 2 users, photos, movies, comments and tags into your new Gallery 3 installation.") ?> </p> diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index ccc631c7..27537c7f 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -115,7 +115,7 @@ class Admin_Languages_Controller extends Admin_Controller { ? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.", array("server-link" => html::mark_clean(html::anchor($server_link)))) - : t("API Key")) + : t("API key")) ->value($api_key) ->error_messages("invalid", t("The API key you provided is invalid.")); $group->submit("save")->value(t("Save settings")); diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index 6c08d39a..0052affc 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -21,15 +21,15 @@ class gallery_block_Core { static function get_admin_list() { return array( "welcome" => t("Welcome to Gallery 3!"), - "photo_stream" => t("Photo Stream"), - "log_entries" => t("Log Entries"), - "stats" => t("Gallery Stats"), - "platform_info" => t("Platform Information"), - "project_news" => t("Gallery Project News")); + "photo_stream" => t("Photo stream"), + "log_entries" => t("Log entries"), + "stats" => t("Gallery stats"), + "platform_info" => t("Platform information"), + "project_news" => t("Gallery project news")); } static function get_site_list() { - return array("language" => t("Language Preference")); + return array("language" => t("Language preference")); } static function get($block_id) { @@ -43,7 +43,7 @@ class gallery_block_Core { case "photo_stream": $block->css_id = "g-photo-stream"; - $block->title = t("Photo Stream"); + $block->title = t("Photo stream"); $block->content = new View("admin_block_photo_stream.html"); $block->content->photos = ORM::factory("item")->where("type", "photo")->orderby("created", "DESC")->find_all(10); @@ -51,7 +51,7 @@ class gallery_block_Core { case "log_entries": $block->css_id = "g-log-entries"; - $block->title = t("Log Entries"); + $block->title = t("Log entries"); $block->content = new View("admin_block_log_entries.html"); $block->content->entries = ORM::factory("log") ->orderby(array("timestamp" => "DESC", "id" => "DESC"))->find_all(5); @@ -59,7 +59,7 @@ class gallery_block_Core { case "stats": $block->css_id = "g-stats"; - $block->title = t("Gallery Stats"); + $block->title = t("Gallery stats"); $block->content = new View("admin_block_stats.html"); $block->content->album_count = ORM::factory("item")->where("type", "album")->where("id <>", 1)->count_all(); @@ -68,7 +68,7 @@ class gallery_block_Core { case "platform_info": $block->css_id = "g-platform"; - $block->title = t("Platform Information"); + $block->title = t("Platform information"); $block->content = new View("admin_block_platform.html"); if (is_readable("/proc/loadavg")) { $block->content->load_average = @@ -80,14 +80,14 @@ class gallery_block_Core { case "project_news": $block->css_id = "g-project-news"; - $block->title = t("Gallery Project News"); + $block->title = t("Gallery project news"); $block->content = new View("admin_block_news.html"); $block->content->feed = feed::parse("http://gallery.menalto.com/node/feed", 3); break; case "block_adder": $block->css_id = "g-block-adder"; - $block->title = t("Dashboard Content"); + $block->title = t("Dashboard content"); $block->content = self::get_add_block_form(); break; @@ -99,7 +99,7 @@ class gallery_block_Core { } $block = new Block(); $block->css_id = "g-user-language-block"; - $block->title = t("Language Preference"); + $block->title = t("Language preference"); $block->content = new View("user_languages_block.html"); $block->content->installed_locales = array_merge(array("" => t("« none »")), $locales); diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 01a213c8..5daf1016 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -199,12 +199,12 @@ class gallery_installer { } access::register_permission("view", "View"); - access::register_permission("view_full", "View Full Size"); + access::register_permission("view_full", "View full size"); access::register_permission("edit", "Edit"); access::register_permission("add", "Add"); // Mark for translation (must be the same strings as used above) - t("View Full Size"); + t("View full size"); t("View"); t("Edit"); t("Add"); diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php index feeab88a..155edfb5 100644 --- a/modules/gallery/helpers/gallery_rss.php +++ b/modules/gallery/helpers/gallery_rss.php @@ -39,8 +39,8 @@ class gallery_rss_Core { ->orderby("created", "DESC"); $feed->max_pages = ceil($all_children->find_all()->count() / $limit); - $feed->title = t("Recent Updates"); - $feed->description = t("Recent Updates"); + $feed->title = t("Recent updates"); + $feed->description = t("Recent updates"); return $feed; case "album": diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index e3ae5f58..32fbc2c3 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -1,10 +1,10 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div id="g-admin-advanced-settings" class="g-block"> - <h1> <?= t("Advanced Settings") ?> </h1> + <h1> <?= t("Advanced settings") ?> </h1> <p> <?= t("Here are internal Gallery configuration settings. Most of these settings are accessible elsewhere in the administrative console.") ?> </p> - + <ul id="g-action-status" class="g-message-block"> <li class="g-warning"><?= t("Change these values at your own risk!") ?></li> </ul> diff --git a/modules/gallery/views/admin_block_platform.html.php b/modules/gallery/views/admin_block_platform.html.php index f27b9e7a..b1b8a2f9 100644 --- a/modules/gallery/views/admin_block_platform.html.php +++ b/modules/gallery/views/admin_block_platform.html.php @@ -4,7 +4,7 @@ <?= t("Host name: %host_name", array("host_name" => php_uname("n"))) ?> </li> <li> - <?= t("Operating System: %os %version", array("os" => php_uname("s"), "version" => php_uname("r"))) ?> + <?= t("Operating system: %os %version", array("os" => php_uname("s"), "version" => php_uname("r"))) ?> </li> <li> <?= t("Apache: %apache_version", array("apache_version" => function_exists("apache_get_version") ? apache_get_version() : t("Unknown"))) ?> diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index 0f4c0dd8..3a48e087 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -13,13 +13,13 @@ </script> <div id="g-admin-graphics" class="g-block ui-helper-clearfix"> - <h1> <?= t("Graphics Settings") ?> </h1> + <h1> <?= t("Graphics settings") ?> </h1> <p> <?= t("Gallery needs a graphics toolkit in order to manipulate your photos. Please choose one from the list below.") ?> </p> <div class="g-block-content"> - <h2> <?= t("Active Toolkit") ?> </h2> + <h2> <?= t("Active toolkit") ?> </h2> <? if ($active == "none"): ?> <?= new View("admin_graphics_none.html") ?> <? else: ?> @@ -27,7 +27,7 @@ <? endif ?> <div class="g-available"> - <h2> <?= t("Available Toolkits") ?> </h2> + <h2> <?= t("Available toolkits") ?> </h2> <? foreach (array_keys((array)$tk) as $id): ?> <? if ($id != $active): ?> <?= new View("admin_graphics_$id.html", array("tk" => $tk->$id, "is_active" => false)) ?> diff --git a/modules/gallery/views/admin_graphics_none.html.php b/modules/gallery/views/admin_graphics_none.html.php index 3ac6b4fb..e0fc4170 100644 --- a/modules/gallery/views/admin_graphics_none.html.php +++ b/modules/gallery/views/admin_graphics_none.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div id="none" class="g-module-status g-warning g-block"> - <h3> <?= t("No Active Toolkit") ?> </h3> + <h3> <?= t("No active toolkit") ?> </h3> <p> <?= t("We were unable to detect a graphics program. You must install one of the toolkits below in order to use many Gallery features.") ?> </p> diff --git a/modules/gallery/views/admin_identity.html.php b/modules/gallery/views/admin_identity.html.php index 358860cf..9a34dcc4 100644 --- a/modules/gallery/views/admin_identity.html.php +++ b/modules/gallery/views/admin_identity.html.php @@ -34,7 +34,7 @@ </script> <div id="g-modules"> - <h1> <?= t("Manage Identity Providers") ?> </h1> + <h1> <?= t("Manage identity providers") ?> </h1> <p> <?= t("Choose a different user/group management provider.") ?> </p> diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 311672de..908cc892 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -26,7 +26,7 @@ </script> <div class="g-block"> - <h1> <?= t("Languages and Translation") ?> </h1> + <h1> <?= t("Languages and translation") ?> </h1> <div class="g-block-content"> @@ -107,6 +107,6 @@ <?= $share_translations_form ?> </div> </div> - + </div> </div> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 73a4bef8..107b35cc 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,13 +1,13 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div id="g-admin-maintenance" class="g-block"> - <h1> <?= t("Maintenance Tasks") ?> </h1> + <h1> <?= t("Maintenance tasks") ?> </h1> <p> <?= t("Occasionally your Gallery will require some maintenance. Here are some tasks you can use to keep it running smoothly.") ?> </p> <div class="g-block-content"> <div id="g-available-tasks"> - <h2> <?= t("Available Tasks") ?> </h2> + <h2> <?= t("Available tasks") ?> </h2> <table> <tr> <th> @@ -43,11 +43,11 @@ <? if ($running_tasks->count()): ?> <div id="g-running-tasks"> - <h2> <?= t("Running Tasks") ?> </h2> + <h2> <?= t("Running tasks") ?> </h2> <table> <tr> <th> - <?= t("Last Updated") ?> + <?= t("Last updated") ?> </th> <th> <?= t("Name") ?> @@ -116,11 +116,11 @@ <? if ($finished_tasks->count()): ?> <div id="g-finished-tasks"> - <h2> <?= t("Finished Tasks") ?> </h2> + <h2> <?= t("Finished tasks") ?> </h2> <table> <tr> <th> - <?= t("Last Updated") ?> + <?= t("Last updated") ?> </th> <th> <?= t("Name") ?> diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 7c97270c..b394aa19 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -36,7 +36,7 @@ </script> <div id="g-block-admin" class="g-block ui-helper-clearfix"> - <h1> <?= t("Manage Sidebar") ?> </h1> + <h1> <?= t("Manage sidebar") ?> </h1> <p> <?= t("Select and drag blocks from the available column to the active column to add to the sidebar; remove by dragging the other way.") ?> </p> @@ -44,7 +44,7 @@ <div class="g-block-content"> <div id="g-site-blocks" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> <div class="g-admin-blocks-list"> - <div><h3><?= t("Available Blocks") ?></h3></div> + <div><h3><?= t("Available blocks") ?></h3></div> <div> <ul id="g-available-blocks" class="g-sortable-blocks"> <?= $available ?> @@ -52,7 +52,7 @@ </div> </div> <div class="g-admin-blocks-list"> - <div><h3><?= t("Active Blocks") ?></h3></div> + <div><h3><?= t("Active blocks") ?></h3></div> <div> <ul id="g-active-blocks" class="g-sortable-blocks"> <?= $active ?> diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index dda18265..d14e8bd4 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -8,7 +8,7 @@ </script> <div class="g-block ui-helper-clearfix"> - <h1> <?= t("Theme Choice") ?> </h1> + <h1> <?= t("Theme choice") ?> </h1> <p> <?= t("Gallery allows you to choose a theme for browsing your Gallery, as well as a special theme for the administration interface. Click a theme to preview and activate it.") ?> </p> @@ -89,6 +89,6 @@ <? endif ?> </div> </div> - + </div> </div> \ No newline at end of file diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index f4da52dc..9d14bbb2 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -6,9 +6,9 @@ <a id="g-close-l10n" title="<?= t("Stop the translation mode")->for_html_attr() ?>" href="<?= html::clean_attribute(url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token())) ?>">X</a> </span> - <div class="label strings"><h2><?= t("Page Text") ?> + <div class="label strings"><h2><?= t("Page text") ?> <? if (!Input::instance()->get('show_all_l10n_messages')): ?> - <a style="background-color:#fff" href="<?= url::site("admin/languages?show_all_l10n_messages=1") ?>"><?= t("(Show All)") ?></a> + <a style="background-color:#fff" href="<?= url::site("admin/languages?show_all_l10n_messages=1") ?>"><?= t("(Show all)") ?></a> <? endif; ?> </h2></div> <div class="label source"><h2><?= t("Source") ?></div> @@ -73,7 +73,7 @@ </div> </div> <script type="text/javascript"> - var MSG_TRANSLATE_TEXT = <?= t("Translate Text")->for_js() ?>; + var MSG_TRANSLATE_TEXT = <?= t("Translate text")->for_js() ?>; var l10n_client_data = <?= json_encode($string_list) ?>; var plural_forms = <?= json_encode($plural_forms) ?>; var toggle_l10n_mode_url = <?= html::js_string(url::site("l10n_client/toggle_l10n_mode")) ?>; diff --git a/modules/gallery/views/login.html.php b/modules/gallery/views/login.html.php index 971d18b8..a7734369 100644 --- a/modules/gallery/views/login.html.php +++ b/modules/gallery/views/login.html.php @@ -11,7 +11,7 @@ <? if (identity::is_writable()): ?> <?= t('Logged in as %name', array('name' => html::mark_clean( '<a href="' . url::site("form/edit/users/{$user->id}") . - '" title="' . t("Edit Your Profile")->for_html_attr() . + '" title="' . t("Edit your profile")->for_html_attr() . '" id="g-user-profile-link" class="g-dialog-link">' . html::clean($user->display_name()) . '</a>'))) ?> <? else: ?> diff --git a/modules/gallery/views/login_ajax.html.php b/modules/gallery/views/login_ajax.html.php index a9a9ef11..9741db0c 100644 --- a/modules/gallery/views/login_ajax.html.php +++ b/modules/gallery/views/login_ajax.html.php @@ -6,7 +6,7 @@ url: "<?= url::site("password/reset") ?>", success: function(data) { $("#g-login").html(data); - $("#ui-dialog-title-g-dialog").html(<?= t("Reset Password")->for_js() ?>); + $("#ui-dialog-title-g-dialog").html(<?= t("Reset password")->for_js() ?>); $(".submit").addClass("g-button ui-state-default ui-corner-all"); $(".submit").gallery_hover_init(); ajaxify_login_reset_form(); @@ -38,7 +38,7 @@ </li> <? if (identity::is_writable()): ?> <li> - <a href="#" id="g-password-reset" class="g-right g-txt-small"><?= t("Forgot Your Password?") ?></a> + <a href="#" id="g-password-reset" class="g-right g-txt-small"><?= t("Forgot your password?") ?></a> </li> <? endif ?> </ul> diff --git a/modules/gallery/views/maintenance.html.php b/modules/gallery/views/maintenance.html.php index 55395b73..2fdc40a3 100644 --- a/modules/gallery/views/maintenance.html.php +++ b/modules/gallery/views/maintenance.html.php @@ -2,7 +2,7 @@ <html> <head> <title> - <?= t("Gallery - Maintenance Mode") ?> + <?= t("Gallery - maintenance mode") ?>