Declined
Last Updated: 15 Jun 2017 19:12 by Venkatesh
Dmitry
Created on: 05 Jul 2012 13:22
Category: Kendo UI for jQuery
Type: Feature Request
4
Customization Window header
 if I want make my custom header (image, few rows, others) I can't do it - I need to write "title:false" and to come up the implementation of title in content.

I propose to add a few lines in the code to be able to customize header:

1. To templates:
	templates = {
		...
		existtitlebar: template(
			"<div class='k-window-actions k-header'>" +
				"# for (var i = 0; i < actions.length; i++) { #" +
					"#= action({ name: actions[i] }) #" +
				"# } #" +
			"</div>"
		),
		...
	};
2. To function "createWindow(element, options)":
	instead of "if (options.title !== false) wrapper.append(templates.titlebar(extend(templates, options)));"
	next:
		if (options.title !== false) {
			var header = contentHtml.find(KWINDOWTITLEBAR);
			if (header.length == 0) wrapper.append(templates.titlebar(extend(templates, options)));
			else wrapper.append(header.append(templates.existtitlebar(extend(templates, options))).detach());
		}

And if I write:
<div id="window">
	<header class="k-window-titlebar"><img src="some_image.png"/> Test header</header>
	Content of the Window
</div>
...
$(document).ready(function() {
	$("#window").kendoWindow();
});

I get next (ex.):
<div class="k-widget k-panel" style="padding-top: 26px; ">
	<header class="k-window-titlebar k-header" style="margin-top: -26px; ">
		<img src="some_image.png"/> Test header
		<div class="k-window-actions k-header"></div>
	</header>
	<div id="window" data-role="window" class="k-window-content k-content">
		Content of the Window
	</div>
</div>


P.S. Possible the content of "header" should be placed in "span class='k-window-title'". In this case the new template is not needed. Only override "options.title" in "createWindow".
2 comments
Venkatesh
Posted on: 15 Jun 2017 19:12
Desperately waiting for this feature..
Momchil Minkov
Posted on: 07 Jul 2012 16:53
I Want This Too!