kendo window with minimize and maximize

2019-09-19 05:11发布

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>

2条回答
贼婆χ
2楼-- · 2019-09-19 05:33

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

查看更多
三岁会撩人
3楼-- · 2019-09-19 05:46

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

查看更多
登录 后发表回答