Roo/bootstrap/Progress.js
[roojs1] / Roo / bootstrap / Progress.js
1 /*
2  * - LGPL
3  *
4  * Progress
5  * 
6  */
7
8 /**
9  * @class Roo.bootstrap.Progress
10  * @extends Roo.bootstrap.Component
11  * Bootstrap Progress 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  * 
18  * 
19  * @constructor
20  * Create a new Progress
21  * @param {Object} config The config object
22  */
23
24 Roo.bootstrap.Progress = function(config){
25     Roo.bootstrap.Progress.superclass.constructor.call(this, config);
26 };
27
28 Roo.extend(Roo.bootstrap.Progress, Roo.bootstrap.Component,  {
29     
30     aria_valuenow : false,
31     aria_valuemin : 0,
32     aria_valuemax : 100,
33     label : false,
34     panel : false,
35     
36     getAutoCreate : function(){
37         var cfg = {
38             tag: 'div',
39             cls: 'progress-bar'
40         };
41       
42         if(this.aria_valuenow){
43             cfg['aria-valuenow'] = this.aria_valuenow;
44         }
45         
46         if(this.label){
47             cfg.html = this.label;
48         }
49         
50         if(this.panel){
51             cfg.cls += 'progress-bar-' + this.panel;
52         }
53         
54         return cfg;
55     }
56    
57 });
58
59  
60
61