当前位置: 代码迷 >> Web前端 >> ext2.0 Ext.MessageBox.confirm 值传送
  详细解决方案

ext2.0 Ext.MessageBox.confirm 值传送

热度:657   发布时间:2012-06-30 17:20:12.0
ext2.0 Ext.MessageBox.confirm 值传递
function showEditPanel(mID){
     var data=new Ext.data.Store({///列表框中的选项数据
     proxy: new Ext.data.HttpProxy({url:'manage/msg.action?actType=imgPage&mid='+mID}),
     reader: new Ext.data.JsonReader({},['id','url',"mark","MsgName"])
  });
  data.load();//必须使用,加载数据
     var tpl = new Ext.XTemplate(
       '<div class="albumes">',
       '<tpl for=".">',
           '<div class="one" id="div{id}">',
     '<img src="{url}">',
     '<ul><li class="L1">新</li><li class="L2"><a href="javascript:document.delImgCheck(this,{id})">删除</a></li></ul>',
     '</div>',
       '</tpl>',
       '</div>'
  );
  document.delImgCheck=function(obj,id){
         Ext.MessageBox.confirm('重要提示', '确实要删除此图片吗?',function(btn,obj){delImg(btn,id)});
  }
  var delImg=function(btn,id){
         if(btn=='yes'){
          alert(btn);
         }
     };
      var newwin = new Ext.Window({
               xtype:'window',
               title:'消息照片(<span style="color:green">单击图片,修改描述</span>)',
                  buttonAlign:'right',
                  closable:true,
                  layout:'fit',
                  modal: 'true',
                  width:480,
                  closeAction:'hide',
                  plain:true,
                  items:new Ext.DataView({
             store: data,
             tpl: tpl,
             autoHeight:true,
             multiSelect: true,
             overClass:'x-view-over',
             itemSelector:'div.thumb-wrap',
             emptyText: 'No images to display'
      })
        });
        newwin.show();
    } 
  相关解决方案