2013-09-26 2 views
0

내가 gridpanel을 가지고 Ext.Window HTML 버튼에서 (chooser.js와) 같은 핸들러와 각 행 버튼어떻게 갱신

http://dev.sencha.com/deploy/ext-3.4.0/examples/view/chooser.html

에 대한 :

function deleteImage(data){ 
    window.open("http://host/delete_file.php?file="+data.url,"_self"); 
}; 

function choose(btn){ 
    if(!chooser){ 
      chooser = new ImageChooser({ 
        url:'http://host/get-images.php?path='+r.get('dtp'), 
        width:600, 
        height:350 
      }); 
    } 
    chooser.show(btn.getEl(), deleteImage); 
}; 
              btn = new Ext.Button({ 
                  renderTo: id2, 
                  text: 'Удалить', 
                  width: 75, 
                  handler: choose 
              }); 

내가 취소하는 경우 창 (이미지가있는 이미지)를 열고 다른 행을 연 다음 첫 번째 이미지를 첫 번째 창 (새 행이 아님)으로 엽니 다.

      { 
            text: 'Cancel', 
            handler: function(){ this.win.hide();}, 
            scope: this 
          } 

가까이하지 : chooser.js에서

버튼을 취소 할 수 있습니다.

개봉 후 새 창 업데이트 내용 (새 행의 이미지)은 어떻게됩니까?

답변

0

그것은 가공 :

function choose(v){ 
     new ImageChooser({ 
       url:'http://host/get-images.php?path='+r.get('dtp'), 
       width:600, 
       height:350 
     }).show(v, deleteImage); 
    }; 
              new Ext.Button({ 
                 renderTo: id2, 
                 text: 'Удалить', 
                 width: 75, 
                 handler: choose 
             });