allow string based values for comboboxarray
[roojs1] / Roo / bootstrap / DocumentViewer.js
index bfe9a8d..6186c4a 100644 (file)
@@ -84,22 +84,22 @@ Roo.extend(Roo.bootstrap.DocumentViewer, Roo.bootstrap.Component,  {
                         cn : [
                             {
                                 tag : 'div',
-                                cls : 'btn-group',
+                                cls : 'btn-group roo-document-viewer-download',
                                 cn : [
                                     {
                                         tag : 'button',
-                                        cls : 'btn btn-default roo-document-viewer-download',
+                                        cls : 'btn btn-default',
                                         html : '<i class="fa fa-download"></i>'
                                     }
                                 ]
                             },
                             {
                                 tag : 'div',
-                                cls : 'btn-group',
+                                cls : 'btn-group roo-document-viewer-trash',
                                 cn : [
                                     {
                                         tag : 'button',
-                                        cls : 'btn btn-default roo-document-viewer-trash',
+                                        cls : 'btn btn-default',
                                         html : '<i class="fa fa-trash"></i>'
                                     }
                                 ]
@@ -115,24 +115,23 @@ Roo.extend(Roo.bootstrap.DocumentViewer, Roo.bootstrap.Component,  {
     
     initEvents : function()
     {
-        
         this.bodyEl = this.el.select('.roo-document-viewer-body', true).first();
-        this.bodyEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
+        this.bodyEl.setVisibilityMode(Roo.Element.DISPLAY);
         
         this.thumbEl = this.el.select('.roo-document-viewer-thumb', true).first();
-        this.thumbEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
+        this.thumbEl.setVisibilityMode(Roo.Element.DISPLAY);
         
         this.imageEl = this.el.select('.roo-document-viewer-image', true).first();
-        this.imageEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
+        this.imageEl.setVisibilityMode(Roo.Element.DISPLAY);
         
         this.footerEl = this.el.select('.roo-document-viewer-footer', true).first();
-        this.footerEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
+        this.footerEl.setVisibilityMode(Roo.Element.DISPLAY);
         
         this.downloadBtn = this.el.select('.roo-document-viewer-download', true).first();
-        this.downloadBtn.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
+        this.downloadBtn.setVisibilityMode(Roo.Element.DISPLAY);
         
         this.trashBtn = this.el.select('.roo-document-viewer-trash', true).first();
-        this.trashBtn.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
+        this.trashBtn.setVisibilityMode(Roo.Element.DISPLAY);
         
         this.bodyEl.on('click', this.onClick, this);
         this.downloadBtn.on('click', this.onDownload, this);
@@ -149,17 +148,14 @@ Roo.extend(Roo.bootstrap.DocumentViewer, Roo.bootstrap.Component,  {
             this.trashBtn.show();
         }
         
-        if(!)
-
-        
+        if(!this.showDownload && !this.showTrash) {
+            this.footerEl.hide();
+        }
         
     },
     
     initial : function()
     {
-//        this.thumbEl.setStyle('line-height', this.thumbEl.getHeight(true) + 'px');
-        
-        
         this.fireEvent('initial', this);
         
     },