function show() {
var uploadlist = filedetailGrid.getSelectionModel().getSelection();
if (uploadlist.length == 0) {
Ext.Msg.alert("提示", "没有选中记录");
} else if (uploadlist.length > 1) {
Ext.Msg.alert("提示", "只能选中1条记录");
} else if (uploadlist.length == 1) {
var uploadpath = filedetailGrid.getSelectionModel().getSelection()[0].get("fil_path");
win.show();
}
}
var uploadpanel = Ext.create('Ext.ux.uploadPanel.UploadPanel', {
header: false,
addFileBtnText: '选择文件...',
uploadBtnText: '上传',
removeBtnText: '移除所有',
cancelBtnText: '取消上传',
file_size_limit: 10000,//MB
//file_types: '*.jpg',
//file_types_description: 'Image Files',
flash_url: "Javascript/swfupload/swfupload.swf",
flash9_url: "Javascript/swfupload/swfupload_fp9.swf",
//var url=encodeURI('Ajax/upload.ashx?uploadpath=' + uploadpath),
upload_url: 'Ajax/upload.ashx'
});
win = Ext.widget('window', {
title: '文件上传',
closeAction: 'hide',
layout: 'fit',
resizable: false,
modal: true,
items: uploadpanel
});
以上代买运行时正常,但我作了一下修改
function show() {
var uploadlist = filedetailGrid.getSelectionModel().getSelection();
if (uploadlist.length == 0) {
Ext.Msg.alert("提示", "没有选中记录");
} else if (uploadlist.length > 1) {
Ext.Msg.alert("提示", "只能选中1条记录");
} else if (uploadlist.length == 1) {
var uploadpath = filedetailGrid.getSelectionModel().getSelection()[0].get("fil_path");
uploadwin(uploadpath);
win.show();
}
}
function uploadwin(path) {
var uploadpanel = Ext.create('Ext.ux.uploadPanel.UploadPanel', {
header: false,
addFileBtnText: '选择文件...',
uploadBtnText: '上传',
removeBtnText: '移除所有',
cancelBtnText: '取消上传',
file_size_limit: 10000,//MB
//file_types: '*.jpg',
//file_types_description: 'Image Files',
flash_url: "Javascript/swfupload/swfupload.swf",
flash9_url: "Javascript/swfupload/swfupload_fp9.swf",
//var url=encodeURI('Ajax/upload.ashx?uploadpath=' + uploadpath),
upload_url: 'Ajax/upload.ashx?path'+path
});
win = Ext.widget('window', {
title: '文件上传',
closeAction: 'hide',
layout: 'fit',
resizable: false,
modal: true,
items: uploadpanel
});
}
我增加一个funtion,把获取的路径传过去,当我点击上传,弹出窗口1,然后点击选择文件,第一可以弹出选择文件的窗口2,然后当我把弹出的窗口1关闭,再次点击上传,再点击选择文件,却没有反应,何解、??求指导!!