From 3e6ba7acc3291f2268cbe9c9bef0a492b557babb Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 4 Oct 2009 00:27:22 -0600 Subject: Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. --- modules/recaptcha/helpers/recaptcha.php | 2 +- modules/recaptcha/helpers/recaptcha_event.php | 2 +- modules/recaptcha/views/admin_recaptcha.html.php | 8 ++++---- modules/recaptcha/views/form_recaptcha.html.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/recaptcha') 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 @@ -
+

reCAPTCHA Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", @@ -11,16 +11,16 @@

-
+

-
+
-
+

- -
- -
+
+ +
+ +
- -

- - - - - - - - - -

+ +

+ + + + + + + + + +

- -
- - 0): ?> -

- -

- -

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

-

- "> - - - - + +

+ + 0): ?> +

+ +

-

-
- +

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

+

+ "> + + + + + +

+
+ - -
-

- -

-
- + +
+

+ +

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

author_name()) ?>

-
-
- item() ?> -
- - has_thumb()): ?> - <?= html::purify($item->title)->for_html_attr() ?>thumb_width, $item->thumb_height, 75) ?> - /> - - - - + + + + + + + $comment): ?> + "> + + - - - -
+ + + + + +
+ + " + class="g-avatar" + alt="author_name()) ?>" + width="40" + height="40" /> + +

author_name()) ?>

+
+ - -

created) ?>

- text)) ?> -
-
    - state != "unpublished"): ?> -
  • - - - - -
  • - - state != "published"): ?> -
  • - - - - -
  • - - state != "spam"): ?> -
  • - - - - -
  • - - -
  • - - - - -
  • -
-
+

created) ?>

+ text)) ?> +
+
    + state != "unpublished"): ?> +
  • + + + + +
  • + + state != "published"): ?> +
  • + + + + +
  • + + state != "spam"): ?> +
  • + + + + +
  • + + +
  • + + + + +
  • +
+
-
- +
+ +
+
diff --git a/modules/digibug/views/admin_digibug.html.php b/modules/digibug/views/admin_digibug.html.php index f75adc60..5d07eb68 100644 --- a/modules/digibug/views/admin_digibug.html.php +++ b/modules/digibug/views/admin_digibug.html.php @@ -1,18 +1,16 @@ -
-
- "> -

+
+ " alt="Digibug logo" class="g-right"/> +

+

-
-

register with Digibug and enter your Digibug id in the Advanced Settings page you can make money off of your photos!", array("signup_url" => "http://www.digibug.com/signup.php", diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index fd8ae63c..e1443aa7 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -1,94 +1,96 @@ -

+

-
-

-

- -

-
    -
  • - not imported. You will have to set them again manually (for now).") ?> -
  • -
  • - -
  • -
  • - -
  • -
  • - php_value eaccelerator.enable 0 in gallery3/.htaccess") ?> -
  • -
-
- - - -
-

-
    -
  • - g2_import::version())) ?> -
  • - -
  • - Using the same value will speed up your import.", - array("g2_pixels" => $g2_sizes["thumb"]["size"], - "g3_pixels" => $thumb_size, - "url" => html::mark_clean(url::site("admin/theme_options")))) ?> -
  • - - - -
  • - Using the same value will speed up your import.", - array("g2_pixels" => $g2_sizes["resize"]["size"], - "g3_pixels" => $resize_size, - "url" => html::mark_clean(url::site("admin/theme_options")))) ?> -
  • - -
- -
+
+
+

- +

  • - + not imported. You will have to set them again manually (for now).") ?>
  • - +
  • - +
  • - + php_value eaccelerator.enable 0 in gallery3/.htaccess") ?>
  • -
  • - +
+
+ + + +
+

+
    +
  • + g2_import::version())) ?>
  • -
  • - + +
  • + Using the same value will speed up your import.", + array("g2_pixels" => $g2_sizes["thumb"]["size"], + "g3_pixels" => $thumb_size, + "url" => html::mark_clean(url::site("admin/theme_options")))) ?>
  • -
  • - + + + +
  • + Using the same value will speed up your import.", + array("g2_pixels" => $g2_sizes["resize"]["size"], + "g3_pixels" => $resize_size, + "url" => html::mark_clean(url::site("admin/theme_options")))) ?>
  • +
-
-

- "> - - -

+
+

+ +

+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ +

+ "> + + +

+
+
-
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index 8af1dd85..ccc631c7 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -112,7 +112,8 @@ class Admin_Languages_Controller extends Admin_Controller { $server_link = l10n_client::server_api_key_url(); $group->input("api_key") ->label(empty($api_key) - ? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.", + ? t("This is a unique key that will allow you to send translations to the remote + server. To get your API key go to %server-link.", array("server-link" => html::mark_clean(html::anchor($server_link)))) : t("API Key")) ->value($api_key) diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index 95d0618c..0f4c0dd8 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -12,26 +12,28 @@ }); -
+

-

- - - - $tk->$active, "is_active" => true)) ?> - - -
-

- - - $tk->$id, "is_active" => false)) ?> +
+

+ + + + $tk->$active, "is_active" => true)) ?> - + +
+

+ + + $tk->$id, "is_active" => false)) ?> + + +
diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 74f48b76..311672de 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -1,103 +1,112 @@ -
-

-

- -

+ - - - for_html_attr() ?>" /> - +
+

- -
- -
-

-

- -

+
+

+

+ +

-

+
+
"> + + + + + + + + + $display_name): ?> + +
+ + + + + + + "> + + + + + + +
+ +
+ for_html_attr() ?>" /> +
+
+
-
- for_html_attr() ?>"> - - +
+

+

+ +

-

Step 1: Make sure the target language is installed and up to date (check above).") ?>

+
+ for_html_attr() ?>"> + + -

Step 2: Make sure you have selected the right target language (currently %default_locale).", - array("default_locale" => locales::display_name())) ?>

+

-

Step 3: Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?>

+

- - - get("l10n_mode", false)): ?> - - - - - -
+
    +
  • +
  • locales::display_name())) ?>
  • +
  • +
+ + + get("l10n_mode", false)): ?> + + + + + -

- +

+ +
+
+ +
diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 94582dc8..73a4bef8 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,193 +1,195 @@ -
+

-
-

- - - - - - - - - severity) ?>"> - - - - - - -
- - - - - -
- name ?> - - description ?> - - callback?csrf=$csrf") ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - - -
-
- - count()): ?> -
-

- - - - - - - - - - - - state == "stalled" ? "g-warning" : "" ?>"> - - - - - - - - - -
- - - - - - - - - - - " - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - - -
"> - updated) ?> - - name ?> - - done): ?> - state == "cancelled"): ?> - - - - state == "stalled"): ?> - - - $task->percent_complete)) ?> - - - status ?> - - owner()->name) ?> - - id?csrf=$csrf") ?>" - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - - - state == "stalled"): ?> - id?csrf=$csrf") ?>"> - - - -
-
- +
+
+

+ + + + + + + + + severity) ?>"> + + + + + + +
+ + + + + +
+ name ?> + + description ?> + + callback?csrf=$csrf") ?>" + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> + + +
+
- count()): ?> - + + + count()): ?> +
+

+ + + + + + + + + + + + state == "success" ? "g-success" : "g-error" ?>"> + + + + + + + + + +
+ + + + + + + + + + + " + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> + + +
"> + updated) ?> + + name ?> + + state == "success"): ?> + + state == "error"): ?> + + state == "cancelled"): ?> + + + + status ?> + + owner()->name) ?> + + done): ?> + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + + + get_log()): ?> + id?csrf=$csrf") ?>" class="g-dialog-link g-button ui-state-default ui-corner-all"> + + + + + id?csrf=$csrf") ?>" class="g-dialog-link g-button" ui-state-default ui-corner-all> + + + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + + + + +
+
+
-
diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 75f4f0c5..4c4976f8 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -1,32 +1,34 @@ -
+

-
"> - - - - - - - - - - $module_info): ?> - "> - $module_name); ?> - locked) $data["disabled"] = 1; ?> - - - - - - - -
name) ?> version ?> description) ?>
- for_html_attr() ?>"/> -
+
+
"> + + + + + + + + + + $module_info): ?> + "> + $module_name); ?> + locked) $data["disabled"] = 1; ?> + + + + + + + +
name) ?> version ?> description) ?>
+ for_html_attr() ?>" /> +
+
diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index b4f339ae..ea950b54 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,7 +1,7 @@ -

-

- -

-
"> -
-

-
-
    - -
+
+

+

+ +

+ +
"> +
+

+
+
    + +
+
-
-
-

-
-
    - -
+
+

+
+
    + +
+
diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index e09be728..a4bf1c4e 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,6 +1,8 @@ -
+

+
+
diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index f7e77a01..dda18265 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -7,83 +7,88 @@ } -

-

- -

+
+

+

+ +

-
-

-
- " - alt="name) ?>" /> -

name ?>

-

- description ?> -

-
+
+ +
+

+
+ " + alt="name) ?>" /> +

name ?>

+

+ description ?> +

+
-
-

-
- " - alt="name) ?>" /> -

name ?>

-

- description ?> -

-
+

+
\ No newline at end of file diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php index 3e964801..a0af3ba8 100644 --- a/modules/recaptcha/views/admin_recaptcha.html.php +++ b/modules/recaptcha/views/admin_recaptcha.html.php @@ -1,5 +1,5 @@ -
+

reCAPTCHA Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", @@ -7,27 +7,29 @@ "recaptcha_url" => html::mark_clean("http://recaptcha.net"))) ?>

- -
+
+ - -
-

-

- -

+ +
+

+

+ +

-
- - +
+ + +
+
+ +
- - diff --git a/modules/server_add/views/admin_server_add.html.php b/modules/server_add/views/admin_server_add.html.php index e447ee6d..eae767af 100644 --- a/modules/server_add/views/admin_server_add.html.php +++ b/modules/server_add/views/admin_server_add.html.php @@ -1,25 +1,22 @@ -
-

- -

-
-

+
+

+
+

style="display: none;">
  • -
    -
    diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 41fa4d41..4ed88e03 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -37,7 +37,7 @@ function editInPlace(element) { closeEditInPlaceForms(); // create edit form - var tag_id = $(this).attr('id').substr(5); + var tag_id = $(this).attr('rel'); var tag_name = $(this).html(); var tag_width = $(this).width(); $(this).parent().data("revert", $(this).parent().html()); @@ -67,7 +67,7 @@ function editInPlace(element) { console.log("success"); if (data.result == "success") { closeEditInPlaceForms(); // close form - $("#g-tag-" + data.tag_id).text(data.new_tagname); // update tagname + $(".g-tag[rel=" + data.tag_id + "]").text(data.new_tagname); // update tagname window.location.reload(); } else if (data.result == "error") { console.log("error"); diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 7771f7fe..67ba4d95 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -1,5 +1,5 @@ - -

    - -

    - count()/5 ?> - - - - - + +
    - count()) ?> -
    - $tag): ?> - name, 0, 1)) ?> - - - -
      - - $tags_per_column): /* new column */ ?> -
    - - +
    +

    + +
    + + + + + - -
    + count()) ?> +
    + $tag): ?> + name, 0, 1)) ?> - - -
      - + + +
        + + $tags_per_column): /* new column */ ?> +
    + + + + + -
    + + + + +
    +
    +
    diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 2f8d8673..aae39c8c 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -41,88 +41,93 @@ }); } -
    - " - class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" - title="for_html_attr() ?>"> - - - -

    - -

    +
    +

    - - - - - - - - + user admin ? "admin" : "" ?>"> - - - - - - - -
    - " - title="for_html_attr() ?>" - alt="name) ?>" - width="20" - height="20" /> - name) ?> - - full_name) ?> - - email) ?> - - last_login == 0) ? "" : gallery::date($user->last_login) ?> - - id") ?>" - open_text="" - class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> - - id != $user->id && !$user->guest): ?> - id") ?>" - class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> - - - for_html_attr() ?>" - class="g-button ui-state-disabled ui-corner-all ui-icon-left"> - - -
    -
    -
    +

    -
    - " - class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" - title="for_html_attr() ?>"> - - - +
    + + + + + + + + -

    - -

    + $user): ?> + user admin ? "admin" : "" ?>"> + + + + + + + +
    + " + title="for_html_attr() ?>" + alt="name) ?>" + width="20" + height="20" /> + name) ?> + + full_name) ?> + + email) ?> + + last_login == 0) ? "" : gallery::date($user->last_login) ?> + + id") ?>" + open_text="" + class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> + + id != $user->id && !$user->guest): ?> + id") ?>" + class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> + + + for_html_attr() ?>" + class="g-button ui-state-disabled ui-corner-all ui-icon-left"> + + +
    +
    +
    -
    -
      - $group): ?> -
    • " /> - group = $group; ?> - -
    • - -
    -
    + +
    diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index d034066a..af38cb41 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -1,37 +1,39 @@ -
    +

    - - " - title="for_html_attr() ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - -

    -

    - -

    -
    -
    - -

    - watermark::position($position))) ?> -

    -

    - module::get_var("watermark", "transparency"))) ?> -

    -
    - diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 1d60d392..20593e9c 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -107,11 +107,11 @@ td { border: none; border-bottom: 1px solid #ccc; padding: .5em; - vertical-align: top; + vertical-align: middle; } -#g-admin-maintenance td { - vertical-align: middle; +th { + white-space: nowrap; } /* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -474,14 +474,6 @@ tr.g-warning { margin-right: 1em; } -#g-user-admin-list { - margin-bottom: 1em; -} - -#g-user-admin-list td { - vertical-align: bottom; -} - #g-user-admin-list .admin { color: #55f; font-weight: bold; @@ -531,36 +523,19 @@ li.g-default-group h4, li.g-default-group .g-user { color: gray; } -#g-admin-advanced-settings tr.setting:hover { - background: #ffc; -} - -/* admin/sidebar ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.g-admin-blocks-list { - float: left; - height: 300px; - margin-left: 20px; - width: 30%; -} +/* Block admin ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.g-admin-blocks-list div:last-child { - border: .1em solid; - height: 100%; - overflow-y: auto; +#g-admin-blocks .g-block { + margin-right: 2em; + height: 200px; + width: 30% !important; } -.g-admin-blocks-list ul { - height: 98%; - margin: .1em .1em; - padding: .1em; -} - -.g-admin-blocks-list ul li { - background-color: #e8e8e8; - font-size: 1em; - font-weight: bold; - margin: .5em; - padding: .3em .8em; +#g-admin-blocks .g-block li { + background: #e7e7e7; + /*border: 1px solid #fff;*/ + margin-bottom: 1em; + padding: .4em .8em; } /** ******************************************************************* @@ -797,20 +772,10 @@ li.g-default-group h4, li.g-default-group .g-user { } #g-languages-form table { - width: 400px; - float: left; + width: 40%; margin: 0 3em 1em 0; } -#g-languages-form .installed { - background-color: #EEEEEE; -} - -#g-languages-form .default { - background-color: #C5DBEC; - font-weight: bold; -} - #g-languages-form input { clear: both; } @@ -824,10 +789,6 @@ li.g-default-group h4, li.g-default-group .g-user { padding: .5em; } -.g-doc-link { - float: right; -} - /** ******************************************************************* * 7) Right to left styles *********************************************************************/ -- cgit v1.2.3 From 76aa4bd1efc3db62326fa2c008de568b53b8710e Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 25 Oct 2009 23:32:49 -0600 Subject: Move comment and recaptcha CSS to their respective modules. --- lib/gallery.common.css | 11 ++++++---- modules/comment/css/comment.css | 35 +++++++++++++++++++++++++++++++ modules/comment/helpers/comment.php | 2 +- modules/comment/helpers/comment_theme.php | 6 ++++++ modules/recaptcha/css/recaptcha.css | 7 +++++++ 5 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 modules/comment/css/comment.css create mode 100644 modules/recaptcha/css/recaptcha.css (limited to 'modules/recaptcha') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 235c5604..be12af55 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -9,6 +9,8 @@ * 4) States and interactions * 5) Positioning and order * 6) Containers/widgets + * + * @todo Remove extra white space at the top of the add comment form, above the first field */ /** ******************************************************************* @@ -58,10 +60,6 @@ input[type="hidden"] { display: none; } -textarea { - height: 12em; -} - input.textbox, input[type="text"], input[type="password"], @@ -74,6 +72,11 @@ textarea { width: 50%; } +textarea { + height: 12em; + width: 97%; +} + input:focus, input.textbox:focus, input[type=text]:focus, diff --git a/modules/comment/css/comment.css b/modules/comment/css/comment.css new file mode 100644 index 00000000..d9d9b2f8 --- /dev/null +++ b/modules/comment/css/comment.css @@ -0,0 +1,35 @@ +#g-content #g-comment-form { + margin-top: 2em; +} + +#g-content #g-comments { + margin-top: 2em; + position: relative; +} + +#g-content #g-comments ul li { + margin: 1em 0; +} + +#g-content #g-comments .g-author { + border-bottom: 1px solid #ccc; + color: #999; + height: 32px; + line-height: 32px; +} + +#g-content #g-comments ul li div { + padding: 0 8px 8px 43px; +} + +#g-content #g-comments .g-avatar { + height: 32px; + margin-right: .4em; + width: 32px; +} + +#g-admin-comment-button { + position: absolute; + right: 0; + top: 2px; +} diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 7b2332a8..bca19282 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -73,7 +73,7 @@ class comment_Core { $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")); + $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); $active = user::active(); if (!$active->guest) { diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php index 10c855db..af0e1ca4 100644 --- a/modules/comment/helpers/comment_theme.php +++ b/modules/comment/helpers/comment_theme.php @@ -19,10 +19,16 @@ */ class comment_theme_Core { static function head($theme) { + $theme->css("comment.css"); $theme->script("comment.js"); return ""; } + static function admin_head($theme) { + $theme->css("comment.css"); + return ""; + } + static function photo_bottom($theme) { $block = new Block; $block->css_id = "g-comments"; diff --git a/modules/recaptcha/css/recaptcha.css b/modules/recaptcha/css/recaptcha.css new file mode 100644 index 00000000..27117a55 --- /dev/null +++ b/modules/recaptcha/css/recaptcha.css @@ -0,0 +1,7 @@ +#g-content #g-comments ul li #g-recaptcha { + padding: 0; +} + +#g-content #g-comments ul li #g-recaptcha div { + padding: 0; +} -- cgit v1.2.3 From 7ea13b3869dee33804606a17488bb1cd26759bdb Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 28 Oct 2009 12:15:52 -0700 Subject: Normalize capitalization ticket #596 --- modules/akismet/views/admin_akismet.html.php | 4 ++-- modules/comment/helpers/comment_block.php | 4 ++-- modules/comment/helpers/comment_rss.php | 2 +- modules/comment/views/admin_comments.html.php | 12 +++++----- modules/exif/views/exif_dialog.html.php | 2 +- modules/exif/views/exif_sidebar.html.php | 2 +- modules/g2_import/helpers/g2_import.php | 2 +- modules/g2_import/views/admin_g2_import.html.php | 2 +- modules/gallery/controllers/admin_languages.php | 2 +- modules/gallery/helpers/gallery_block.php | 26 +++++++++++----------- modules/gallery/helpers/gallery_installer.php | 4 ++-- modules/gallery/helpers/gallery_rss.php | 4 ++-- .../gallery/views/admin_advanced_settings.html.php | 4 ++-- .../gallery/views/admin_block_platform.html.php | 2 +- modules/gallery/views/admin_graphics.html.php | 6 ++--- modules/gallery/views/admin_graphics_none.html.php | 2 +- modules/gallery/views/admin_identity.html.php | 2 +- modules/gallery/views/admin_languages.html.php | 4 ++-- modules/gallery/views/admin_maintenance.html.php | 12 +++++----- modules/gallery/views/admin_sidebar.html.php | 6 ++--- modules/gallery/views/admin_themes.html.php | 4 ++-- modules/gallery/views/l10n_client.html.php | 6 ++--- modules/gallery/views/login.html.php | 2 +- modules/gallery/views/login_ajax.html.php | 4 ++-- modules/gallery/views/maintenance.html.php | 4 ++-- modules/gallery/views/simple_uploader.html.php | 4 ++-- modules/gallery/views/upgrader.html.php | 2 +- modules/gallery/views/welcome_message.html.php | 4 ++-- modules/image_block/helpers/image_block_block.php | 4 ++-- modules/info/helpers/info_block.php | 2 +- .../notification/views/comment_published.html.php | 4 ++-- modules/notification/views/item_updated.html.php | 4 ++-- modules/recaptcha/views/admin_recaptcha.html.php | 6 ++--- modules/rss/helpers/rss_block.php | 4 ++-- modules/search/views/search.html.php | 2 +- modules/server_add/helpers/server_add_event.php | 2 +- modules/server_add/views/admin_server_add.html.php | 6 ++--- modules/tag/helpers/tag_block.php | 4 ++-- modules/user/views/admin_users.html.php | 14 ++++++------ modules/user/views/admin_users_group.html.php | 8 +++---- modules/user/views/reset_password.html.php | 4 ++-- modules/watermark/views/admin_watermarks.html.php | 6 ++--- themes/admin_wind/views/admin.html.php | 6 ++--- themes/admin_wind/views/pager.html.php | 16 ++++++------- themes/night_wind/views/movie.html.php | 8 +++---- themes/night_wind/views/pager.html.php | 16 ++++++------- themes/wind/views/movie.html.php | 8 +++---- themes/wind/views/pager.html.php | 16 ++++++------- 48 files changed, 137 insertions(+), 137 deletions(-) (limited to 'modules/recaptcha') diff --git a/modules/akismet/views/admin_akismet.html.php b/modules/akismet/views/admin_akismet.html.php index d273be5b..399053d8 100644 --- a/modules/akismet/views/admin_akismet.html.php +++ b/modules/akismet/views/admin_akismet.html.php @@ -1,6 +1,6 @@
    -

    +

    Wordpress.com API Key, which is also free. Your comments will be automatically relayed to Akismet.com where they'll be scanned for spam. Spam messages will be flagged accordingly and hidden from your vistors until you approve or delete them.", array("api_key_url" => "http://wordpress.com/api-keys", @@ -9,7 +9,7 @@

    - +
    diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index c00c6c51..7cd5d429 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -19,7 +19,7 @@ */ class comment_block_Core { static function get_admin_list() { - return array("recent_comments" => t("Recent Comments")); + return array("recent_comments" => t("Recent comments")); } static function get($block_id) { @@ -27,7 +27,7 @@ class comment_block_Core { switch ($block_id) { case "recent_comments": $block->css_id = "g-recent-comments"; - $block->title = t("Recent Comments"); + $block->title = t("Recent comments"); $block->content = new View("admin_block_recent_comments.html"); $block->content->comments = ORM::factory("comment")->orderby("created", "DESC")->limit(5)->find_all(); diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php index 4424981d..3692a30d 100644 --- a/modules/comment/helpers/comment_rss.php +++ b/modules/comment/helpers/comment_rss.php @@ -61,7 +61,7 @@ class comment_rss_Core { $feed->max_pages = ceil($comments->count_all() / $limit); $feed->title = htmlspecialchars(t("Recent Comments")); $feed->uri = url::abs_site("albums/" . (empty($id) ? "1" : $id)); - $feed->description = t("Recent Comments"); + $feed->description = t("Recent comments"); return $feed; } diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 82e071a8..f0f5ab1c 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -35,7 +35,7 @@
    -

    +

    @@ -46,13 +46,13 @@

    - + - + - + - +

    @@ -196,6 +196,6 @@
    - +
    diff --git a/modules/exif/views/exif_dialog.html.php b/modules/exif/views/exif_dialog.html.php index b50eea1d..22744e2d 100644 --- a/modules/exif/views/exif_dialog.html.php +++ b/modules/exif/views/exif_dialog.html.php @@ -4,7 +4,7 @@ .g-odd { background: #bdd2ff; } .g-even { background: #dfeffc; } -

    +

    diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 04f72b02..8af2eb12 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,5 +1,5 @@ -id}") ?>" title="for_html_attr() ?>" +id}") ?>" title="for_html_attr() ?>" class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index f55e7f32..248f8017 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -271,7 +271,7 @@ class g2_import_Core { if (g2(GalleryCoreApi::isAnonymousUser($g2_user_id))) { self::set_map($g2_user_id, identity::guest()->id); - return t("Skipping Anonymous User"); + return t("Skipping anonymous user"); } $g2_admin_group_id = diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index e1443aa7..b2665a5f 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -1,6 +1,6 @@
    -

    +

    diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index ccc631c7..27537c7f 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -115,7 +115,7 @@ class Admin_Languages_Controller extends Admin_Controller { ? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.", array("server-link" => html::mark_clean(html::anchor($server_link)))) - : t("API Key")) + : t("API key")) ->value($api_key) ->error_messages("invalid", t("The API key you provided is invalid.")); $group->submit("save")->value(t("Save settings")); diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index 6c08d39a..0052affc 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -21,15 +21,15 @@ class gallery_block_Core { static function get_admin_list() { return array( "welcome" => t("Welcome to Gallery 3!"), - "photo_stream" => t("Photo Stream"), - "log_entries" => t("Log Entries"), - "stats" => t("Gallery Stats"), - "platform_info" => t("Platform Information"), - "project_news" => t("Gallery Project News")); + "photo_stream" => t("Photo stream"), + "log_entries" => t("Log entries"), + "stats" => t("Gallery stats"), + "platform_info" => t("Platform information"), + "project_news" => t("Gallery project news")); } static function get_site_list() { - return array("language" => t("Language Preference")); + return array("language" => t("Language preference")); } static function get($block_id) { @@ -43,7 +43,7 @@ class gallery_block_Core { case "photo_stream": $block->css_id = "g-photo-stream"; - $block->title = t("Photo Stream"); + $block->title = t("Photo stream"); $block->content = new View("admin_block_photo_stream.html"); $block->content->photos = ORM::factory("item")->where("type", "photo")->orderby("created", "DESC")->find_all(10); @@ -51,7 +51,7 @@ class gallery_block_Core { case "log_entries": $block->css_id = "g-log-entries"; - $block->title = t("Log Entries"); + $block->title = t("Log entries"); $block->content = new View("admin_block_log_entries.html"); $block->content->entries = ORM::factory("log") ->orderby(array("timestamp" => "DESC", "id" => "DESC"))->find_all(5); @@ -59,7 +59,7 @@ class gallery_block_Core { case "stats": $block->css_id = "g-stats"; - $block->title = t("Gallery Stats"); + $block->title = t("Gallery stats"); $block->content = new View("admin_block_stats.html"); $block->content->album_count = ORM::factory("item")->where("type", "album")->where("id <>", 1)->count_all(); @@ -68,7 +68,7 @@ class gallery_block_Core { case "platform_info": $block->css_id = "g-platform"; - $block->title = t("Platform Information"); + $block->title = t("Platform information"); $block->content = new View("admin_block_platform.html"); if (is_readable("/proc/loadavg")) { $block->content->load_average = @@ -80,14 +80,14 @@ class gallery_block_Core { case "project_news": $block->css_id = "g-project-news"; - $block->title = t("Gallery Project News"); + $block->title = t("Gallery project news"); $block->content = new View("admin_block_news.html"); $block->content->feed = feed::parse("http://gallery.menalto.com/node/feed", 3); break; case "block_adder": $block->css_id = "g-block-adder"; - $block->title = t("Dashboard Content"); + $block->title = t("Dashboard content"); $block->content = self::get_add_block_form(); break; @@ -99,7 +99,7 @@ class gallery_block_Core { } $block = new Block(); $block->css_id = "g-user-language-block"; - $block->title = t("Language Preference"); + $block->title = t("Language preference"); $block->content = new View("user_languages_block.html"); $block->content->installed_locales = array_merge(array("" => t("« none »")), $locales); diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 01a213c8..5daf1016 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -199,12 +199,12 @@ class gallery_installer { } access::register_permission("view", "View"); - access::register_permission("view_full", "View Full Size"); + access::register_permission("view_full", "View full size"); access::register_permission("edit", "Edit"); access::register_permission("add", "Add"); // Mark for translation (must be the same strings as used above) - t("View Full Size"); + t("View full size"); t("View"); t("Edit"); t("Add"); diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php index feeab88a..155edfb5 100644 --- a/modules/gallery/helpers/gallery_rss.php +++ b/modules/gallery/helpers/gallery_rss.php @@ -39,8 +39,8 @@ class gallery_rss_Core { ->orderby("created", "DESC"); $feed->max_pages = ceil($all_children->find_all()->count() / $limit); - $feed->title = t("Recent Updates"); - $feed->description = t("Recent Updates"); + $feed->title = t("Recent updates"); + $feed->description = t("Recent updates"); return $feed; case "album": diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index e3ae5f58..32fbc2c3 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -1,10 +1,10 @@
    -

    +

    - +
    diff --git a/modules/gallery/views/admin_block_platform.html.php b/modules/gallery/views/admin_block_platform.html.php index f27b9e7a..b1b8a2f9 100644 --- a/modules/gallery/views/admin_block_platform.html.php +++ b/modules/gallery/views/admin_block_platform.html.php @@ -4,7 +4,7 @@ php_uname("n"))) ?>
  • - php_uname("s"), "version" => php_uname("r"))) ?> + php_uname("s"), "version" => php_uname("r"))) ?>
  • function_exists("apache_get_version") ? apache_get_version() : t("Unknown"))) ?> diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index 0f4c0dd8..3a48e087 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -13,13 +13,13 @@
    -

    +

    -

    +

    @@ -27,7 +27,7 @@
    -

    +

    $tk->$id, "is_active" => false)) ?> diff --git a/modules/gallery/views/admin_graphics_none.html.php b/modules/gallery/views/admin_graphics_none.html.php index 3ac6b4fb..e0fc4170 100644 --- a/modules/gallery/views/admin_graphics_none.html.php +++ b/modules/gallery/views/admin_graphics_none.html.php @@ -1,7 +1,7 @@
    -

    +

    diff --git a/modules/gallery/views/admin_identity.html.php b/modules/gallery/views/admin_identity.html.php index 358860cf..9a34dcc4 100644 --- a/modules/gallery/views/admin_identity.html.php +++ b/modules/gallery/views/admin_identity.html.php @@ -34,7 +34,7 @@
    -

    +

    diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 311672de..908cc892 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -26,7 +26,7 @@
    -

    +

    @@ -107,6 +107,6 @@
    - +
    diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 73a4bef8..107b35cc 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,13 +1,13 @@
    -

    +

    -

    +

  • @@ -43,11 +43,11 @@ count()): ?>
    -

    +

    - + @@ -116,11 +116,11 @@ count()): ?>
    -

    +

    - + diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 7c97270c..b394aa19 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -36,7 +36,7 @@
    -

    +

    @@ -44,7 +44,7 @@
    ">
    -

    +

      @@ -52,7 +52,7 @@
    -

    +

      diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index dda18265..d14e8bd4 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -8,7 +8,7 @@
      -

      +

      @@ -89,6 +89,6 @@
    - +
    \ No newline at end of file diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index f4da52dc..9d14bbb2 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -6,9 +6,9 @@ for_html_attr() ?>" href="">X -

    +

    get('show_all_l10n_messages')): ?> - "> + ">

    @@ -73,7 +73,7 @@

    diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php index 4acdb156..b50163fa 100644 --- a/modules/gallery/views/welcome_message.html.php +++ b/modules/gallery/views/welcome_message.html.php @@ -16,10 +16,10 @@

    id}") ?>" - title="for_html_attr() ?>" + title="for_html_attr() ?>" id="g-after-install-change-password-link" class="g-button ui-state-default ui-corners-all"> - +

    -

    +

    @@ -54,7 +54,7 @@ -

    +

    @@ -87,17 +87,17 @@ @@ -115,7 +115,7 @@

    - +

    diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index db3645a0..e44cbddd 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -5,11 +5,11 @@ id") ?>" title=" $group->name))->for_html_attr() ?>" class="g-dialog-link g-button ui-state-default ui-corner-all"> - + for_html_attr() ?>" class="g-dialog-link g-button ui-state-disabled ui-corner-all ui-icon-left"> - + @@ -23,7 +23,7 @@ class="g-button ui-state-default ui-corner-all ui-icon-left" title=" $user->name, "group" => $group->name))->for_html_attr() ?>"> - + @@ -32,7 +32,7 @@

    - +

    diff --git a/modules/user/views/reset_password.html.php b/modules/user/views/reset_password.html.php index 92ca4917..3afca881 100644 --- a/modules/user/views/reset_password.html.php +++ b/modules/user/views/reset_password.html.php @@ -1,10 +1,10 @@ - <?= t("Password Reset Request") ?> + <?= t("Password reset request") ?> -

    +

    $user->full_name ? $user->full_name : $user->name)) ?>

    diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index af38cb41..fc634b82 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -11,7 +11,7 @@ title="for_html_attr() ?>" class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> -

    +

    @@ -27,10 +27,10 @@
    diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index ef1aa1d2..e554b817 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -4,7 +4,7 @@ - <?= t("Admin Dashboard") ?> + <?= t("Admin dashboard") ?>" type="image/x-icon" /> css("yui/reset-fonts-grids.css") ?> @@ -23,7 +23,7 @@ script("gallery.common.js") ?> script("gallery.ajax.js") ?> script("gallery.dialog.js") ?> @@ -48,7 +48,7 @@ html::mark_clean( 'id}") . - '" title="' . t("Edit Your Profile")->for_html_attr() . + '" title="' . t("Edit your profile")->for_html_attr() . '" id="g-user-profile-link" class="g-dialog-link">' . html::clean($user->display_name()) . ''))) ?> diff --git a/themes/admin_wind/views/pager.html.php b/themes/admin_wind/views/pager.html.php index 555a4950..e4fbd5d5 100644 --- a/themes/admin_wind/views/pager.html.php +++ b/themes/admin_wind/views/pager.html.php @@ -11,34 +11,34 @@
  • - + - + - + - +
  • - + - + - + - +
  • diff --git a/themes/night_wind/views/movie.html.php b/themes/night_wind/views/movie.html.php index 17b519ba..9254c7fe 100644 --- a/themes/night_wind/views/movie.html.php +++ b/themes/night_wind/views/movie.html.php @@ -6,20 +6,20 @@
  • - + - +
  • $position, "total" => $sibling_count)) ?>
  • - + - +
  • diff --git a/themes/night_wind/views/pager.html.php b/themes/night_wind/views/pager.html.php index 337d658f..ba325d03 100644 --- a/themes/night_wind/views/pager.html.php +++ b/themes/night_wind/views/pager.html.php @@ -11,34 +11,34 @@
  • - + - + - + - +
  • - + - + - + - +
  • diff --git a/themes/wind/views/movie.html.php b/themes/wind/views/movie.html.php index 17b519ba..9254c7fe 100644 --- a/themes/wind/views/movie.html.php +++ b/themes/wind/views/movie.html.php @@ -6,20 +6,20 @@
  • - + - +
  • $position, "total" => $sibling_count)) ?>
  • - + - +
  • diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php index 337d658f..ba325d03 100644 --- a/themes/wind/views/pager.html.php +++ b/themes/wind/views/pager.html.php @@ -11,34 +11,34 @@
  • - + - + - + - +
  • - + - + - + - +
  • -- cgit v1.2.3 From bfafef95e8090b66f3322f73e532056b10ca116a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 29 Oct 2009 09:21:07 -0700 Subject: Generalize the adding of the recaptcha form by changing the name of the event to recaptch_add. This prevents us from having to keep modifying the recaptch module anytime we add a form that requires recaptcha. --- modules/comment/helpers/comment.php | 2 +- modules/recaptcha/helpers/recaptcha_event.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/recaptcha') diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 35685d8c..37b11206 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -72,7 +72,7 @@ class comment_Core { $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); + module::event("recaptcha_add", $form); $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); $active = identity::active_user(); diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php index feedced4..6e885656 100644 --- a/modules/recaptcha/helpers/recaptcha_event.php +++ b/modules/recaptcha/helpers/recaptcha_event.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class recaptcha_event_Core { - static function comment_add_form($form) { + static function recaptcha_add($form) { if (module::get_var("recaptcha", "public_key")) { $form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha"); } -- cgit v1.2.3 From e45ea9359d6cb603be0bc28376d92883aa8d7c7e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 29 Oct 2009 09:27:44 -0700 Subject: Cleanup typo and change what is passwed into the event. pass the group that the recaptch element should be attached to instead of the whole form. This allows the recaptch event to have no knowledge of the containing form. --- modules/comment/helpers/comment.php | 2 +- modules/recaptcha/helpers/recaptcha_event.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/recaptcha') diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 37b11206..2b651118 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -72,7 +72,7 @@ class comment_Core { $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("recaptcha_add", $form); + module::event("recaptcha_add", $group); $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); $active = identity::active_user(); diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php index 6e885656..d3e5bca6 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 recaptcha_add($form) { if (module::get_var("recaptcha", "public_key")) { - $form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha"); + $form->recaptcha("recaptcha")->label("")->id("g-recaptcha"); } } -- cgit v1.2.3 From 488b67014b44baf8bb19deaf7c77e87a95be220b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 31 Oct 2009 16:25:25 -0700 Subject: Revert "Cleanup typo and change what is passwed into the event. pass the group that the recaptch element should be attached to instead of the whole form. This allows the recaptch event to have no knowledge of the containing form." Revert "Generalize the adding of the recaptcha form by changing the name of the event to recaptch_add. This prevents us from having to keep modifying the recaptch module anytime we add a form that requires recaptcha." This reverts commits e45ea9359d6cb603be0bc28376d92883aa8d7c7e and bfafef95e8090b66f3322f73e532056b10ca116a. --- modules/comment/helpers/comment.php | 2 +- modules/recaptcha/helpers/recaptcha_event.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/recaptcha') diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 2b651118..35685d8c 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -72,7 +72,7 @@ class comment_Core { $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("recaptcha_add", $group); + module::event("comment_add_form", $form); $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); $active = identity::active_user(); diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php index d3e5bca6..feedced4 100644 --- a/modules/recaptcha/helpers/recaptcha_event.php +++ b/modules/recaptcha/helpers/recaptcha_event.php @@ -18,9 +18,9 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class recaptcha_event_Core { - static function recaptcha_add($form) { + static function comment_add_form($form) { if (module::get_var("recaptcha", "public_key")) { - $form->recaptcha("recaptcha")->label("")->id("g-recaptcha"); + $form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha"); } } -- cgit v1.2.3 From 809e738536b6639bb42ecae8eb1e183543fed93c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 1 Nov 2009 13:14:11 -0800 Subject: Try an new approach to extending forms. Create an extend_form event. For the first attempt replace the comment_add_form and item_add_form events. --- modules/comment/helpers/comment.php | 6 +++++- modules/gallery/helpers/album.php | 4 +++- modules/gallery/helpers/movie.php | 5 +++-- modules/gallery/helpers/photo.php | 4 +++- modules/recaptcha/config/recaptcha.php | 24 ++++++++++++++++++++++++ modules/recaptcha/helpers/recaptcha_event.php | 10 +++++++--- modules/tag/helpers/tag_event.php | 18 +++++++++++------- 7 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 modules/recaptcha/config/recaptcha.php (limited to 'modules/recaptcha') diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 35685d8c..e2772707 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -72,7 +72,11 @@ class comment_Core { $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); + + $extend_form = (object)array("data" => $item, "form" => $form, "id" => "g-comment-form", + "append_to" => $group); + module::event("extend_form", $extend_form); + $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); $active = identity::active_user(); diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index 72a79a75..c9c6e2c9 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -154,7 +154,9 @@ class album_Core { "DESC" => t("Descending"))) ->selected($parent->sort_order); - module::event("item_edit_form", $parent, $form); + $extend_form = (object)array("data" => $parent, "form" => $form, "id" => "g-edit-album-form", + "append_to" => $group); + module::event("extend_form", $extend_form); $group = $form->group("buttons")->label(""); $group->hidden("type")->value("album"); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index e84e8ea6..9e663d1f 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -151,7 +151,9 @@ class movie_Core { "not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores")); - module::event("item_edit_form", $movie, $form); + $extend_form = (object)array("data" => $parent, "form" => $form, "id" => "g-edit-movie-form", + "append_to" => $group); + module::event("extend_form", $extend_form); $group = $form->group("buttons")->label(""); $group->submit("")->value(t("Modify")); @@ -159,7 +161,6 @@ class movie_Core { return $form; } - static function getmoviesize($filename) { $ffmpeg = self::find_ffmpeg(); if (empty($ffmpeg)) { diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php index 01cf5278..f5e1e1dc 100644 --- a/modules/gallery/helpers/photo.php +++ b/modules/gallery/helpers/photo.php @@ -179,7 +179,9 @@ class photo_Core { "not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores")); - module::event("item_edit_form", $photo, $form); + $extend_form = (object)array("data" => $photo, "form" => $form, "id" => "g-edit-photo-form", + "append_to" => $group); + module::event("extend_form", $extend_form); $group = $form->group("buttons")->label(""); $group->submit("")->value(t("Modify")); diff --git a/modules/recaptcha/config/recaptcha.php b/modules/recaptcha/config/recaptcha.php new file mode 100644 index 00000000..04827673 --- /dev/null +++ b/modules/recaptcha/config/recaptcha.php @@ -0,0 +1,24 @@ +add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha"); + static function extend_form($event_data) { + // @todo put into an admin interface + $config = Kohana::config("recaptcha"); + if (module::get_var("recaptcha", "public_key") && + in_array($event_data->id, $config["recaptcha"])) { + $input = empty($event_data->append_to) ? $event_data->form : $event_data->append_to; + $input->recaptcha("recaptcha")->label("")->id("g-recaptcha"); } } diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index 57986e40..cc134766 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -64,16 +64,20 @@ class tag_event_Core { tag::compact(); } - static function item_edit_form($item, $form) { - $url = url::site("tags/autocomplete"); - $form->script("") - ->text("$('form input[id=tags]').ready(function() { + static function extend_form($event_data) { + if (in_array($event_data->id, + array("g-edit-album-form", "g-edit-movie-form", "g-edit-photo-form"))) { + $url = url::site("tags/autocomplete"); + $event_data->form->script("") + ->text("$('form input[id=tags]').ready(function() { $('form input[id=tags]').autocomplete( '$url', {max: 30, multiple: true, multipleSeparator: ',', cacheLength: 1}); });"); - $tag_value = implode(", ", tag::item_tags($item)); - $form->edit_item->input("tags")->label(t("Tags (comma separated)")) - ->value($tag_value); + $tag_value = implode(", ", tag::item_tags($event_data->data)); + $input = empty($event_data->append_to) ? $event_data->form : $event_data->append_to; + $input->input("tags")->label(t("Tags (comma separated)")) + ->value($tag_value); + } } static function item_edit_form_completed($item, $form) { -- cgit v1.2.3 From 192b11724ef315ebaabb3088a0daba1450fd7df0 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 2 Nov 2009 13:45:40 -0800 Subject: Add a recaptcha_theme file so we can actually include the recaptcha.css file so the recaptcha doesn't looking... interesting. --- modules/recaptcha/helpers/recaptcha_theme.php | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/recaptcha/helpers/recaptcha_theme.php (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/helpers/recaptcha_theme.php b/modules/recaptcha/helpers/recaptcha_theme.php new file mode 100644 index 00000000..fd1f563c --- /dev/null +++ b/modules/recaptcha/helpers/recaptcha_theme.php @@ -0,0 +1,28 @@ +css("recaptcha.css"); + } + + static function admin_head($theme) { + $theme->css("recaptcha.css"); + } +} \ No newline at end of file -- cgit v1.2.3 From f9b700e75c682df3c48efb0e69f893c61f06d3bd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 3 Nov 2009 13:40:59 -0800 Subject: Delay initializing the recaptcha to allow the recaptcha JS to load and initialize. Fixes ticket #851. --- modules/recaptcha/views/form_recaptcha.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/views/form_recaptcha.html.php b/modules/recaptcha/views/form_recaptcha.html.php index f26ebdf6..20e7359e 100644 --- a/modules/recaptcha/views/form_recaptcha.html.php +++ b/modules/recaptcha/views/form_recaptcha.html.php @@ -12,6 +12,6 @@ callback: Recaptcha.focus_response_field } ); - }, 0); + }, 500); -- cgit v1.2.3 From 9a33f96e31ba41d78ab24eb9420d74578c7fbbcf Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 3 Nov 2009 14:44:53 -0800 Subject: Add a register_add_form event handler to recaptcha to add the recaptcha to the bottom of the user registration form in the register module. --- modules/recaptcha/helpers/recaptcha_event.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php index feedced4..e7ded3ab 100644 --- a/modules/recaptcha/helpers/recaptcha_event.php +++ b/modules/recaptcha/helpers/recaptcha_event.php @@ -24,6 +24,12 @@ class recaptcha_event_Core { } } + static function register_add_form($form) { + if (module::get_var("recaptcha", "public_key")) { + $form->register_user->recaptcha("recaptcha")->label("")->id("g-recaptcha"); + } + } + static function admin_menu($menu, $theme) { $menu->get("settings_menu") ->append(Menu::factory("link") -- cgit v1.2.3 From 26f8240e3478802a505f6f5355741d30130c65c5 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 9 Nov 2009 11:52:43 -0800 Subject: Revert "Try an new approach to extending forms. Create an extend_form event. For the first attempt replace the comment_add_form and item_add_form events." This reverts commit 809e738536b6639bb42ecae8eb1e183543fed93c. --- modules/comment/helpers/comment.php | 6 +----- modules/gallery/helpers/album.php | 4 +--- modules/gallery/helpers/movie.php | 5 ++--- modules/gallery/helpers/photo.php | 4 +--- modules/recaptcha/config/recaptcha.php | 24 ------------------------ modules/recaptcha/helpers/recaptcha_event.php | 10 +++------- modules/tag/helpers/tag_event.php | 18 +++++++----------- 7 files changed, 15 insertions(+), 56 deletions(-) delete mode 100644 modules/recaptcha/config/recaptcha.php (limited to 'modules/recaptcha') diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index e2772707..35685d8c 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -72,11 +72,7 @@ class comment_Core { $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); - - $extend_form = (object)array("data" => $item, "form" => $form, "id" => "g-comment-form", - "append_to" => $group); - module::event("extend_form", $extend_form); - + module::event("comment_add_form", $form); $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); $active = identity::active_user(); diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index c9c6e2c9..72a79a75 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -154,9 +154,7 @@ class album_Core { "DESC" => t("Descending"))) ->selected($parent->sort_order); - $extend_form = (object)array("data" => $parent, "form" => $form, "id" => "g-edit-album-form", - "append_to" => $group); - module::event("extend_form", $extend_form); + module::event("item_edit_form", $parent, $form); $group = $form->group("buttons")->label(""); $group->hidden("type")->value("album"); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 9e663d1f..e84e8ea6 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -151,9 +151,7 @@ class movie_Core { "not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores")); - $extend_form = (object)array("data" => $parent, "form" => $form, "id" => "g-edit-movie-form", - "append_to" => $group); - module::event("extend_form", $extend_form); + module::event("item_edit_form", $movie, $form); $group = $form->group("buttons")->label(""); $group->submit("")->value(t("Modify")); @@ -161,6 +159,7 @@ class movie_Core { return $form; } + static function getmoviesize($filename) { $ffmpeg = self::find_ffmpeg(); if (empty($ffmpeg)) { diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php index f5e1e1dc..01cf5278 100644 --- a/modules/gallery/helpers/photo.php +++ b/modules/gallery/helpers/photo.php @@ -179,9 +179,7 @@ class photo_Core { "not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores")); - $extend_form = (object)array("data" => $photo, "form" => $form, "id" => "g-edit-photo-form", - "append_to" => $group); - module::event("extend_form", $extend_form); + module::event("item_edit_form", $photo, $form); $group = $form->group("buttons")->label(""); $group->submit("")->value(t("Modify")); diff --git a/modules/recaptcha/config/recaptcha.php b/modules/recaptcha/config/recaptcha.php deleted file mode 100644 index 04827673..00000000 --- a/modules/recaptcha/config/recaptcha.php +++ /dev/null @@ -1,24 +0,0 @@ -id, $config["recaptcha"])) { - $input = empty($event_data->append_to) ? $event_data->form : $event_data->append_to; - $input->recaptcha("recaptcha")->label("")->id("g-recaptcha"); + static function comment_add_form($form) { + if (module::get_var("recaptcha", "public_key")) { + $form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha"); } } diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index cc134766..57986e40 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -64,20 +64,16 @@ class tag_event_Core { tag::compact(); } - static function extend_form($event_data) { - if (in_array($event_data->id, - array("g-edit-album-form", "g-edit-movie-form", "g-edit-photo-form"))) { - $url = url::site("tags/autocomplete"); - $event_data->form->script("") - ->text("$('form input[id=tags]').ready(function() { + static function item_edit_form($item, $form) { + $url = url::site("tags/autocomplete"); + $form->script("") + ->text("$('form input[id=tags]').ready(function() { $('form input[id=tags]').autocomplete( '$url', {max: 30, multiple: true, multipleSeparator: ',', cacheLength: 1}); });"); - $tag_value = implode(", ", tag::item_tags($event_data->data)); - $input = empty($event_data->append_to) ? $event_data->form : $event_data->append_to; - $input->input("tags")->label(t("Tags (comma separated)")) - ->value($tag_value); - } + $tag_value = implode(", ", tag::item_tags($item)); + $form->edit_item->input("tags")->label(t("Tags (comma separated)")) + ->value($tag_value); } static function item_edit_form_completed($item, $form) { -- cgit v1.2.3
    id") ?>" - open_text="" + open_text="" class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> - + id != $user->id && !$user->guest): ?> id") ?>" class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> - + for_html_attr() ?>" class="g-button ui-state-disabled ui-corner-all ui-icon-left"> - +