Merge branch 'guange_dev' into develop
Conflicts: public/javascripts/application.js
This commit is contained in:
commit
e6f3b9ed8f
|
@ -863,6 +863,10 @@ function redo() {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function encodeHomeworkUrl(url){
|
||||||
|
var file = encodeURI(url).replace(/\+/g, '%2B');
|
||||||
|
return '/zipdown/download?file='+file;
|
||||||
|
}
|
||||||
|
|
||||||
//// 作业附件删除
|
//// 作业附件删除
|
||||||
$(function(){
|
$(function(){
|
||||||
|
@ -880,8 +884,7 @@ $(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.length==1){
|
if(res.length==1){
|
||||||
var file = encodeURI(res[0].file).replace(/\+/g, '%2B');
|
location.href = encodeHomeworkUrl(res[0].file);return;
|
||||||
location.href = '/zipdown/download?file='+file;return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('light').style.display='block';
|
document.getElementById('light').style.display='block';
|
||||||
|
@ -894,7 +897,7 @@ $(function(){
|
||||||
} else {
|
} else {
|
||||||
des = '第'+res[i].index+'个学生的作品下载';
|
des = '第'+res[i].index+'个学生的作品下载';
|
||||||
}
|
}
|
||||||
$('<li><span class="upload_box_span" >'+(i+1)+'.</span> <a href="/zipdown/download?file='+res[i].file+'">'+des+'</a><span class="c_grey"> (共'+res[i].size+'M)</span> </li>').appendTo($container);
|
$('<li><span class="upload_box_span" >'+(i+1)+'.</span> <a href="'+ encodeHomeworkUrl(res[i].file) +'">'+des+'</a><span class="c_grey"> (共'+res[i].size+'M)</span> </li>').appendTo($container);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -911,10 +914,8 @@ $(function(){
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(res.length==1){
|
if(res.length==1){
|
||||||
var file = encodeURI(res[0].file).replace(/\+/g, '%2B');
|
location.href = encodeHomeworkUrl(res[0].file);return;
|
||||||
location.href = '/zipdown/download?file='+file;return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('light').style.display='block';
|
document.getElementById('light').style.display='block';
|
||||||
$container = $('#light .upload_box_ul');
|
$container = $('#light .upload_box_ul');
|
||||||
$container.empty();
|
$container.empty();
|
||||||
|
@ -925,7 +926,7 @@ $(function(){
|
||||||
} else {
|
} else {
|
||||||
des = '第'+res[i].index+'个学生的作品下载';
|
des = '第'+res[i].index+'个学生的作品下载';
|
||||||
}
|
}
|
||||||
$('<li><span class="upload_box_span" >'+(i+1)+'.</span> <a href="/zipdown/download?file='+res[i].file+'">'+des+'</a><span class="c_grey"> (共'+res[i].size+'M)</span> </li>').appendTo($container);
|
$('<li><span class="upload_box_span" >'+(i+1)+'.</span> <a href="'+ encodeHomeworkUrl(res[i].file) +'">'+des+'</a><span class="c_grey"> (共'+res[i].size+'M)</span> </li>').appendTo($container);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue