亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tabpanel.js

?? ext js demo ext學習資料
?? JS
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Ext JS Library 1.1 RC 1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://www.extjs.com/license
 */

/**
 * @class Ext.TabPanel
 * @extends Ext.util.Observable
 * Creates a lightweight TabPanel component using Yahoo! UI.
 * <br><br>
 * Usage:
 * <pre><code>
<font color="#008000">// basic tabs 1, built from existing content</font>
var tabs = new Ext.TabPanel("tabs1");
tabs.addTab("script", "View Script");
tabs.addTab("markup", "View Markup");
tabs.activate("script");

<font color="#008000">// more advanced tabs, built from javascript</font>
var jtabs = new Ext.TabPanel("jtabs");
jtabs.addTab("jtabs-1", "Normal Tab", "My content was added during construction.");

<font color="#008000">// set up the UpdateManager</font>
var tab2 = jtabs.addTab("jtabs-2", "Ajax Tab 1");
var updater = tab2.getUpdateManager();
updater.setDefaultUrl("ajax1.htm");
tab2.on('activate', updater.refresh, updater, true);

<font color="#008000">// Use setUrl for Ajax loading</font>
var tab3 = jtabs.addTab("jtabs-3", "Ajax Tab 2");
tab3.setUrl("ajax2.htm", null, true);

<font color="#008000">// Disabled tab</font>
var tab4 = jtabs.addTab("tabs1-5", "Disabled Tab", "Can't see me cause I'm disabled");
tab4.disable();

jtabs.activate("jtabs-1");
 * </code></pre>
 * @constructor
 * Create a new TabPanel.
 * @param {String/HTMLElement/Ext.Element} container The id, DOM element or Ext.Element container where this TabPanel is to be rendered. 
 * @param {Object/Boolean} config Config object to set any properties for this TabPanel, or true to render the tabs on the bottom. 
 */
Ext.TabPanel = function(container, config){
    /**
    * The container element for this TabPanel.
    * @type Ext.Element
    */
    this.el = Ext.get(container, true);
    if(config){
        if(typeof config == "boolean"){
            this.tabPosition = config ? "bottom" : "top";
        }else{
            Ext.apply(this, config);
        }
    }
    if(this.tabPosition == "bottom"){
        this.bodyEl = Ext.get(this.createBody(this.el.dom));
        this.el.addClass("x-tabs-bottom");
    }
    this.stripWrap = Ext.get(this.createStrip(this.el.dom), true);
    this.stripEl = Ext.get(this.createStripList(this.stripWrap.dom), true);
    this.stripBody = Ext.get(this.stripWrap.dom.firstChild.firstChild, true);
    if(Ext.isIE){
        Ext.fly(this.stripWrap.dom.firstChild).setStyle("overflow-x", "hidden");
    }
    if(this.tabPosition != "bottom"){
    /** The body element that contains {@link Ext.TabPanelItem} bodies. 
     * @type Ext.Element
     */
      this.bodyEl = Ext.get(this.createBody(this.el.dom));
      this.el.addClass("x-tabs-top");
    }
    this.items = [];
    
    this.bodyEl.setStyle("position", "relative");
    
    this.active = null;
    this.activateDelegate = this.activate.createDelegate(this);
    
    this.addEvents({
        /**
         * @event tabchange
         * Fires when the active tab changes
         * @param {Ext.TabPanel} this
         * @param {Ext.TabPanelItem} activePanel The new active tab
         */
        "tabchange": true,
        /**
         * @event beforetabchange
         * Fires before the active tab changes, set cancel to true on the "e" parameter to cancel the change
         * @param {Ext.TabPanel} this
         * @param {Object} e Set cancel to true on this object to cancel the tab change
         * @param {Ext.TabPanelItem} tab The tab being changed to
         */
        "beforetabchange" : true
    });
    
    Ext.EventManager.onWindowResize(this.onResize, this);
    this.cpad = this.el.getPadding("lr");
    this.hiddenCount = 0;

    Ext.TabPanel.superclass.constructor.call(this);
};

Ext.extend(Ext.TabPanel, Ext.util.Observable, {
    /** The position of the tabs. Can be "top" or "bottom" @type String */
    tabPosition : "top",
    currentTabWidth : 0,
    /** The minimum width of a tab (ignored if {@link #resizeTabs} is not true). @type Number */
    minTabWidth : 40,
    /** The maximum width of a tab (ignored if {@link #resizeTabs} is not true). @type Number */
    maxTabWidth : 250,
    /** The preferred (default) width of a tab (ignored if {@link #resizeTabs} is not true). @type Number */
    preferredTabWidth : 175,
    /** Set this to true to enable dynamic tab resizing. @type Boolean */
    resizeTabs : false,
    /** Set this to true to turn on window resizing monitoring (ignored if {@link #resizeTabs} is not true). @type Boolean */
    monitorResize : true,

    /**
     * Creates a new {@link Ext.TabPanelItem} by looking for an existing element with the provided id -- if it's not found it creates one.
     * @param {String} id The id of the div to use <b>or create</b>
     * @param {String} text The text for the tab
     * @param {String} content (optional) Content to put in the TabPanelItem body
     * @param {Boolean} closable (optional) True to create a close icon on the tab
     * @return {Ext.TabPanelItem} The created TabPanelItem
     */
    addTab : function(id, text, content, closable){
        var item = new Ext.TabPanelItem(this, id, text, closable);
        this.addTabItem(item);
        if(content){
            item.setContent(content);
        }
        return item;
    },
    
    /**
     * Returns the {@link Ext.TabPanelItem} with the specified id/index
     * @param {String/Number} id The id or index of the TabPanelItem to fetch.
     * @return {Ext.TabPanelItem}
     */
    getTab : function(id){
        return this.items[id];
    },
    
    /**
     * Hides the {@link Ext.TabPanelItem} with the specified id/index
     * @param {String/Number} id The id or index of the TabPanelItem to hide.
     */
    hideTab : function(id){
        var t = this.items[id];
        if(!t.isHidden()){
           t.setHidden(true);
           this.hiddenCount++;
           this.autoSizeTabs();
        }
    },
    
    /**
     * "Unhides" the {@link Ext.TabPanelItem} with the specified id/index.
     * @param {String/Number} id The id or index of the TabPanelItem to unhide.
     */
    unhideTab : function(id){
        var t = this.items[id];
        if(t.isHidden()){
           t.setHidden(false);
           this.hiddenCount--;
           this.autoSizeTabs();
        }
    },
    
    /**
     * Adds an existing {@link Ext.TabPanelItem}.
     * @param {Ext.TabPanelItem} item The TabPanelItem to add
     */
    addTabItem : function(item){
        this.items[item.id] = item;
        this.items.push(item);
        if(this.resizeTabs){
           item.setWidth(this.currentTabWidth || this.preferredTabWidth);
           this.autoSizeTabs();
        }else{
            item.autoSize();
        }
    },
        
    /**
     * Removes a {@link Ext.TabPanelItem}.
     * @param {String/Number} id The id or index of the TabPanelItem to remove.
     */
    removeTab : function(id){
        var items = this.items;
        var tab = items[id];
        if(!tab) return;
        var index = items.indexOf(tab);
        if(this.active == tab && items.length > 1){
            var newTab = this.getNextAvailable(index);
            if(newTab)newTab.activate();
        }
        this.stripEl.dom.removeChild(tab.pnode.dom);
        if(tab.bodyEl.dom.parentNode == this.bodyEl.dom){ // if it was moved already prevent error
            this.bodyEl.dom.removeChild(tab.bodyEl.dom);
        }
        items.splice(index, 1);
        delete this.items[tab.id];
        tab.fireEvent("close", tab);
        tab.purgeListeners();
        this.autoSizeTabs();
    },
    
    getNextAvailable : function(start){
        var items = this.items;
        var index = start;
        // look for a next tab that will slide over to
        // replace the one being removed
        while(index < items.length){
            var item = items[++index];
            if(item && !item.isHidden()){
                return item;
            }
        }
        // if one isn't found select the previous tab (on the left)
        index = start;
        while(index >= 0){
            var item = items[--index];
            if(item && !item.isHidden()){
                return item;
            }
        }
        return null;
    },
    
    /**
     * Disables a {@link Ext.TabPanelItem}. It cannot be the active tab, if it is this call is ignored.
     * @param {String/Number} id The id or index of the TabPanelItem to disable.
     */
    disableTab : function(id){
        var tab = this.items[id];
        if(tab && this.active != tab){
            tab.disable();
        }
    },
    
    /**
     * Enables a {@link Ext.TabPanelItem} that is disabled.
     * @param {String/Number} id The id or index of the TabPanelItem to enable.
     */
    enableTab : function(id){
        var tab = this.items[id];
        tab.enable();
    },
    
    /**
     * Activates a {@link Ext.TabPanelItem}. The currently active one will be deactivated. 
     * @param {String/Number} id The id or index of the TabPanelItem to activate.
     * @return {Ext.TabPanelItem} The TabPanelItem.
     */
    activate : function(id){
        var tab = this.items[id];
        if(!tab){
            return null;
        }
        if(tab == this.active || tab.disabled){
            return tab;
        } 
        var e = {};
        this.fireEvent("beforetabchange", this, e, tab);
        if(e.cancel !== true && !tab.disabled){
            if(this.active){
                this.active.hide();
            }
            this.active = this.items[id];
            this.active.show();
            this.fireEvent("tabchange", this, this.active);
        }
        return tab;
    },
    
    /**
     * Gets the active {@link Ext.TabPanelItem}.
     * @return {Ext.TabPanelItem} The active TabPanelItem or null if none are active.
     */
    getActiveTab : function(){
        return this.active;
    },
    
    /**
     * Updates the tab body element to fit the height of the container element
     * for overflow scrolling
     * @param {Number} targetHeight (optional) Override the starting height from the elements height
     */
    syncHeight : function(targetHeight){
        var height = (targetHeight || this.el.getHeight())-this.el.getBorderWidth("tb")-this.el.getPadding("tb");
        var bm = this.bodyEl.getMargins();
        var newHeight = height-(this.stripWrap.getHeight()||0)-(bm.top+bm.bottom);
        this.bodyEl.setHeight(newHeight);
        return newHeight; 
    },
    
    onResize : function(){
        if(this.monitorResize){
            this.autoSizeTabs();
        }
    },

    /**
     * Disables tab resizing while tabs are being added (if {@link #resizeTabs} is false this does nothing)
     */
    beginUpdate : function(){
        this.updating = true;    
    },
    
    /**
     * Stops an update and resizes the tabs (if {@link #resizeTabs} is false this does nothing)
     */
    endUpdate : function(){
        this.updating = false;
        this.autoSizeTabs();  
    },
    
    /**
     * Manual call to resize the tabs (if {@link #resizeTabs} is false this does nothing)
     */
    autoSizeTabs : function(){
        var count = this.items.length;
        var vcount = count - this.hiddenCount;
        if(!this.resizeTabs || count < 1 || vcount < 1 || this.updating) return;
        var w = Math.max(this.el.getWidth() - this.cpad, 10);
        var availWidth = Math.floor(w / vcount);
        var b = this.stripBody;
        if(b.getWidth() > w){
            var tabs = this.items;
            this.setTabWidth(Math.max(availWidth, this.minTabWidth)-2);
            if(availWidth < this.minTabWidth){
                /*if(!this.sleft){    // incomplete scrolling code
                    this.createScrollButtons();
                }
                this.showScroll();
                this.stripClip.setWidth(w - (this.sleft.getWidth()+this.sright.getWidth()));*/
            }
        }else{
            if(this.currentTabWidth < this.preferredTabWidth){
                this.setTabWidth(Math.min(availWidth, this.preferredTabWidth)-2);
            }
        }
    },
    
    /**
     * Returns the number of tabs in this TabPanel.
     * @return {Number}
     */
     getCount : function(){
         return this.items.length;  
     },
    
    /**
     * Resizes all the tabs to the passed width
     * @param {Number} The new width
     */
    setTabWidth : function(width){
        this.currentTabWidth = width;
        for(var i = 0, len = this.items.length; i < len; i++) {
        	if(!this.items[i].isHidden())this.items[i].setWidth(width);
        }
    },
    
    /**
     * Destroys this TabPanel
     * @param {Boolean} removeEl (optional) True to remove the element from the DOM as well (defaults to undefined)
     */
    destroy : function(removeEl){
        Ext.EventManager.removeResizeListener(this.onResize, this);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线精品一区二区| 日韩国产精品大片| www..com久久爱| 国产精品护士白丝一区av| 成人精品国产一区二区4080| 亚洲欧洲www| 在线观看亚洲成人| 麻豆精品在线播放| 国产精品无遮挡| 91片在线免费观看| 日韩黄色一级片| 久久精品视频一区二区三区| 色综合天天视频在线观看| 亚洲aaa精品| 久久亚洲综合av| av一区二区三区四区| 婷婷一区二区三区| 久久久综合精品| 色呦呦日韩精品| 裸体健美xxxx欧美裸体表演| 久久久久久**毛片大全| 在线观看国产日韩| 国产综合久久久久影院| 综合色中文字幕| 精品国内二区三区| 日本韩国精品在线| 国产精品 欧美精品| 亚洲福利电影网| 久久精品视频在线看| 欧美肥妇free| 成人高清视频免费观看| 日本不卡123| 中文字幕亚洲一区二区av在线 | 国产亚洲欧洲一区高清在线观看| 成人精品国产一区二区4080| 偷窥少妇高潮呻吟av久久免费| 国产午夜精品久久久久久免费视| 欧美高清www午色夜在线视频| 国产不卡视频在线播放| 日本美女一区二区| 亚洲色图另类专区| 久久精品人人做| 欧美一区二区三区在线电影| 91在线高清观看| 成人免费视频视频| 精品午夜一区二区三区在线观看| 亚洲综合精品自拍| 成人免费在线视频| 国产午夜精品久久久久久久| 欧美videos大乳护士334| 欧美性大战xxxxx久久久| 成人av综合一区| 国产精品乡下勾搭老头1| 蜜臀国产一区二区三区在线播放 | 日本成人在线一区| 一区二区三区丝袜| 综合av第一页| 中文字幕一区av| 国产精品视频你懂的| 久久久久久久久久久久久久久99 | 欧美体内she精视频| 99久久国产综合精品女不卡| 国产91在线|亚洲| 国产在线视频不卡二| 美女在线一区二区| 久久se精品一区精品二区| 免费观看成人av| 美国十次综合导航| 久久99国产精品尤物| 狠狠久久亚洲欧美| 国内精品久久久久影院一蜜桃| 老司机精品视频在线| 青青青爽久久午夜综合久久午夜| 亚洲国产乱码最新视频| 亚洲18色成人| 人人超碰91尤物精品国产| 日日夜夜免费精品视频| 天堂av在线一区| 日本成人中文字幕| 精品一区免费av| 国产精品一区在线| 粉嫩aⅴ一区二区三区四区| 成人污污视频在线观看| gogo大胆日本视频一区| 色94色欧美sute亚洲13| 欧美精品v国产精品v日韩精品| 欧美日韩国产在线观看| 日韩视频国产视频| 久久美女高清视频| 亚洲欧洲性图库| 亚洲综合激情小说| 日韩专区中文字幕一区二区| 精品无码三级在线观看视频 | 蜜臀精品久久久久久蜜臀| 精品一区二区三区不卡| 成人不卡免费av| 欧美日韩精品一区视频| 精品裸体舞一区二区三区| 亚洲国产成人在线| 亚洲成av人在线观看| 精品午夜久久福利影院 | 国产成人午夜视频| 97精品国产露脸对白| 欧美欧美欧美欧美| 久久精品日韩一区二区三区| 亚洲欧美成aⅴ人在线观看| 午夜亚洲国产au精品一区二区| 欧美精品一区二区久久婷婷| 国产美女一区二区| 亚洲激情av在线| 日韩成人精品在线观看| 精品亚洲国内自在自线福利| 91麻豆.com| 日韩欧美亚洲国产精品字幕久久久 | 国产精品萝li| 亚洲国产va精品久久久不卡综合| 狠狠色丁香久久婷婷综合_中| 9i在线看片成人免费| 日韩亚洲欧美在线| 国产精品欧美极品| 蜜臀久久久99精品久久久久久| 成人毛片视频在线观看| 日韩欧美成人激情| 一区二区三区加勒比av| 国产乱妇无码大片在线观看| 欧美三级资源在线| 综合av第一页| 国产精品一级片在线观看| 欧美日韩日本视频| 中文字幕一区二区三区四区不卡| 另类中文字幕网| 欧美色视频在线| 亚洲女与黑人做爰| 国产成人精品一区二| 日韩欧美一卡二卡| 午夜精品久久久久久久久久久| 成人深夜福利app| 久久久亚洲欧洲日产国码αv| 五月婷婷激情综合| 欧美专区日韩专区| 亚洲色图.com| 成人av在线网站| 国产午夜精品理论片a级大结局 | 国产日产欧产精品推荐色| 日韩精品三区四区| 欧美色视频在线观看| 亚洲黄色在线视频| 成人动漫精品一区二区| 国产区在线观看成人精品| 蜜臀久久99精品久久久久久9| 欧美福利电影网| 亚洲一二三四久久| 91福利国产成人精品照片| 国产精品久久久久毛片软件| 国产精品911| 国产欧美日本一区二区三区| 国产一区二区日韩精品| 精品国产区一区| 国产乱码一区二区三区| 久久蜜臀中文字幕| 国产精品91一区二区| 国产日韩欧美精品综合| 国产成人精品免费网站| 国产视频911| 成人精品亚洲人成在线| 国产精品福利一区| av爱爱亚洲一区| 亚洲欧美aⅴ...| 欧洲另类一二三四区| 午夜精品aaa| 日韩视频在线永久播放| 激情综合色播激情啊| 久久精品综合网| 99久久久久免费精品国产| 专区另类欧美日韩| 色激情天天射综合网| 日韩一区精品视频| 欧美成人精品1314www| 国产精品一级黄| 亚洲欧美日韩中文字幕一区二区三区 | 精品国产免费视频| 成熟亚洲日本毛茸茸凸凹| 国产精品久久久久久妇女6080| 色哟哟精品一区| 婷婷综合在线观看| 久久精品在这里| 91理论电影在线观看| 日日夜夜精品视频天天综合网| 亚洲精品在线观看网站| 粉嫩av一区二区三区| 亚洲国产裸拍裸体视频在线观看乱了 | 91极品视觉盛宴| 美女性感视频久久| 国产丝袜欧美中文另类| 91女厕偷拍女厕偷拍高清| 午夜成人在线视频| 国产日韩三级在线| 欧洲中文字幕精品| 激情久久五月天| 亚洲黄色av一区|