PRO.UI/resources/examples.js

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * Ext JS Library 2.2
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

Ext.example = function () {
    var msgCt,
        createBox = function (t, s) {
            return ['<div class="msg">',
                    '<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',
                    '<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>',
                    '<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',
                    '</div>'].join('');
        };

    return {
        msg : function (title, format) {
            if (!msgCt) {
                msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);
            }

            msgCt.alignTo(document, 't-t');
            
            var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
            var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
            
            m.slideIn('t').pause(1).ghost("t", {remove:true});
        },

        init : function () {
            var t = Ext.get('exttheme');

            if (!t) { // run locally?
                return;
            }
            
            var theme = Cookies.get('exttheme') || 'aero';

            if (theme) {
                t.dom.value = theme;
                Ext.getBody().addClass('x-'+theme);
            }
            
            t.on('change', function () {
                Cookies.set('exttheme', t.getValue());
                setTimeout(function () {
                    window.location.reload();
                }, 250);
            });

            var lb = Ext.get('lib-bar');

            if (lb) {
                lb.show();
            }
        }
    };
后面还有 64 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。