roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Mon, 11 Sep 2017 02:24:02 +0000 (10:24 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 11 Sep 2017 02:24:02 +0000 (10:24 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 285f72f..fa89ad2 100644 (file)
@@ -1521,7 +1521,8 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
     
     setSrc : function(url)
     {
-        this.el.dom.src =  url;
+        this.src =  url;
+        this.el.select('img', true).first().dom.src =  url;
     }
     
     
@@ -6014,7 +6015,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         if (this.footer) {
             this.footer.parentId = this.id;
             this.footer.onRender(this.el.select('tfoot tr td').first(), null);        
-        }
+        } 
         
         this.maskEl = new Roo.LoadMask(this.el, { store : this.ds, msgCls: 'roo-el-mask-msg' });
         
@@ -6734,13 +6735,15 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         var thd = this.getGridEl().select('thead',true).first();
         var tbd = this.getGridEl().select('tbody', true).first();
-        
+        var tfd = this.getGridEl().select('tfoot', true).first();
         
         var cw = ctr.getWidth();
         
         if (tbd) {
             
-            tbd.setSize(ctr.getWidth(), ctr.getHeight() - thd.getHeight());
+            tbd.setSize(ctr.getWidth(),
+                        ctr.getHeight() - (thd.getHeight() + (tfd ? tfd.getHeight() : 0))
+            );
             var barsize = (tbd.dom.offsetWidth - tbd.dom.clientWidth);
             cw -= barsize;
         }
index 4388c64..df41fc1 100644 (file)
@@ -57,7 +57,7 @@ Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this
 var s=['xs','sm','md','lg'];s.splice(s.indexOf(C),1);Roo.each(s,function(ss){D.cls+=' hidden-'+ss;});if(['rounded','circle','thumbnail'].indexOf(B.border)>-1){A.cls+=' img-'+B.border;}if(B.alt){A.alt=B.alt;}if(B.href){var a={tag:'a',href:B.href,cn:[D]};if(this.target){a.target=B.target;
 }}A.cn.push((B.href)?a:D);});return A;},createSingleImg:function(){var A={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:null,src:'about:blank'};A.html=this.html||A.html;A.src=this.src||A.src;if(['rounded','circle','thumbnail'].indexOf(this.border)>-1){A.cls+=' img-'+this.border;
 }if(this.alt){A.alt=this.alt;}if(this.href){var a={tag:'a',href:this.href,cn:[A]};if(this.target){a.target=this.target;}}return (this.href)?a:A;},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}},onClick:function(e){Roo.log('img onclick');
-this.fireEvent('click',this,e);},setSrc:function(A){this.el.dom.src=A;}});
+this.fireEvent('click',this,e);},setSrc:function(A){this.src=A;this.el.select('img',true).first().dom.src=A;}});
 // Roo/bootstrap/Link.js
 Roo.bootstrap.Link=function(A){Roo.bootstrap.Link.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Link,Roo.bootstrap.Component,{href:false,target:false,preventDefault:false,anchor:false,alt:false,fa:false,getAutoCreate:function(){var A=this.html||'';
 if(this.fa!==false){A='<i class="fa fa-'+this.fa+'"></i>';}var B={tag:'a'};if(this.anchor===false){B.html=A;B.href=this.href||'#';}else{B.name=this.anchor;if(this.html!==false||this.fa!==false){B.html=A;}if(this.href!==false){B.href=this.href;}}if(this.alt!==false){B.alt=this.alt;
@@ -266,8 +266,8 @@ return (typeof(B[A])=='undefined')?false:B[A];},renderRow:function(cm,ds,A){var
 B.cellObjects=C;return B;},onBeforeLoad:function(){},clear:function(){this.el.select('tbody',true).first().dom.innerHTML='';},setRowVisibility:function(A,B){var bt=this.mainBody.dom;var C=this.el.select('tbody > tr',true).elements;if(typeof(C[A])=='undefined'){return;
 }C[A].dom.style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel({grid:this});}return this.selModel;},renderCellObject:function(r){var A=this;var t=r.cfg.render(r.container);if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B={container:t.getChildContainer(),cfg:c}
 ;A.renderCellObject(B);})}},getRowIndex:function(A){var B=-1;Roo.each(this.el.select('tbody > tr',true).elements,function(el,C){if(el!=A){return;}B=C;});return B;},getGridEl:function(){return this.el;},autoSize:function(){var A=Roo.get(this.el.dom);var B=this.getGridEl().select('thead',true).first();
-var C=this.getGridEl().select('tbody',true).first();var cw=A.getWidth();if(C){C.setSize(A.getWidth(),A.getHeight()-B.getHeight());var D=(C.dom.offsetWidth-C.dom.clientWidth);cw-=D;}cw=Math.max(cw,this.totalWidth);this.getGridEl().select('tr',true).setWidth(cw);
-return;},onBodyScroll:function(){this.mainHead.setStyle({'position':'relative','left':(-1*this.mainBody.dom.scrollLeft)+'px'});}});
+var C=this.getGridEl().select('tbody',true).first();var D=this.getGridEl().select('tfoot',true).first();var cw=A.getWidth();if(C){C.setSize(A.getWidth(),A.getHeight()-(B.getHeight()+(D?D.getHeight():0)));var E=(C.dom.offsetWidth-C.dom.clientWidth);cw-=E;}
+cw=Math.max(cw,this.totalWidth);this.getGridEl().select('tr',true).setWidth(cw);return;},onBodyScroll:function(){this.mainHead.setStyle({'position':'relative','left':(-1*this.mainBody.dom.scrollLeft)+'px'});}});
 // Roo/bootstrap/TableCell.js
 Roo.bootstrap.TableCell=function(A){Roo.bootstrap.TableCell.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.TableCell,Roo.bootstrap.Component,{html:false,cls:false,tag:false,abbr:false,align:false,axis:false,bgcolor:false,charoff:false,colspan:false,headers:false,height:false,nowrap:false,rowspan:false,scope:false,valign:false,width:false,getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));A={tag:'td'};if(this.tag){A.tag=this.tag;}if(this.html){A.html=this.html}if(this.cls){A.cls=this.cls}if(this.abbr){A.abbr=this.abbr}if(this.align){A.align=this.align}if(this.axis){A.axis=this.axis}