Fix #6465 - drag drop for cards
[roojs1] / Roo / bootstrap / PaginationItem.js
index 1cb205b..c23d00e 100644 (file)
@@ -13,6 +13,8 @@
  * @cfg {String} html text
  * @cfg {String} href the link
  * @cfg {Boolean} preventDefault (true | false) default true
+ * @cfg {Boolean} active (true | false) default false
+ * @cfg {Boolean} disabled default false
  * 
  * 
  * @constructor
@@ -39,6 +41,9 @@ Roo.extend(Roo.bootstrap.PaginationItem, Roo.bootstrap.Component,  {
     href : false,
     html : false,
     preventDefault: true,
+    active : false,
+    cls : false,
+    disabled: false,
     
     getAutoCreate : function(){
         var cfg= {
@@ -51,6 +56,18 @@ Roo.extend(Roo.bootstrap.PaginationItem, Roo.bootstrap.Component,  {
                }
            ]
         };
+        
+        if(this.cls){
+            cfg.cls = this.cls;
+        }
+        
+        if(this.disabled){
+            cfg.cls = typeof(cfg.cls) !== 'undefined' ? cfg.cls + ' disabled' : 'disabled';
+        }
+        
+        if(this.active){
+            cfg.cls = typeof(cfg.cls) !== 'undefined' ? cfg.cls + ' active' : 'active';
+        }
        
         return cfg;
     },
@@ -67,6 +84,10 @@ Roo.extend(Roo.bootstrap.PaginationItem, Roo.bootstrap.Component,  {
             e.preventDefault();
         }
         
+        if(this.disabled){
+            return;
+        }
+        
         this.fireEvent('click', this, e);
     }