<style>
.upfile { display: inline-block; width: %; }
.upfile li { display: inline-block; width: auto; margin:0px; }
.upfile li input { width:%; }
.upfile li h4 { color: #; font-weight: normal; margin:0px;}
</style>
<form action="javascript:void(0);" id="file_edit" >
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel"></h4>
</div>
<div class="modal-body">
<div class="form-group">
<label>上传文件:</label>
<ul class="upfile k-block">
<li>
<input type="file" id="fileAux" name="fileAux" data-fid="" />
</li>
<li>
<h4 id="fuAuxMsg"></h4>
</li>
</ul>
</div>
</div>
<div class="alert alert-danger alert-dismissible fade in" role="alert" id="errMsg" style="display:none"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</form> <script>
$("#fileAux").kendoUpload({
localization: {
select: "选择文件",
dropFilesHere: "",
headerStatusUploaded: "",
headerStatusUploading: "",
statusUploading: "",
uploadSelectedFiles: ""
},
multiple: false,
showFileList: false,
async: {
saveUrl: "/FX/File/UpLoad",
autoUpload: true
},
select: function (e) {
var files = e.files;
},
upload: function (e) {
$("#errMsg").hide();
$("#fileAux").attr("data-fid", "");
$("#fuAuxMsg").html("<img src='/content/image/loading_80×10.gif' />");
},
success: function (e) {
if (e.response != null) {
if (e.response.SUCCESS) {
$('#wndGeneralEdit').modal('toggle');
if ($("#grid_file").length > )
$("#grid_file").data("kendoGrid").dataSource.read();
}
else {
$("#fileAux").attr("data-fid", "");
$("#errMsg").html("<strong>上传失败:</strong>" + e.response.MESSAGE);
$("#errMsg").show({ duration: });
}
}
$(".k-upload-status-total").remove();
},
error: function (e) {
console.log("Er", e);
}
});
</script>

kendoUpload的更多相关文章

  1. JQuery Kendo UI使用技巧总结

    Kendo UI开发总结 By Gloomyfish on 2013-04-25 在Grid中支持分页刷新:            scrollable: {virtual : true }, 在Gr ...

  2. JS 读取本地Excel文件

    首先我们先引用一个Excel的类库xlsx.full.min.js 中间处理: 'use strict'; var ExcelReader = { isFirstRead: true, fixdata ...

随机推荐

  1. 怎样正确的使用Cookie的Path详细解析

    原文地址:http://java-zone.org/1052.html cookie 有路径--path,表示哪些路径下的文件有权限读取该 cookie. path 应该以 “/” 结尾,同名 coo ...

  2. Xcode5和6共存时,如何发布应用到商店

    如何你和我一样手贱安装了Xcode6,同时又需要发布应用到商店时,你会发现打好的包是通不过审核的.验证报错: unable to validate application archives of ty ...

  3. IOS-plist文件DES加密

    转载请说明出处:http://www.cnblogs.com/gexun/p/3705207.html,谢谢. 这些天一直在做一个知识问答的项目,因为初赛的项目题目比较少,所以题目就写在本地的plis ...

  4. ibatis.net:第七天,QueryWithRowDelegate

    xml <statement id="FindOrdersByCustomer" parameterClass="string" resultClass= ...

  5. linux文件名称查找which,whereis,locate

    1. 文件名称查找 使用find查询时.因为磁盘查询.所以速度较慢. 所以linux下查询更常使用which, whereis, locate来查询,因为是利用数据库查询.所以速度非常快. 2. wh ...

  6. 疑犯追踪第五季/全集Person of Interest迅雷下载

    英文全名Person of Interest,第5季(2015)CBS.本季看点:<疑犯追踪>本季剧组暗示Finch可能重建机器,这次他会给机器更多自由(如Root一直要求的那样).或许新 ...

  7. Android 类加载原理 和热修复——深入浅出原理与实现

    一.简述 热修复无疑是这2年较火的新技术,是作为安卓工程师必学的技能之一.在热修复出现之前,一个已经上线的app中如果出现了bug,即使是一个非常小的bug,不及时更新的话有可能存在风险,若要及时更新 ...

  8. HTML5 <Audio>标签API整理(三)

    一.浏览器支持 Internet Explorer 9+, Firefox, Opera, Chrome, 和 Safari 都支持 <audio> 元素. 注意: Internet Ex ...

  9. Eclipse中的特殊注释:TODO、XXX、FIXME

    特殊注释: 1. TODO表示需要实现,但目前还未实现的功能 2 .XXX勉强可以工作,但是性能差等原因 3 .FIXME代码是错误的,不能工作,需要修复 TODO: + 说明:如果代码中有该标识,说 ...

  10. 使用PHP生成二维码图像

    1.PHP生成二维码图像的类QRcode http://www.phper.org.cn/?post=128 QRcode是用于生成二维条形码的开放源码 (LGPL) 库.提供 API 创建条码图像. ...