Reputation: 43
As per telerik documentation, Kendo window restore should call resize event. It works as documented when window is maximized & then restored. But, it's not calling resize event when window is minimized & then restored. I want to add some logic when window is minimized & then restored. Any idea how can I achieve this. Here is a sample kendo window
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.common.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.rtl.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.silver.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.mobile.all.min.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.1.412/js/kendo.all.min.js"> </script>
</head>
<body>
<div id="dialog"></div>
<script>
$("#dialog").kendoWindow({
width: "90%",
height: "90%",
title: "Lease Log",
position: { top: "5%", left: "5%" },
actions: [
"Pin",
"Minimize",
"Maximize",
"Close"
],
resize: function(){
alert("resized")
},
restore: function(){
alert("restored")
},
maximize: function(){
alert("maximized")
},
minWidth: 500,
minHeight: 300
});
</script>
</body>
</html>
Upvotes: 0
Views: 978
Reputation: 2102
Per Telerik's documentation they do not have a restore event. The only thing I've been able to come up with is to add a mouse down event to the restore icon from the window's minimize and maximize events:
$('.k-i-restore').on("mousedown", function (e) {
console.log('restored');
});
Upvotes: 1