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 6 files changed, 91 insertions(+), 38 deletions(-) create mode 100644 lib/images/ico-separator.gif (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 = ""; + 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 -- cgit v1.2.3