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

📄 preferences.js

📁 echo3 很炫的ajax框架技术 js 演示demo ajax j2ee 里面有jsp演示代码
💻 JS
字号:
/** * Dialog for editing user application preferences. */DemoApp.PreferencesDialog = Core.extend(Echo.WindowPane, {    _transitionsEnabled: null,    _sourceViewerForeground: null,    _sourceViewerBackground: null,    _windowStyleNameSelect: null,        $construct: function() {        this._msg = DemoApp.getMessages();        var groupAnimatedScreenTransitions = Echo.Application.generateUid();                    Echo.WindowPane.call(this, {            styleName: DemoApp.pref.windowStyleName,            modal: true,            width: "40em",            height: "30em",             title: this._msg["PrefDialog.WindowTitle"],            icon: "image/Icon16Preferences.gif",            iconInsets: "6px 10px",            events: {                close: Core.method(this, this._close)            },            children: [                new Echo.SplitPane({                    autoPositioned: true,                    orientation: Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP,                    children: [                        new Echo.Row({                            styleName: "ControlPane",                            children: [                                new Echo.Button({                                    styleName: "ControlPane.Button",                                    text: this._msg["Generic.Ok"],                                    icon: "image/Icon24Yes.gif",                                    events: {                                        action: Core.method(this, this._apply)                                    }                                }),                                new Echo.Button({                                    styleName: "ControlPane.Button",                                    text: this._msg["Generic.Cancel"],                                    icon: "image/Icon24No.gif",                                    events: {                                        action: Core.method(this, this._close)                                    }                                })                            ]                        }),                        new Echo.Column({                            insets: "10px 30px",                            cellSpacing: 15,                            children: [                                new Echo.Column({                                    styleName: "PreferencesColumn",                                    children: [                                        new Echo.Label({                                            styleName: "PreferencesTitle",                                            text: this._msg["PrefDialog.PromptAnimations"]                                        }),                                        new Echo.Row({                                            cellSpacing: 40,                                            children: [                                                this._transitionsEnabled = new Echo.RadioButton({                                                    group: groupAnimatedScreenTransitions,                                                    text: this._msg["Generic.Enabled"],                                                    selected: DemoApp.pref.transitionsEnabled                                                }),                                                new Echo.RadioButton({                                                    group: groupAnimatedScreenTransitions,                                                    text: this._msg["Generic.Disabled"],                                                    selected: !DemoApp.pref.transitionsEnabled                                                })                                            ]                                        })                                    ]                                }),                                new Echo.Column({                                    styleName: "PreferencesColumn",                                    children: [                                        new Echo.Label({                                            styleName: "PreferencesTitle",                                            text: this._msg["PrefDialog.PromptWindowAppearance"]                                        }),                                        this._windowStyleNameSelect = new Echo.SelectField({                                            items: [                                                { id: "Default", text: this._msg["PrefDialog.WindowStyle.BlueShadow"] },                                                { id: "GlassBlue2", text: this._msg["PrefDialog.WindowStyle.GlassBlueDark"] },                                                { id: "GlassBlue", text: this._msg["PrefDialog.WindowStyle.GlassBlueLight"] },                                                { id: "TransGreen", text: this._msg["PrefDialog.WindowStyle.TransGreen"] },                                                { id: "None", text: this._msg["PrefDialog.WindowStyle.Default"] }                                            ],                                            selectedId: DemoApp.pref.windowStyleName == null ? "None" : DemoApp.pref.windowStyleName                                        })                                    ]                                }),                                new Echo.Column({                                    styleName: "PreferencesColumn",                                    children: [                                        new Echo.Label({                                            styleName: "PreferencesTitle",                                            text: this._msg["PrefDialog.PromptSourceViewerColors"]                                        }),                                        new Echo.Row({                                            cellSpacing: 40,                                            children: [                                                new Echo.Row({                                                    cellSpacing: 10,                                                    children: [                                                        new Echo.Label({                                                            text: this._msg["PrefDialog.PromptForeground"]                                                        }),                                                        this._sourceViewerForeground = new DemoApp.ColorSelectButton(                                                                DemoApp.pref.sourceViewerForeground)                                                    ]                                                }),                                                new Echo.Row({                                                    cellSpacing: 10,                                                    children: [                                                        new Echo.Label({                                                            text: this._msg["PrefDialog.PromptBackground"]                                                        }),                                                        this._sourceViewerBackground = new DemoApp.ColorSelectButton(                                                                DemoApp.pref.sourceViewerBackground)                                                    ]                                                })                                            ]                                        })                                    ]                                })                            ]                        })                    ]                })            ]        });    },        _apply: function(e) {        DemoApp.pref.windowStyleName = this._windowStyleNameSelect.get("selectedId") == "None" ?                null : this._windowStyleNameSelect.get("selectedId");        DemoApp.pref.transitionsEnabled = this._transitionsEnabled.get("selected");        DemoApp.pref.sourceViewerBackground = this._sourceViewerBackground.color;        DemoApp.pref.sourceViewerForeground = this._sourceViewerForeground.color;        this.parent.remove(this);    },        _close: function(e) {        this.parent.remove(this);    }});

⌨️ 快捷键说明

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