Roo/bootstrap/MasonryBrick.js
authorjohn <john@roojs.com>
Thu, 14 Dec 2017 10:02:40 +0000 (18:02 +0800)
committerjohn <john@roojs.com>
Thu, 14 Dec 2017 10:02:40 +0000 (18:02 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/MasonryBrick.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 6654b16..1be7050 100644 (file)
@@ -480,13 +480,13 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
         var index = m.selectedBrick.indexOf(this.id);
         
         if ( index > -1) {
-            this.removeClass(this.activeClass);
+            this.el.removeClass(this.activeClass);
             m.selectedBrick.splice(index,1);
             Roo.log(m.selectedBrick);
             return;
         }
         
-        this.addClass(this.activeClass);
+        this.el.addClass(this.activeClass);
         m.selectedBrick.push(this.id);
         Roo.log(m.selectedBrick);
         return;
index ab0e30b..24dcdf0 100644 (file)
@@ -32376,13 +32376,13 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
         var index = m.selectedBrick.indexOf(this.id);
         
         if ( index > -1) {
-            this.removeClass(this.activeClass);
+            this.el.removeClass(this.activeClass);
             m.selectedBrick.splice(index,1);
             Roo.log(m.selectedBrick);
             return;
         }
         
-        this.addClass(this.activeClass);
+        this.el.addClass(this.activeClass);
         m.selectedBrick.push(this.id);
         Roo.log(m.selectedBrick);
         return;
index ddeaa67..b5801e2 100644 (file)
@@ -1360,7 +1360,7 @@ if(this.activcClass!=''){this.selectBrick();}this.fireEvent('click',this);},ente
 if(!this.isFitContainer){return;}if(!this.bgimage.length||!this.html.length){return;}this.el.select('.masonry-brick-paragraph',true).first().setOpacity(0.9,true);this.timer=new Date().getTime();},onTouchMove:function(e,el){this.touchmoved=true;},onContextMenu:function(e,el){e.preventDefault();
 e.stopPropagation();return false;},onTouchEnd:function(e,el){if((new Date().getTime()-this.timer>1000)||!this.href.length||this.touchmoved){this.leave(e,el);return;}if(!this.bgimage.length||!this.html.length){if(this.href.length){window.location.href=this.href;
 }return;}if(!this.isFitContainer){return;}this.el.select('.masonry-brick-paragraph',true).first().setOpacity(0,true);window.location.href=this.href;},selectBrick:function(){if(!this.parentId){return;}var m=Roo.bootstrap.LayoutMasonry.get(this.parentId);var A=m.selectedBrick.indexOf(this.id);
-if(A>-1){this.removeClass(this.activeClass);m.selectedBrick.splice(A,1);Roo.log(m.selectedBrick);return;}this.addClass(this.activeClass);m.selectedBrick.push(this.id);Roo.log(m.selectedBrick);return;}});
+if(A>-1){this.el.removeClass(this.activeClass);m.selectedBrick.splice(A,1);Roo.log(m.selectedBrick);return;}this.el.addClass(this.activeClass);m.selectedBrick.push(this.id);Roo.log(m.selectedBrick);return;}});
 // Roo/bootstrap/Brick.js
 Roo.bootstrap.Brick=function(A){Roo.bootstrap.Brick.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Brick,Roo.bootstrap.Component,{title:'',html:'',bgimage:'',cls:'',href:'',video:'',square:true,getAutoCreate:function(){var A='roo-brick';
 if(this.href.length){A+=' roo-brick-link';}if(this.bgimage.length){A+=' roo-brick-image';}if(!this.html.length&&!this.bgimage.length){A+=' roo-brick-center-title';}if(!this.html.length&&this.bgimage.length){A+=' roo-brick-bottom-title';}if(this.cls){A+=' '+this.cls;