Browse files

created package for bootstrap v2.0.0

  • Loading branch information...
1 parent e013d27 commit d1a54b5046b1633fffc668c9715e496eac4e03d1 Evgheny committed Mar 21, 2012
Showing with 17 additions and 8 deletions.
  1. +4 −4 README
  2. +13 −4 classes/message/core.php
View
8 README
@@ -1,19 +1,19 @@
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();
Note: add this in your app template in order to print messages after app is redirected.
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.
View
17 classes/message/core.php
@@ -2,21 +2,30 @@
/**
* 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();
* Note: add this in your app template in order to print messages after app is redirected.
*
* 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

0 comments on commit d1a54b5

Please sign in to comment.