Commit 81fc18da authored by agping's avatar agping

文件保存优化

parent e199db86
......@@ -50,6 +50,9 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
var _url = '/index/downloadFile';
window.open(_url + '?file_id=' + file_id);
});
_doc.on('click', '.pdf-pre-a-new', function() {
alert('文件未保存 暂不能下载')
});
$("#search").click(function() {
user.getList(1);
......@@ -151,7 +154,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
success: function(_data) {
if(_data.code == 200) {
var _url = _data.data.internet_img_name;
_this.parent().next().prepend('<li class="pdf-pre-li"><a data-filename="{3}" class="pdf-pre-a" href="javascript:;" title="保存之后才可以点击下载">{4}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
_this.parent().next().prepend('<li class="pdf-pre-li"><a data-filename="{3}" class="pdf-pre-a pdf-pre-a-new" href="javascript:;" title="保存之后才可以点击下载">{4}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _url,
'1': decodeURI(_url.slice(_url.lastIndexOf('/') + 1)),
'2': dealFileName(decodeURI(_url.slice(_url.lastIndexOf('/') + 1))),//dealFileName不要忘记
......@@ -368,8 +371,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
$("#modal_add_user").modal('hide'); //提交成功 关闭模态框
// user.getList(1);
alert('提交成功')
// window.location.href = '/index/business_school';
console.log(66);
window.location.href = '/index/business_school';
} else {
alert(data.msg);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment