1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    32
    Vote Rating
    0
    Alidad is on a distinguished road

      0  

    Default Expand dialog animation

    Expand dialog animation


    Hi, I have create hello world dialog part of sample code from jack, and I'm trying to create expland animation to resize to make wider.

    They are two tab there, and i put expland animation code in second tab, part of this i'm confused of how i can create button to expland. please see code in BOLD, dose anyone can help me how i can create button to link that funtion to expland it!

    ----------------
    <script type="text/javascript">
    var HelloWorld = function(){
    var dialog, showBtn;
    return {
    init : function(){
    showBtn = getEl('show-dialog-btn');
    // attach to click event
    showBtn.on('click', this.showDialog, this, true);
    },

    showDialog : function(){
    if(!dialog){ // lazy initialize the dialog and only create it once
    dialog = new YAHOO.ext.BasicDialog("hello-dlg", {
    //modal:true,
    resizable:false,
    autoTabs:true,
    modal:true,
    draggable:false,
    width:420,
    height:300,
    shadow:true,
    minWidth:300,
    minHeight:250,
    proxyDrag: true

    });

    }


    dialog.show(showBtn.dom);
    // dialog.getTabs('jtabs');
    if(!dialog.getTabs().getTab('jtabs-1'))
    {
    var tabs = dialog.getTabs();
    tabs.addTab('jtabs-1', "First Tab");

    var tab2 = tabs.addTab('jtabs-2', "Tab 2");
    var updater = tab2.getUpdateManager();


    Code:
    	isc.IButton.create({
                                    title:"Expand",
                                    click:"ajaxDefinition.animateResize(310,195);"
                                    })
    
             isc.IButton.create({
                                     title:"Collapse", left:120,
                                     click:"ajaxDefinition.animateResize(75,45);"
                                      })
    tab2.onActivate.subscribe(updater.refresh, updater, true);

    }
    }
    };
    }();

    YAHOO.ext.EventManager.onDocumentReady(HelloWorld.init, HelloWorld, true);
    </script>

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    209
    Vote Rating
    0
    Bobafart is on a distinguished road

      0  

    Default


    I don't think you meant to paste your code the way you did-- your UBB bold tags screwed up the way you pasted your code I believe.


    Barring that I fail to see where you defined isc

    perhaps some of your code is missing

    do you define isc anywhere?

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    You want to know how to create a button??

    Wouldn't you just have

    Code:
    <button type="button" id="show-dialog-btn">Open Dialog</button>
    :?: :?: :?: :?: :?: :?:

    Or in fact

    Code:
    <any-html-element id="show-dialog-btn">Open Dialog</any-html-element>
    :!: :!:

Similar Threads

  1. Expand Grid Lines to Detail More
    By domluc in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 27 Mar 2007, 11:03 AM
  2. async treenode expand/load bug
    By seldon in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 14 Feb 2007, 1:31 PM
  3. Expand Resizeable-Reloaded beyond containing DIV in IE
    By uofmpike in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 17 Jan 2007, 7:11 AM
  4. expand dialog
    By Alidad in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 5 Jan 2007, 7:23 PM
  5. Dialog not draggable after animation
    By mambo in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 25 Oct 2006, 4:06 PM

Thread Participants: 2