Exemple #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();
            });
        }
Exemple #2
0
        static void OnReady()
        {
            win = new jQuery("#window");
            undo = new jQuery("#undo")
                    .bind("click", e =>
                    {
                        win.data("kendoWindow").As<Window>().open();
                        undo.hide();
                    });

            if (win.data("kendoWindow") == null)
            {
                win.kendoWindow(new WindowConfiguration
                {
                    width = "630px",
                    height = "315px",
                    title = "Rams's Ten Principles of Good Design",
                    actions = new[] { "Refresh", "Close" },
                    contentString = "../../content/web/window/ajax/ajaxContent1.html",
                    open = onOpen,
                    activate = onActivate,
                    close = onClose,
                    deactivate = onDeactivate,
                    refresh = onRefresh,
                    resize = onResize,
                    dragstart = onDragStart,
                    dragend = onDragEnd
                });
            }
        }
Exemple #3
0
        static void OnReady()
        {
            var wnd = new jQuery("#window");

            new jQuery("#open").click(e => wnd.data("kendoWindow").As<Window>().open());
            new jQuery("#close").click(e => wnd.data("kendoWindow").As<Window>().close());
            //new jQuery("#refresh").click(e => wnd.data("kendoWindow").As<Window>().refresh());
            wnd.kendoWindow(new WindowConfiguration
            {
                width = "505px",
                height = "315px",
                title = "Rams's Ten Principles of Good Design",
                actions = new[] { "Refresh", "Maximize", "Close" },
                contentString = "../../content/web/window/ajax/ajaxContent1.html"
            });
        }
Exemple #4
0
        static void OnReady()
        {
            
		var spin = new jQuery( "#spinner" ).spinner();

		new jQuery( "#disable" ).click(() => 
        {
			if ( spin.spinner( "option", "disabled" ).As<bool>() ) {
				spin.spinner( "enable" );
			} else {
				spin.spinner( "disable" );
			}
		});
		new jQuery( "#destroy" ).click(() => {
			if ( spin.data( "ui-spinner" ).As<bool>() ) {
				spin.spinner( "destroy" );
			} else {
				spin.spinner();
			}
		});
		new jQuery( "#getvalue" ).click(() => {
			HtmlContext.window.alert( spin.spinner( "value" ) );
		});
		new jQuery( "#setvalue" ).click(() => {
			spin.spinner( "value", 5 );
		});

		new jQuery( "button" ).button();
        }
Exemple #5
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
                });
            }
        }
Exemple #6
0
        static void OnReady()
        {
            var original = new jQuery("#panelbar").clone(true);
            original.find(".k-state-active").removeClass("k-state-active");

            new jQuery(".configuration input").change(e =>
                {
                    var panelBar = new jQuery("#panelbar").As<PanelBar>();
                    jQuery clone = original.clone(true);
                    panelBar.data("kendoPanelBar").collapse(new jQuery("#panelbar .k-link"));
                    panelBar.replaceWith(clone);
                    initPanelBar();
                });
            initPanelBar();

        }
Exemple #7
0
        static void OnReady()
        {

           
            var original = new jQuery("#menu").clone(true);
            original.find(".k-state-active").removeClass("k-state-active");

            new jQuery(".configuration input").change(e =>
                {
                    jQuery menu = new jQuery("#menu");
                    jQuery clone = original.clone(true);

                    menu.data("kendoMenu").As<Menu>().close(new jQuery("#menu .k-link"));

                    menu.replaceWith(clone);

                    initMenu();
                });

            initMenu();
        }
Exemple #8
0
        static void OnReady()
        {
            var original = new jQuery("#tabstrip").clone(true);
            original.find(".k-state-active").removeClass("k-state-active");
            new jQuery(".configuration input").change(e =>
                {
                    jQuery tabStrip = new jQuery("#tabstrip"),

                        clone = original.clone(true);
                    JsNumber selectedIndex = tabStrip.data("kendoTabStrip").As<TabStrip>().select().As<JsNumber>();
                    clone.children("ul")
                         .children("li")
                         .eq(selectedIndex)
                         .addClass("k-state-active")
                         .end();

                    tabStrip.replaceWith(clone);

                    initTabStrip();
                });

            initTabStrip();
        }