Roo/bootstrap/MessageBar.js
authorEdward <edward@roojs.com>
Wed, 4 Jun 2014 06:08:54 +0000 (14:08 +0800)
committerEdward <edward@roojs.com>
Wed, 4 Jun 2014 06:08:54 +0000 (14:08 +0800)
Roo/bootstrap/MessageBar.js

index bd91da8..0064417 100644 (file)
@@ -10,6 +10,7 @@
  * @extends Roo.bootstrap.Component
  * Bootstrap MessageBar class
  * @cfg {String} html contents of the MessageBar
+ * @cfg {String} weight (info | success | warning | danger) default info
  * 
  * @constructor
  * Create a new Element
@@ -23,10 +24,16 @@ Roo.bootstrap.MessageBar = function(config){
 Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
     
     html: '',
+    weight: 'info',
      
     
     getAutoCreate : function(){
         
+        var cfg = {
+            tag: 'div',
+            cls: 'alert alert-dismissable alert-messages alert-' + this.weight,
+            html: this.html || ''
+        }
         
         return cfg;
     }