Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

created package for bootstrap v2.0.0

  • Loading branch information...
commit d1a54b5046b1633fffc668c9715e496eac4e03d1 1 parent e013d27
Eugene Bunin authored
Showing with 17 additions and 8 deletions.
  1. +4 −4 README
  2. +13 −4 classes/message/core.php
8 README
View
@@ -1,14 +1,14 @@
Message queue module for Kohana 3.2
-Works with Bootstrap v1.2.0 from Twitter
+Works with Bootstrap v2.0.0 from Twitter
@link http://twitter.github.com/bootstrap/
Passing messages to a queue and then print them with a nice looking Twitter style template.
Use CSS styles from: http://twitter.github.com/bootstrap/
1. To enqueue a message do like this:
-Message::queue( array('type' => 'alert', 'text' => 'With love from Russia!') );
+Message::queue( array('type' => 'alert alert-notify', 'text' => 'Hello from Russia!') );
or
-Message::queue( array('type' => 'success', 'text' => 'Data successfully saved.') )
+Message::queue( array('type' => 'alert alert-success', 'text' => 'Data successfully saved.') );
2. To print messages use:
Message::render();
@@ -16,4 +16,4 @@ Note: add this in your app template in order to print messages after app is redi
Supports:
1. Different views: in config or Message::render( array('view' => 'message/basic') ).
-2. Alert types: alert, success, error.
+2. Message alert types: alert-notify, alert-success, alert-error.
17 classes/message/core.php
View
@@ -2,13 +2,13 @@
/**
* Message queue module
- * Works with Bootstrap v1.2.0 from Twitter
+ * Works with Bootstrap v2.0.0 from Twitter
* @link: http://twitter.github.com/bootstrap/
*
* 1. To enqueue a message do like this:
- * Message::queue( array('type' => 'alert', 'text' => 'Hello from Russia!') );
+ * Message::queue( array('type' => 'alert alert-notify', 'text' => 'Hello from Russia!') );
* or
- * Message::queue( array('type' => 'success', 'text' => 'Data successfully saved.') );
+ * Message::queue( array('type' => 'alert alert-success', 'text' => 'Data successfully saved.') );
*
* 2. To print messages use:
* Message::render();
@@ -16,7 +16,16 @@
*
* Supports:
* - Message views: in config or Message::render( array('view' => 'message/basic') ).
- * - Message alert types: alert, success, error.
+ * - Message alert types: alert-notify, alert-success, alert-error.
+ *
+ * TODO:
+ * May be it makes sense to change:
+ * 'type' => 'alert alert-notify'
+ * to something more clear like:
+ * 'type' => 'notify'
+ * So, it will become:
+ * Message::queue( array('type' => 'notify', 'text' => 'Hello from Russia!') );
+ *
*
* @package Kohana/Message
* @category Modules
Please sign in to comment.
Something went wrong with that request. Please try again.