sync
[roojs1] / roojs-bootstrap-debug.js
index db3a8eb..2fc8012 100644 (file)
@@ -534,6 +534,14 @@ Roo.extend(Roo.bootstrap.ButtonGroup, Roo.bootstrap.Component,  {
 
 Roo.bootstrap.Button = function(config){
     Roo.bootstrap.Button.superclass.constructor.call(this, config);
+    this.weightClass = ["btn-default", 
+                       "btn-primary", 
+                       "btn-success", 
+                       "btn-info", 
+                       "btn-warning",
+                       "btn-danger",
+                       "btn-link"
+                      ],  
     this.addEvents({
         // raw events
         /**
@@ -857,6 +865,11 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
     show: function() {
        
         this.el.show();   
+    },
+    setWeight : function(str)
+    {
+         this.el.removeClass(this.weightClass);
+        this.el.addClass('btn-' + str);        
     }
     
     
@@ -31304,11 +31317,12 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
     addItem : function(cfg)
     {
         var cn = new Roo.bootstrap.MasonryBrick(cfg);
-        this.register(cn);
+        //this.register(cn);
         cn.parentId = this.id;
         cn.onRender(this.el, null);
         return cn;
     },
+    
     /**
     * register a Masonry Brick
     * @param {Roo.bootstrap.MasonryBrick} the masonry brick to add
@@ -31327,6 +31341,13 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
         this.bricks = [];
         //this.getChildContainer().dom.innerHTML = "";
         this.el.dom.innerHTML = '';
+    },
+    
+    getSelected : function()
+    {
+        for (var i=0; i<this.bricks.length; i++) {
+            Roo.log(this.bricks)[i];
+        }
     }
     
 });
@@ -32197,7 +32218,7 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
     onClick: function(e, el)
     {
         var time = this.endTimer - this.startTimer;
-        // Roo.log(e.preventDefault());
+        
         if(Roo.isTouch){
             if(time > 1000){
                 e.preventDefault();