<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. HTML5之SVG

    1.背景 SVG是Scalable Vector Graphics的缩写,意为可缩放矢量图形.1998年,万维网联盟成立了一个工作组,研发一种通过 XML来表现矢量图形的技术——SVG!由于SVG也是 ...

  2. 查看docker容器日志

    sudo docker logs -f -t --tail 10 my-openldap-container(container ID)

  3. 通过path绘制点击区域

    通过path绘制点击区域 效果 源码 https://github.com/YouXianMing/Animations // // TapDrawImageView.h // TapDrawImag ...

  4. 美国恐怖故事第一季/全集American Horror Story 1全迅雷下载

    第一季 American Horror Story Season 1 (2011)看点:心理治疗师Ben(迪伦·麦克德莫特 Dylan McDermott 饰)因与女学生有染被妻子Vivien(康妮· ...

  5. appstore防代充的一些想法

    点击这里可以查看代充相关的报道, 利用苹果商店规则漏洞,出现了一个灰色地下产业链>> 用户点击选择要充值的物品时,先向后台服务器发起一个创建订单号的请求,然后再向appstore发起购买商 ...

  6. [Web 前端] CSS篇之2. 清除浮动,什么时候需要清除浮动,清除浮动都有哪些方法

    cp: https://blog.csdn.net/zengyonglan/article/details/53304487 2. 清除浮动,什么时候需要清除浮动,清除浮动都有哪些方法 ? 一.什么时 ...

  7. ubuntu 终端无法启动:ImportError: cannot import name 'sysconfig' from 'distutils'

    gnome-terminal 出错 ImportError: cannot import name '_gi' 系统:ubuntu17 装了python2.7.13, 之后陆续装了python3.5. ...

  8. Qt中对QDomDocument和QDomnode的理解

    一.对QDomDocument和QDomnode的理解 QDom前缀的都是代表节点类型.所以有,QDomElement代表一个Element节点,而QDomText代表一个Text节点.QDomNod ...

  9. Effective Java - Item 1: Consider static factory methods instead of constructors

    考虑使用静态工厂方法来替代构造方法, 这样的做的好处有四点. 1. 更好的表意 有的构造方法实际上有特殊的含义, 使用静态工厂方法能更好的表达出他的意思. 例如 BigInteger(int, int ...

  10. Java NIO SocketChannel

    A Java NIO SocketChannel is a channel that is connected to a TCP network socket. It is Java NIO's eq ...