diff options
Diffstat (limited to 'modules')
115 files changed, 654 insertions, 659 deletions
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 ?> |