1. #1
    Ext JS Premium Member stever's Avatar
    Join Date
    Mar 2007
    Posts
    1,407
    Vote Rating
    6
    stever will become famous soon enough stever will become famous soon enough

      0  

    Default BasicDialog

    BasicDialog


    Since there is no BasicDialog in Ext2, I started by using this while updating our code. It is barebones at the moment, but hopefully someone else can help fill it in...

    Code:
    Ext.BasicDialogTabs = Ext.extend(Ext.TabPanel,{
    	defaults:{bodyStyle:'padding:18px;'},
    	
    	readTabs : function(removeExisting)
    	{
    	    if(removeExisting === true){
    	        this.items.each(function(item){
    	            this.remove(item);
    	        }, this);
    	    }
    	    var tabs = this.el.query(this.autoTabSelector);
    	    for(var i = 0, len = tabs.length; i < len; i++){
    	        var tab = tabs[i];
    	        var title = tab.getAttribute('title');
    	        tab.removeAttribute('title');
    	        var id = tab.getAttribute('id')+'_tab';
    	        this.add({
    	        	id: id,
    	            title: title,
    	            contentEl: tab
    	        });
    	    }
    	},
    	hideTab: function(id)
    	{
    		this.hideTabStripItem(id+'_tab');
    	},
    	unhideTab: function(id)
    	{
    		this.unhideTabStripItem(id+'_tab');
    	},
    	enableTab: function(id)
    	{
    		this.getTab(id).disable(false);
    	},
    	disableTab: function(id)
    	{
    		this.getTab(id).disable();
    	},
    	activateTab: function(id)
    	{
    		this.setActiveTab(id+'_tab');
    	},
    	getTab:function(id)
    	{
    		return this.items.get(id+'_tab');
    	}
    	
    });
    
    Ext.BasicDialog = Ext.extend(Ext.Window,{
    	closeAction: 'hide',
    	hideBorders: true,
    	bodyStyle:'padding-top:10px',
    	initComponent : function()
    	{
    		if (this.autoTabs)
    		{
    			this.tabs=new Ext.BasicDialogTabs({
    				deferredRender: false,
    				autoTabs:	this.autoTabs,
    				activeTab:0,
    				el:this.tabsEl
    			});
    			this.items=[this.tabs];
    			this.layout='fit';
    		}
    		Ext.BasicDialog.superclass.initComponent.call(this);
    	},
    	
    	getTabs:function()
    	{
    		return this.tabs;
    	},
    	getTab:function(id)
    	{
    		return this.tabs.getTab(id);
    	}
    });

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Thanks Steve. That will be really useful for many people who are upgrading!
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    19
    Vote Rating
    0
    litumishra is on a distinguished road

      0  

    Default


    Can you give any example, how to use this? I am new to Extjs.

    Thanks

  4. #4
    Ext JS Premium Member stever's Avatar
    Join Date
    Mar 2007
    Posts
    1,407
    Vote Rating
    6
    stever will become famous soon enough stever will become famous soon enough

      0  

    Default


    Quote Originally Posted by litumishra View Post
    Can you give any example, how to use this? I am new to Extjs.

    Thanks
    It is not for you then. It is a class to help people port from Ext 1.x to Ext 2.x

Thread Participants: 2

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