summaryrefslogtreecommitdiff
path: root/themes/default/js/ui.init.js
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2009-05-09 07:10:36 +0000
committerChad Kieffer <chad@2tbsp.com>2009-05-09 07:10:36 +0000
commit853c00cde04509fb2f90ab7adc2425528dc7839c (patch)
treed94b6217006efbcb8304bcd3bccacde26c961ca8 /themes/default/js/ui.init.js
parent48ee3d5fe83175639ef910dedd30bc144ed0a67e (diff)
Highlight status messages on load, fade them out after a few seconds. Make success green brighter.
Diffstat (limited to 'themes/default/js/ui.init.js')
-rw-r--r--themes/default/js/ui.init.js16
1 files changed, 14 insertions, 2 deletions
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);
}