9 * @class Roo.bootstrap.ProgressBar
10 * @extends Roo.bootstrap.Component
11 * Bootstrap ProgressBar class
12 * @cfg {Number} aria_valuenow aria-value now
13 * @cfg {Number} aria_valuemin aria-value min
14 * @cfg {Number} aria_valuemax aria-value max
15 * @cfg {String} label label for the progress bar
16 * @cfg {String} panel (success | info | warning | danger )
17 * @cfg {String} role role of the progress bar
18 * @cfg {String} sr_only text
22 * Create a new ProgressBar
23 * @param {Object} config The config object
26 Roo.bootstrap.ProgressBar = function(config){
27 Roo.bootstrap.ProgressBar.superclass.constructor.call(this, config);
30 Roo.extend(Roo.bootstrap.ProgressBar, Roo.bootstrap.Component, {
40 getAutoCreate : function()
46 style: 'width:' + Math.ceil((this.aria_valuenow / this.aria_valuemax) * 100) + '%'
61 if(this.aria_valuenow){
62 cfg['aria-valuenow'] = this.aria_valuenow;
65 if(this.aria_valuemin){
66 cfg['aria-valuemin'] = this.aria_valuemin;
69 if(this.aria_valuemax){
70 cfg['aria-valuemax'] = this.aria_valuemax;
73 if(this.label && !this.sr_only){
74 cfg.html = this.label;
78 cfg.cls += ' progress-bar-' + this.panel;
84 update : function(aria_valuenow)
86 this.aria_valuenow = aria_valuenow;
88 this.el.setStyle('width', Math.ceil((this.aria_valuenow / this.aria_valuemax) * 100) + '%');