[Jifty-commit] r5955 - in jifty/trunk: . share/web/static/js

Jifty commits jifty-commit at lists.jifty.org
Mon Oct 20 16:14:01 EDT 2008


Author: alexmv
Date: Mon Oct 20 16:14:00 2008
New Revision: 5955

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/web/static/css/notices.css
   jifty/trunk/share/web/static/js/jifty.js

Log:
 r38332 at kohr-ah:  chmrr | 2008-10-20 16:13:53 -0400
  * Use Behavior to change full-page action messages into sticky jGrowl messages


Modified: jifty/trunk/share/web/static/css/notices.css
==============================================================================
--- jifty/trunk/share/web/static/css/notices.css	(original)
+++ jifty/trunk/share/web/static/css/notices.css	Mon Oct 20 16:14:00 2008
@@ -42,6 +42,10 @@
     padding-left: 20px;
 }
 
+#jGrowl .result-error { 
+    background: #a00000;
+}
+
 #jGrowl .result-error .message {
     background: url(/static/images/silk/error.png) no-repeat center left;
     padding-left: 20px;

Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Mon Oct 20 16:14:00 2008
@@ -708,6 +708,22 @@
         if (!jQuery(e).hasClass("focused")) {
             jQuery(e).addClass("focused").focus();
         }
+    },
+    /* Use jQuery for full-page-refresh notifications, as well */
+    '#messages.jifty.results.messages, #errors.jifty.results.messages': function(e) {
+        jQuery(e).hide();
+    },
+    '#messages.jifty.results.messages .message': function(e) {
+        jQuery.jGrowl( e.innerHTML, {
+            sticky: true,
+            theme: 'result-message'
+        });
+    },
+    '#errors.jifty.results.messages .error': function(e) {
+        jQuery.jGrowl( e.innerHTML, {
+            sticky: true,
+            theme: 'result-error'
+        });
     }
 });
 


More information about the Jifty-commit mailing list