1.增加代码换行

2.底部都留相对固定宽度
This commit is contained in:
杨树明775174143 2018-10-09 16:54:20 +08:00
parent 01e9e0ed60
commit 7fc09c6676
2 changed files with 13 additions and 4 deletions

View File

@ -428,6 +428,7 @@ a:hover {
height: 880px;
overflow-x: hidden;
overflow-y: visible;
padding-bottom: 600px;
}
.codeopration {
@ -473,7 +474,8 @@ a:hover {
margin-top: 30px;
padding: 30px;
box-sizing: border-box;
overflow-y:auto;
overflow-y:auto;
padding-bottom: 300px;
/* max-width: 370px; */
}

View File

@ -527,6 +527,7 @@ function delete_anno(file_id,line_num,anno_id){
function add_annotation(item,file_id, line_num) {
// 获取当前是注释还是问题
function_name="add_annotation(this"+","+file_id+","+line_num+")"
// make_button_disable($(item))
@ -534,7 +535,13 @@ function add_annotation(item,file_id, line_num) {
var selectValue = $(item).siblings(".put-select").find(".active").html().trim();
var text_context = "#addno-text-" + file_id+"-"+line_num;
var content = $(text_context).val();
//保留输入的换行符
var a = content.replace(/\n|\r\n/g,"<br/>");
var reg=new RegExp("<br>","g");
var newstr=a.replace(reg,"\n");
if (content.trim().length == 0) {
alert("内容不能为空")
$(item).attr('disabled',false);
@ -545,13 +552,13 @@ function add_annotation(item,file_id, line_num) {
make_button_disable($("#issue-anno-submit"))
if (selectValue == "注释") {
// 向addAnnatation中发请求
submit_annotation(file_id, line_num, content);
submit_annotation(file_id, line_num, newstr);
deletelocalStorage("file_id");
deletelocalStorage("line_num");
deletelocalStorage("item_value");
deletelocalStorage("status_value");
} else {
submit_question(file_id, line_num, content);
submit_question(file_id, line_num, newstr);
deletelocalStorage("issuefile_id");
deletelocalStorage("issueline_num");
deletelocalStorage("issueitem_value");