X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_bootstrap_PaginationItem.js.html;fp=docs%2Fsrc%2FRoo_bootstrap_PaginationItem.js.html;h=fff5b0de930466c1b3daffb0485b969f403f4814;hb=9ff8ded6bbbd258ecd646184ba26020874e2c085;hp=0000000000000000000000000000000000000000;hpb=2542b67d1a0768025056f2f330bfe50b64d1ad38;p=roojs1 diff --git a/docs/src/Roo_bootstrap_PaginationItem.js.html b/docs/src/Roo_bootstrap_PaginationItem.js.html new file mode 100644 index 0000000000..fff5b0de93 --- /dev/null +++ b/docs/src/Roo_bootstrap_PaginationItem.js.html @@ -0,0 +1,98 @@ +
/*
+ * - LGPL
+ *
+ * Pagination item
+ *
+ */
+
+
+/**
+ * @class Roo.bootstrap.PaginationItem
+ * @extends Roo.bootstrap.Component
+ * Bootstrap PaginationItem class
+ * @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
+ * Create a new PaginationItem
+ * @param {Object} config The config object
+ */
+
+
+Roo.bootstrap.PaginationItem = function(config){
+ Roo.bootstrap.PaginationItem.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.PaginationItem, Roo.bootstrap.Component, {
+
+ href : false,
+ html : false,
+ preventDefault: true,
+ active : false,
+ cls : false,
+ disabled: false,
+
+ getAutoCreate : function(){
+ var cfg= {
+ tag: 'li',
+ cn: [
+ {
+ tag : 'a',
+ href : this.href ? this.href : '#',
+ html : this.html ? this.html : ''
+ }
+ ]
+ };
+
+ 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;
+ },
+
+ initEvents: function() {
+
+ this.el.on('click', this.onClick, this);
+
+ },
+ onClick : function(e)
+ {
+ Roo.log('PaginationItem on click ');
+ if(this.preventDefault){
+ e.preventDefault();
+ }
+
+ if(this.disabled){
+ return;
+ }
+
+ this.fireEvent('click', this, e);
+ }
+
+});
+
+
+
+
\ No newline at end of file