1. #1
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default [3.x] Ext.ux.grid.PageSizer

    [3.x] Ext.ux.grid.PageSizer


    Hi,

    I write a new PageSizer plugin for new rewrited Ext.toolbar component.

    I use Ext.ux.iconMgr If you dont´t want to use this, please create iconCls css class with attached images.

    28/04/2009: First version.
    29/04/2009: Rewrite. Felixibilize the plugin and support locale.
    30/04/2009: Capture http://www.jadacosta.es/contents/scr...t/capture1.swf
    02/06/2009: Minor change "pagingToolbar.insert(12, '-');" for last rev of ExtJS 3.0
    15/06/2009: Added GNU license.
    11/08/2009: Fixed some bugs. Added price: 18€. In a pack with AutoRefresher is offered for 30€. Contact to: galdaka@hotmail.com
    03/11/2009: License changed. Reason: People use your work for comercial purposes without your permission.
    03/11/2009: NEW LICENSE: http://creativecommons.org/licenses/by-nc/3.0/. Thanks to cparker.

    PHP Code:

    /**
     * Ext.ux.grid.PageSizer
     * Copyright (c) 2009-2010, José Alfonso Dacosta Dominguez (galdaka@hotmail.com)
     *
     * Ext.ux.grid.PageSizer is licensed http://creativecommons.org/licenses/by-nc/3.0/ license.
     *
     * Commercial use is prohibited. contact with galdaka@hotmail.com
     * if you need to obtain a commercial license.
     *
     *  Site: www.jadacosta.es
     */
     
    Ext.namespace('Ext.ux.grid');
    Ext.ux.grid.PageSizer Ext.extend(Ext.CycleButton, {
     
    initialSizethis.initialSize || 15,
     
    pageSizesthis.pageSizes || [10152025305075100],
     
    addText' entrada(s) por página',
     
    initComponent: function(){
      var 
    ir=[];
      var 
    at this.addText ;
      var 
    is this.initialSize;
      
    Ext.each(this.pageSizes, function(ps){ir.push({
        
    text' ' ps at
        
    valueps
        
    checkedps==is true false
       
    })
      });
      
    Ext.apply(this, {
       
    showTexttrue,
       
    prependText' ',
       
    forceIconExt.ux.iconMgr.getIcon('/dev/common/icons.nsf/extjs/ux/icons/''table_add_del_rows'),
       
    itemsir
      
    });
     
      
    Ext.ux.grid.PageSizer.superclass.initComponent.apply(thisarguments);
     },
     
    init: function(pagingToolbar) { 
      
    pagingToolbar.on('render'this.onInitViewthis);
     },
     
    onInitView: function(pagingToolbar) {
      
    pagingToolbar.insert(12this);
      
    pagingToolbar.insert(12'-');
      
    this.on('change'this.onPageSizeChangedpagingToolbar);
     },
     
    onPageSizeChanged: function(cycleButton) {
      
    this.pageSize parseInt(cycleButton.getActiveItem().value);
      
    this.doLoad(0);
     }
    });
    if(
    Ext.ux.grid.PageSizer){
     
    Ext.ux.grid.PageSizer.prototype.addText " entrada(s) por página";

    Be careful::


    *) Change Ext.ux.iconMgr.getIcon('/dev/common/icons.nsf/extjs/ux/icons/', 'application_view_list_1') for css class like this:

    PHP Code:
    .myImg01background-imageurl({your-url/application_view_list_1}) !important; }; 
    Greetings,
    Attached Images

  2. #2
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Some changes.

    View also Ext.ux.grid.AutoRefresher : http://extjs.com/forum/showthread.ph...663#post322663

    ToDo: Support for locale.

  3. #3
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    I rewrite entire code for make it flexible.

    1) Now support locale.

    2) Config options:

    initialSize: The initial pageSize that you use in your grids.
    pageSizes: you posibles pageSizes options in an array.

    Greetings,

  4. #4
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Hi people,

    Added capture of funtionallity.

    Greetings,

  5. #5
    Ext User
    Join Date
    Feb 2009
    Posts
    60
    Vote Rating
    0
    wayned@escc is on a distinguished road

      0  

    Default


    Really nice looking plugin. I'm having the following issue

    Code:
    this.doLoad(0); 
    is null or not an object?

    What does this method call reference?

    It's not in the grid, the grids store or anything I can see - am I missing something?



    w://
    --------------------------------------------

    collaborate & fix: http://jsbin.com/
    verify: http://www.jslint.com/
    beutify: http://jsbeautifier.org/

  6. #6
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by wayned@escc View Post
    Really nice looking plugin. I'm having the following issue

    Code:
    this.doLoad(0); 
    is null or not an object?

    What does this method call reference?

    It's not in the grid, the grids store or anything I can see - am I missing something?



    w://
    This plugin is only for grid. This action recharge the data form server.

    Greetings,

  7. #7
    Ext User
    Join Date
    Feb 2009
    Posts
    60
    Vote Rating
    0
    wayned@escc is on a distinguished road

      0  

    Default


    Quote Originally Posted by galdaka View Post
    This plugin is only for grid. This action recharge the data form server.

    Greetings,
    I am using grid?
    --------------------------------------------

    collaborate & fix: http://jsbin.com/
    verify: http://www.jslint.com/
    beutify: http://jsbeautifier.org/

  8. #8
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by wayned@escc View Post
    I am using grid?
    I don´t understand. What is the problem?

    this.doLoad works over PagingToolbar.

    Greetings,

  9. #9

  10. #10
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Is a plugin of bbar. You can try this:

    PHP Code:
    ...
    bbar: new Ext.PagingToolbar({
    storeds,
    pageSize15,
    plugins: [
    new 
    Ext.ux.grid.PageSizer()
    ],
    ... 
    Greetings,

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar