2016-08-18 126 views
2

單擊按鈕時,我打開一個帶有中止按鈕的彈出窗口。並在我得到響應後向服務器發送請求,我打開帶有下載按鈕的新彈出窗口並關閉第一個窗口。第一次它工作正常。但第二次我的中止和下載按鈕逐漸消失。當我檢查彈出我可以看到中止下載按鈕目前在代碼端但不可見在用戶界面上。當第二次彈出窗口時,窗口按鈕會消失。

if (_data.status == "inProcess") { 
      exportPopup.show(); 
     } else if (_data.status == "success") { 
      var height= exportPopup.getHeight(); 
      exportPopup.close(); 
      downloadPopup = Ext.create('Ext.window.Window', { 
       name: 'downloadReport', 
       header: false, 
       id: 'downloadPopWin', 
       constrain: true, 
       closable: false, 
       width: 400, 
       height: height, 
       resizable: false, 
       bodyStyle: 'background-color : white;', 
       buttonAlign: 'center', 
       layout: { 
        type: 'hbox', 
        align: 'center', 
        pack: 'center' 
       }, 
       items: 
       { 
        xtype: 'label', 
        itemId:'exportStatus', 
        margin : '50 0 0 0', 
        text: 'Export completed.', 
        //style: 'font-weight: bold;' 
       }, 
       buttons:[ 
       { 
        //xtype: 'button', 
        text: 'Download', 
        id: "btnDownloadReport", 
        //margin : '20 0 20 180', 
        handler: function(_button) { 
         downloadPopup.close(); 
         ReportUtil.downloadReportData(me, _data); 
        } 
       }     
       ] 

      }); 
      downloadPopup.show(); 
     } 
+0

請提供給我的小提琴,你的問題是沒有extrapopup代碼還請提供那也 –

回答