summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-08-08 01:14:51 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-08-08 01:14:51 -0600
commited6302a0adbdee604722ce93ad975a55e1d02397 (patch)
tree434fe1d24e827962b1d7204aad7a35cc932e87d1 /lib/gallery.common.js
parent6357f3332b9bc33b10c11dc93b83ba9e72eec109 (diff)
parent828f6add509c26ee183b44b4ad4f927f34d04509 (diff)
Merge branch 'master' of git@github.com:bharat/gallery3
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r--lib/gallery.common.js40
1 files changed, 26 insertions, 14 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 1eaa6db2..7e6acad9 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -1,19 +1,13 @@
-/**
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-(function () {
- $.fn.showMessage = function(message) {
+(function ($) {
+ $.fn.gallery_show_message = function(message) {
return this.each(function(i){
$(this).effect("highlight", {"color": "white"}, 3000);
$(this).animate({opacity: 1.0}, 6000);
});
};
-})(jQuery);
-// Vertically align a block element's content
-(function () {
- $.fn.vAlign = function(container) {
+ // Vertically align a block element's content
+ $.fn.gallery_valign = function(container) {
return this.each(function(i){
if (container == null) {
container = 'div';
@@ -26,11 +20,9 @@
$(el).css('margin-top', nh);
});
};
-})(jQuery);
-// Get the viewport size
-(function () {
- $.getViewportSize = function() {
+ // Get the viewport size
+ $.gallery_get_viewport_size = function() {
return {
width : function() {
return $(window).width();
@@ -40,4 +32,24 @@
}
};
};
+
+ /**
+ * Toggle the processing indicator, both large and small
+ * @param elementID Target ID, including #, to apply .gLoadingSize
+ */
+ $.fn.gallery_show_loading = function() {
+ return this.each(function(i){
+ var size;
+ switch ($(this).attr("id")) {
+ case "#gDialog":
+ case "#gPanel":
+ size = "Large";
+ break;
+ default:
+ size = "Small";
+ break;
+ }
+ $(this).toggleClass("gLoading" + size);
+ });
+ };
})(jQuery);