We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2292
    • 2 Posts
    I’ve read http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution% 2C + Part + II and to panel.home.js running smoothly but also to the grid does not appear , is there anything less than this tutorial?
      • 33968
      • 863 Posts
      I’ve followed that one and didn’t have any problems with it.

      Paste your doodles.grid.js file here and we might be able to help.
      Also check you are loading it correctly in controllers/mgr/index.php
        • 2292
        • 2 Posts
        this my supports.grid.js just like doodles.grid.js

        Supports.grid.Supports = function(config) {
        config = config || {};
        Ext.applyIf(config,{
        id: ’supports-grid-supports’
        ,url: Supports.config.connectorUrl
        ,baseParams: { action: ’mgr/supports/getList’ }
        ,fields: [’id’,’name’,’description’,’menu’]
        ,paging: true
        ,remoteSort: true
        ,anchor: ’97%’
        ,autoExpandColumn: ’name’
        ,columns: [{
        header: _(’id’)
        ,dataIndex: ’id’
        ,sortable: true
        ,width: 60
        },{
        header: _(’supports.name’)
        ,dataIndex: ’name’
        ,sortable: true
        ,width: 100
        ,editor: { xtype: ’textfield’ }
        },{
        header: _(’supports.description’)
        ,dataIndex: ’description’
        ,sortable: false
        ,width: 350
        ,editor: { xtype: ’textfield’ }
        }]
        });
        Supports.grid.Supports.superclass.constructor.call(this,config)
        };
        Ext.extend(Supports.grid.Supports,MODx.grid.Grid);
        Ext.reg(’supports-grid-supports’,Supports.grid.Supports);

        and this my mgr/index.php
        $modx->regClientStartupScript($doodles->config[’jsUrl’].’mgr/widgets/supports.grid.js’);
        $modx->regClientStartupScript($supports->config[’jsUrl’].’mgr/widgets/home.panel.js’);
        $modx->regClientStartupScript($supports->config[’jsUrl’].’mgr/sections/index.js’);

        return ’<div id="supports-panel-home-div"></div>’;

        any wrong with my code?
          • 33968
          • 863 Posts
          This line:
          $modx->regClientStartupScript($doodles->config['jsUrl'].'mgr/widgets/supports.grid.js');
          


          Change $doodles to $supports
            • 2292
            • 2 Posts
            yep i have change it but still not showed , any idea? sad
              • 33968
              • 863 Posts
              Want to post your home.panel.js too?
                • 2292
                • 2 Posts
                this my home.panel.js

                Supports.panel.Home = function(config) {
                config = config || {};
                Ext.apply(config,{
                border: false
                ,baseCls: ’modx-formpanel’
                ,items: [{
                html: ’<h2>’+_(’supports.management’)+’</h2>’
                ,border: false
                ,cls: ’modx-page-header’
                },{
                xtype: ’modx-tabs’
                ,bodyStyle: ’padding: 10px’
                ,defaults: { border: false ,autoHeight: true }
                ,border: true
                ,items: [{
                title: _(’supports’)
                ,defaults: { autoHeight: true }
                [{
                html: ’<p>’+_(’supports.management_desc’)+’</p>
                ’
                ,border: false
                },{
                xtype: ’supports-grid-supports’
                ,preventRender: true
                }]
                }]
                }]
                });
                Supports.panel.Home.superclass.constructor.call(this,config);
                };
                Ext.extend(Supports.panel.Home,MODx.Panel);
                Ext.reg(’supports-panel-home’,Supports.panel.Home);

                any wrong here?
                  • 33968
                  • 863 Posts
                  Sorry man, I couldn’t see anything wrong in there either. Maybe check for typos in your file names? Try running it through Firebug and seeing if you get any debug errors.

                  I don’t know about others on here, but I’ve been looking at ExtJs all day and it makes my eyes bleed rolleyes
                    • 2292
                    • 2 Posts
                    yeah thank you for your attention, yeah me too so difficult just to create a grid, hmmm i think better if thats use jquery i think.....ill check it on firebug smiley
                      • 33968
                      • 863 Posts
                      It’s worth persevering a little as there are some great features like sorting, grouping, right-click menus, etc that work almost out of the box. You’ve probably just got a little syntax error in there or have named something incorrectly. Sleep on it and have a look in the morning, usually works for me smiley