fix weights list
authorAlan Knowles <alan@roojs.com>
Fri, 27 Nov 2020 05:18:07 +0000 (13:18 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 27 Nov 2020 05:18:07 +0000 (13:18 +0800)
Roo/bootstrap/Button.js
docs/summary.txt

index de39a37..a022a20 100644 (file)
@@ -10,8 +10,8 @@
  * @extends Roo.bootstrap.Component
  * Bootstrap Button class
  * @cfg {String} html The button content
  * @extends Roo.bootstrap.Component
  * Bootstrap Button class
  * @cfg {String} html The button content
- * @cfg {String} weight (default|primary|secondary|success|info|warning|danger|link ) default
- * @cfg {String} badge_weight (default|primary|secondary|success|info|warning|danger|link ) default (same as button)
+ * @cfg {String} weight (default|primary|secondary|success|info|warning|danger|link|light|dark) default
+ * @cfg {String} badge_weight (default|primary|secondary|success|info|warning|danger|link|light|dark) default (same as button)
  * @cfg {Boolean} outline default false (except for weight=default which emulates old behaveiour with an outline)
  * @cfg {String} size (lg|sm|xs)
  * @cfg {String} tag (a|input|submit)
  * @cfg {Boolean} outline default false (except for weight=default which emulates old behaveiour with an outline)
  * @cfg {String} size (lg|sm|xs)
  * @cfg {String} tag (a|input|submit)
 
 Roo.bootstrap.Button = function(config){
     Roo.bootstrap.Button.superclass.constructor.call(this, config);
 
 Roo.bootstrap.Button = function(config){
     Roo.bootstrap.Button.superclass.constructor.call(this, config);
-    this.weightClass = ["btn-default btn-outline-secondary", 
-                       "btn-primary", 
-                       "btn-success", 
-                       "btn-info", 
-                       "btn-warning",
-                       "btn-danger",
-                       "btn-link"
-                      ],  
+    
     this.addEvents({
         // raw events
         /**
     this.addEvents({
         // raw events
         /**
@@ -143,8 +136,8 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
             
             return cfg;
         }
             
             return cfg;
         }
+             
         
         
-         
         if (this.theme==='default') {
             cfg.cls = 'btn roo-button';
             
         if (this.theme==='default') {
             cfg.cls = 'btn roo-button';
             
@@ -410,7 +403,7 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
     
     setWeight : function(str)
     {
     
     setWeight : function(str)
     {
-       this.el.removeClass(this.weightClass);
+       this.el.removeClass(Roo.bootstrap.Button.weightClass );
         this.weight = str;
         var outline = this.outline ? 'outline-' : '';
         if (str == 'default') {
         this.weight = str;
         var outline = this.outline ? 'outline-' : '';
         if (str == 'default') {
@@ -422,5 +415,17 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
     
     
 });
     
     
 });
-
\ No newline at end of file
+Roo.bootstrap.Button.weightClass = [
+                        
+       "btn-default",
+       "btn-outline-secondary",
+       "btn-secondary",        
+       "btn-primary", 
+       "btn-success", 
+       "btn-info", 
+       "btn-warning",
+       "btn-danger",
+       "btn-link",
+       'btn-light',
+       'btn-dark'
+];
\ No newline at end of file
index 454b6de..2716d80 100644 (file)
@@ -145,10 +145,11 @@ Bootstrap Widgets
 
     Cards
         Roo.bootstrap.Card a interactive card element (dragable / expandabe etc.)
 
     Cards
         Roo.bootstrap.Card a interactive card element (dragable / expandabe etc.)
-            [examples/bootstrap4/dashboard4.html] Dragable Trello like cards.
         Roo.bootstrap.CardHeader container for header elements
         Roo.bootstrap.CardFooter container for footer elements
         Roo.bootstrap.CardImageTop container for footer elements
         Roo.bootstrap.CardHeader container for header elements
         Roo.bootstrap.CardFooter container for footer elements
         Roo.bootstrap.CardImageTop container for footer elements
+        Examples
+            [examples/bootstrap4/dashboard4.html] Dragable Trello like cards.
         
     Html
         Roo.bootstrap.Img  Images
         
     Html
         Roo.bootstrap.Img  Images