空白的剑道窗口在第二次尝试打开窗口时

时间:2018-07-11 11:12:09

标签: kendo-ui telerik kendo-window

Kendo窗口通常仅在第一次尝试时打开。关闭窗口后,再次尝试将导致空白窗口中没有数据。

      }).success(function (ContractID) {
        $('#save-contract-edit').
          append(
            '<a role="button" id="print-edit" class="k-button k-button-icontext k-primary export-pdf updateContract" href="\#"></a>')
        $('#print-edit').kendoButton({
          click: function (e) {
            openWindowEdit($('#contract-edit').data('contract_id_edit'))
          },
        })

  function openWindowEdit (contract_id) {
      $("#dialogEdit").kendoWindow({
        width: '34%',
        minWidth: 100,
        title: 'Umowa',
        actions: [
          'Close'
        ],
        close: onClose,
        visible: false,
        position: {
          top: 100,
          left: '33%'
        },
        content: {
          url: API_URL + contract_id,
          dataType: 'json',
          iframe: false,
          template: $('#tmpPrint').html()
        }
      }
    );

    var windowEdit = $('#dialogEdit').data("kendoWindow");

    windowEdit.refresh({
      dataType: "json",
      url: API_URL + contract_id,
      template: $('#tmpPrint').html()
    });
    windowEdit.open().center()
  }
 ...

0 个答案:

没有答案
相关问题