quicktips.js

来自「EXT2.0的中文API源代码」· JavaScript 代码 · 共 55 行

JS
55
字号
Ext.QuickTips = function(){
    var tip, locks = [];
    return {
        init : function(){
            if(!tip){
                tip = new Ext.QuickTip({elements:'header,body'});
            }
        },

        /**
         * Enable this quick tip.
         */
        enable : function(){
            if(tip){
                locks.pop();
                if(locks.length < 1){
                    tip.enable();
                }
            }
        },

        /**
         * Disable this quick tip.
         */
        disable : function(){
            if(tip){
                tip.disable();
            }
            locks.push(1);
        },

        /**
         * Returns true if the quick tip is enabled, else false.
         */
        isEnabled : function(){
            return tip && !tip.disabled;
        },

        getQuickTip : function(){
            return tip;
        },

        register : function(){
            tip.register.apply(tip, arguments);
        },

        unregister : function(){
            tip.unregister.apply(tip, arguments);
        },

        tips :function(){
            tip.register.apply(tip, arguments);
        }
    }
}();

⌨️ 快捷键说明

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