Merge branch 'yuanke' into develop
This commit is contained in:
commit
24b969e781
|
@ -123,7 +123,9 @@ class StudentWorkController < ApplicationController
|
||||||
#-1 默认值 0全部正确并结束 2 超时 -2 编译错误
|
#-1 默认值 0全部正确并结束 2 超时 -2 编译错误
|
||||||
resultObj[:status] = -1
|
resultObj[:status] = -1
|
||||||
resultObj[:results] = result["results"].first #本次测试结果
|
resultObj[:results] = result["results"].first #本次测试结果
|
||||||
result["error_msg"] = result["error_msg"][0..2047]
|
if result["status"].to_i == -2 #编译错误
|
||||||
|
result["error_msg"] = result["error_msg"][0..2047]
|
||||||
|
end
|
||||||
resultObj[:error_msg] = result["error_msg"] #编译错误时的信息
|
resultObj[:error_msg] = result["error_msg"] #编译错误时的信息
|
||||||
|
|
||||||
#该状态用于存入CodeTests
|
#该状态用于存入CodeTests
|
||||||
|
|
|
@ -416,9 +416,11 @@ function uploadpic(piclist,myself) {
|
||||||
that.attr("src", str[tIndex]);
|
that.attr("src", str[tIndex]);
|
||||||
that.attr("data-ke-src", str[tIndex]);
|
that.attr("data-ke-src", str[tIndex]);
|
||||||
|
|
||||||
|
//复制过来带的链接class等都要去掉 和视频图片有关系
|
||||||
that.removeAttr("class");
|
that.removeAttr("class");
|
||||||
that.parent().removeAttr("class");
|
that.parent().removeAttr("class");
|
||||||
that.parent().removeAttr("href");
|
that.parents().removeAttr("href"); //删除所有父节点的href
|
||||||
|
// that.parent().removeAttr("href");
|
||||||
that.parent().removeAttr("data-ke-src");
|
that.parent().removeAttr("data-ke-src");
|
||||||
tIndex = tIndex + 1;
|
tIndex = tIndex + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1045,6 +1045,7 @@ function showNormalImage(id) {
|
||||||
$(image).attr('src',_src);
|
$(image).attr('src',_src);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//无格式的图片不让点击显示大图,显示的话会有问题
|
||||||
var tmpsrc = image.attr('src');
|
var tmpsrc = image.attr('src');
|
||||||
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
|
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
|
||||||
var element = $("<a></a>").attr("href", image.attr('src'));
|
var element = $("<a></a>").attr("href", image.attr('src'));
|
||||||
|
|
Loading…
Reference in New Issue