From e1e8904e4a82792effd721fc0b4c028d86cf177a Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Wed, 30 Sep 2009 22:49:36 -0600 Subject: Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's and classes in the login/reset password dialog. --- modules/exif/helpers/exif.php | 2 +- modules/exif/views/exif_sidebar.html.php | 2 +- modules/g2_import/views/admin_g2_import.html.php | 2 +- modules/gallery/helpers/graphics.php | 2 +- modules/gallery/libraries/Menu.php | 2 +- .../gallery/views/admin_advanced_settings.html.php | 2 +- modules/gallery/views/admin_maintenance.html.php | 8 ++++---- .../views/admin_maintenance_show_log.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 4 ++-- modules/organize/js/organize.js | 16 +++++++-------- modules/organize/views/organize_dialog.html.php | 2 +- modules/search/helpers/search.php | 2 +- modules/server_add/js/server_add.js | 4 ++-- modules/tag/js/tag.js | 2 +- modules/tag/views/admin_tags.html.php | 2 +- modules/user/helpers/group.php | 1 + modules/user/helpers/user.php | 3 +++ modules/user/views/admin_users.html.php | 8 ++++---- modules/user/views/admin_users_group.html.php | 4 ++-- modules/user/views/login.html.php | 2 +- modules/user/views/login_ajax.html.php | 24 ++++++++++------------ modules/watermark/views/admin_watermarks.html.php | 6 +++--- 22 files changed, 52 insertions(+), 50 deletions(-) (limited to 'modules') diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 83540622..453690ea 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -163,7 +163,7 @@ class exif_Core { list ($remaining) = exif::stats(); if ($remaining) { site_status::warning( - t('Your Exif index needs to be updated. Fix this now', + t('Your Exif index needs to be updated. Fix this now', array("url" => html::mark_clean(url::site("admin/maintenance/start/exif_task::update_index?csrf=__CSRF__")))), "exif_index_out_of_date"); } diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 23ecab03..3c7bb517 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,6 +1,6 @@ id}") ?>" title="for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 91b723ad..314f030b 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -84,7 +84,7 @@

- "> diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 0e32022f..f9b88638 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -249,7 +249,7 @@ class graphics_Core { "%count of your photos are out of date. Click here to fix them", $count, array("attrs" => html::mark_clean(sprintf( - 'href="%s" class="gDialogLink"', + 'href="%s" class="g-dialogLink"', url::site("admin/maintenance/start/gallery_task::rebuild_dirty_images?csrf=__CSRF__"))))), "graphics_dirty"); } diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index 07b2b2b8..4be374a2 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -142,7 +142,7 @@ class Menu_Element_Dialog extends Menu_Element { } else { $css_class = ""; } - return "

  • url\" " . + return "
  • url\" " . "title=\"$this->label\">$this->label
  • "; } } diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index c3595da5..6ad265ac 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -23,7 +23,7 @@ name) ?> module_name/" . html::clean($var->name)) ?>" - class="gDialogLink" + class="g-dialogLink" title=" $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> value): ?> value) ?> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 8c3917b6..977ba75b 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -30,7 +30,7 @@ callback?csrf=$csrf") ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> @@ -100,7 +100,7 @@ state == "stalled"): ?> - id?csrf=$csrf") ?>"> @@ -170,12 +170,12 @@ get_log()): ?> - id?csrf=$csrf") ?>" class="gDialogLink g-button ui-state-default ui-corner-all"> + id?csrf=$csrf") ?>" class="g-dialogLink g-button ui-state-default ui-corner-all"> - id?csrf=$csrf") ?>" class="gDialogLink g-button" ui-state-default ui-corner-all> + id?csrf=$csrf") ?>" class="g-dialogLink 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_maintenance_show_log.html.php b/modules/gallery/views/admin_maintenance_show_log.html.php index 2dfef90f..c61db871 100644 --- a/modules/gallery/views/admin_maintenance_show_log.html.php +++ b/modules/gallery/views/admin_maintenance_show_log.html.php @@ -9,7 +9,7 @@ appendTo('body').submit().remove(); }; -
    +

    name ?>

    get_log()) ?>
    diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index 0aac4717..d0ffc414 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -30,7 +30,7 @@ site) continue ?>
    - " class="gDialogLink" title=" $info->name))->for_html_attr() ?>"> + " class="g-dialogLink" title=" $info->name))->for_html_attr() ?>"> " alt="name) ?>" />

    name ?>

    @@ -68,7 +68,7 @@ admin) continue ?>
    - " class="gDialogLink" title=" $info->name))->for_html_attr() ?>"> + " class="g-dialogLink" title=" $info->name))->for_html_attr() ?>"> " alt="name) ?>" />

    name ?>

    diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index cfaff01c..bee42a22 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -138,19 +138,19 @@ var self = this; // Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475 (target 1.8?) $(".sf-menu li.sfHover ul").css("z-index", 68); - $("#gDialog").dialog("option", "zIndex", 70); - $("#gDialog").bind("dialogopen", function(event, ui) { - $("#gOrganize").height($("#gDialog").innerHeight() - 20); - $("#gOrganizeMicroThumbPanel").height($("#gDialog").innerHeight() - 90); - $("#gOrganizeTreeContainer").height($("#gDialog").innerHeight() - 59); + $("#g-dialog").dialog("option", "zIndex", 70); + $("#g-dialog").bind("dialogopen", function(event, ui) { + $("#gOrganize").height($("#g-dialog").innerHeight() - 20); + $("#gOrganizeMicroThumbPanel").height($("#g-dialog").innerHeight() - 90); + $("#gOrganizeTreeContainer").height($("#g-dialog").innerHeight() - 59); }); - $("#gDialog").bind("dialogclose", function(event, ui) { + $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); - $("#gDialog #gOrganizeClose").click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog #gOrganizeClose").click(function(event) { + $("#g-dialog").dialog("close"); }); $("#gOrganizeSortColumn,#gOrganizeSortOrder").change(function(event) { diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 87f12be9..09720fe4 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -5,7 +5,7 @@ var sort_order_url = ""; var tree_url = ""; -
    +

    html::purify($album->title))) ?>

    diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php index 0080b4ce..c73eda08 100644 --- a/modules/search/helpers/search.php +++ b/modules/search/helpers/search.php @@ -57,7 +57,7 @@ class search_Core { list ($remaining) = search::stats(); if ($remaining) { site_status::warning( - t('Your search index needs to be updated. Fix this now', + t('Your search index needs to be updated. Fix this now', array("url" => html::mark_clean(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))), "search_index_out_of_date"); } diff --git a/modules/server_add/js/server_add.js b/modules/server_add/js/server_add.js index 50a8c36b..86bff079 100644 --- a/modules/server_add/js/server_add.js +++ b/modules/server_add/js/server_add.js @@ -21,7 +21,7 @@ self.run_add(); }); $("#gServerAddCloseButton", this.element).click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog").dialog("close"); window.location.reload(); }); $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { @@ -33,7 +33,7 @@ $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { self.open_dir(event); }); - $("#gDialog").bind("dialogclose", function(event, ui) { + $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); }, diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 52c695c6..ab3691a6 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -24,7 +24,7 @@ function closeEditInPlaceForms() { $("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert")); li.height(""); $(".gEditable", li).bind("click", editInPlace); - $(".gDialogLink", li).gallery_dialog(); + $(".g-dialogLink", li).gallery_dialog(); } } diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index b7344cda..a4bd5d8f 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -50,7 +50,7 @@ name) ?> (count ?>) id") ?>" - class="gDialogLink delete-link g-button"> + class="g-dialogLink delete-link g-button"> diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index 04e6efd6..e0dfac8e 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -86,6 +86,7 @@ class group_Core { static function get_add_form_admin() { $form = new Forge("admin/users/add_group", "", "post", array("id" => "gAddGroupForm")); + $form->set_attr('class', "g-narrow"); $form_group = $form->group("add_group")->label(t("Add Group")); $form_group->input("name")->label(t("Name"))->id("gName"); $form_group->inputs["name"]->error_messages( diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index b9162b92..93c385a3 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -26,6 +26,7 @@ class user_Core { static function get_edit_form($user) { $form = new Forge("users/$user->id?_method=put", "", "post", array("id" => "gEditUserForm")); + $form->set_attr("class", "g-narrow"); $group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name))); $group->input("full_name")->label(t("Full Name"))->id("gFullName")->value($user->full_name); self::_add_locale_dropdown($group, $user); @@ -66,6 +67,7 @@ class user_Core { static function get_add_form_admin() { $form = new Forge("admin/users/add_user", "", "post", array("id" => "gAddUserForm")); + $form->set_attr('class', "g-narrow"); $group = $form->group("add_user")->label(t("Add User")); $group->input("name")->label(t("Username"))->id("gUsername") ->error_messages("in_use", t("There is already a user with that username")); @@ -112,6 +114,7 @@ class user_Core { static function get_login_form($url) { $form = new Forge($url, "", "post", array("id" => "gLoginForm")); + $form->set_attr('class', "g-narrow"); $group = $form->group("login")->label(t("Login")); $group->input("name")->label(t("Username"))->id("gUsername")->class(null); $group->password("password")->label(t("Password"))->id("gPassword")->class(null); diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 0741a932..a46e402f 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -28,7 +28,7 @@ {}, function(data) { $("#group-" + group_id).html(data); - $("#group-" + group_id + " .gDialogLink").gallery_dialog(); + $("#group-" + group_id + " .g-dialogLink").gallery_dialog(); }); } @@ -43,7 +43,7 @@
    " - class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" + class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" title="for_html_attr() ?>"> @@ -89,7 +89,7 @@ id != $user->id && !$user->guest): ?> id") ?>" - class="gDialogLink g-button ui-state-default ui-corner-all ui-icon-left"> + class="g-dialogLink g-button ui-state-default ui-corner-all ui-icon-left"> for_html_attr() ?>" @@ -105,7 +105,7 @@
    " - class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" + class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" title="for_html_attr() ?>"> diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index 6f2496f8..e5c9fcee 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -4,11 +4,11 @@ special): ?> id") ?>" title=" $group->name))->for_html_attr() ?>" - class="gDialogLink g-button ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-state-default ui-corner-all"> for_html_attr() ?>" - class="gDialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> + class="g-dialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> diff --git a/modules/user/views/login.html.php b/modules/user/views/login.html.php index bb670d51..c814bbfa 100644 --- a/modules/user/views/login.html.php +++ b/modules/user/views/login.html.php @@ -11,7 +11,7 @@ html::mark_clean( 'id}") . '" title="' . t("Edit Your Profile")->for_html_attr() . - '" id="gUserProfileLink" class="gDialogLink">' . + '" id="gUserProfileLink" class="g-dialogLink">' . html::clean($user->display_name()) . ''))) ?>
  • diff --git a/modules/user/views/login_ajax.html.php b/modules/user/views/login_ajax.html.php index a7530134..d3364b46 100644 --- a/modules/user/views/login_ajax.html.php +++ b/modules/user/views/login_ajax.html.php @@ -1,12 +1,12 @@ -
    +
      -
    • -
      - -
      +
    • +
    • - +
    diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index 3790030d..285f6407 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -8,7 +8,7 @@ " title="for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all">

    @@ -27,10 +27,10 @@

    " title="for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> " title="for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all">
    -- cgit v1.2.3