* @cfg {String} html The content of alert
* @cfg {String} weight ( success | info | warning | danger )
* @cfg {String} fa font-awesomeicon
+ @cfg {Number} seconds default:-1 Number of seconds until it disapears (-1 means never.)
*
*
* @constructor
initEvents: function()
{
this.el.setVisibilityMode(Roo.Element.DISPLAY);
+ this.titleEl = this.el.select('.roo-alert-title',true).first();
+ this.iconEl = this.el.select('.roo-alert-icon',true).first();
},
setTitle : function(str)
{
- this.el.select('.roo-alert-title',true).first().dom.innerHTML = str;
+ this.titleEl.dom.innerHTML = str;
},
setText : function(str)
{
- this.el.select('.roo-alert-text',true).first().dom.innerHTML = str;
+ this.titleEl.dom.innerHTML = str;
},
setWeight : function(weight)
{
if(this.weight){
- this.el.select('.alert',true).first().removeClass('alert-' + this.weight);
+ this.el.removeClass('alert-' + this.weight);
}
this.weight = weight;
- this.el.select('.alert',true).first().addClass('alert-' + this.weight);
+ this.el.addClass('alert-' + this.weight);
},
setIcon : function(icon)