This is a migrated thread and some comments may be shown as answers.

Window Actions

1 Answer 223 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 05 Apr 2012, 04:03 PM
Hey Guys,

Q:Is it possible to call a function on the "Custom" action passed into the window.

In one of your online samples you have passed in the following actions to the window:
  actions: ["Custom", "Minimize", "Maximize", "Close"]

I can call functions for Close Minimize Maximize, but how can I call a function when the custom icon is clicked?

How does the window even know what icon to render for the "Custom" action.


JSFiddle Share link:
http://jsfiddle.net/taF5V/4/

JSFiddle full screen:
http://jsfiddle.net/taF5V/4/embedded/result/

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 06 Apr 2012, 12:34 PM
Hello Mark,

The custom action's icon receives two CSS classes - k-icon and k-name, where name is the lowercase action name.

You can apply various styles of your preference to the custom action button and attach a click handler manually, after initializing the Window:

windowElement.data("kendoWindow").wrapper.find(".k-custom").click(function(e){
    alert("custom action button clicked");
    e.preventDefault();
});

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Mark
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or