diff options
32 files changed, 162 insertions, 207 deletions
diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 601f6609..54453012 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -3,9 +3,10 @@ * * Sheet organization: * 1) Text - * 2) States and interactions - * 3) Positioning and order - * 4) Reusable containers/widgets + * 2) Dimension and scale + * 3) States and interactions + * 4) Positioning and order + * 5) Containers/widgets */ /** ******************************************************************* @@ -24,8 +25,16 @@ text-align: right; } + +/** ******************************************************************* + * 2) Dimension and scale + **********************************************************************/ + +.g-narrow { +} + /** ******************************************************************* - * 2) States and interactions + * 3) States and interactions **********************************************************************/ .g-active, @@ -105,7 +114,7 @@ form .g-error { } /** ******************************************************************* - * 3) Positioning and order + * 4) Positioning and order **********************************************************************/ .g-left { @@ -131,10 +140,43 @@ form .g-error { } /** ******************************************************************* - * 4) Reusable containers/widgets + * 5) Containers/widgets **********************************************************************/ -.g-dialog { +#g-dialog { + text-align: left; +} + +#g-dialog .g-narrow { + margin: 0 auto; + width: 270px; +} + +#g-dialog fieldset { + border: none; +} + +#g-dialog legend { + display: none; +} + +#g-dialog form input[type="text"], +#g-dialog form input[type="password"] { + width: 100%; +} + +#g-dialog p { + margin: 0; +} + +#g-dialog li { + padding-left: 0; +} + +#g-dialog .g-cancel { + clear: none; + float: left; + margin: .3em 1em; } .g-button { diff --git a/lib/gallery.common.js b/lib/gallery.common.js index a91f021e..59482b22 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -53,7 +53,7 @@ return this.each(function(i){ var size; switch ($(this).attr("id")) { - case "#gDialog": + case "#g-dialog": case "#gPanel": size = "Large"; break; @@ -133,7 +133,7 @@ function() { if (in_progress == 0) { $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); - $(this).find(".gDialogLink").gallery_dialog(); + $(this).find(".g-dialogLink").gallery_dialog(); $(this).find(".gAjaxLink").gallery_ajax(); } }, diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 39c451e3..a70200f9 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -15,75 +15,75 @@ _show: function(sHref) { var self = this; - var eDialog = '<div id="gDialog"></div>'; + var eDialog = '<div id="g-dialog"></div>'; $("body").append(eDialog); if (!self.options.close) { self.options.close = self.close_dialog; } - $("#gDialog").dialog(self.options); + $("#g-dialog").dialog(self.options); - $("#gDialog").gallery_show_loading(); + $("#g-dialog").gallery_show_loading(); $.get(sHref, function(data) { - $("#gDialog").html(data).gallery_show_loading(); + $("#g-dialog").html(data).gallery_show_loading(); - if ($("#gDialog form").length) { - self.form_loaded(null, $("#gDialog form")); + if ($("#g-dialog form").length) { + self.form_loaded(null, $("#g-dialog form")); } self._layout(); - $("#gDialog").dialog("open"); + $("#g-dialog").dialog("open"); // Remove titlebar for progress dialogs or set title - if ($("#gDialog #gProgress").length) { + if ($("#g-dialog #gProgress").length) { $(".ui-dialog-titlebar").remove(); - } else if ($("#gDialog h1").length) { - $("#gDialog").dialog('option', 'title', $("#gDialog h1:eq(0)").html()); - } else if ($("#gDialog fieldset legend").length) { - $("#gDialog").dialog('option', 'title', $("#gDialog fieldset legend:eq(0)").html()); + } else if ($("#g-dialog h1").length) { + $("#g-dialog").dialog('option', 'title', $("#g-dialog h1:eq(0)").html()); + } else if ($("#g-dialog fieldset legend").length) { + $("#g-dialog").dialog('option', 'title', $("#g-dialog fieldset legend:eq(0)").html()); } - if ($("#gDialog form").length) { + if ($("#g-dialog form").length) { self._ajaxify_dialog(); } }); - $("#gDialog").dialog("option", "self", self); + $("#g-dialog").dialog("option", "self", self); }, _layout: function() { var dialogWidth; - var dialogHeight = $("#gDialog").height(); - var cssWidth = new String($("#gDialog form").css("width")); + var dialogHeight = $("#g-dialog").height(); + var cssWidth = new String($("#g-dialog form").css("width")); var childWidth = cssWidth.replace(/[^0-9]/g,""); var size = $.gallery_get_viewport_size(); - if ($("#gDialog iframe").length) { + if ($("#g-dialog iframe").length) { dialogWidth = size.width() - 100; // Set the iframe width and height - $("#gDialog iframe").width("100%").height(size.height() - 100); - } else if ($("#gDialog .gDialogPanel").length) { + $("#g-dialog iframe").width("100%").height(size.height() - 100); + } else if ($("#g-dialog .g-dialogPanel").length) { dialogWidth = size.width() - 100; - $("#gDialog").dialog("option", "height", size.height() - 100); + $("#g-dialog").dialog("option", "height", size.height() - 100); } else if (childWidth == "" || childWidth > 300) { dialogWidth = 500; } - $("#gDialog").dialog('option', 'width', dialogWidth); + $("#g-dialog").dialog('option', 'width', dialogWidth); }, form_loaded: function(event, ui) { // Should be defined (and localized) in the theme MSG_CANCEL = MSG_CANCEL || 'Cancel'; - var eCancel = '<a href="#" class="gCancel">' + MSG_CANCEL + '</a>'; - if ($("#gDialog .submit").length) { - $("#gDialog .submit").addClass("ui-state-default ui-corner-all"); + var eCancel = '<a href="#" class="g-cancel">' + MSG_CANCEL + '</a>'; + if ($("#g-dialog .submit").length) { + $("#g-dialog .submit").addClass("ui-state-default ui-corner-all"); $.fn.gallery_hover_init(); - $("#gDialog .submit").parent().append(eCancel); - $("#gDialog .gCancel").click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog .submit").parent().append(eCancel); + $("#g-dialog .g-cancel").click(function(event) { + $("#g-dialog").dialog("close"); event.preventDefault(); }); } - $("#gDialog .ui-state-default").hover( + $("#g-dialog .ui-state-default").hover( function() { $(this).addClass("ui-state-hover"); }, @@ -94,23 +94,23 @@ }, close_dialog: function(event, ui) { - var self = $("#gDialog").dialog("option", "self"); - if ($("#gDialog form").length) { - self._trigger("form_closing", null, $("#gDialog form")); + var self = $("#g-dialog").dialog("option", "self"); + if ($("#g-dialog form").length) { + self._trigger("form_closing", null, $("#g-dialog form")); } - self._trigger("dialog_closing", null, $("#gDialog")); - $("#gDialog").dialog("destroy").remove(); + self._trigger("dialog_closing", null, $("#g-dialog")); + $("#g-dialog").dialog("destroy").remove(); }, _ajaxify_dialog: function() { var self = this; - $("#gDialog form").ajaxForm({ + $("#g-dialog form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gDialog form").replaceWith(data.form); + $("#g-dialog form").replaceWith(data.form); self._ajaxify_dialog(); - self.form_loaded(null, $("#gDialog form")); + self.form_loaded(null, $("#g-dialog form")); if (typeof data.reset == 'function') { eval(data.reset + '()'); } diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 83540622..453690ea 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -163,7 +163,7 @@ class exif_Core { list ($remaining) = exif::stats(); if ($remaining) { site_status::warning( - t('Your Exif index needs to be updated. <a href="%url" class="gDialogLink">Fix this now</a>', + t('Your Exif index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>', array("url" => html::mark_clean(url::site("admin/maintenance/start/exif_task::update_index?csrf=__CSRF__")))), "exif_index_out_of_date"); } diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 23ecab03..3c7bb517 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <a id="gExifDataLink" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-info"></span> <?= t("View more information") ?> </a> diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 91b723ad..314f030b 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -84,7 +84,7 @@ </div> <p> - <a class="g-button gDialogLink ui-state-default ui-corner-all" + <a class="g-button g-dialogLink ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/start/g2_import_task::import?csrf=$csrf") ?>"> <?= t("Begin import!") ?> </a> diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 0e32022f..f9b88638 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -249,7 +249,7 @@ class graphics_Core { "%count of your photos are out of date. <a %attrs>Click here to fix them</a>", $count, array("attrs" => html::mark_clean(sprintf( - 'href="%s" class="gDialogLink"', + 'href="%s" class="g-dialogLink"', url::site("admin/maintenance/start/gallery_task::rebuild_dirty_images?csrf=__CSRF__"))))), "graphics_dirty"); } diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index 07b2b2b8..4be374a2 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -142,7 +142,7 @@ class Menu_Element_Dialog extends Menu_Element { } else { $css_class = ""; } - return "<li><a$css_id class=\"gDialogLink $css_class\" href=\"$this->url\" " . + return "<li><a$css_id class=\"g-dialogLink $css_class\" href=\"$this->url\" " . "title=\"$this->label\">$this->label</a></li>"; } } diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index c3595da5..6ad265ac 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -23,7 +23,7 @@ <td> <?= html::clean($var->name) ?> </td> <td> <a href="<?= url::site("admin/advanced_settings/edit/$var->module_name/" . html::clean($var->name)) ?>" - class="gDialogLink" + class="g-dialogLink" title="<?= t("Edit %var (%module_name)", array("var" => $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> <? if ($var->value): ?> <?= html::clean($var->value) ?> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 8c3917b6..977ba75b 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -30,7 +30,7 @@ </td> <td> <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <?= t("run") ?> </a> </td> @@ -100,7 +100,7 @@ <?= t("cancel") ?> </a> <? if ($task->state == "stalled"): ?> - <a class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all" + <a class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>"> <?= t("resume") ?> </a> @@ -170,12 +170,12 @@ <?= t("remove") ?> </a> <? if ($task->get_log()): ?> - <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button ui-state-default ui-corner-all"> <?= t("browse log") ?> </a> <? endif ?> <? else: ?> - <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button" ui-state-default ui-corner-all> + <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="g-dialogLink g-button" ui-state-default ui-corner-all> <?= t("resume") ?> </a> <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> diff --git a/modules/gallery/views/admin_maintenance_show_log.html.php b/modules/gallery/views/admin_maintenance_show_log.html.php index 2dfef90f..c61db871 100644 --- a/modules/gallery/views/admin_maintenance_show_log.html.php +++ b/modules/gallery/views/admin_maintenance_show_log.html.php @@ -9,7 +9,7 @@ appendTo('body').submit().remove(); }; </script> -<div id="gTaskLogDialog"> +<div id="gTaskLog-dialog"> <h1> <?= $task->name ?> </h1> <div class="gTaskLog"> <pre><?= html::purify($task->get_log()) ?></pre> diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index 0aac4717..d0ffc414 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -30,7 +30,7 @@ <? if (!$info->site) continue ?> <? if ($id == $site) continue ?> <div class="gBlock"> - <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> <h3> <?= $info->name ?> </h3> @@ -68,7 +68,7 @@ <? if (!$info->admin) continue ?> <? if ($id == $admin) continue ?> <div class="gBlock"> - <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" alt="<?= html::clean_attribute($info->name) ?>" /> <h3> <?= $info->name ?> </h3> diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index cfaff01c..bee42a22 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -138,19 +138,19 @@ var self = this; // Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475 (target 1.8?) $(".sf-menu li.sfHover ul").css("z-index", 68); - $("#gDialog").dialog("option", "zIndex", 70); - $("#gDialog").bind("dialogopen", function(event, ui) { - $("#gOrganize").height($("#gDialog").innerHeight() - 20); - $("#gOrganizeMicroThumbPanel").height($("#gDialog").innerHeight() - 90); - $("#gOrganizeTreeContainer").height($("#gDialog").innerHeight() - 59); + $("#g-dialog").dialog("option", "zIndex", 70); + $("#g-dialog").bind("dialogopen", function(event, ui) { + $("#gOrganize").height($("#g-dialog").innerHeight() - 20); + $("#gOrganizeMicroThumbPanel").height($("#g-dialog").innerHeight() - 90); + $("#gOrganizeTreeContainer").height($("#g-dialog").innerHeight() - 59); }); - $("#gDialog").bind("dialogclose", function(event, ui) { + $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); - $("#gDialog #gOrganizeClose").click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog #gOrganizeClose").click(function(event) { + $("#g-dialog").dialog("close"); }); $("#gOrganizeSortColumn,#gOrganizeSortOrder").change(function(event) { diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 87f12be9..09720fe4 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -5,7 +5,7 @@ var sort_order_url = "<?= url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") ?>"; var tree_url = "<?= url::site("organize/tree/__ALBUM_ID__") ?>"; </script> -<div id="gOrganize" class="gDialogPanel"> +<div id="gOrganize" class="g-dialogPanel"> <h1 style="display:none"><?= t("Organize %name", array("name" => html::purify($album->title))) ?></h1> <div id="bd"> <div class="yui-gf"> diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php index 0080b4ce..c73eda08 100644 --- a/modules/search/helpers/search.php +++ b/modules/search/helpers/search.php @@ -57,7 +57,7 @@ class search_Core { list ($remaining) = search::stats(); if ($remaining) { site_status::warning( - t('Your search index needs to be updated. <a href="%url" class="gDialogLink">Fix this now</a>', + t('Your search index needs to be updated. <a href="%url" class="g-dialogLink">Fix this now</a>', array("url" => html::mark_clean(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))), "search_index_out_of_date"); } diff --git a/modules/server_add/js/server_add.js b/modules/server_add/js/server_add.js index 50a8c36b..86bff079 100644 --- a/modules/server_add/js/server_add.js +++ b/modules/server_add/js/server_add.js @@ -21,7 +21,7 @@ self.run_add(); }); $("#gServerAddCloseButton", this.element).click(function(event) { - $("#gDialog").dialog("close"); + $("#g-dialog").dialog("close"); window.location.reload(); }); $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { @@ -33,7 +33,7 @@ $("#gServerAddTree span.gDirectory", this.element).dblclick(function(event) { self.open_dir(event); }); - $("#gDialog").bind("dialogclose", function(event, ui) { + $("#g-dialog").bind("dialogclose", function(event, ui) { window.location.reload(); }); }, diff --git a/modules/server_add/views/admin_server_add.html.php b/modules/server_add/views/admin_server_add.html.php index b48a19da..4fd7f257 100644 --- a/modules/server_add/views/admin_server_add.html.php +++ b/modules/server_add/views/admin_server_add.html.php @@ -5,8 +5,8 @@ </h2> <div id="gAuthorizedPath"> <h3><?= t("Authorized Paths") ?></h3> - <ul id="gMessage"<? if (!empty($paths)): ?> style="display: none;"<? endif ?>> - <li class="gInfo"><?= t("No Authorized image source paths defined yet") ?></li> + <ul<? if (!empty($paths)): ?> style="display: none;"<? endif ?>> + <li class="gModuleStatus gInfo"><?= t("No Authorized image source paths defined yet") ?></li> </ul> <ul id="gPathList"> <? foreach ($paths as $id => $path): ?> diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 52c695c6..ab3691a6 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -24,7 +24,7 @@ function closeEditInPlaceForms() { $("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert")); li.height(""); $(".gEditable", li).bind("click", editInPlace); - $(".gDialogLink", li).gallery_dialog(); + $(".g-dialogLink", li).gallery_dialog(); } } diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index b7344cda..a4bd5d8f 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -50,7 +50,7 @@ <span id="gTag-<?= $tag->id ?>" class="gEditable tag-name"><?= html::clean($tag->name) ?></span> <span class="g-understate">(<?= $tag->count ?>)</span> <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" - class="gDialogLink delete-link g-button"> + class="g-dialogLink delete-link g-button"> <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> </li> diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index 04e6efd6..e0dfac8e 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -86,6 +86,7 @@ class group_Core { static function get_add_form_admin() { $form = new Forge("admin/users/add_group", "", "post", array("id" => "gAddGroupForm")); + $form->set_attr('class', "g-narrow"); $form_group = $form->group("add_group")->label(t("Add Group")); $form_group->input("name")->label(t("Name"))->id("gName"); $form_group->inputs["name"]->error_messages( diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index b9162b92..93c385a3 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -26,6 +26,7 @@ class user_Core { static function get_edit_form($user) { $form = new Forge("users/$user->id?_method=put", "", "post", array("id" => "gEditUserForm")); + $form->set_attr("class", "g-narrow"); $group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name))); $group->input("full_name")->label(t("Full Name"))->id("gFullName")->value($user->full_name); self::_add_locale_dropdown($group, $user); @@ -66,6 +67,7 @@ class user_Core { static function get_add_form_admin() { $form = new Forge("admin/users/add_user", "", "post", array("id" => "gAddUserForm")); + $form->set_attr('class', "g-narrow"); $group = $form->group("add_user")->label(t("Add User")); $group->input("name")->label(t("Username"))->id("gUsername") ->error_messages("in_use", t("There is already a user with that username")); @@ -112,6 +114,7 @@ class user_Core { static function get_login_form($url) { $form = new Forge($url, "", "post", array("id" => "gLoginForm")); + $form->set_attr('class', "g-narrow"); $group = $form->group("login")->label(t("Login")); $group->input("name")->label(t("Username"))->id("gUsername")->class(null); $group->password("password")->label(t("Password"))->id("gPassword")->class(null); diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 5ee62fae..a46e402f 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -28,7 +28,7 @@ {}, function(data) { $("#group-" + group_id).html(data); - $("#group-" + group_id + " .gDialogLink").gallery_dialog(); + $("#group-" + group_id + " .g-dialogLink").gallery_dialog(); }); } @@ -43,7 +43,7 @@ </script> <div class="gBlock"> <a href="<?= url::site("admin/users/add_user_form") ?>" - class="gDialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" + class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new user")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new user") ?> @@ -89,7 +89,7 @@ <span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?= t("edit") ?></span></a> <? if (user::active()->id != $user->id && !$user->guest): ?> <a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>" - class="gDialogLink g-button ui-state-default ui-corner-all ui-icon-left"> + class="g-dialogLink g-button ui-state-default ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> <? else: ?> <span title="<?= t("This user cannot be deleted")->for_html_attr() ?>" @@ -105,7 +105,7 @@ <div id="gGroupAdmin" class="gBlock"> <a href="<?= url::site("admin/users/add_group_form") ?>" - class="gDialogLink g-button right ui-icon-left ui-state-default ui-corner-all" + class="g-dialogLink g-button g-right ui-icon-left ui-state-default ui-corner-all" title="<?= t("Create a new group")->for_html_attr() ?>"> <span class="ui-icon ui-icon-circle-plus"></span> <?= t("Add a new group") ?> diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index 6f2496f8..e5c9fcee 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -4,11 +4,11 @@ <? if (!$group->special): ?> <a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>" title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>" - class="gDialogLink g-button ui-state-default ui-corner-all"> + class="g-dialogLink g-button ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? else: ?> <a title="<?= t("This default group cannot be deleted")->for_html_attr() ?>" - class="gDialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> + class="g-dialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a> <? endif ?> </h4> diff --git a/modules/user/views/login.html.php b/modules/user/views/login.html.php index bb670d51..c814bbfa 100644 --- a/modules/user/views/login.html.php +++ b/modules/user/views/login.html.php @@ -11,7 +11,7 @@ <?= t('Logged in as %name', array('name' => html::mark_clean( '<a href="' . url::site("form/edit/users/{$user->id}") . '" title="' . t("Edit Your Profile")->for_html_attr() . - '" id="gUserProfileLink" class="gDialogLink">' . + '" id="gUserProfileLink" class="g-dialogLink">' . html::clean($user->display_name()) . '</a>'))) ?> </li> <li> diff --git a/modules/user/views/login_ajax.html.php b/modules/user/views/login_ajax.html.php index 56bc1cbd..d3364b46 100644 --- a/modules/user/views/login_ajax.html.php +++ b/modules/user/views/login_ajax.html.php @@ -1,12 +1,14 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> - $("#gLoginForm").ready(function() { - $("#gForgotPasswordLink").click(function() { + $("#g-login-form").ready(function() { + $("#g-password-reset").click(function() { $.ajax({ url: "<?= url::site("password/reset") ?>", success: function(data) { - $("div#gLoginView").html(data); - $("#ui-dialog-title-gDialog").html(<?= t("Reset Password")->for_js() ?>); + $("#g-login").html(data); + $("#ui-dialog-title-g-dialog").html(<?= t("Reset Password")->for_js() ?>); + $(".submit").addClass("g-button ui-state-default ui-corner-all"); + $(".submit").gallery_hover_init(); ajaxify_login_reset_form(); } }); @@ -14,31 +16,28 @@ }); function ajaxify_login_reset_form() { - $("#gLoginView form").ajaxForm({ + $("#g-login form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gLoginView form").replaceWith(data.form); + $("#g-login form").replaceWith(data.form); ajaxify_login_reset_form(); } if (data.result == "success") { - $("#gDialog").dialog("close"); + $("#g-dialog").dialog("close"); window.location.reload(); } - } }); }; </script> -<div id="gLoginView"> +<div id="g-login"> <ul> - <li> - <div id="gLoginViewForm"> - <?= $form ?> - </div> + <li id="g-login-form"> + <?= $form ?> </li> <li> - <a href="#" id="gForgotPasswordLink"><?= t("Forgot Your Password?") ?></a> + <a href="#" id="g-password-reset" class="g-right g-txt-small"><?= t("Forgot Your Password?") ?></a> </li> </ul> </div> diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index 3790030d..285f6407 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -8,7 +8,7 @@ <? if (empty($name)): ?> <a href="<?= url::site("admin/watermarks/form_add") ?>" title="<?= t("Upload a watermark")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> <? else: ?> <h2> <?= t("Active Watermark") ?> </h2> <p> @@ -27,10 +27,10 @@ <div class="controls"> <a href="<?= url::site("admin/watermarks/form_edit") ?>" title="<?= t("Edit Watermark")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> <a href="<?= url::site("admin/watermarks/form_delete") ?>" title="<?= t("Delete Watermark")->for_html_attr() ?>" - class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> + class="g-dialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> </div> </div> <? endif ?> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 2679386b..24c63756 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -67,7 +67,7 @@ h3 { a, .gMenu a, -#gDialog a, +#g-dialog a, .g-button, .g-button:hover, .g-button:active, @@ -80,7 +80,7 @@ button.ui-state-hover { } a:hover, -#gDialog a:hover { +#g-dialog a:hover { text-decoration: underline; } @@ -88,21 +88,6 @@ a:hover, text-decoration: none; } -#gDialog .gCancel { - clear: none; - float: left; - margin: .3em 1em; -} - -#gForgotPasswordLink { - float: right; - font-size: .9em; -} - -#gDialog .gCancel { - float: left; -} - /* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ table { @@ -782,7 +767,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { font-size: 0; } -.gDialogLoadingLarge { +.g-dialogLoadingLarge { background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; font-size: 0; } @@ -836,34 +821,6 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { opacity: .7; } -#gDialog { - text-align: left; -} - -#gDialog li { - padding-left: 0; -} - -#gDialog form input[type="text"], -#gDialog form input[type="password"] { - width: 100%; -} - -#gDialog #gLoginForm, -#gDialog #gAddUserForm, -#gDialog #gAddGroupForm { - margin: 0 auto; - width: 270px; -} - -#gDialog fieldset { - border: none; -} - -#gDialog legend { - display: none; -} - /* jQuery UI ThemeRoller buttons */ .gButtonSet { @@ -1056,7 +1013,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: right; } -#gTaskLogDialog h1 { +#gTaskLog-dialog h1 { font-size: 1.1em; } @@ -1143,7 +1100,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { .rtl caption, .rtl th, -.rtl #gDialog { +.rtl #g-dialog { text-align: right; } @@ -1159,7 +1116,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: left; } -.rtl #gDialog .gCancel, +.rtl #g-dialog .g-cancel, .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], diff --git a/themes/admin_wind/js/ui.init.js b/themes/admin_wind/js/ui.init.js index d9b011bd..a603f87f 100644 --- a/themes/admin_wind/js/ui.init.js +++ b/themes/admin_wind/js/ui.init.js @@ -17,7 +17,7 @@ $(document).ready(function(){ $("#gMessage li").gallery_show_message(); // Initialize modal dialogs - $(".gDialogLink").gallery_dialog(); + $(".g-dialogLink").gallery_dialog(); // Initialize ajax links $(".gAjaxLink").gallery_ajax(); diff --git a/themes/wind/css/fix-ie.css b/themes/wind/css/fix-ie.css index 4c13764f..8899ec59 100644 --- a/themes/wind/css/fix-ie.css +++ b/themes/wind/css/fix-ie.css @@ -23,7 +23,7 @@ input.submit { width: 110px; } -#gDialog a.gCancel { +#g-dialog a.g-cancel { display: inline-block !important; float: none !important; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 8f17e310..ec75d310 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -67,7 +67,7 @@ h3 { a, .gMenu a, -#gDialog a, +#g-dialog a, .g-button, .g-button:hover, .g-button:active, @@ -81,7 +81,7 @@ button.ui-state-hover { } a:hover, -#gDialog a:hover { +#g-dialog a:hover { text-decoration: underline; } @@ -89,22 +89,7 @@ a:hover, text-decoration: none; } -#gDialog .gCancel { - clear: none; - float: left; - margin: .3em 1em; -} - -#gForgotPasswordLink { - float: right; - font-size: .9em; -} - -#gDialog .gCancel { - float: left; -} - -#gDialog #gMessage li { +#g-dialog #gMessage li { width: 400px; white-space: normal; padding-left: 32px; @@ -685,13 +670,13 @@ form .gError, font-weight: bold; } -#gDialog ul.gBreadcrumbs { +#g-dialog ul.gBreadcrumbs { clear: both; margin-left: 0; padding-left: 0; } -#gDialog .gBreadcrumbs li { +#g-dialog .gBreadcrumbs li { font-size: .9em; } @@ -822,7 +807,7 @@ form .gError, font-size: 0; } -.gDialogLoadingLarge { +.g-dialogLoadingLarge { background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; font-size: 0; } @@ -850,38 +835,6 @@ form .gError, opacity: .7; } -#gDialog { - text-align: left; -} - -#gDialog li { - padding-left: 0; -} - -#gDialog form input[type="text"], -#gDialog form input[type="password"] { - width: 100%; -} - -#gDialog #gLoginForm, -#gDialog #gAddUserForm, -#gDialog #gAddGroupForm { - margin: 0 auto; - width: 270px; -} - -#gDialog fieldset { - border: none; -} - -#gDialog legend { - display: none; -} - -#gDialog p { - margin: 0; -} - /* jQuery UI ThemeRoller buttons */ .gButtonSet { @@ -1097,7 +1050,7 @@ form .gError, .rtl caption, .rtl th, -.rtl #gDialog { +.rtl #g-dialog { text-align: right; } @@ -1109,7 +1062,7 @@ form .gError, float: left; } -.rtl #gDialog .gCancel, +.rtl #g-dialog .g-cancel, .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index 4a1962c0..4b3b4306 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -26,8 +26,8 @@ $(document).ready(function() { $("#gMessage li").gallery_show_message(); // Initialize dialogs - $("#gLoginLink").addClass("gDialogLink"); - $(".gDialogLink").gallery_dialog(); + $("#gLoginLink").addClass("g-dialogLink"); + $(".g-dialogLink").gallery_dialog(); // Initialize view menu if ($("#gViewMenu").length) { diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php index 01f7be50..fd647f81 100644 --- a/themes/wind/views/album.html.php +++ b/themes/wind/views/album.html.php @@ -30,7 +30,7 @@ <? if ($user->admin || access::can("add", $item)): ?> <? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?> <li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.", - array("attrs" => html::mark_clean("href=\"$addurl\" class=\"gDialogLink\""))) ?></li> + array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialogLink\""))) ?></li> <? else: ?> <li><?= t("There aren't any photos here yet!") ?></li> <? endif; ?> |