Commit 81fc18da authored by agping's avatar agping

文件保存优化

parent e199db86
...@@ -50,6 +50,9 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind ...@@ -50,6 +50,9 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
var _url = '/index/downloadFile'; var _url = '/index/downloadFile';
window.open(_url + '?file_id=' + file_id); window.open(_url + '?file_id=' + file_id);
}); });
_doc.on('click', '.pdf-pre-a-new', function() {
alert('文件未保存 暂不能下载')
});
$("#search").click(function() { $("#search").click(function() {
user.getList(1); user.getList(1);
...@@ -151,7 +154,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind ...@@ -151,7 +154,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
success: function(_data) { success: function(_data) {
if(_data.code == 200) { if(_data.code == 200) {
var _url = _data.data.internet_img_name; 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, '0': _url,
'1': decodeURI(_url.slice(_url.lastIndexOf('/') + 1)), '1': decodeURI(_url.slice(_url.lastIndexOf('/') + 1)),
'2': dealFileName(decodeURI(_url.slice(_url.lastIndexOf('/') + 1))),//dealFileName不要忘记 '2': dealFileName(decodeURI(_url.slice(_url.lastIndexOf('/') + 1))),//dealFileName不要忘记
...@@ -368,8 +371,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind ...@@ -368,8 +371,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
$("#modal_add_user").modal('hide'); //提交成功 关闭模态框 $("#modal_add_user").modal('hide'); //提交成功 关闭模态框
// user.getList(1); // user.getList(1);
alert('提交成功') alert('提交成功')
// window.location.href = '/index/business_school'; window.location.href = '/index/business_school';
console.log(66);
} else { } else {
alert(data.msg); 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