Roo/bootstrap/LayoutMasonry.js
authorjohn <john@roojs.com>
Thu, 14 Dec 2017 09:31:16 +0000 (17:31 +0800)
committerjohn <john@roojs.com>
Thu, 14 Dec 2017 09:31:16 +0000 (17:31 +0800)
Roo/bootstrap/LayoutMasonry.js

index cd7a39e..f9e27d1 100644 (file)
@@ -1246,6 +1246,7 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
     * register a Masonry Brick
     * @param {Roo.bootstrap.MasonryBrick} the masonry brick to add
     */
+    
     register : function(brick)
     {
         this.bricks.push(brick);
@@ -1270,6 +1271,36 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
     }
 });
 
+Roo.apply(Roo.bootstrap.LayoutMasonry, {
+    
+    groups: {},
+     /**
+    * register a Layout of Masonry
+    * @param {Roo.bootstrap.LayoutMasonry} the layout to add
+    */
+    
+    register : function(layout)
+    {
+        this.groups[layout.id] = layout;
+    },
+    /**
+    * fetch a Navigation Group based on the navigation ID
+    * @param {string} the navgroup to add
+    * @returns {Roo.bootstrap.NavGroup} the navgroup 
+    */
+    
+    get: function(layout_id) {
+        if (typeof(this.groups[layout_id]) == 'undefined') {
+            return false;
+            //this.register(new Roo.bootstrap.NavGroup({ navId : navId }));
+        }
+        return this.groups[layout_id] ;
+    }
+    
+    
+    
+});
+
  
 
  
\ No newline at end of file