⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 container_core-debug.js

📁 国外的人才求职招聘最新版
💻 JS
📖 第 1 页 / 共 5 页
字号:
    /**    * Constant representing the module header    * @property YAHOO.widget.Module.CSS_HEADER    * @static    * @final    * @type String    */    Module.CSS_HEADER = "hd";        /**    * Constant representing the module body    * @property YAHOO.widget.Module.CSS_BODY    * @static    * @final    * @type String    */    Module.CSS_BODY = "bd";        /**    * Constant representing the module footer    * @property YAHOO.widget.Module.CSS_FOOTER    * @static    * @final    * @type String    */    Module.CSS_FOOTER = "ft";        /**    * Constant representing the url for the "src" attribute of the iframe     * used to monitor changes to the browser's base font size    * @property YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL    * @static    * @final    * @type String    */    Module.RESIZE_MONITOR_SECURE_URL = "javascript:false;";        /**    * Singleton CustomEvent fired when the font size is changed in the browser.    * Opera's "zoom" functionality currently does not support text     * size detection.    * @event YAHOO.widget.Module.textResizeEvent    */    Module.textResizeEvent = new CustomEvent("textResize");    function createModuleTemplate() {        if (!m_oModuleTemplate) {            m_oModuleTemplate = document.createElement("div");                        m_oModuleTemplate.innerHTML = ("<div class=\"" +                 Module.CSS_HEADER + "\"></div>" + "<div class=\"" +                 Module.CSS_BODY + "\"></div><div class=\"" +                 Module.CSS_FOOTER + "\"></div>");            m_oHeaderTemplate = m_oModuleTemplate.firstChild;            m_oBodyTemplate = m_oHeaderTemplate.nextSibling;            m_oFooterTemplate = m_oBodyTemplate.nextSibling;        }        return m_oModuleTemplate;    }    function createHeader() {        if (!m_oHeaderTemplate) {                    createModuleTemplate();                }                return (m_oHeaderTemplate.cloneNode(false));    }        function createBody() {        if (!m_oBodyTemplate) {                    createModuleTemplate();                }                return (m_oBodyTemplate.cloneNode(false));        }        function createFooter() {        if (!m_oFooterTemplate) {                    createModuleTemplate();                }                return (m_oFooterTemplate.cloneNode(false));    }        Module.prototype = {            /**        * The class's constructor function        * @property contructor        * @type Function        */        constructor: Module,                /**        * The main module element that contains the header, body, and footer        * @property element        * @type HTMLElement        */        element: null,                /**        * The header element, denoted with CSS class "hd"        * @property header        * @type HTMLElement        */        header: null,                /**        * The body element, denoted with CSS class "bd"        * @property body        * @type HTMLElement        */        body: null,                /**        * The footer element, denoted with CSS class "ft"        * @property footer        * @type HTMLElement        */        footer: null,                /**        * The id of the element        * @property id        * @type String        */        id: null,                /**        * A string representing the root path for all images created by        * a Module instance.        * @deprecated It is recommend that any images for a Module be applied        * via CSS using the "background-image" property.        * @property imageRoot        * @type String        */        imageRoot: Module.IMG_ROOT,            /**        * Initializes the custom events for Module which are fired         * automatically at appropriate times by the Module class.        * @method initEvents        */        initEvents: function () {                    var SIGNATURE = CustomEvent.LIST;                    /**            * CustomEvent fired prior to class initalization.            * @event beforeInitEvent            * @param {class} classRef class reference of the initializing             * class, such as this.beforeInitEvent.fire(Module)            */            this.beforeInitEvent = this.createEvent(EVENT_TYPES.BEFORE_INIT);            this.beforeInitEvent.signature = SIGNATURE;                    /**            * CustomEvent fired after class initalization.            * @event initEvent            * @param {class} classRef class reference of the initializing             * class, such as this.beforeInitEvent.fire(Module)            */              this.initEvent = this.createEvent(EVENT_TYPES.INIT);            this.initEvent.signature = SIGNATURE;                    /**            * CustomEvent fired when the Module is appended to the DOM            * @event appendEvent            */            this.appendEvent = this.createEvent(EVENT_TYPES.APPEND);            this.appendEvent.signature = SIGNATURE;                    /**            * CustomEvent fired before the Module is rendered            * @event beforeRenderEvent            */            this.beforeRenderEvent =                 this.createEvent(EVENT_TYPES.BEFORE_RENDER);            this.beforeRenderEvent.signature = SIGNATURE;                    /**            * CustomEvent fired after the Module is rendered            * @event renderEvent            */            this.renderEvent = this.createEvent(EVENT_TYPES.RENDER);            this.renderEvent.signature = SIGNATURE;                    /**            * CustomEvent fired when the header content of the Module             * is modified            * @event changeHeaderEvent            * @param {String/HTMLElement} content String/element representing             * the new header content            */            this.changeHeaderEvent =                 this.createEvent(EVENT_TYPES.CHANGE_HEADER);            this.changeHeaderEvent.signature = SIGNATURE;                        /**            * CustomEvent fired when the body content of the Module is modified            * @event changeBodyEvent            * @param {String/HTMLElement} content String/element representing             * the new body content            */              this.changeBodyEvent = this.createEvent(EVENT_TYPES.CHANGE_BODY);            this.changeBodyEvent.signature = SIGNATURE;                        /**            * CustomEvent fired when the footer content of the Module             * is modified            * @event changeFooterEvent            * @param {String/HTMLElement} content String/element representing             * the new footer content            */            this.changeFooterEvent =                 this.createEvent(EVENT_TYPES.CHANGE_FOOTER);            this.changeFooterEvent.signature = SIGNATURE;                    /**            * CustomEvent fired when the content of the Module is modified            * @event changeContentEvent            */            this.changeContentEvent =                 this.createEvent(EVENT_TYPES.CHANGE_CONTENT);            this.changeContentEvent.signature = SIGNATURE;                    /**            * CustomEvent fired when the Module is destroyed            * @event destroyEvent            */            this.destroyEvent = this.createEvent(EVENT_TYPES.DESTORY);            this.destroyEvent.signature = SIGNATURE;                        /**            * CustomEvent fired before the Module is shown            * @event beforeShowEvent            */            this.beforeShowEvent = this.createEvent(EVENT_TYPES.BEFORE_SHOW);            this.beforeShowEvent.signature = SIGNATURE;                    /**            * CustomEvent fired after the Module is shown            * @event showEvent            */            this.showEvent = this.createEvent(EVENT_TYPES.SHOW);            this.showEvent.signature = SIGNATURE;                    /**            * CustomEvent fired before the Module is hidden            * @event beforeHideEvent            */            this.beforeHideEvent = this.createEvent(EVENT_TYPES.BEFORE_HIDE);            this.beforeHideEvent.signature = SIGNATURE;                    /**            * CustomEvent fired after the Module is hidden            * @event hideEvent            */            this.hideEvent = this.createEvent(EVENT_TYPES.HIDE);            this.hideEvent.signature = SIGNATURE;        },                 /**        * String representing the current user-agent platform        * @property platform        * @type String        */        platform: function () {                    var ua = navigator.userAgent.toLowerCase();                    if (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1) {                        return "windows";                    } else if (ua.indexOf("macintosh") != -1) {                        return "mac";                    } else {                        return false;                    }                }(),                /**        * String representing the user-agent of the browser        * @deprecated Use YAHOO.env.ua        * @property browser        * @type String        */        browser: function () {                    var ua = navigator.userAgent.toLowerCase();                        /*                 Check Opera first in case of spoof and check Safari before                 Gecko since Safari's user agent string includes "like Gecko"            */            if (ua.indexOf('opera') != -1) {                             return 'opera';                        } else if (ua.indexOf('msie 7') != -1) {                            return 'ie7';                        } else if (ua.indexOf('msie') != -1) {                            return 'ie';                        } else if (ua.indexOf('safari') != -1) {                             return 'safari';                        } else if (ua.indexOf('gecko') != -1) {                            return 'gecko';                        } else {                            return false;                        }                }(),                /**        * Boolean representing whether or not the current browsing context is         * secure (https)        * @property isSecure        * @type Boolean        */        isSecure: function () {                    if (window.location.href.toLowerCase().indexOf("https") === 0) {                        return true;                    } else {                        return false;                    }                }(),                /**        * Initializes the custom events for Module which are fired         * automatically at appropriate times by the Module class.        */        initDefaultConfig: function () {                // Add properties //                    /**            * Specifies whether the Module is visible on the page.            * @config visible            * @type Boolean            * @default true            */            this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key, {                handler: this.configVisible,                 value: DEFAULT_CONFIG.VISIBLE.value,                 validator: DEFAULT_CONFIG.VISIBLE.validator            });                        /**            * Object or array of objects representing the ContainerEffect             * classes that are active for animating the container.            * @config effect            * @type Object            * @default null            */            this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key, {                suppressEvent: DEFAULT_CONFIG.EFFECT.suppressEvent,                 supercedes: DEFAULT_CONFIG.EFFECT.supercedes            });                        /**            * Specifies whether to create a special proxy iframe to monitor             * for user font resizing in the document            * @config monitorresize            * @type Boolean            * @default true            */            this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key, {                handler: this.configMonitorResize,                value: DEFAULT_CONFIG.MONITOR_RESIZE.value            });                    },                /**        * The Module class's initialization method, which is executed for        * Module and all of its subclasses. This method is automatically         * called by the constructor, and  sets up all DOM references for         * pre-existing markup, and creates required markup if it is not         * already present.        * @method init        * @param {String} el The element ID representing the Module <em>OR</em>        * @param {HTMLElement} el The element representing the Module        * @param {Object} userConfig The configuration Object literal         * containing the configuration that should be set for this module.         * See configuration documentation for more details.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -