Roo/bootstrap/MasonryBrick.js
[roojs1] / Roo / bootstrap / MasonryBrick.js
index b979101..477bfef 100644 (file)
@@ -90,7 +90,7 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
             return this.getSplitAutoCreate();
         }
         
-        var cls = 'masonry-brick masonry-brick-full';
+        var cls = 'masonry-brick masonry-brick-full embed-responsive';
         
         if(this.href.length){
             cls += ' masonry-brick-link';
@@ -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';
         }
         
@@ -194,12 +194,11 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
             // youtube support only?
             cfg.cn.push({
                 tag: 'iframe',
-                cls: 'masonry-brick-image-view',
+                cls: 'masonry-brick-image-view embed-responsive-item',
                 src: vurl,
                 frameborder : 0,
                 allowfullscreen : true
             });
-            
         }
         
         return cfg;
@@ -378,17 +377,15 @@ 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)
     {
-        Roo.log('enter?????????????????');
-        
         e.preventDefault();
         
         if(!this.isFitContainer || this.maskInverse || this.videourl.length){
@@ -500,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, {