1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    29
    Vote Rating
    0
    farracha is on a distinguished road

      0  

    Default ExtJS with jquery adapter window.show error

    ExtJS with jquery adapter window.show error


    Hi,

    I'm using Ext 3.0 and jquery 1.3.2 together and I have found a problem on window.show().

    The error is "R[S == "toggle" ? L ? "show" : "hide" : S] is not a function" in the jquery.1.3.2-min.js file.

    My Javascript files are declared in the following order:
    1- jquery-1.3.2.min.js
    2- ext-jquery-adapter.js
    3- ext-all.cs
    4- myjs.js

    The code snippet:
    Code:
    if (_mapOverview.isVisible() == false) {
                _mapOverview.setPosition(screen.width - 235, 60);
                Ext.get("overviewDiv").setVisible(true);
                _mapOverview.setAnimateTarget(Ext.get("hNavOverview"));
                _mapOverview.show();
             }
             else {
                _mapOverview.hide();
             }
    any help?

  2. #2
    Ext User chalda's Avatar
    Join Date
    Aug 2009
    Location
    Dolomiten, Italy
    Posts
    9
    Vote Rating
    0
    chalda is on a distinguished road

      0  

    Default


    Uff... I get the same error when I try to drag an object outside the target.
    Any help?

    Case example:

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
        <title>Drag 'n' drop problem with jquery</title>
    
        <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
        <script type="text/javascript" src="ext/adapter/jquery/jquery.js"></script>
        <script type="text/javascript" src="ext/adapter/jquery/jquery-plugins.js"></script>
        <script type="text/javascript" src="ext/adapter/jquery/ext-jquery-adapter.js"></script>
        <script type="text/javascript" src="ext/ext-all.js"></script>
        <script type="text/javascript">
            
            Ext.onReady(function() {
                var tree = new Ext.tree.TreePanel({
                    root:{text:'root', id:'root', expanded:true, children:[
                        {text:'Child 1',data:'Child 1 additional data',children:[
                            {text:'Child 1 Subchild 1', data:'Some additional data of Child 1 Subchild 1', leaf:true},
                            {text:'Child 1 Subchild 2',data:'Some additional data of Child 1 Subchild 2',leaf:true}
                        ]},
                        {text:'Child 2',leaf:true,data:'Last but not least. Data of Child 2'}
                    ]},
                    loader:new Ext.tree.TreeLoader({preloadChildren:true}),
                    enableDrag:true,
                    ddGroup:'t2div',
                    region:'west',
                    title:'Tree',
                    layout:'fit',
                    width:200,
                    split:true,
                    collapsible:true,
                    autoScroll:true,
                    listeners:{
                        startdrag:function() {
                            var t = Ext.getCmp('target').body.child('div.drop-target');
                            if(t) {
                                t.applyStyles({'background-color':'#f0f0f0'});
                            }
                        },
                        enddrag:function() {
                            var t = Ext.getCmp('target').body.child('div.drop-target');
                            if(t) {
                                t.applyStyles({'background-color':'white'});
                            }
                        }
                    }
                });
    
            var target = new Ext.Panel({
                region:'center',
                layout:'fit',
                id:'target',
                bodyStyle:'font-size:13px',
                title:'Drop Target',
                html:'<div class="drop-target" '
                    +'style="border:1px silver solid;margin:20px;padding:8px;height:140px">'
                    +'If you dopn\'t drop node here you get an error!!!!</div>',
                afterRender:function() {
                    Ext.Panel.prototype.afterRender.apply(this, arguments);
                    this.dropTarget = this.body.child('div.drop-target');
                    var dd = new Ext.dd.DropTarget(this.dropTarget, {
                        ddGroup:'t2div',
                        notifyDrop:function(dd, e, node) {
                            var msg = '<i>You have dropped node:</i><br><br><table style="font-size:13px">';
                            msg += '<tr><td>id:</td><td><b>' + node.node.id + '</b></td></tr>'
                            msg += '<tr><td>text:</td><td><b>' + node.node.text + '</b></td></tr>';
                            msg += '<tr><td>leaf:</td><td><b>' + node.node.leaf + '</b></td></tr>';
                            msg += '<tr><td>data:</td><td><b>' + node.node.attributes.data + '</b></td></tr>';
                            msg += '</table>'
                            Ext.getCmp('target').body.child('div.drop-target').update(msg)
                            return true;
                        }
                    });
                }
            });
    
    
    
            var win = new Ext.Window({
                title: 'Drag & drop problem with jquery',
                id:'tree2divdrag',
                border:false,
                layout:'border',
                width:600,
                height:400,
                renderTo:Ext.getBody(),
                items:[tree, target]
            });
            win.show();
    
        });
    
        </script>
    
    
    </head>
    <body>
    </body>
    </html>
    ( example code from http://examples.extjs.eu )

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    It's a known bug (not yet fixed).

    You can find a patch here.

  4. #4
    Ext User chalda's Avatar
    Join Date
    Aug 2009
    Location
    Dolomiten, Italy
    Posts
    9
    Vote Rating
    0
    chalda is on a distinguished road

      0  

    Default


    Thanks!

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    I like your avatar! I spent countless hours trying to stop purple tentacle from taking over the world...

  6. #6
    Ext User chalda's Avatar
    Join Date
    Aug 2009
    Location
    Dolomiten, Italy
    Posts
    9
    Vote Rating
    0
    chalda is on a distinguished road

      0  

    Default


    OT
    Ahah
    My next step will be to put my favorite shirt (with purple tentacle) in the avatar
    "I like your avatar! I spent countless hours trying to stop purple tentacle from taking over the world..."
    by Condor

Thread Participants: 2