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

📄 main.js

📁 echo3 很炫的ajax框架技术 js 演示demo ajax j2ee 里面有jsp演示代码
💻 JS
📖 第 1 页 / 共 3 页
字号:
/** * Echo.Application implementation. * Root namespace. */DemoApp = Core.extend(Echo.Application, {    $static: {            /** Required JavaScript module URLs for "About" dialog. */        MODULE_ABOUT: [            "lib/extras/Application.TabPane.js",            "lib/extras/Sync.TabPane.js",            "app/About.js"        ],                /** Required JavaScript module URLs for Automatic demo system. */        MODULE_AUTOMATIC_DEMO: [            "lib/echo/Sync.ToggleButton.js",            "lib/echo/Sync.List.js",            "app/AutomaticDemo.js"        ],            /** Required JavaScript module URLs for source viewer. */        MODULE_SOURCE_VIEW: [            "app/SourceView.js"        ],            /** Required JavaScript module URLs for preferences dialog. */        MODULE_PREFERENCES: [            "lib/echo/Sync.List.js",            "lib/echo/Sync.ToggleButton.js",            "lib/extras/Application.ColorSelect.js",            "lib/extras/Sync.ColorSelect.js",            "app/Preferences.js"        ],            /** Required JavaScript module URLs for WindowPane demo screen. */        MODULE_DEMO_WINDOWPANE: [            "lib/echo/Sync.ToggleButton.js",            "lib/extras/Application.TabPane.js",            "lib/extras/Sync.TabPane.js",            "lib/extras/Application.ColorSelect.js",            "lib/extras/Sync.ColorSelect.js",            "app/WindowPaneScreen.js"        ],                /** Required JavaScript module URLs for SplitPane demo screen. */        MODULE_DEMO_SPLITPANE: [            "app/SplitPaneScreen.js"        ],                /** Required JavaScript module URLs for Basic Components demo screen. */        MODULE_DEMO_BASIC_COMPONENTS: [            "lib/echo/Sync.ToggleButton.js",            "lib/echo/Sync.Grid.js",            "lib/echo/Sync.List.js",            "lib/echo/Sync.TextComponent.js",            "app/BasicComponentsScreen.js"        ],            /** Required JavaScript module URLs for Layout Containers demo screen. */        MODULE_DEMO_LAYOUT_CONTAINERS: [            "lib/echo/Sync.Grid.js",            "app/LayoutContainersScreen.js"        ],                /** Required JavaScript module URLs for JavaScript Development demo screen. */        MODULE_DEMO_JS_DEVELOPMENT: [            "lib/extras/Application.TabPane.js",            "lib/extras/Sync.TabPane.js",            "lib/extras/Application.ToolTipContainer.js",            "lib/extras/Sync.ToolTipContainer.js",            "app/SourceView.js",            "app/JSDevelopmentScreen.js"        ],                /** Required JavaScript module URLs for Java Development demo screen. */        MODULE_DEMO_JAVA_DEVELOPMENT: [            "app/SourceView.js",            "app/JavaDevelopmentScreen.js"        ],                /** Required JavaScript module URLs for AccordionPane demo screen. */        MODULE_DEMO_ACCORDIONPANE: [            "app/AccordionPaneScreen.js"        ],                /** Required JavaScript module URLs for TabPane demo screen. */        MODULE_DEMO_TABPANE: [            "lib/echo/Sync.Grid.js",            "lib/echo/Sync.ToggleButton.js",            "lib/extras/Application.ColorSelect.js",            "lib/extras/Sync.ColorSelect.js",            "lib/extras/Application.TabPane.js",            "lib/extras/Sync.TabPane.js",            "app/TabPaneScreen.js"        ],                /** Required JavaScript module URLs for RichTextArea demo screen. */        MODULE_DEMO_RICHTEXTAREA: [            "lib/echo/Sync.List.js",            "lib/echo/Sync.Grid.js",            "lib/echo/Arc.js",            "lib/echo/Sync.Composite.js",            "lib/echo/Sync.List.js",            "lib/echo/Sync.TextComponent.js",            "lib/extras/Application.ColorSelect.js",            "lib/extras/Sync.ColorSelect.js",            "lib/extras/Application.RichTextArea.js",            "lib/extras/Sync.RichTextArea.js",            "app/RichTextScreen.js"        ],            /** Required JavaScript module URLs for Extras Widgets demo screen. */        MODULE_DEMO_EXTRAS_WIDGETS: [            "lib/echo/Sync.ToggleButton.js",            "lib/extras/Application.CalendarSelect.js",            "lib/extras/Sync.CalendarSelect.js",            "lib/extras/Application.ColorSelect.js",            "lib/extras/Sync.ColorSelect.js",            "lib/extras/Application.Group.js",            "lib/extras/Sync.Group.js",            "lib/extras/Application.BorderPane.js",            "lib/extras/Sync.BorderPane.js",            "lib/extras/Application.ToolTipContainer.js",            "lib/extras/Sync.ToolTipContainer.js",            "app/ExtrasWidgetsScreen.js"        ],                /**         * Set of available locale modules.         */        LOCALE_MODULES: {            "1337": true        },                /**         * User preference information.         */         pref: {                    /**             * Flag indicating whether animated transition effects are enabled.             * @type Boolean             */            transitionsEnabled: true,                        /**             * Default WindowPane style name.             * @type String             */            windowStyleName: "Default",                        /**             * Background color for source code viewer.             * @type {#Color}             */            sourceViewerBackground: "#000000",                        /**             * Foreground color for source code viewer.             * @type {#Color}             */            sourceViewerForeground: "#00ff00"        },                /**         * Retrieves resource map for current (globally configured) locale from resource bundle.         */        getMessages: function() {            return DemoApp.Messages.get(DemoApp.locale);        },                /**         * Global initialization method.  Creates/starts client/application in "rootArea" element of document.         */        init: function() {            Core.Web.init();            if (Echo.DebugConsole) {                Echo.DebugConsole.install();            }            var app = new DemoApp();            var client = new Echo.FreeClient(app, document.getElementById("rootArea"));            client.addResourcePath("Echo", "lib/echo/");            client.addResourcePath("Extras", "lib/extras/");            app.setStyleSheet(DemoApp.StyleSheet);            client.init();        },                /**         * Globally configured locale.         * @type String         */        locale: null    },    /**     * Localized resource map.     */    _msg: null,        /**     * The DemoApp.Workspace being displayed.     * @type DemoApp.Workspace     */    workspace: null,        /** @see Echo.Application#init */    init: function() {        this._msg = DemoApp.getMessages();        var 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",                    DemoApp.MODULE_DEMO_WINDOWPANE,                    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",                    DemoApp.MODULE_DEMO_SPLITPANE,                    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",                    DemoApp.MODULE_DEMO_BASIC_COMPONENTS,                     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",                    DemoApp.MODULE_DEMO_LAYOUT_CONTAINERS,                    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",                    DemoApp.MODULE_DEMO_JS_DEVELOPMENT,                    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",                    DemoApp.MODULE_DEMO_JAVA_DEVELOPMENT,                    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",                    DemoApp.MODULE_DEMO_ACCORDIONPANE,                     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",                    DemoApp.MODULE_DEMO_TABPANE,                    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",                    DemoApp.MODULE_DEMO_RICHTEXTAREA,                    function(container) {                        container.setContent(new DemoApp.RichTextScreen());                    },                    "app/RichTextScreen.js"),                new DemoApp.Workspace.ScreenData(                    this._msg["ExtrasWidgetsScreen.Title"],                     "image/demoicon/WidgetsIcon16.gif",                     "image/demoicon/WidgetsIcon64.gif",                    DemoApp.MODULE_DEMO_EXTRAS_WIDGETS,                     function(container) {                        container.setContent(new DemoApp.ExtrasWidgetsScreen());                    },                    "app/ExtrasWidgetsScreen.js")            ])        ];                this.workspace = new DemoApp.Workspace(sections);        this.rootComponent.add(this.workspace);                // Edit/Enable the following line to launch a specific screen at startup.        //this.workspace.launchScreen(sections[3].screens[2]);    }});/** * Window to provide information about downloading the demo application. */DemoApp.DownloadWindow = Core.extend(Echo.WindowPane, {    /**     * Localized resource map.     */    _msg: null,    /** Creates a new download window. */    $construct: function() {        this._msg = DemoApp.getMessages();        Echo.WindowPane.call(this, {            styleName: DemoApp.pref.windowStyleName,            title: this._msg["DownloadWindow.Title"],            icon:  "image/Icon16Download.gif",            iconInsets: "6px 10px",            insets: 10,            events: {                close: function(e) {                    e.source.parent.remove(e.source);

⌨️ 快捷键说明

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