Roo/bootstrap/DocumentSlider.js
[roojs1] / Roo / bootstrap / DocumentSlider.js
1
2 /*
3 * Licence: LGPL
4 */
5
6 /**
7  * @class Roo.bootstrap.DocumentSlider
8  * @extends Roo.bootstrap.Component
9  * Bootstrap DocumentSlider class
10  * 
11  * @constructor
12  * Create a new DocumentViewer
13  * @param {Object} config The config object
14  */
15
16 Roo.bootstrap.DocumentSlider = function(config){
17     Roo.bootstrap.DocumentSlider.superclass.constructor.call(this, config);
18     
19     this.addEvents({
20         /**
21          * @event initial
22          * Fire after initEvent
23          * @param {Roo.bootstrap.DocumentViewer} this
24          */
25         "initial" : true
26     });
27 };
28
29 Roo.extend(Roo.bootstrap.DocumentSlider, Roo.bootstrap.Component,  {
30     
31     getAutoCreate : function()
32     {
33         var cfg = {
34             tag : 'div',
35             cls : 'roo-document-slider',
36             cn : [
37                 {
38                     tag : 'div',
39                     cls : 'roo-document-slider-body',
40                     cn : [
41                         {
42                             tag : 'div',
43                             cls : 'roo-document-slider-thumb',
44                             cn : [
45                                 {
46                                     tag : 'img',
47                                     cls : 'roo-document-slider-image'
48                                 }
49                             ]
50                         }
51                     ]
52                 }
53             ]
54         };
55         
56         return cfg;
57     },
58     
59     initEvents : function()
60     {
61         this.bodyEl = this.el.select('.roo-document-slider-body', true).first();
62         this.bodyEl.setVisibilityMode(Roo.Element.DISPLAY);
63         
64         this.thumbEl = this.el.select('.roo-document-slider-thumb', true).first();
65         this.thumbEl.setVisibilityMode(Roo.Element.DISPLAY);
66         
67         this.imageEl = this.el.select('.roo-document-slider-image', true).first();
68         this.imageEl.setVisibilityMode(Roo.Element.DISPLAY);
69     },
70     
71     initial : function()
72     {
73         this.fireEvent('initial', this);
74     }
75 });