parent
01e9e0ed60
commit
7fc09c6676
|
@ -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; */
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
@ -535,6 +536,12 @@ function add_annotation(item,file_id, line_num) {
|
|||
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");
|
||||
|
|
Loading…
Reference in New Issue