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

📄 main.js

📁 一个ajax富客户端的ajax类库
💻 JS
📖 第 1 页 / 共 5 页
字号:
init = function() {    WebCore.init();    var app = new DemoApp();    var client = new EchoFreeClient(app, document.getElementById("rootArea"));    client.addResourcePath("Echo", "lib/echo/");    client.addResourcePath("Extras", "lib/extras/");    app.setStyleSheet(DemoApp.StyleSheet);    client.init();};/** * EchoApp.Application implementation. * Root namespace. */DemoApp = Core.extend(EchoApp.Application, {    $static: {        pref: {            transitionsEnabled: true,            windowStyleName: "GlassBlue2",            sourceViewerBackground: "#000000",            sourceViewerForeground: "#00ff00"        }    },        _sections: null,        $construct: function() {        EchoApp.Application.call(this);                this._msg = DemoApp.Messages.get(null);        this._sections = [            new DemoApp.Workspace.SectionData(this._msg["SectionTitle.Welcome"], [                new DemoApp.Workspace.ScreenData(                    this._msg["WelcomeScreen.Title"],                     "image/demoicon/WelcomeIcon16.gif",                     "image/demoicon/WelcomeIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.WelcomeScreen())                     },                    "app/WelcomeScreen.js"                )            ]),            new DemoApp.Workspace.SectionData(this._msg["SectionTitle.CoreComponents"], [                new DemoApp.Workspace.ScreenData(                    this._msg["WindowPaneScreen.Title"],                     "image/demoicon/WindowPaneIcon16.gif",                     "image/demoicon/WindowPaneIcon64.gif",                    function(container) {                        container.setContent(new DemoApp.WindowPaneScreen())                     },                    "app/WindowPaneScreen.js"                ),                new DemoApp.Workspace.ScreenData(                    this._msg["SplitPaneScreen.Title"],                     "image/demoicon/SplitPaneIcon16.gif",                     "image/demoicon/SplitPaneIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.SplitPaneScreen())                     },                    "app/SplitPaneScreen.js"                ),                new DemoApp.Workspace.ScreenData(                    this._msg["BasicComponentsScreen.Title"],                     "image/demoicon/BasicComponentsIcon16.gif",                     "image/demoicon/BasicComponentsIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.BasicComponentsScreen())                     },                    "app/BasicComponentsScreen.js"                ),                new DemoApp.Workspace.ScreenData(                    this._msg["LayoutContainersScreen.Title"],                     "image/demoicon/LayoutContainersIcon16.gif",                     "image/demoicon/LayoutContainersIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.LayoutContainersScreen())                     },                    "app/LayoutContainersScreen.js"                )            ]),            new DemoApp.Workspace.SectionData(this._msg["SectionTitle.Technology"], [                new DemoApp.Workspace.ScreenData(                    this._msg["JSDevelopmentScreen.Title"],                     "image/demoicon/JSDevelopmentIcon16.gif",                     "image/demoicon/JSDevelopmentIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.JSDevelopmentScreen())                     },                    "app/JSDevelopmentScreen.js"                ),                new DemoApp.Workspace.ScreenData(                    this._msg["JavaDevelopmentScreen.Title"],                     "image/demoicon/JavaDevelopmentIcon16.gif",                     "image/demoicon/JavaDevelopmentIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.JavaDevelopmentScreen())                     },                    "app/JavaDevelopmentScreen.js"                )            ]),            new DemoApp.Workspace.SectionData(this._msg["SectionTitle.Extras"], [                new DemoApp.Workspace.ScreenData(                    this._msg["AccordionPaneScreen.Title"],                     "image/demoicon/AccordionPaneIcon16.gif",                     "image/demoicon/AccordionPaneIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.AccordionPaneScreen())                     },                    "app/AccordionPaneScreen.js"                ),                new DemoApp.Workspace.ScreenData(                    this._msg["TabPaneScreen.Title"],                     "image/demoicon/TabPaneIcon16.gif",                     "image/demoicon/TabPaneIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.TabPaneScreen())                     },                    "app/TabPaneScreen.js"                ),                new DemoApp.Workspace.ScreenData(                    this._msg["RichTextScreen.Title"],                     "image/demoicon/RichTextIcon16.gif",                     "image/demoicon/RichTextIcon64.gif",                    function(container) {                         container.setContent(new DemoApp.RichTextScreen())                     },                    "app/RichTextScreen.js"                )            ])        ];                var workspace = new DemoApp.Workspace(this._sections);        this.rootComponent.add(workspace);                // Enable the following line to launch a specific screen at startup.        //workspace.setContent(new DemoApp.WindowPaneScreen());    }});/** * Help/About Dialog.  Displays general application information, credits, and copyrights. */DemoApp.AboutDialog = Core.extend(EchoApp.WindowPane, {    _msg: null,        $construct: function() {        this._msg = DemoApp.Messages.get(null);                EchoApp.WindowPane.call(this, {            styleName: DemoApp.pref.windowStyleName,            width: 500,            height: 400,            title: this._msg["About.WindowTitle"],            iconInsets: "6px 10px",            icon: "image/Icon16Info.gif",            modal: true,            closable: true,            events: {                close: function(e) {                    e.source.parent.remove(e.source);                }            },            children: [                new EchoApp.ContentPane({                    backgroundImage: "image/BlueLineBackground.png",                    children: [                        new ExtrasApp.TabPane({                            tabActiveBackground: "#ffffff",                            tabInactiveBackground: "#afafef",                            background: "#ffffff",                            children: [                                new EchoApp.Column({                                    insets: "15px 25px",                                    cellSpacing: 10,                                    layoutData: {                                        title: this._msg["About.GeneralTab"]                                    },                                    children: [                                        new EchoApp.Label({                                            icon: "image/NextApp.png"                                        }),                                        new EchoApp.Label({                                            text: this._msg["About.General1"]                                        }),                                        new DemoApp.HtmlLabel({                                            html: this._msg["About.General2"]                                        }),                                        new DemoApp.HtmlLabel({                                            html: this._msg["About.General3"]                                        })                                    ]                                }),                                new EchoApp.Column({                                    insets: "15px 25px",                                    cellSpacing: 10,                                    layoutData: {                                        title: this._msg["About.PhotographyTab"]                                    },                                    children: [                                        new DemoApp.HtmlLabel({                                            html: this._msg["About.Photography1"]                                        })                                    ]                                })                            ]                        })                    ]                })            ]        });    }});/** * Dialog to configure and launch an automatic demo session. */DemoApp.AutomaticDemoDialog = Core.extend(EchoApp.WindowPane, {    _intervalButtons: null,    _transitionSelect: null,    _transitionSelectLastId: null,    _speedFast: null,    _speedLudicrous: null,    _orderRandom: null,    _msg: null,    _workspace: null,        $construct: function(workspace) {        this._workspace = workspace;        this._msg = DemoApp.Messages.get(null);        var groupSpeedButtons = EchoApp.generateUid();        var groupOrderButtons = EchoApp.generateUid();                EchoApp.WindowPane.call(this, {            styleName: DemoApp.pref.windowStyleName,            modal: true,            width: 500,            height: 400,             title: this._msg["AutomaticDemo.WindowTitle"],            icon: "image/Icon16Play.gif",            iconInsets: "6px 10px",            events: {                close: Core.method(this, this._close)            },            children: [                new EchoApp.SplitPane({                    styleName: "ControlPane.Container.Bottom",                    children: [                        new EchoApp.Row({                            styleName: "ControlPane",                            children: [                                new EchoApp.Button({                                    styleName: "ControlPane.Button",                                    text: this._msg["Generic.Start"],                                    icon: "image/Icon24Play.gif",                                    events: {                                        action: Core.method(this, this._start)                                    }                                }),                                new EchoApp.Button({                                    styleName: "ControlPane.Button",                                    text: this._msg["Generic.Cancel"],                                    icon: "image/Icon24No.gif",                                    events: {                                        action: Core.method(this, this._close)                                    }                                })                            ]                        }),                        new EchoApp.Column({                            insets: "10px 30px",                            cellSpacing: 15,                            children: [                                new EchoApp.Label({                                    text: this._msg["AutomaticDemo.Description"]                                }),                                new EchoApp.Column({                                    styleName: "PreferencesColumn",                                    children: [                                        new EchoApp.Label({                                            styleName: "PreferencesTitle",                                            text: this._msg["AutomaticDemo.SpeedPrompt"]                                        }),                                        new EchoApp.Row({                                            cellSpacing: 40,                                            children: [                                                new EchoApp.RadioButton({                                                    group: groupSpeedButtons,                                                    text: this._msg["AutomaticDemo.SpeedNormal"],                                                    selected: true,                                                    events: {                                                        action: Core.method(this, this._processSpeedChange)                                                    }                                                }),                                                this._speedFast = new EchoApp.RadioButton({                                                    group: groupSpeedButtons,                                                    text: this._msg["AutomaticDemo.SpeedFast"],                                                    events: {                                                        action: Core.method(this, this._processSpeedChange)                                                    }                                                }),                                                this._speedLudicrous = new EchoApp.RadioButton({                                                    group: groupSpeedButtons,                                                    text: this._msg["AutomaticDemo.SpeedLudicrous"],                                                    events: {                                                        action: Core.method(this, this._processSpeedChange)                                                    }                                                })                                            ]                                        })                                    ]                                }),                                new EchoApp.Column({                                    styleName: "PreferencesColumn",                                    children: [                                        new EchoApp.Label({                                            styleName: "PreferencesTitle",                                            text: this._msg["AutomaticDemo.OrderPrompt"]

⌨️ 快捷键说明

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