Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    You found a bug! We've classified it as EXTJS-3907 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    61
    Vote Rating
    4
    ap is on a distinguished road

      1  

    Default rowEditing plugin layout problem in Grid autoHeight:true

    rowEditing plugin layout problem in Grid autoHeight:true


    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.0.1
    • Ext 4.0.2
    • Ext 4.0.4

    Browser versions tested against:
    • Chrome 12
    • FF4 (firebug 1.3.0.10 installed)

    Description:
    • If the grid contains just one row, the rowEditing plugin does not seem to trigger any view refresh of the grid to set the proper height. In the case where the grid has a fixed height, at least a scroll bar will appear to navigate to the row editing controls.
      When the grid is set to autoHeight, the grid view is stuck at the original height, no scroll, only tabbing through the fields will bring up the row editing buttons.

      Even if the autoHeight grid has more than one row, the scroll bar does not appear when RowEditor is rendered.

    Steps to reproduce the problem:
    • Create a Grid with RowEditing plugin
    • Set the Grid to have autoHeight

    The result that was expected:
    • Either a scroll bar appears for the grid since the row editor increased the actual element height
    • Or, the Grid should layout correctly(grow) to accommodate the height increase.

    The result that occurs instead:
    • The Grid View does not refresh, no easy way for user to get to the RowEditor controls

    Test Case:

    Code:
        <html>
    <head>
        <title>ExtJs 4 - combobox setValue bug</title>
        <!-- Ext includes -->
        <link rel="stylesheet" type="text/css" href="http://dev.sencha.com/deploy/ext-4.0.0/resources/css/ext-all.css" />
        <script type="text/javascript" src="http://dev.sencha.com/deploy/ext-4.0.0/ext-all-debug.js"></script>
        
    	<script type="text/javascript">
    Ext.Loader.setConfig({
        enabled: true
    });
    
    
    Ext.require([
        'Ext.grid.*',
        'Ext.data.*',
        'Ext.util.*',
        'Ext.state.*',
        'Ext.form.*'
    ]);
    
    Ext.onReady(function(){
        // Define our data model
        Ext.define('Employee', {
            extend: 'Ext.data.Model',
            fields: [
                'name',
                'email',
                { name: 'start', type: 'date', dateFormat: 'n/j/Y' },
                { name: 'salary', type: 'float' },
                { name: 'active', type: 'bool' }
            ]
        });
    
        // Generate mock employee data
        var data = (function() {
            var lasts = ['Jones', 'Smith', 'Lee', 'Wilson', 'Black', 'Williams', 'Lewis', 'Johnson', 'Foot', 'Little', 'Vee', 'Train', 'Hot', 'Mutt'],
                firsts = ['Fred', 'Julie', 'Bill', 'Ted', 'Jack', 'John', 'Mark', 'Mike', 'Chris', 'Bob', 'Travis', 'Kelly', 'Sara'],
                lastLen = lasts.length,
                firstLen = firsts.length,
                usedNames = {},
                data = [],
                s = new Date(2007, 0, 1),
                now = new Date(),
    
                getRandomInt = function(min, max) {
                    return Math.floor(Math.random() * (max - min + 1)) + min;
                },
    
                generateName = function() {
                    var name = firsts[getRandomInt(0, firstLen - 1)] + ' ' + lasts[getRandomInt(0, lastLen - 1)];
                    if (usedNames[name]) {
                        return generateName();
                    }
                    usedNames[name] = true;
                    return name;
                };
    
            //while (s.getTime() < now.getTime()) {
                var ecount = 1;
                for (var i = 0; i < ecount; i++) {
                    var name = generateName();
                    data.push({
                        start : Ext.Date.add(Ext.Date.clearTime(s, true), Ext.Date.DAY, getRandomInt(0, 27)),
                        name : name,
                        email: name.toLowerCase().replace(' ', '.') + '@sencha-test.com',
                        active: getRandomInt(0, 1),
                        salary: Math.floor(getRandomInt(35000, 85000) / 1000) * 1000
                    });
                }
                s = Ext.Date.add(s, Ext.Date.MONTH, 1);
            //}
    
            return data;
        })();
    
        // create the Data Store
        var store = Ext.create('Ext.data.Store', {
            // destroy the store if the grid is destroyed
            autoDestroy: true,
            model: 'Employee',
            proxy: {
                type: 'memory'
            },
            data: data,
            sorters: [{
                property: 'start',
                direction: 'ASC'
            }]
        });
    
        var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
            clicksToMoveEditor: 1,
            autoCancel: false
        });
    
        // create the grid and specify what field you want
        // to use for the editor at each column.
        var grid = Ext.create('Ext.grid.Panel', {
            store: store,
            columns: [{
                header: 'Name',
                dataIndex: 'name',
                flex: 1,
                editor: {
                    // defaults to textfield if no xtype is supplied
                    allowBlank: false
                }
            }, {
                header: 'Email',
                dataIndex: 'email',
                width: 160,
                editor: {
                    allowBlank: false,
                    vtype: 'email'
                }
            }, {
                xtype: 'datecolumn',
                header: 'Start Date',
                dataIndex: 'start',
                width: 90,
                field: {
                    xtype: 'datefield',
                    allowBlank: false,
                    format: 'm/d/Y',
                    minValue: '01/01/2006',
                    minText: 'Cannot have a start date before the company existed!',
                    maxValue: Ext.Date.format(new Date(), 'm/d/Y')
                }
            }, {
                xtype: 'numbercolumn',
                header: 'Salary',
                dataIndex: 'salary',
                format: '$0,0',
                width: 90,
                editor: {
                    xtype: 'numberfield',
                    allowBlank: false,
                    minValue: 1,
                    maxValue: 150000
                }
            }],
            renderTo: Ext.getBody(),
            width: 600,
            //height: 400,
    	autoHeight:true,
            title: 'Employee Salaries',
            frame: true,
            tbar: [{
                text: 'Add Employee',
                iconCls: 'employee-add',
                handler : function() {
                    rowEditing.cancelEdit();
    
                    // Create a record instance through the ModelManager
                    var r = Ext.ModelManager.create({
                        name: 'New Guy',
                        email: 'new@sencha-test.com',
                        start: new Date(),
                        salary: 50000,
                        active: true
                    }, 'Employee');
    
                    store.insert(0, r);
                    rowEditing.startEdit(0, 0);
                }
            }, {
                itemId: 'removeEmployee',
                text: 'Remove Employee',
                iconCls: 'employee-remove',
                handler: function() {
                    var sm = grid.getSelectionModel();
                    rowEditing.cancelEdit();
                    store.remove(sm.getSelection());
                    if (store.getCount() > 0) {
                        sm.select(0);
                    }
                },
                disabled: true
            }],
            plugins: [rowEditing],
            listeners: {
                'selectionchange': function(view, records) {
                    grid.down('#removeEmployee').setDisabled(!records.length);
                }
            }
        });
    });
    	</script>
    </head>
    <body>
        <form id="history-form" class="x-hide-display">
        <input type="hidden" id="x-history-field" />
        <iframe id="x-history-frame"></iframe>
    </form>
    </body>
    </html>


    HELPFUL INFORMATION


    Screenshot or Video:
    • Single row
    • No scrollbar or grid view update
    • 2 rows
    • No scrollbar, editing on the second row. No way to get to the first row



    Debugging already done:
    • none

    Possible fix:
    • not provided

    Additional CSS used:
    • only default ext-all.css
    • custom css (include details)

    Operating System:
    • OSX 10.6.7

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    61
    Vote Rating
    4
    ap is on a distinguished road

      1  

    Default


    Can someone please address this issue?
    If it should be the user's responsibility to take care of the interaction of the plugin with the grid's layout, please at least provide more built-in events in rowEditing plugin.

    The rowEditing plugin is such a step back from the rowEditor ux in 3.x, this is quite frustrating...

    Thanks anyways.

  3. #3
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    311
    Vote Rating
    51
    droessner is a jewel in the rough droessner is a jewel in the rough droessner is a jewel in the rough

      0  

    Default


    I'm running into this same issue. I'm using version 4.0.5. Have you found any viable work-around or solution for this in the meantime?

    If not, what would be the best way to handle this issue until it is fixed? Do I create a function to manually calculate the height of the panel and then call that function on the beforedit, edit, and canceledit events? Or is there a better way to do this?

  4. #4
    Sencha - Services Team
    Join Date
    Aug 2007
    Posts
    98
    Vote Rating
    0
    mdlincoln is on a distinguished road

      0  

    Default


    We have confirmed this issue and created a bug report for it.

  5. #5
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Thanks for the great bug report and sorry for the slow initial response. I've put this one onto the 4.0.7 pile
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  6. #6
    Sencha User
    Join Date
    Nov 2010
    Location
    Ontario, Canada
    Posts
    11
    Vote Rating
    -1
    ngamble is an unknown quantity at this point

      0  

    Default


    I'm having the same problems. Any suggestion for a workaround to this issue?

  7. #7
    Sencha User
    Join Date
    Jul 2010
    Location
    Omsk
    Posts
    1
    Vote Rating
    0
    AndreyLevchenko is on a distinguished road

      0  

    Default


    This patch may help:
    Code:
    Ext.define('Ext.ux.grid.RowEditor', {
        override : 'Ext.grid.RowEditor',
        onHide: function() {
            var me = this,
                grid = me.editingPlugin.grid,
                viewEl = grid.view.el;
            this.callOverridden(arguments);
            if (this.delta) {
    //            restore grid height
                this.changeGridHeight(-this.delta);
            }
            this.delta = undefined;
        },
        changeGridHeight : function(delta){
            var me = this,
                grid = me.editingPlugin.grid,
                viewEl = grid.view.el;
    
    
            viewEl.setHeight(viewEl.getHeight() + delta);
            grid.getEl().setHeight(grid.getEl().getHeight() + delta);
            
        },
        reposition : function() {
    
    
            var me = this,
                context = me.context,
                row = context && Ext.get(context.row),
                grid = me.editingPlugin.grid,
                viewEl = grid.view.el;
    
    
            if (row && Ext.isElement(row.dom)) {
            
                this.delta = me.getHeight() + grid.headerCt.getEl().getHeight() - viewEl.getHeight() + 10 ; //magic 10 is used in overridden method
    
    
                if (this.delta > 0) {
                    this.changeGridHeight(this.delta);
                }
            }
    
    
            this.callOverridden(arguments);
            
        }
    });

  8. #8
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    61
    Vote Rating
    4
    ap is on a distinguished road

      2  

    Default


    Is there any update on this?
    I tested this on 4.1.0. It's still breaking.

  9. #9
    Sencha User
    Join Date
    Jun 2012
    Posts
    16
    Vote Rating
    0
    catalinux1907 is on a distinguished road

      0  

    Default Andrey's override

    Andrey's override


    The patch above wil work if you change this


    viewEl.setHeight(viewEl.getHeight() + delta);
    grid.getEl().setHeight(grid.getEl().getHeight() + delta);in

    viewEl.setHeight(viewEl.getHeight() + delta);
    grid.getEl().setHeight(grid.getEl().getHeight() + delta );
    grid.doComponentLayout();

    and
    this.delta = me.getHeight() + grid.headerCt.getEl().getHeight() - viewEl.getHeight() + 10 ; //magic 10 is used in overridden method


    in
    this.delta = me.getHeight() + grid.headerCt.getEl().getHeight() - viewEl.getHeight() + 76 ; //magic 76 is used in overridden method






    I think the magic with 46 should be changed with the magic of 10 when this.delta is calculated.
    Last edited by catalinux1907; 8 Aug 2012 at 10:24 AM. Reason: a better solution

  10. #10
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    61
    Vote Rating
    4
    ap is on a distinguished road

      0  

    Default


    Thanks

    This line made Andrey's patch work.
    PHP Code:
    grid.doComponentLayout();