summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.common.css57
-rw-r--r--lib/gallery.common.js24
-rw-r--r--lib/gallery.dialog.js4
-rw-r--r--lib/gallery.panel.js24
-rw-r--r--lib/gallery.show_full_size.js20
-rw-r--r--lib/images/ico-separator.gifbin0 -> 106 bytes
6 files changed, 91 insertions, 38 deletions
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() + "</" + container + ">");
- var el = $(this).children(container + ".gValign");
+ $(this).html("<" + container + " class=\"g-valign\">" + $(this).html() + "</" + container + ">");
+ 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 = "<tr id=\"gPanel\"><td colspan=\"6\"></td></tr>";
+ var ePanel = "<tr id=\"g-panel\"><td colspan=\"6\"></td></tr>";
// 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('<div id="gFullsizeOverlay" class="ui-dialog-overlay" ' +
+ $("body").append('<div id="g-fullsize-overlay" class="ui-dialog-overlay" ' +
'style="border: none; margin: 0; padding: 0; background-color: #000; ' +
'position: absolute; top: 0px; left: 0px; ' +
'width: ' + width + 'px; height: ' + height + 'px;' +
@@ -26,32 +26,32 @@
}
- $("body").append('<div id="gFullsize" class="ui-dialog ui-widget" ' +
+ $("body").append('<div id="g-fullsize" class="ui-dialog ui-widget" ' +
'style="overflow: hidden; display: block; ' +
'position: absolute; z-index: 1002; outline-color: -moz-use-text-color; ' +
'outline-style: none; outline-width: 0px; ' +
'height: ' + image_size.height + 'px; ' +
'width: ' + image_size.width + 'px; ' +
'top: ' + image_size.top + 'px; left: ' + image_size.left + 'px;">' +
- '<img id="gFullSizeImage" src="' + image_url + '"' +
+ '<img id="g-fullsize-image" src="' + image_url + '"' +
'height="' + image_size.height + '" width="' + image_size.width + '"/></div>');
$().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
--- /dev/null
+++ b/lib/images/ico-separator.gif
Binary files differ