Roo/bootstrap/MasonryBrick.js
[roojs1] / Roo / bootstrap / MasonryBrick.js
index 8b3b9a4..ddd72d0 100644 (file)
@@ -104,7 +104,7 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
             cls += ' mask-inverse';
         }
         
-        if(!this.html.length && !this.maskInverse){
+        if(!this.html.length && !this.maskInverse && !this.videourl.length){
             cls += ' enable-mask';
         }
         
@@ -175,7 +175,8 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
                 cls: 'masonry-brick-text',
                 html: this.html
             });
-        }  
+        }
+        
         if (!this.title.length && !this.html.length) {
             cfg.cn[1].cls += ' hide';
         }
@@ -198,7 +199,6 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
                 frameborder : 0,
                 allowfullscreen : true
             });
-            
         }
         
         return cfg;
@@ -377,11 +377,11 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
         
         e.preventDefault();
         
-        if (this.activcClass != '') {
+        if (this.activeClass != '') {
             this.selectBrick();
         }
         
-        this.fireEvent('click', this);
+        this.fireEvent('click', this, e);
     },
     
     enter: function(e, el)
@@ -401,7 +401,7 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
     {
         e.preventDefault();
         
-        if(!this.isFitContainer || this.maskInverse || this.videourl.length){
+        if(!this.isFitContainer || this.maskInverse  || this.videourl.length){
             return;
         }
         
@@ -497,8 +497,12 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
         m.selectedBrick.push(this.id);
         this.el.addClass(this.activeClass);
         return;
-    }
+    },
     
+    isSelected : function(){
+        return this.el.hasClass(this.activeClass);
+        
+    }
 });
 
 Roo.apply(Roo.bootstrap.MasonryBrick, {