try and get ctrl-enter to add a clear all
[roojs1] / Roo / bootstrap / Pagination.js
index db67628..cfb6845 100644 (file)
@@ -8,14 +8,11 @@
 /**
  * @class Roo.bootstrap.Pagination
  * @extends Roo.bootstrap.Component
+ * @children Roo.bootstrap.Pagination
  * Bootstrap Pagination class
- * @cfg {String} size xs | sm | md | lg
- * @cfg {Boolean} inverse false | true
- * @cfg {Number} from pagination starting number
- * @cfg {Number} to pagination ending number
- * @cfg {String} align empty or left | right
- * @cfg {Number} active active page number
- * @cfg {Boolean} preventDefault (true | false) default false
+ * 
+ * @cfg {String} size (xs|sm|md|lg|xl)
+ * @cfg {Boolean} inverse 
  * 
  * @constructor
  * Create a new Pagination
 
 Roo.bootstrap.Pagination = function(config){
     Roo.bootstrap.Pagination.superclass.constructor.call(this, config);
-    
-    this.addEvents({
-        // raw events
-        /**
-         * @event click
-         * The raw click event for the entire grid.
-         * @param {Roo.EventObject} e
-         */
-        "click" : true
-    });
 };
 
 Roo.extend(Roo.bootstrap.Pagination, Roo.bootstrap.Component,  {
@@ -41,17 +28,11 @@ Roo.extend(Roo.bootstrap.Pagination, Roo.bootstrap.Component,  {
     cls: false,
     size: false,
     inverse: false,
-    from: 1,
-    to: 4,
-    align: false,
-    active: 1,
-    preventDefault : false,
     
     getAutoCreate : function(){
         var cfg = {
             tag: 'ul',
-                cls: 'pagination',
-                cn: []
+                cls: 'pagination'
         };
         if (this.inverse) {
             cfg.cls += ' inverse';
@@ -60,66 +41,9 @@ Roo.extend(Roo.bootstrap.Pagination, Roo.bootstrap.Component,  {
             cfg.html=this.html;
         }
         if (this.cls) {
-            cfg.cls=this.cls;
-        }
-        cfg.cn[0]={
-            tag: 'li',
-            cn: [
-                {
-                    tag: 'a',
-                    href:'#',
-                    html: '«'
-                }
-            ]
-        };
-        var from=this.from>0?this.from:1;
-        var to=this.to-from<=10?this.to:from+10;
-        var active=this.active>=from&&this.active<=to?this.active:null;
-        for (var i=from;i<=to;i++) {
-            cfg.cn.push(
-                {
-                    tag: 'li',
-                    cls: active===i?'active':'',
-                    cn: [
-                        {
-                            tag: 'a',
-                            href: '#',
-                            html: i
-                        }
-                    ]
-                }
-            );
+            cfg.cls += " " + this.cls;
         }
-        
-        cfg.cn.push(
-            {
-                tag: 'li',
-                cn: [
-                    {
-                       tag: 'a',
-                       href: '#',
-                       html: '&raquo;'
-                    }
-                ]
-            }
-        );
-       
         return cfg;
-    },
-    
-    initEvents: function() {
-        this.el.on('click', this.onClick, this);
-    },
-    
-    onClick : function(e)
-    {
-        Roo.log('pagination click');
-        
-        if(this.preventDefault){
-            e.preventDefault();
-        }
-        
-        this.fireEvent('click', this, e);
     }
    
 });