<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. Control reaches end of non-void function 犯过最傻的错误

    之所以会报“Control reaches end of non-void function ”的警告,时因为方法名中缺少返回类型.正确的写法如下: +(void)setMobile:(NSStrin ...

  2. IOS文件系统及其相关操作(NSFileManager,NSFileHandle)

    How do you get the paths to these special sandbox directories? NSArray *NSSearchPathForDirectoriesIn ...

  3. 【python】python安装步骤

    1.官网下载python 官网地址:https://www.python.org/getit/ 2.下载完成后点击安装 勾选Add python to PATH 是可以自己去配置环境变量的 注意:这里 ...

  4. JAVA使用Marvin在图片中搜索图片

    Java对图像的处理框架比较少,目前比较流行的有Jmagick以及Marvin,但Jmagick只能处理图像(上篇Java清除图片中的恶意信息(利用Jmagick)中对Jmagick已做过简略介绍), ...

  5. Python获取数字的二进制值

    目标 想要获取一个整形数字的二进制表示 bin 内置函数 看一下官方的解释 Convert an integer number to a binary string prefixed with &qu ...

  6. JAVA开发中文乱码的几个解决方案

    一:html乱码或者引入的JS乱码 1:第一步,text file encoding 首先确保文件的保存格式要UTF-8,如在eclipse中,要在文件上点属性,确保这里选择UTF-8 注意,在ecl ...

  7. 2014年.net程序员年终总结

    2014年经历了3家公司,感觉这一年工作不怎么顺利,在2013年1月进入一家外企从事软件架构设计.开发测试.部署实施的相关工作,在2013年感觉工作很充实,在2014年由于项目的原因被迫去做项目维护, ...

  8. Longest Palindromic Substring leetcode java

    题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum l ...

  9. css3中webkit内核的滚动栏样式

    项目其中用到的滚动栏样式,在别人的基础上调成适合自己的样式.(IE能够调试滚动栏样式,firefox眼下不能调试) ::-webkit-scrollbar { width: 14px; }/* Tra ...

  10. postgres配置只能让某一个ip的主机登陆

    https://stackoverflow.com/questions/11753296/configure-postgresql-to-work-for-only-localhost-or-spec ...