From 68f3dab7f202fbd9b690f4db27cc4f4038e58d2f Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Mon, 21 Sep 2009 21:56:27 -0600 Subject: Don't try to initialize contextual menu unless it has items --- lib/gallery.common.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'lib') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index c6a619c1..81904548 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -112,21 +112,23 @@ }; $.fn.gallery_context_menu = function() { - var in_progress = 0; - $(".gContextMenu *").removeAttr('title'); - $(".gContextMenu ul").hide(); - $(".gContextMenu").hover( - function() { - if (in_progress == 0) { - $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); - $(this).find(".gDialogLink").gallery_dialog(); - $(this).find(".gAjaxLink").gallery_ajax(); + if ($(".gContextMenu li").length) { + var in_progress = 0; + $(".gContextMenu *").removeAttr('title'); + $(".gContextMenu ul").hide(); + $(".gContextMenu").hover( + function() { + if (in_progress == 0) { + $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); + $(this).find(".gDialogLink").gallery_dialog(); + $(this).find(".gAjaxLink").gallery_ajax(); + } + }, + function() { + $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); } - }, - function() { - $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); - } - ); + ); + } }; $.gallery_auto_fit_window = function(imageWidth, imageHeight) { -- cgit v1.2.3 From 78cce555c377b4dd3078a007c6c407cf4eb9f6dd Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 22 Sep 2009 07:31:00 -0700 Subject: Change the gallery.show_full_size widget to only scale the image if one of the dimensions is greater than the browser window size. Fixes #695 --- lib/gallery.show_full_size.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 7e826c32..360ecdc2 100644 --- a/lib/gallery.show_full_size.js +++ b/lib/gallery.show_full_size.js @@ -15,7 +15,16 @@ '-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; ' + '-moz-background-inline-policy: -moz-initial; z-index: 1001;"> '); - var image_size = $.gallery_auto_fit_window(image_width, image_height); + var image_size; + if (image_width >= size.width() - 6 || image_height >= size.height() - 6) { + image_size = $.gallery_auto_fit_window(image_width, image_height); + } else { + image_size = { + top: Number((height - image_height) / 2), left: Number((width - image_width) / 2), + width: Number(image_width), height: Number(image_height) + }; + } + $("body").append('
Date: Tue, 22 Sep 2009 23:03:48 -0600 Subject: Convert tabs to spaces --- lib/gallery.common.css | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index f4d46a4e..eb686bcf 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -12,17 +12,16 @@ * 1) Text **********************************************************************/ - .g-txt-small { - font-size: .8em; + font-size: .8em; } .g-txt-big { - font-size: 1.2em; + font-size: 1.2em; } .g-txt-right { - text-align: right; + text-align: right; } /** ******************************************************************* @@ -99,7 +98,7 @@ form .g-error { .g-draggable, .ui-draggable { - cursor: move; + cursor: move; } .g-target { @@ -110,11 +109,11 @@ form .g-error { **********************************************************************/ .g-right { - float: right; + float: right; } .g-left { - float: left; + float: left; } .g-first { -- cgit v1.2.3 From d1792ab3e03dd151041f2b044ebad6422ce47d38 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sat, 26 Sep 2009 15:44:34 -0600 Subject: Clean up hover effect, move some CSS out of ui.init.js to screen.css. Fix context_menu, it wasn't closing. Fix context_menu in IE7 by putting a bg color on the menu --- lib/gallery.common.js | 9 +++++---- themes/wind/css/screen.css | 15 ++++++++++++--- themes/wind/js/ui.init.js | 40 ++++++++++++---------------------------- 3 files changed, 29 insertions(+), 35 deletions(-) (limited to 'lib') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 6e3efe5a..618c556e 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -113,10 +113,11 @@ $.fn.gallery_context_menu = function() { if ($(".gContextMenu li").length) { + var hover_target = ".gContextMenu"; var in_progress = 0; - $(".gContextMenu *").removeAttr('title'); - $(".gContextMenu ul").hide(); - $(".gContextMenu li").hover( + $(hover_target + " *").removeAttr('title'); + $(hover_target + " ul").hide(); + $(hover_target).hover( function() { if (in_progress == 0) { $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); @@ -125,7 +126,7 @@ } }, function() { - $(this).find(".gContext").slideUp("slow", function() { in_progress = 0; }); + $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); } ); } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 2898bf2b..444c370e 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -465,6 +465,7 @@ form .gError, #gContent .gPhoto h2, #gContent .gItem .gMetadata { display: none; + margin-bottom: .6em; } #gContent #gAlbumGrid .gAlbum { @@ -480,8 +481,9 @@ form .gError, } #gContent #gAlbumGrid .gHoverItem { - background-color: #fff; border: 1px solid #000; + position: absolute !important; + z-index: 1000 !important; } #gContent .gHoverItem h2, @@ -489,6 +491,12 @@ form .gError, display: block; } +#gContent #gAlbumGrid #gPlaceHolder { + position: relative; + visibility: hidden; + z-index: 1; +} + /* Individual photo content ~~~~~~~~~~~~~~ */ #gContent #gItem { @@ -589,7 +597,7 @@ form .gError, #gSiteMenu { bottom: 0; - display: none; + display: none; left: 140px; position: absolute; } @@ -601,9 +609,10 @@ form .gError, /* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .gContextMenu { - position: absolute; + background-color: #fff; bottom: 0; left: 0; + position: absolute; } .gItem .gContextMenu { diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index 4eee1bb2..abf79b81 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -65,34 +65,19 @@ $(document).ready(function() { // Initialize thumbnail hover effect $(".gItem").hover( function() { - // Insert invisible placeholder to hold the item's position in the grid - var placeHolder = $(this).clone(); - $(placeHolder).attr("id", "gPlaceHolder"); - $(placeHolder).css("visibility", "hidden"); + // Insert a placeholder to hold the item's position in the grid + var placeHolder = $(this).clone().attr("id", "gPlaceHolder"); $(this).after($(placeHolder)); - // Style and position the item - $(this).addClass("gHoverItem"); + // Style and position the hover item var position = $(this).position(); - $(this).css("position", "absolute"); - $(this).css("top", position.top); - $(this).css("left", position.left); - $(this).css("z-index", "1000"); + $(this).css("top", position.top).css("left", position.left); + $(this).addClass("gHoverItem"); // Initialize the contextual menu $(this).gallery_context_menu(); - // Set height based on height of descendents - var title = $(this).find("h2"); - var meta = $(this).find(".gMetadata"); - var item_ht = $(this).height(); - var title_ht = $(title).gallery_height(); - var meta_ht = $(meta).gallery_height(); - var ht = item_ht + title_ht + meta_ht; - var context_label = $(this).find(".gContextMenu li:first"); - var css_id = $(this).attr("id"); - if ($("#" + css_id + " .gContextMenu li").length) { - var context_label_ht = $(context_label).gallery_height(); - ht = ht + context_label_ht; - } - $(this).height(ht); + $(this).height("auto"); + var context_menu = $(this).find(".gContextMenu"); + var adj_height = $(this).height() + context_menu.height(); + $(this).height(adj_height); }, function() { // Reset item height, position, and z-index @@ -104,14 +89,13 @@ $(document).ready(function() { if ($.browser.msie && $.browser.version >= 8) { sib_height = sib_height + 1; } + $(this).toggleClass("gHoverItem"); $(this).css("height", sib_height); $(this).css("position", "relative"); - $(this).css("top", 0); - $(this).css("left", 0); - $(this).css("z-index", 1); + $(this).css("top", 0).css("left", 0); // Remove the placeholder and hover class from the item - $("#gPlaceHolder").remove(); $(this).removeClass("gHoverItem"); + $("#gPlaceHolder").remove(); } ); } -- cgit v1.2.3 From 6cd8679dec24cd643fa3c2d9bdbf6ac8b938600c Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 27 Sep 2009 22:49:46 -0600 Subject: Set .gItem height dynamically based on the tallest item in the grid. Addresses ticket #757 --- lib/gallery.common.js | 12 ++++++++++++ themes/wind/css/screen.css | 2 -- themes/wind/js/ui.init.js | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 618c556e..a91f021e 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -6,6 +6,18 @@ }); }; + // Make the height of all items the same as the tallest item within the set + $.fn.equal_heights = function() { + var tallest_height = 0; + $(this).each(function(){ + if ($(this).height() > tallest_height) { + tallest_height = $(this).height(); + } + }); + return $(this).height(tallest_height); + }; + + // Vertically align a block element's content $.fn.gallery_valign = function(container) { return this.each(function(i){ diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index c4b33b35..df46b443 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -449,8 +449,6 @@ form .gError, border: 1px solid #fff; float: left; font-size: .7em; - height: 220px; - overflow: hidden; padding: .6em 8px; position: relative; text-align: center; diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index cb765552..c79e91bd 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -59,8 +59,8 @@ $(document).ready(function() { // Album view only if ($("#gAlbumGrid").length) { - // Vertical align thumbnails/metadata in album grid - $(".gItem").gallery_valign(); + // Set equal height for album items and vertically align thumbnails/metadata + $('.gItem').equal_heights().gallery_valign(); // Initialize thumbnail hover effect $(".gItem").hover( -- cgit v1.2.3 From daa3a2b43cd6e1458014e763e9640b8db16cc0c1 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Wed, 30 Sep 2009 00:32:52 -0600 Subject: First round of CSS refactor updates. Added calls to gallery.common.css from wind and admin_wind. Replaced basic text align and block float classes. Removed section #2 from both themes screen styles. --- lib/gallery.common.css | 10 +++++---- modules/comment/views/admin_comments.html.php | 2 +- modules/gallery/views/admin_maintenance.html.php | 6 +++--- .../gallery/views/admin_maintenance_task.html.php | 2 +- modules/tag/views/admin_tags.html.php | 4 ++-- modules/user/views/admin_users.html.php | 2 +- themes/admin_wind/css/screen.css | 24 ---------------------- themes/admin_wind/views/admin.html.php | 1 + themes/admin_wind/views/pager.html.php | 2 +- themes/wind/css/fix-ie.css | 2 +- themes/wind/css/screen.css | 24 ---------------------- themes/wind/views/movie.html.php | 2 +- themes/wind/views/page.html.php | 1 + themes/wind/views/pager.html.php | 2 +- themes/wind/views/photo.html.php | 2 +- 15 files changed, 21 insertions(+), 65 deletions(-) (limited to 'lib') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index eb686bcf..0aa9cc29 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -108,12 +108,14 @@ form .g-error { * 3) Positioning and order **********************************************************************/ -.g-right { - float: right; -} - .g-left { float: left; + margin: 1em 1em 1em 0; +} + +.g-right { + float: right; + margin: 1em 0 1em 1em; } .g-first { diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 455cd714..5e9ffb1a 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -116,7 +116,7 @@ title="author_email()) ?>"> author_name()) ?>

-
+
item() ?>
diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index ce693d73..cdfe6cfd 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -63,7 +63,7 @@ " - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> @@ -102,7 +102,7 @@ id?csrf=$csrf") ?>" - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> @@ -136,7 +136,7 @@ " - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> diff --git a/modules/gallery/views/admin_maintenance_task.html.php b/modules/gallery/views/admin_maintenance_task.html.php index ddd5bd17..c0bc0d43 100644 --- a/modules/gallery/views/admin_maintenance_task.html.php +++ b/modules/gallery/views/admin_maintenance_task.html.php @@ -57,7 +57,7 @@
-
+
diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 8f3693aa..23a00567 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -23,7 +23,7 @@ - @@ -48,7 +48,7 @@
  • name) ?> - (count ?>) + (count ?>) id") ?>" class="gDialogLink delete-link gButtonLink"> diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index c065e4b1..348747dd 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -43,7 +43,7 @@
    " - class="gDialogLink gButtonLink right ui-icon-left ui-state-default ui-corner-all" + class="gDialogLink gButtonLink g-right ui-icon-left ui-state-default ui-corner-all" title="for_html_attr() ?>"> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 3aee0719..d006463d 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -5,7 +5,6 @@ * * Sheet organization: * 1) Basic HTML elements - * 2) Reusable classes * 3) Reusable content blocks * 4) Page layout containers * 5) Content blocks in specific layout containers @@ -239,29 +238,6 @@ li.gError select { border: 2px solid red; } -/** ******************************************************************* - * 2) Reusable generic classes - *********************************************************************/ - -.inactive, .understate { - color: #ccc; - font-weight: normal; -} - -.left { - float: left; - margin: 1em 1em 1em 0; -} - -.right { - float: right; - margin: 1em 0 1em 1em; -} - -.txtright { - text-align: right; -} - /** ******************************************************************* * 3) Reusable content blocks *********************************************************************/ diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index ef15ed25..b18f010a 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -10,6 +10,7 @@ css("yui/reset-fonts-grids.css") ?> css("themeroller/ui.base.css") ?> css("superfish/css/superfish.css") ?> + css("gallery.common.css") ?> css("screen.css") ?>
  • + class="g-button ui-state-default ui-icon-left"> diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index dd706a23..ee4a8ad6 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -1,6 +1,6 @@ id})") ?>" id="gAddCommentButton" - class="gButtonLink ui-corner-all ui-icon-left ui-state-default right"> + class="g-button ui-corner-all ui-icon-left ui-state-default right"> diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 60c0e1d4..23ecab03 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,6 +1,6 @@ id}") ?>" title="for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 23ff27a8..91b723ad 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -84,7 +84,7 @@

    - "> diff --git a/modules/gallery/views/admin_graphics_gd.html.php b/modules/gallery/views/admin_graphics_gd.html.php index 010a31b4..08c19234 100644 --- a/modules/gallery/views/admin_graphics_gd.html.php +++ b/modules/gallery/views/admin_graphics_gd.html.php @@ -11,7 +11,7 @@ $tk->version)) ?>

    - +

    installed): ?> error): ?> @@ -20,7 +20,7 @@

    - +

    diff --git a/modules/gallery/views/admin_graphics_graphicsmagick.html.php b/modules/gallery/views/admin_graphics_graphicsmagick.html.php index 97624850..6ee15bc3 100644 --- a/modules/gallery/views/admin_graphics_graphicsmagick.html.php +++ b/modules/gallery/views/admin_graphics_graphicsmagick.html.php @@ -11,7 +11,7 @@ $tk->version, "dir" => $tk->dir)) ?>

    - +

    diff --git a/modules/gallery/views/admin_graphics_imagemagick.html.php b/modules/gallery/views/admin_graphics_imagemagick.html.php index cdff7c2c..aeef4919 100644 --- a/modules/gallery/views/admin_graphics_imagemagick.html.php +++ b/modules/gallery/views/admin_graphics_imagemagick.html.php @@ -11,7 +11,7 @@ $tk->version, "dir" => $tk->dir)) ?>

    - +

    error): ?>
    diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index fb30c7ba..d6f50516 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -88,7 +88,7 @@

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

    + class="g-button ui-state-default ui-corner-all ui-icon-left"> get("l10n_mode", false)): ?> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 00ba5199..8c3917b6 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -30,7 +30,7 @@
  • @@ -62,7 +62,7 @@ @@ -96,11 +96,11 @@ @@ -166,19 +166,19 @@ @@ -105,7 +105,7 @@
    " - class="gDialogLink gButtonLink right ui-icon-left ui-state-default ui-corner-all" + class="gDialogLink g-button right ui-icon-left ui-state-default ui-corner-all" title="for_html_attr() ?>"> diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php index 476e0817..6f2496f8 100644 --- a/modules/user/views/admin_users_group.html.php +++ b/modules/user/views/admin_users_group.html.php @@ -4,11 +4,11 @@ special): ?> id") ?>" title=" $group->name))->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-state-default ui-corner-all"> for_html_attr() ?>" - class="gDialogLink gButtonLink ui-state-disabled ui-corner-all ui-icon-left"> + class="gDialogLink g-button ui-state-disabled ui-corner-all ui-icon-left"> @@ -20,7 +20,7 @@ name) ?> special): ?> $user->name, "group" => $group->name))->for_html_attr() ?>"> diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index ac69d21d..3790030d 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -8,7 +8,7 @@ " title="for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all">

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

    " title="for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> " title="for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all">
    diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index d006463d..737c5939 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -68,9 +68,9 @@ h3 { a, .gMenu a, #gDialog a, -.gButtonLink, -.gButtonLink:hover, -.gButtonLink:active, +.g-button, +.g-button:hover, +.g-button:active, a.ui-state-hover, input.ui-state-hover, button.ui-state-hover { @@ -283,11 +283,11 @@ li.gError select { background: #eee; } -.gAvailable .gButtonLink { +.gAvailable .g-button { width: 96%; } -.gSelected .gButtonLink { +.gSelected .g-button { display: none; } @@ -627,7 +627,7 @@ li.gGroup h4 { border-bottom: 1px dashed #ccc; padding: .5em 0 .5em .5em; } -li.gGroup .gButtonLink { +li.gGroup .g-button { padding: 0; } li.gGroup ul, li.gGroup div { @@ -644,7 +644,7 @@ li.gGroup div p { li.gGroup .gUser { padding: .2em 0 0 .5em; } -li.gGroup .gUser .gButtonLink { +li.gGroup .gUser .g-button { vertical-align: middle; } @@ -838,13 +838,6 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { /* jQuery UI ThemeRoller buttons */ -.gButtonLink { - display: inline-block; - margin: 0 4px 0 0; - padding: .2em .4em; - outline: 0; -} - .gButtonSet { padding-left: 1px; } @@ -853,7 +846,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: left; } -.gButtonSet .gButtonLink { +.gButtonSet .g-button { margin: 0; } @@ -1106,7 +1099,7 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { clear: both; } -#gTranslations .gButtonLink { +#gTranslations .g-button { padding: .5em; } diff --git a/themes/admin_wind/js/ui.init.js b/themes/admin_wind/js/ui.init.js index c6379c09..d9b011bd 100644 --- a/themes/admin_wind/js/ui.init.js +++ b/themes/admin_wind/js/ui.init.js @@ -37,7 +37,7 @@ $(document).ready(function(){ if ($("#gAdminCommentsMenu").length) { $("#gAdminCommentsMenu ul").removeClass("gMenu").removeClass("sf-menu"); $("#gAdminCommentsMenu").addClass("gButtonSet"); - $("#gAdminCommentsMenu a").addClass("gButtonLink ui-state-default"); + $("#gAdminCommentsMenu a").addClass("g-button ui-state-default"); $("#gAdminCommentsMenu ul li:first a").addClass("ui-corner-left"); $("#gAdminCommentsMenu ul li:last a").addClass("ui-corner-right"); } diff --git a/themes/admin_wind/views/pager.html.php b/themes/admin_wind/views/pager.html.php index 90c71446..29b9f9d0 100644 --- a/themes/admin_wind/views/pager.html.php +++ b/themes/admin_wind/views/pager.html.php @@ -10,34 +10,34 @@ "count" => $total_items)) ?>
  • - + - + - + - +
  • - + - + - + - +
  • diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 9f3a53e6..6d955481 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -68,9 +68,9 @@ h3 { a, .gMenu a, #gDialog a, -.gButtonLink, -.gButtonLink:hover, -.gButtonLink:active, +.g-button, +.g-button:hover, +.g-button:active, a.ui-state-hover, input.ui-state-hover, button.ui-state-hover { @@ -884,13 +884,6 @@ form .gError, /* jQuery UI ThemeRoller buttons */ -.gButtonLink { - display: inline-block; - margin: 0 4px 0 0; - padding: .2em .4em; - outline: 0; -} - .gButtonSet { padding-left: 1px; } @@ -899,7 +892,7 @@ form .gError, float: left; } -.gButtonSet .gButtonLink { +.gButtonSet .g-button { margin: 0; } diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index c79e91bd..4a1962c0 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -49,7 +49,7 @@ $(document).ready(function() { // Apply styles and icon classes to gContextMenu if ($(".gContextMenu").length) { $(".gContextMenu li").addClass("ui-state-default"); - $(".gContextMenu a").addClass("gButtonLink ui-icon-left"); + $(".gContextMenu a").addClass("g-button ui-icon-left"); $(".gContextMenu a").prepend(""); $(".gContextMenu a span").each(function() { var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString(); diff --git a/themes/wind/views/movie.html.php b/themes/wind/views/movie.html.php index 8b8e43a8..cf7c9b7f 100644 --- a/themes/wind/views/movie.html.php +++ b/themes/wind/views/movie.html.php @@ -5,20 +5,20 @@
    • - + - +
    • $position, "total" => $sibling_count)) ?>
    • - + - +
    • diff --git a/themes/wind/views/pager.html.php b/themes/wind/views/pager.html.php index b57e0c9d..155c8d16 100644 --- a/themes/wind/views/pager.html.php +++ b/themes/wind/views/pager.html.php @@ -10,34 +10,34 @@ "count" => $total_items)) ?>
    • - + - + - + - +
    • - + - + - + - +
    • diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index 25e1ad39..def3d8b7 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -18,20 +18,20 @@
      • - + - +
      • $position, "total" => $sibling_count)) ?>
      • - + - +
      • -- cgit v1.2.3 From 06070c78eef1ffc95d14cc017ed20622c56e19da Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Wed, 30 Sep 2009 18:05:15 -0600 Subject: Move primary status message icons to lib/images/, update css urls accordingly. --- lib/gallery.common.css | 8 ++++---- lib/images/ico-error.png | Bin 0 -> 701 bytes lib/images/ico-info.png | Bin 0 -> 778 bytes lib/images/ico-success.png | Bin 0 -> 537 bytes lib/images/ico-warning.png | Bin 0 -> 666 bytes themes/admin_wind/css/screen.css | 8 ++++---- themes/admin_wind/images/ico-error.png | Bin 701 -> 0 bytes themes/admin_wind/images/ico-info.png | Bin 778 -> 0 bytes themes/admin_wind/images/ico-success.png | Bin 537 -> 0 bytes themes/admin_wind/images/ico-warning.png | Bin 666 -> 0 bytes themes/wind/css/screen.css | 8 ++++---- themes/wind/images/ico-error.png | Bin 701 -> 0 bytes themes/wind/images/ico-info.png | Bin 778 -> 0 bytes themes/wind/images/ico-success.png | Bin 537 -> 0 bytes themes/wind/images/ico-warning.png | Bin 666 -> 0 bytes 15 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 lib/images/ico-error.png create mode 100644 lib/images/ico-info.png create mode 100644 lib/images/ico-success.png create mode 100644 lib/images/ico-warning.png delete mode 100644 themes/admin_wind/images/ico-error.png delete mode 100644 themes/admin_wind/images/ico-info.png delete mode 100644 themes/admin_wind/images/ico-success.png delete mode 100644 themes/admin_wind/images/ico-warning.png delete mode 100644 themes/wind/images/ico-error.png delete mode 100644 themes/wind/images/ico-info.png delete mode 100644 themes/wind/images/ico-success.png delete mode 100644 themes/wind/images/ico-warning.png (limited to 'lib') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index d57e95fc..601f6609 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -61,23 +61,23 @@ .g-denied { background-color: #f6cbca; color: #f00; - background-image: url('lib/images/ico-error.png'); + background-image: url('images/ico-error.png'); } .g-info { background-color: #e8e8e8; - background-image: url('lib/images/ico-info.png'); + background-image: url('images/ico-info.png'); } .g-success, .g-allowed { background-color: #d9efc2; - background-image: url('lib/images/ico-success.png'); + background-image: url('images/ico-success.png'); } .g-warning { background-color: #fcf9ce; - background-image: url('lib/images/ico-warning.png'); + background-image: url('images/ico-warning.png'); } form .g-error { diff --git a/lib/images/ico-error.png b/lib/images/ico-error.png new file mode 100644 index 00000000..c37bd062 Binary files /dev/null and b/lib/images/ico-error.png differ diff --git a/lib/images/ico-info.png b/lib/images/ico-info.png new file mode 100644 index 00000000..12cd1aef Binary files /dev/null and b/lib/images/ico-info.png differ diff --git a/lib/images/ico-success.png b/lib/images/ico-success.png new file mode 100644 index 00000000..a9925a06 Binary files /dev/null and b/lib/images/ico-success.png differ diff --git a/lib/images/ico-warning.png b/lib/images/ico-warning.png new file mode 100644 index 00000000..628cf2da Binary files /dev/null and b/lib/images/ico-warning.png differ diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index c733b482..2679386b 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -336,19 +336,19 @@ li.gError select { } .gError, tr.gError td.gError { - background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; + background: #f6cbca url('../../../lib/images/ico-error.png') no-repeat .4em 50%; } .gInfo { - background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; + background: #e8e8e8 url('../../../lib/images/ico-info.png') no-repeat .4em 50%; } .gSuccess { - background: #d9efc2 url('../images/ico-success.png') no-repeat .4em 50%; + background: #d9efc2 url('../../../lib/images/ico-success.png') no-repeat .4em 50%; } .gWarning, tr.gWarning td.gWarning { - background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; + background: #fcf9ce url('../../../lib/images/ico-warning.png') no-repeat .4em 50%; } .gPager .gInfo, diff --git a/themes/admin_wind/images/ico-error.png b/themes/admin_wind/images/ico-error.png deleted file mode 100644 index c37bd062..00000000 Binary files a/themes/admin_wind/images/ico-error.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-info.png b/themes/admin_wind/images/ico-info.png deleted file mode 100644 index 12cd1aef..00000000 Binary files a/themes/admin_wind/images/ico-info.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-success.png b/themes/admin_wind/images/ico-success.png deleted file mode 100644 index a9925a06..00000000 Binary files a/themes/admin_wind/images/ico-success.png and /dev/null differ diff --git a/themes/admin_wind/images/ico-warning.png b/themes/admin_wind/images/ico-warning.png deleted file mode 100644 index 628cf2da..00000000 Binary files a/themes/admin_wind/images/ico-warning.png and /dev/null differ diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 6d955481..8f17e310 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -294,22 +294,22 @@ li.gError select { .gError { background-color: #f6cbca; - background-image: url('../images/ico-error.png'); + background-image: url('../../../lib/images/ico-error.png'); } .gInfo { background-color: #e8e8e8; - background-image: url('../images/ico-info.png'); + background-image: url('../../../lib/images/ico-info.png'); } .gSuccess { background-color: #d9efc2; - background-image: url('../images/ico-success.png'); + background-image: url('../../../lib/images/ico-success.png'); } .gWarning { background-color: #fcf9ce; - background-image: url('../images/ico-warning.png'); + background-image: url('../../../lib/images/ico-warning.png'); } form .gError, diff --git a/themes/wind/images/ico-error.png b/themes/wind/images/ico-error.png deleted file mode 100644 index c37bd062..00000000 Binary files a/themes/wind/images/ico-error.png and /dev/null differ diff --git a/themes/wind/images/ico-info.png b/themes/wind/images/ico-info.png deleted file mode 100644 index 12cd1aef..00000000 Binary files a/themes/wind/images/ico-info.png and /dev/null differ diff --git a/themes/wind/images/ico-success.png b/themes/wind/images/ico-success.png deleted file mode 100644 index a9925a06..00000000 Binary files a/themes/wind/images/ico-success.png and /dev/null differ diff --git a/themes/wind/images/ico-warning.png b/themes/wind/images/ico-warning.png deleted file mode 100644 index 628cf2da..00000000 Binary files a/themes/wind/images/ico-warning.png and /dev/null differ -- cgit v1.2.3 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. --- lib/gallery.common.css | 56 ++++++++++++++--- lib/gallery.common.js | 4 +- lib/gallery.dialog.js | 72 +++++++++++----------- modules/exif/helpers/exif.php | 2 +- modules/exif/views/exif_sidebar.html.php | 2 +- modules/g2_import/views/admin_g2_import.html.php | 2 +- modules/gallery/helpers/graphics.php | 2 +- modules/gallery/libraries/Menu.php | 2 +- .../gallery/views/admin_advanced_settings.html.php | 2 +- modules/gallery/views/admin_maintenance.html.php | 8 +-- .../views/admin_maintenance_show_log.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 4 +- modules/organize/js/organize.js | 16 ++--- modules/organize/views/organize_dialog.html.php | 2 +- modules/search/helpers/search.php | 2 +- modules/server_add/js/server_add.js | 4 +- modules/tag/js/tag.js | 2 +- modules/tag/views/admin_tags.html.php | 2 +- modules/user/helpers/group.php | 1 + modules/user/helpers/user.php | 3 + modules/user/views/admin_users.html.php | 8 +-- modules/user/views/admin_users_group.html.php | 4 +- modules/user/views/login.html.php | 2 +- modules/user/views/login_ajax.html.php | 24 ++++---- modules/watermark/views/admin_watermarks.html.php | 6 +- themes/admin_wind/css/screen.css | 55 ++--------------- themes/admin_wind/js/ui.init.js | 2 +- themes/wind/css/fix-ie.css | 2 +- themes/wind/css/screen.css | 63 +++---------------- themes/wind/js/ui.init.js | 4 +- themes/wind/views/album.html.php | 2 +- 31 files changed, 158 insertions(+), 204 deletions(-) (limited to 'lib') 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 = '
        '; + var eDialog = '
        '; $("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 = '' + MSG_CANCEL + ''; - if ($("#gDialog .submit").length) { - $("#gDialog .submit").addClass("ui-state-default ui-corner-all"); + var eCancel = '' + MSG_CANCEL + ''; + 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. 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 @@
    @@ -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">
    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 @@ admin || access::can("add", $item)): ?> id") ?>
  • Add some.", - array("attrs" => html::mark_clean("href=\"$addurl\" class=\"gDialogLink\""))) ?>
  • + array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialogLink\""))) ?>
  • -- cgit v1.2.3 From 5ab0be3e6263f2955c58e81e1a41495af94a66d4 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 3 Oct 2009 09:58:57 -0700 Subject: Add the swfobject (http://code.google.com/p/swfobject/) to gallery3/lib. --- lib/swfobject.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/swfobject.js (limited to 'lib') diff --git a/lib/swfobject.js b/lib/swfobject.js new file mode 100644 index 00000000..87e61553 --- /dev/null +++ b/lib/swfobject.js @@ -0,0 +1,4 @@ +/* SWFObject v2.2 + is released under the MIT License +*/ +var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab Date: Sat, 3 Oct 2009 12:33:53 -0600 Subject: Renamed and moved gOdd/gEven CSS classes. --- lib/gallery.common.css | 2 ++ modules/comment/views/admin_block_recent_comments.html.php | 2 +- modules/comment/views/admin_comments.html.php | 2 +- modules/gallery/tests/xss_data.txt | 14 +++++++------- modules/gallery/views/admin_maintenance.html.php | 6 +++--- modules/gallery/views/admin_modules.html.php | 2 +- modules/user/views/admin_users.html.php | 2 +- themes/admin_wind/css/screen.css | 8 -------- 8 files changed, 16 insertions(+), 22 deletions(-) (limited to 'lib') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 54453012..5768e1cf 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -134,9 +134,11 @@ form .g-error { } .g-even-row { + background-color: #fff; } .g-odd-row { + background-color: #eee; } /** ******************************************************************* diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index 2afa5bf8..ca0d1c0b 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -1,7 +1,7 @@
      $comment): ?> -
    • "> +
    • "> " class="gAvatar" alt="author_name()) ?>" diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index ec5ad7b2..82de378c 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -103,7 +103,7 @@
    $comment): ?> - "> + "> - severity) ?>"> + severity) ?>"> @@ -69,7 +69,7 @@ - state == "stalled" ? "gWarning" : "" ?>"> + state == "stalled" ? "gWarning" : "" ?>"> @@ -142,7 +142,7 @@ - state == "success" ? "gSuccess" : "gError" ?>"> + state == "success" ? "gSuccess" : "gError" ?>"> diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 9cf03cb3..058844b4 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -16,7 +16,7 @@ $module_info): ?> - "> + "> $module_name); ?> locked) $data["disabled"] = 1; ?> diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index a46e402f..46bdb65e 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -64,7 +64,7 @@ $user): ?> - user admin ? "admin" : "" ?>"> + user admin ? "admin" : "" ?>"> "; + var ePanel = ""; // We keep track of the open vs. closed state by looking to see if there' // an orig_text attr. If that attr is missing, then the panel is closed @@ -16,12 +16,12 @@ var should_open = !$(element).attr("orig_text"); // Close any open panels and reset their button text - if ($("#gPanel").length) { - $("#gPanel").slideUp("slow").remove(); - $.each($(".gPanelLink"), + if ($("#g-panel").length) { + $("#g-panel").slideUp("slow").remove(); + $.each($(".g-panel-link"), function() { if ($(this).attr("orig_text")) { - $(this).children(".gButtonText").text($(this).attr("orig_text")); + $(this).children(".g-button-text").text($(this).attr("orig_text")); $(this).attr("orig_text", ""); } } @@ -30,15 +30,15 @@ if (should_open) { $(parent).after(ePanel); - $("#gPanel td").html(sHref); + $("#g-panel td").html(sHref); $.get(sHref, function(data) { - $("#gPanel td").html(data); + $("#g-panel td").html(data); self._ajaxify_panel(); if ($(element).attr("open_text")) { - $(element).attr("orig_text", $(element).children(".gButtonText").text()); - $(element).children(".gButtonText").text($(element).attr("open_text")); + $(element).attr("orig_text", $(element).children(".g-button-text").text()); + $(element).children(".g-button-text").text($(element).attr("open_text")); } - $("#gPanel").addClass(parentClass).show().slideDown("slow"); + $("#g-panel").addClass(parentClass).show().slideDown("slow"); }); } @@ -48,11 +48,11 @@ _ajaxify_panel: function () { var self = this; - $("#gPanel td form").ajaxForm({ + $("#g-panel td form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gPanel td form").replaceWith(data.form); + $("#g-panel td form").replaceWith(data.form); self._ajaxify_panel(); } if (data.result == "success") { diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 360ecdc2..49dc620a 100644 --- a/lib/gallery.show_full_size.js +++ b/lib/gallery.show_full_size.js @@ -7,7 +7,7 @@ var height = $(document).height(); var size = $.gallery_get_viewport_size(); - $("body").append('
    ' + - '
    '); $().click(function() { - $("#gFullsizeOverlay*").remove(); - $("#gFullsize").remove(); + $("#g-fullsize-overlay*").remove(); + $("#g-fullsize").remove(); }); $().bind("keypress", function() { - $("#gFullsizeOverlay*").remove(); - $("#gFullsize").remove(); + $("#g-fullsize-overlay*").remove(); + $("#g-fullsize").remove(); }); $(window).resize(function() { - $("#gFullsizeOverlay").width($(document).width()).height($(document).height()); + $("#g-fullsize-overlay").width($(document).width()).height($(document).height()); image_size = $.gallery_auto_fit_window(image_width, image_height); - $("#gFullsize").height(image_size.height) + $("#g-fullsize").height(image_size.height) .width(image_size.width) .css("top", image_size.top) .css("left", image_size.left); - $("#gFullSizeImage").height(image_size.height).width(image_size.width); + $("#g-fullsize-image").height(image_size.height).width(image_size.width); }); }; })(jQuery); diff --git a/lib/images/ico-separator.gif b/lib/images/ico-separator.gif new file mode 100644 index 00000000..3de2d0d3 Binary files /dev/null and b/lib/images/ico-separator.gif differ diff --git a/modules/akismet/helpers/akismet.php b/modules/akismet/helpers/akismet.php index acd5cb3e..43549ffa 100644 --- a/modules/akismet/helpers/akismet.php +++ b/modules/akismet/helpers/akismet.php @@ -21,7 +21,7 @@ class akismet_Core { public static $test_mode = TEST_MODE; static function get_configure_form() { - $form = new Forge("admin/akismet", "", "post", array("id" => "gConfigureAkismetForm")); + $form = new Forge("admin/akismet", "", "post", array("id" => "g-configure-akismet-form")); $group = $form->group("configure_akismet")->label(t("Configure Akismet")); $group->input("api_key")->label(t("API Key"))->value(module::get_var("akismet", "api_key")); $group->api_key->error_messages("invalid", t("The API key you provided is invalid.")); diff --git a/modules/akismet/views/admin_akismet.html.php b/modules/akismet/views/admin_akismet.html.php index 009d8810..22c60c97 100644 --- a/modules/akismet/views/admin_akismet.html.php +++ b/modules/akismet/views/admin_akismet.html.php @@ -1,5 +1,5 @@ -
    +

    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.", @@ -8,7 +8,7 @@

    -
    +
    diff --git a/modules/akismet/views/admin_akismet_stats.html.php b/modules/akismet/views/admin_akismet_stats.html.php index 41bad15b..32908ba0 100644 --- a/modules/akismet/views/admin_akismet_stats.html.php +++ b/modules/akismet/views/admin_akismet_stats.html.php @@ -1,11 +1,11 @@ -
    -
    diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index f74a8644..7b2332a8 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -65,12 +65,12 @@ class comment_Core { } static function get_add_form($item) { - $form = new Forge("comments", "", "post", array("id" => "gAddCommentForm")); + $form = new Forge("comments", "", "post", array("id" => "g-comment-form")); $group = $form->group("add_comment")->label(t("Add comment")); - $group->input("name") ->label(t("Name")) ->id("gAuthor"); - $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); - $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); - $group->textarea("text")->label(t("Comment")) ->id("gText"); + $group->input("name") ->label(t("Name")) ->id("g-author"); + $group->input("email") ->label(t("Email (hidden)")) ->id("g-email"); + $group->input("url") ->label(t("Website (hidden)"))->id("g-url"); + $group->textarea("text")->label(t("Comment")) ->id("g-text"); $group->hidden("item_id")->value($item->id); module::event("comment_add_form", $form); $group->submit("")->value(t("Add")); @@ -90,12 +90,12 @@ class comment_Core { static function get_edit_form($comment) { $form = new Forge("comments/{$comment->id}?_method=put", "", "post", - array("id" => "gEditCommentForm")); + array("id" => "g-edit-comment-form")); $group = $form->group("edit_comment")->label(t("Edit comment")); - $group->input("name") ->label(t("Author")) ->id("gAuthor"); - $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); - $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); - $group->textarea("text")->label(t("Comment")) ->id("gText"); + $group->input("name") ->label(t("Author")) ->id("g-author"); + $group->input("email") ->label(t("Email (hidden)")) ->id("g-email"); + $group->input("url") ->label(t("Website (hidden)"))->id("g-url"); + $group->textarea("text")->label(t("Comment")) ->id("g-text"); $group->submit("")->value(t("Edit")); $group->text = $comment->text; diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index b989be6b..c00c6c51 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -26,7 +26,7 @@ class comment_block_Core { $block = new Block(); switch ($block_id) { case "recent_comments": - $block->css_id = "gRecentComments"; + $block->css_id = "g-recent-comments"; $block->title = t("Recent Comments"); $block->content = new View("admin_block_recent_comments.html"); $block->content->comments = diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php index 0234aea9..2199eb7f 100644 --- a/modules/comment/helpers/comment_event.php +++ b/modules/comment/helpers/comment_event.php @@ -36,7 +36,7 @@ class comment_event_Core { ->id("comments") ->label(t("View comments on this item")) ->url("#comments") - ->css_id("gCommentsLink")); + ->css_id("g-comments-link")); } static function item_index_data($item, $data) { diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php index e9b402f6..10c855db 100644 --- a/modules/comment/helpers/comment_theme.php +++ b/modules/comment/helpers/comment_theme.php @@ -25,7 +25,7 @@ class comment_theme_Core { static function photo_bottom($theme) { $block = new Block; - $block->css_id = "gComments"; + $block->css_id = "g-comments"; $block->title = t("Comments"); $block->anchor = "comments"; diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index 6e985626..96370fb1 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -1,43 +1,43 @@ $("document").ready(function() { - $("#gAddCommentButton").click(function(event) { + $("#g-admin-comment-button").click(function(event) { event.preventDefault(); - if (!$("#gAddCommentForm").length) { + if (!$("#g-comment-form").length) { $.get($(this).attr("href"), {}, function(data) { - $("#gCommentDetail").append(data); + $("#g-comment-detail").append(data); ajaxify_comment_form(); }); } }); - $("#gNoComments").click(function(event) { + $("#g-no-comments").click(function(event) { event.preventDefault(); - if (!$("#gAddCommentForm").length) { + if (!$("#g-comment-form").length) { $.get($(this).attr("href"), {}, function(data) { - $("#gCommentDetail").append(data); + $("#g-comment-detail").append(data); ajaxify_comment_form(); }); - $("#gNoCommentsYet").remove(); + $("#g-no-comments-yet").remove(); } }); }); function ajaxify_comment_form() { - $("#gComments form").ajaxForm({ + $("#g-comments form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gComments form").replaceWith(data.form); + $("#g-comments form").replaceWith(data.form); ajaxify_comment_form(); } if (data.result == "success") { $.get(data.resource, function(data, textStatus) { - $("#gComments .gBlockContent ul:first").append("
  • "+data+"
  • "); - $("#gComments .gBlockContent ul:first li:last").effect("highlight", {color: "#cfc"}, 8000); - $("#gAddCommentForm").hide(2000).remove(); - $("#gNoCommentsYet").hide(2000); + $("#g-comments .g-block-content ul:first").append("
  • "+data+"
  • "); + $("#g-comments .g-block-content ul:first li:last").effect("highlight", {color: "#cfc"}, 8000); + $("#g-comment-form").hide(2000).remove(); + $("#g-no-comments-yet").hide(2000); }); } } diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index ca0d1c0b..7941e02d 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -1,9 +1,9 @@
      $comment): ?> -
    • "> +
    • "> " - class="gAvatar" + class="g-avatar" alt="author_name()) ?>" width="32" height="32" /> diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 82de378c..0e8dd525 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -6,7 +6,7 @@ $.get(set_state_url.replace("__STATE__", state).replace("__ID__", id), {}, function() { - $("#gComment-" + id).slideUp(); + $("#g-comment-" + id).slideUp(); update_menu(); }); } @@ -18,7 +18,7 @@ $.get(delete_url.replace("__ID__", id), {}, function() { - $("#gComment-" + id).slideUp(); + $("#g-comment-" + id).slideUp(); update_menu(); }); } @@ -27,18 +27,18 @@ $.get(, {}, function(data) { for (var i = 0; i < data.length; i++) { - $("#gAdminCommentsMenu li:eq(" + i + ") a").html(data[i]); + $("#g-admin-comments-menu li:eq(" + i + ") a").html(data[i]); } }, "json"); } -
      +

      -
      +
      @@ -90,7 +90,7 @@
      -
    + count()) ?>
    callback?csrf=$csrf") ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> " - class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> id?csrf=$csrf") ?>" - class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> state == "stalled"): ?> - id?csrf=$csrf") ?>"> @@ -135,7 +135,7 @@ " - class="gButtonLink g-right ui-icon-left ui-state-default ui-corner-all"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> done): ?> - id?csrf=$csrf") ?>" class="gButtonLink ui-state-default ui-corner-all"> + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> get_log()): ?> - id?csrf=$csrf") ?>" class="gDialogLink gButtonLink ui-state-default ui-corner-all"> + id?csrf=$csrf") ?>" class="gDialogLink g-button ui-state-default ui-corner-all"> - id?csrf=$csrf") ?>" class="gDialogLink gButtonLink" ui-state-default ui-corner-all> + id?csrf=$csrf") ?>" class="gDialogLink g-button" ui-state-default ui-corner-all> - id?csrf=$csrf") ?>" class="gButtonLink ui-state-default ui-corner-all"> + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index b0f424be..a7f001aa 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -68,7 +68,7 @@ for_html_attr() ?>"/> + class="g-button ui-state-default ui-corner-all"> diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php index 5515c3dc..021e5772 100644 --- a/modules/gallery/views/welcome_message.html.php +++ b/modules/gallery/views/welcome_message.html.php @@ -18,7 +18,7 @@ id}") ?>" title="for_html_attr() ?>" id="gAfterInstallChangePasswordLink" - class="gButtonLink ui-state-default ui-corners-all"> + class="g-button ui-state-default ui-corners-all"> id") ?>" open_text="" - class="gPanelLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="gPanelLink g-button ui-state-default ui-corner-all ui-icon-left"> id != $user->id && !$user->guest): ?> id") ?>" - class="gDialogLink gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="gDialogLink g-button ui-state-default ui-corner-all ui-icon-left"> for_html_attr() ?>" - class="gButtonLink ui-state-disabled ui-corner-all ui-icon-left"> + class="g-button ui-state-disabled ui-corner-all ui-icon-left"> 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">
    " diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index 7d3cf362..5fd6a390 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -1,12 +1,12 @@ modules/akismet/views/admin_akismet.html.php 16 DIRTY $form modules/akismet/views/admin_akismet_stats.html.php 9 DIRTY_ATTR $api_key modules/akismet/views/admin_akismet_stats.html.php 9 DIRTY_ATTR urlencode($blog_url) -modules/comment/views/admin_block_recent_comments.html.php 4 DIRTY_ATTR ($i%2==0)?"gEvenRow":"gOddRow" +modules/comment/views/admin_block_recent_comments.html.php 4 DIRTY_ATTR ($i%2==0)?"g-even-row":"g-odd-row" modules/comment/views/admin_block_recent_comments.html.php 5 DIRTY_ATTR $comment->author()->avatar_url(32,$theme->url(,true)) modules/comment/views/admin_block_recent_comments.html.php 10 DIRTY gallery::date_time($comment->created) modules/comment/views/admin_comments.html.php 42 DIRTY $menu modules/comment/views/admin_comments.html.php 106 DIRTY_ATTR $comment->id -modules/comment/views/admin_comments.html.php 106 DIRTY_ATTR ($i%2==0)?"gOddRow":"gEvenRow" +modules/comment/views/admin_comments.html.php 106 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" modules/comment/views/admin_comments.html.php 109 DIRTY_ATTR $comment->author()->avatar_url(40,$theme->url(,true)) modules/comment/views/admin_comments.html.php 122 DIRTY_JS $item->url() modules/comment/views/admin_comments.html.php 124 DIRTY_ATTR $item->thumb_url() @@ -72,18 +72,18 @@ modules/gallery/views/admin_languages.html.php 28 DIRTY form:: modules/gallery/views/admin_languages.html.php 29 DIRTY $display_name modules/gallery/views/admin_languages.html.php 31 DIRTY form::radio("default_locale",$code,($default_locale==$code),((isset($installed_locales[$code]))?'':'disabled="disabled"')) modules/gallery/views/admin_languages.html.php 102 DIRTY $share_translations_form -modules/gallery/views/admin_maintenance.html.php 24 DIRTY_ATTR ($i%2==0)?"gOddRow":"gEvenRow" +modules/gallery/views/admin_maintenance.html.php 24 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" modules/gallery/views/admin_maintenance.html.php 24 DIRTY_ATTR log::severity_class($task->severity) modules/gallery/views/admin_maintenance.html.php 25 DIRTY_ATTR log::severity_class($task->severity) modules/gallery/views/admin_maintenance.html.php 26 DIRTY $task->name modules/gallery/views/admin_maintenance.html.php 29 DIRTY $task->description -modules/gallery/views/admin_maintenance.html.php 72 DIRTY_ATTR ($i%2==0)?"gOddRow":"gEvenRow" +modules/gallery/views/admin_maintenance.html.php 72 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" modules/gallery/views/admin_maintenance.html.php 72 DIRTY_ATTR $task->state=="stalled"?"gWarning":"" modules/gallery/views/admin_maintenance.html.php 73 DIRTY_ATTR $task->state=="stalled"?"gWarning":"" modules/gallery/views/admin_maintenance.html.php 74 DIRTY gallery::date_time($task->updated) modules/gallery/views/admin_maintenance.html.php 77 DIRTY $task->name modules/gallery/views/admin_maintenance.html.php 92 DIRTY $task->status -modules/gallery/views/admin_maintenance.html.php 145 DIRTY_ATTR ($i%2==0)?"gOddRow":"gEvenRow" +modules/gallery/views/admin_maintenance.html.php 145 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" modules/gallery/views/admin_maintenance.html.php 145 DIRTY_ATTR $task->state=="success"?"gSuccess":"gError" modules/gallery/views/admin_maintenance.html.php 146 DIRTY_ATTR $task->state=="success"?"gSuccess":"gError" modules/gallery/views/admin_maintenance.html.php 147 DIRTY gallery::date_time($task->updated) @@ -93,7 +93,7 @@ modules/gallery/views/admin_maintenance_show_log.html.php 8 DIRTY_JS url::s modules/gallery/views/admin_maintenance_show_log.html.php 13 DIRTY $task->name modules/gallery/views/admin_maintenance_task.html.php 55 DIRTY $task->name modules/gallery/views/admin_modules.html.php 9 DIRTY access::csrf_form_field() -modules/gallery/views/admin_modules.html.php 19 DIRTY_ATTR ($i%2==0)?"gOddRow":"gEvenRow" +modules/gallery/views/admin_modules.html.php 19 DIRTY_ATTR ($i%2==0)?"g-odd-row":"g-even-row" modules/gallery/views/admin_modules.html.php 22 DIRTY form::checkbox($data,'1',module::is_active($module_name)) modules/gallery/views/admin_modules.html.php 24 DIRTY $module_info->version modules/gallery/views/admin_theme_options.html.php 5 DIRTY $form @@ -267,7 +267,7 @@ modules/user/views/admin_users.html.php 3 DIRTY_JS url::s modules/user/views/admin_users.html.php 26 DIRTY_JS url::site("admin/users/group/__GROUPID__") modules/user/views/admin_users.html.php 36 DIRTY_JS url::site("admin/users/remove_user_from_group/__USERID__/__GROUPID__?csrf=$csrf") modules/user/views/admin_users.html.php 67 DIRTY_ATTR $user->id -modules/user/views/admin_users.html.php 67 DIRTY_ATTR text::alternate("gOddRow","gEvenRow") +modules/user/views/admin_users.html.php 67 DIRTY_ATTR text::alternate("g-odd-row","g-even-row") modules/user/views/admin_users.html.php 67 DIRTY_ATTR $user->admin?"admin":"" modules/user/views/admin_users.html.php 68 DIRTY_ATTR $user->id modules/user/views/admin_users.html.php 69 DIRTY_ATTR $user->avatar_url(20,$theme->url(,true)) diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 977ba75b..4c79c25b 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -21,7 +21,7 @@
    name ?>
    "> updated) ?>
    "> updated) ?>
    " title="for_html_attr() ?>" diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 28115149..61161967 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -281,14 +281,6 @@ li.gError select { opacity: 0.4; } -.gOddRow { - background-color: #eee; -} - -.gEvenRow { - background-color: #fff; -} - /* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ #gMessage { -- cgit v1.2.3 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. --- lib/gallery.common.css | 57 ++- lib/gallery.common.js | 24 +- lib/gallery.dialog.js | 4 +- lib/gallery.panel.js | 24 +- lib/gallery.show_full_size.js | 20 +- lib/images/ico-separator.gif | Bin 0 -> 106 bytes modules/akismet/helpers/akismet.php | 2 +- modules/akismet/views/admin_akismet.html.php | 4 +- modules/akismet/views/admin_akismet_stats.html.php | 6 +- modules/comment/helpers/comment.php | 20 +- modules/comment/helpers/comment_block.php | 2 +- modules/comment/helpers/comment_event.php | 2 +- modules/comment/helpers/comment_theme.php | 2 +- modules/comment/js/comment.js | 26 +- .../views/admin_block_recent_comments.html.php | 4 +- modules/comment/views/admin_comments.html.php | 20 +- modules/comment/views/comment.html.php | 6 +- modules/comment/views/comments.html.php | 14 +- modules/digibug/helpers/digibug_event.php | 7 +- modules/digibug/js/digibug.js | 7 +- modules/digibug/views/admin_digibug.html.php | 8 +- modules/exif/helpers/exif.php | 2 +- modules/exif/views/exif_dialog.html.php | 22 +- modules/exif/views/exif_sidebar.html.php | 5 +- modules/g2_import/controllers/admin_g2_import.php | 2 +- modules/g2_import/helpers/g2_import.php | 6 +- modules/g2_import/views/admin_g2_import.html.php | 18 +- modules/gallery/controllers/admin_dashboard.php | 2 +- modules/gallery/controllers/admin_languages.php | 2 +- modules/gallery/controllers/l10n_client.php | 4 +- modules/gallery/css/debug.css | 8 +- modules/gallery/css/l10n_client.css | 28 +- modules/gallery/helpers/album.php | 10 +- modules/gallery/helpers/gallery_block.php | 16 +- modules/gallery/helpers/gallery_event.php | 2 +- modules/gallery/helpers/graphics.php | 2 +- modules/gallery/helpers/item.php | 2 +- modules/gallery/helpers/log.php | 8 +- modules/gallery/helpers/message.php | 10 +- modules/gallery/helpers/movie.php | 2 +- modules/gallery/helpers/photo.php | 4 +- modules/gallery/helpers/site_status.php | 10 +- modules/gallery/helpers/theme.php | 14 +- modules/gallery/js/albums_form_add.js | 20 +- modules/gallery/js/l10n_client.js | 44 +- modules/gallery/libraries/Admin_View.php | 2 +- modules/gallery/libraries/Menu.php | 8 +- modules/gallery/libraries/Theme_View.php | 6 +- modules/gallery/models/item.php | 2 +- modules/gallery/tests/DrawForm_Test.php | 12 +- modules/gallery/tests/selenium/Add_Comment.html | 8 +- modules/gallery/tests/selenium/Login.html | 8 +- modules/gallery/tests/xss_data.txt | 62 +-- .../gallery/views/admin_advanced_settings.html.php | 8 +- .../views/admin_block_photo_stream.html.php | 2 +- modules/gallery/views/admin_dashboard.html.php | 22 +- modules/gallery/views/admin_graphics.html.php | 10 +- modules/gallery/views/admin_graphics_gd.html.php | 8 +- .../views/admin_graphics_graphicsmagick.html.php | 6 +- .../views/admin_graphics_imagemagick.html.php | 6 +- modules/gallery/views/admin_graphics_none.html.php | 2 +- modules/gallery/views/admin_languages.html.php | 12 +- modules/gallery/views/admin_maintenance.html.php | 26 +- .../views/admin_maintenance_show_log.html.php | 8 +- .../gallery/views/admin_maintenance_task.html.php | 24 +- modules/gallery/views/admin_modules.html.php | 4 +- modules/gallery/views/admin_sidebar.html.php | 24 +- .../gallery/views/admin_sidebar_blocks.html.php | 2 +- modules/gallery/views/admin_theme_options.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 20 +- modules/gallery/views/form.html.php | 4 +- modules/gallery/views/l10n_client.html.php | 6 +- modules/gallery/views/move_browse.html.php | 14 +- modules/gallery/views/permissions_browse.html.php | 14 +- modules/gallery/views/permissions_form.html.php | 10 +- modules/gallery/views/simple_uploader.html.php | 28 +- modules/gallery/views/welcome_message.html.php | 6 +- .../gallery/views/welcome_message_loader.html.php | 4 +- modules/image_block/helpers/image_block_block.php | 2 +- .../image_block/views/image_block_block.html.php | 4 +- modules/info/helpers/info_block.php | 2 +- modules/info/views/info_block.html.php | 2 +- .../notification/helpers/notification_event.php | 2 +- modules/organize/css/organize.css | 50 +-- modules/organize/helpers/organize_event.php | 4 +- modules/organize/js/organize.js | 84 ++-- modules/organize/views/organize_dialog.html.php | 28 +- .../organize/views/organize_thumb_grid.html.php | 10 +- modules/organize/views/organize_tree.html.php | 8 +- modules/recaptcha/helpers/recaptcha.php | 2 +- modules/recaptcha/helpers/recaptcha_event.php | 2 +- modules/recaptcha/views/admin_recaptcha.html.php | 8 +- modules/recaptcha/views/form_recaptcha.html.php | 4 +- modules/rss/helpers/rss_block.php | 2 +- modules/rss/views/rss_block.html.php | 2 +- modules/search/helpers/search.php | 2 +- modules/search/helpers/search_installer.php | 2 +- modules/search/views/search.html.php | 12 +- modules/search/views/search_link.html.php | 6 +- .../server_add/controllers/admin_server_add.php | 2 +- modules/server_add/js/admin.js | 2 +- modules/server_add/js/server_add.js | 58 +-- modules/server_add/views/admin_server_add.html.php | 10 +- modules/server_add/views/server_add_tree.html.php | 6 +- .../views/server_add_tree_dialog.html.php | 26 +- modules/slideshow/helpers/slideshow_event.php | 6 +- modules/tag/helpers/tag.php | 6 +- modules/tag/helpers/tag_block.php | 2 +- modules/tag/js/tag.js | 38 +- modules/tag/views/admin_tags.html.php | 14 +- modules/tag/views/tag_block.html.php | 10 +- modules/user/controllers/password.php | 10 +- modules/user/helpers/group.php | 10 +- modules/user/helpers/user.php | 52 +-- modules/user/helpers/user_block.php | 2 +- modules/user/views/admin_users.html.php | 36 +- modules/user/views/admin_users_group.html.php | 6 +- modules/user/views/login.html.php | 8 +- modules/user/views/user_languages_block.html.php | 4 +- modules/watermark/helpers/watermark.php | 6 +- modules/watermark/views/admin_watermarks.html.php | 8 +- themes/admin_wind/css/fix-ie.css | 12 +- themes/admin_wind/css/screen.css | 453 ++++++++++----------- themes/admin_wind/images/avatar.jpg | Bin 914 -> 0 bytes themes/admin_wind/images/ico-album.png | Bin 397 -> 0 bytes themes/admin_wind/images/ico-print.png | Bin 989 -> 0 bytes themes/admin_wind/images/ico-separator.gif | Bin 106 -> 0 bytes themes/admin_wind/images/ico-view-comments.png | Bin 768 -> 0 bytes themes/admin_wind/images/ico-view-fullsize.png | Bin 1046 -> 0 bytes themes/admin_wind/images/ico-view-hybrid.png | Bin 494 -> 0 bytes themes/admin_wind/images/ico-view-slideshow.png | Bin 960 -> 0 bytes themes/admin_wind/js/ui.init.js | 38 +- themes/admin_wind/views/admin.html.php | 20 +- themes/admin_wind/views/block.html.php | 6 +- themes/admin_wind/views/pager.html.php | 4 +- themes/wind/css/fix-ie.css | 18 +- themes/wind/css/screen.css | 432 +++++++++----------- themes/wind/images/ico-separator.gif | Bin 106 -> 0 bytes themes/wind/images/ico-view-hybrid.png | Bin 494 -> 0 bytes themes/wind/js/ui.init.js | 72 ++-- themes/wind/views/album.html.php | 20 +- themes/wind/views/block.html.php | 4 +- themes/wind/views/dynamic.html.php | 12 +- themes/wind/views/movie.html.php | 12 +- themes/wind/views/no_sidebar.html.php | 2 +- themes/wind/views/page.html.php | 22 +- themes/wind/views/pager.html.php | 4 +- themes/wind/views/photo.html.php | 18 +- themes/wind/views/sidebar.html.php | 4 +- 149 files changed, 1278 insertions(+), 1317 deletions(-) create mode 100644 lib/images/ico-separator.gif delete mode 100644 themes/admin_wind/images/avatar.jpg delete mode 100644 themes/admin_wind/images/ico-album.png delete mode 100644 themes/admin_wind/images/ico-print.png delete mode 100644 themes/admin_wind/images/ico-separator.gif delete mode 100644 themes/admin_wind/images/ico-view-comments.png delete mode 100644 themes/admin_wind/images/ico-view-fullsize.png delete mode 100644 themes/admin_wind/images/ico-view-hybrid.png delete mode 100644 themes/admin_wind/images/ico-view-slideshow.png delete mode 100644 themes/wind/images/ico-separator.gif delete mode 100644 themes/wind/images/ico-view-hybrid.png (limited to 'lib') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 5768e1cf..c422fe6e 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -133,11 +133,11 @@ form .g-error { .g-last { } -.g-even-row { +.g-even { background-color: #fff; } -.g-odd-row { +.g-odd { background-color: #eee; } @@ -211,7 +211,60 @@ form .g-error { margin-bottom: .4em; } +/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-breadcrumbs { + padding: 0 20px; +} + +.g-breadcrumbs li { + background: transparent url('images/ico-separator.gif') no-repeat scroll left center; + float: left; + padding: 10px 6px 10px 16px !important; +} + +.g-breadcrumbs li.root { + background: transparent; +} + +.g-breadcrumbs li a, +.g-breadcrumbs li span { + display: block; +} + +.g-breadcrumbs li.active, +.g-breadcrumbs li.active span { + font-weight: bold; +} + +#g-dialog ul.g-breadcrumbs { + clear: both; + margin-left: 0; + padding-left: 0; +} + +#g-dialog .g-breadcrumbs li { + font-size: .9em; +} + +/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + .g-pager { + clear: both; + margin: 0; + padding: 5px 0 !important; + width: 100%; +} + +.g-pager li { + float: left; + margin: 0; + width: 30%; +} + +.g-pager .g-info { + text-align: center; + width: 40%; } .g-list-horizontal { diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 59482b22..f2de74ad 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -24,8 +24,8 @@ if (container == null) { container = 'div'; } - $(this).html("<" + container + " class=\"gValign\">" + $(this).html() + ""); - var el = $(this).children(container + ".gValign"); + $(this).html("<" + container + " class=\"g-valign\">" + $(this).html() + ""); + var el = $(this).children(container + ".g-valign"); var elh = $(el).height(); var ph = $(this).height(); var nh = (ph - elh) / 2; @@ -47,21 +47,21 @@ /** * Toggle the processing indicator, both large and small - * @param elementID Target ID, including #, to apply .gLoadingSize + * @param elementID Target ID, including #, to apply .g-loading-size */ $.fn.gallery_show_loading = function() { return this.each(function(i){ var size; switch ($(this).attr("id")) { case "#g-dialog": - case "#gPanel": - size = "Large"; + case "#g-panel": + size = "large"; break; default: - size = "Small"; + size = "small"; break; } - $(this).toggleClass("gLoading" + size); + $(this).toggleClass("g-loading" + size); }); }; @@ -89,7 +89,7 @@ */ $.fn.gallery_get_photo = function() { var photo = $(this).find("img").filter(function() { - return this.id.match(/gPhotoId-\d+/); + return this.id.match(/g-photoId-\d+/); }); return photo; }; @@ -124,8 +124,8 @@ }; $.fn.gallery_context_menu = function() { - if ($(".gContextMenu li").length) { - var hover_target = ".gContextMenu"; + if ($(".g-context-menu li").length) { + var hover_target = ".g-context-menu"; var in_progress = 0; $(hover_target + " *").removeAttr('title'); $(hover_target + " ul").hide(); @@ -133,8 +133,8 @@ function() { if (in_progress == 0) { $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); - $(this).find(".g-dialogLink").gallery_dialog(); - $(this).find(".gAjaxLink").gallery_ajax(); + $(this).find(".g-dialog-link").gallery_dialog(); + $(this).find(".g-ajax-link").gallery_ajax(); } }, function() { diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index a70200f9..c162ab2a 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -36,7 +36,7 @@ $("#g-dialog").dialog("open"); // Remove titlebar for progress dialogs or set title - if ($("#g-dialog #gProgress").length) { + if ($("#g-dialog #g-progress").length) { $(".ui-dialog-titlebar").remove(); } else if ($("#g-dialog h1").length) { $("#g-dialog").dialog('option', 'title', $("#g-dialog h1:eq(0)").html()); @@ -61,7 +61,7 @@ dialogWidth = size.width() - 100; // Set the iframe width and height $("#g-dialog iframe").width("100%").height(size.height() - 100); - } else if ($("#g-dialog .g-dialogPanel").length) { + } else if ($("#g-dialog .g-dialog-panel").length) { dialogWidth = size.width() - 100; $("#g-dialog").dialog("option", "height", size.height() - 100); } else if (childWidth == "" || childWidth > 300) { diff --git a/lib/gallery.panel.js b/lib/gallery.panel.js index 6115297d..8530dd9f 100644 --- a/lib/gallery.panel.js +++ b/lib/gallery.panel.js @@ -8,7 +8,7 @@ var parent = $(element).parent().parent(); var sHref = $(element).attr("href"); var parentClass = $(parent).attr("class"); - var ePanel = "
    +
    $comment): ?> - "> + ">
    @@ -103,11 +103,11 @@
    " - class="gAvatar" + class="g-avatar" alt="author_name()) ?>" width="40" height="40" /> @@ -118,7 +118,7 @@ -