<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. 在im4java中使用GraphicsMagick

    1.定义操作和命令GMOperation op = new GMOperation();GraphicsMagickCmd cmd = new GraphicsMagickCmd("conv ...

  2. WebLogic清理缓存

    如果发布到weblogic的工程,登录发现还是原来的代码错误,可尝试清理weblogic缓存: 1.在weblogic控制台中停止应用,删除部署的工程 2.登录weblogic服务器,删除以下目录中的 ...

  3. 打电话时InCallScreen的具体流程 之 来电不锁屏

    打电话时InCallScreen的具体流程 前面说到OutgoingCallReceiver解析号码并启动incallscreen类,第一次启动时首先进入了其oncreate方法 (1)初始化Phon ...

  4. source insight设置tab键为4个空格

    首先通过路径(Options->Document Options)进入以下界面: step 1:将 Visible tabs 打勾. step 2 :将 Expand Tabs 打勾. step ...

  5. Swift - 用UIScrollView实现视差动画效果

    Swift - 用UIScrollView实现视差动画效果 效果 源码 https://github.com/YouXianMing/Swift-Animations // // MoreInfoVi ...

  6. IOS的唯一标识符问题(转)

    引用地址 http://www.zhihu.com/question/22599526/answer/21938878 网上搜了下IOS手机标志的种类,直接引用过来. UDID [[UIDevice ...

  7. [leetcode]Edit Distance @ Python

    原题地址:https://oj.leetcode.com/problems/edit-distance/ 题意: Given two words word1 and word2, find the m ...

  8. Sudoku Solver leetcode java

    题目: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated b ...

  9. java去除字符串的html标签

    //方法一 public String stripHtml(String content) { // <p>段落替换为换行 content = content.replaceAll(&qu ...

  10. 利用blob对象实现粘贴图片

    blob的一个常用应用场景,就是获取剪切板上的数据来进行粘贴的操作.例如通过QQ截图后,需要在网页上进行粘贴操作. 粘贴图片我们需要解决下面几个问题 1.监听用户的粘贴操作 2.获取到剪切板上的数据 ...