From 853c00cde04509fb2f90ab7adc2425528dc7839c Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sat, 9 May 2009 07:10:36 +0000 Subject: Highlight status messages on load, fade them out after a few seconds. Make success green brighter. --- themes/default/js/ui.init.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'themes/default/js/ui.init.js') diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js index ffcc3ed3..e250a1c3 100644 --- a/themes/default/js/ui.init.js +++ b/themes/default/js/ui.init.js @@ -44,9 +44,11 @@ $(document).ready(function() { // Album view only if ($("#gAlbumGrid").length) { // Vertical align thumbnails/metadata in album grid - $('.gItem').vAlign(); + $(".gItem").vAlign(); } + $("#gMessage li").showMessage(); + // Photo/Item item view only if ($("#gItem").length) { // Ensure that sized image versions @@ -93,7 +95,7 @@ $(document).ready(function() { }); // Vertically align a block element's content -(function ($) { +(function () { $.fn.vAlign = function(container) { return this.each(function(i){ if (container == null) { @@ -165,4 +167,14 @@ function shortFormInit(formID) { $(this).val(eLabelVal); } }); + + (function () { + $.fn.showMessage = function(message) { + return this.each(function(i){ + $(this).effect("highlight", {"color": "white"}, 3000); + $(this).animate({opacity: 1.0}, 6000); + $(this).fadeOut("slow"); + }); + }; + })(jQuery); } -- cgit v1.2.3