kendo window with minimize and maximize

落爺英雄遲暮 提交于 2019-12-13 07:10:39

问题


I have two kendo windows one below the other in the page with minimize and maximize options. When I close or minimize the first window the window below should come up. Could you please help me achieve this?

<div id="dialog"></div>
<div id="dialog1"></div>

<script>
$("#dialog").kendoWindow({
  animation: {
    close: false
  }
});
$("#dialog1").kendoWindow({
  animation: {
    close: false
  }
});
</script>

回答1:


Try:

<script>

$("#dialog").kendoWindow({
  animation: {
    close: false
  },
  close: function(e) {
      var d1 = $("#dialog1").data("kendoWindow");
      d1.open();
  },
  minimize: function(e) {
      var d1 = $("#dialog1").data("kendoWindow");
      d1.open();
  }

});
$("#dialog1").kendoWindow({
  animation: {
    close: false
  }
});
</script>

http://docs.telerik.com/kendo-ui/api/javascript/ui/window#methods-open




回答2:


Use the toFront() method

$("#dialog1").kendoWindow({
  animation: {
    close: false
  },
    actions: [
        "Pin",
        "Minimize",
        "Maximize",
        "Close"
    ],
    minimize: function(e) {
      var d1 = $("#dialog").data("kendoWindow");
      d1.toFront();
  },
    close: function(e) {
      var d1 = $("#dialog").data("kendoWindow");
      d1.toFront();
  }
});

DEMO



来源:https://stackoverflow.com/questions/38396679/kendo-window-with-minimize-and-maximize

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!