Beispiel #1
0
        static void OnReady()
        {
            var win = new jQuery("#window");
            var undo = new jQuery("#undo");

            undo.bind("click", e =>
            {
                win.data("kendoWindow").As<Window>().open();
                undo.hide();
            });

            if (win.data("kendoWindow") == null)
            {
                win.kendoWindow(new WindowConfiguration
                {
                    width = "500px",
                    actions = new JsArray { "Custom", "Minimize", "Maximize", "Close" },
                    title = "About Josef Hoffmann",
                    close = () => undo.show().As<Window>()

                });
            }
            win.data("kendoWindow").As<Window>().wrapper.find(".k-i-custom").click(e =>
            {
                HtmlContext.alert("Custom action button clicked");
                e.preventDefault();
            });
        }
Beispiel #2
0
        static void OnReady()
        {
            var window = new jQuery("#window");
            var undo = new jQuery("#undo")
                    .bind("click", e =>
                    {
                        window.data("kendoWindow").As<Window>().open();

                    });
            undo.hide();
            
            JsAction onClose = () => undo.show().As<Window>();
            
            if (window.data("kendoWindow") == null)
            {
                window.kendoWindow(new WindowConfiguration
                {
                    width = "615px",
                    title = "Rams's Ten Principles of Good Design",
                    contentString = "../../content/web/window/ajax/ajaxContent.html",
                    close = onClose
                });
            }
        }
        public void popView()
        {
            var oldView = viewFragmentStack.pop();
            if (oldView != null ) {
                oldView.remove();
                var url = oldView.data( "url" ).As<JsString>();
                var mediator = mediators[url];

                if (mediator != null ) {
                    mediator.removeAndCleanup();
                    JsContext.delete(mediators[url]);
                }
            }

            if ( viewFragmentStack.length > 0 ) {
                _currentView = viewFragmentStack[ viewFragmentStack.length - 1 ];
                if ( _currentView != null ) {
                    _currentView.show();
                }
            } else {
                _currentView = null;
            }
        }
        private void showView(jQuery oldFragment, jQuery newFragment )
        {
            if (oldFragment != null) {
                oldFragment.hide();
            }

            if (newFragment != null) {
                newFragment.show();
            }
        }