diff --git a/static/css/code_show.css b/static/css/code_show.css
index ff7481d..df3fb89 100644
--- a/static/css/code_show.css
+++ b/static/css/code_show.css
@@ -81,20 +81,21 @@ p, input, table {
}
a {
- text-decoration: none;
+ text-decoration: none !important;
color: #000;
+
}
.code_Area a{
- text-decoration: underline;
- color: white
+ color: white;
}
a:hover {
color: #33A6D6;
- text-decoration: underline;
+ padding-bottom: 2px;
+ border-bottom: 1px solid #33A6D6;
+ display: inline-block;
}
-
.font-12 {
font-size: 12px!important;
}
@@ -1640,4 +1641,30 @@ animation: myfirst 10s;
-moz-animation: myfirst 10s; /* Firefox */
-webkit-animation: myfirst 10s; /* Safari 和 Chrome */
-o-animation: myfirst 10s; /* Opera */
+}
+.closeX{
+ color: #FFF;
+ font-size: 12px;
+ position: absolute;
+ z-index: 20000;
+ right: -18px;
+ top: -24px;
+ border: 1px solid #FFF;
+ border-radius: 50%;
+ width: 20px;
+ height: 20px;
+ text-align: center;
+ line-height: 17px;
+}
+.FontFatimes{
+ color:#000;
+ font-size:16px;
+ margin-left:10px;
+ cursor: pointer;
+}
+.FontFaCheck{
+ color:cornflowerblue;
+ font-size:16px;
+ margin-left:10px;
+ cursor: pointer;
}
\ No newline at end of file
diff --git a/static/js/source.js b/static/js/source.js
index fd0c7a3..9127dac 100644
--- a/static/js/source.js
+++ b/static/js/source.js
@@ -57,8 +57,8 @@ function close_modify_anno(){
$("#modification").show();
$(".modify_anno_div").remove();
$("#modify_anno_textarea").attr("readonly","readonly")
-
-
+
+
ev = window.event;
if(ev==undefined){
ev=arguments.callee.caller.arguments[0]||window.event;
@@ -72,7 +72,7 @@ function inject_modifyAnno_html(item,file_id,linenum,anno_id) {
$(".modify_anno_div").remove();
$("#modify_anno_textarea").removeAttr("readonly");
$("#modify_anno_textarea").focus()
-
+
html_str = '
'+
'
取消'+
'
提交'+
@@ -314,7 +314,7 @@ function add_annotation(item,file_id, line_num) {
if (selectValue == "注释") {
// 向addAnnatation中发请求
submit_annotation(file_id, line_num, content);
-
+
} else {
submit_question(file_id, line_num, content);
}
@@ -393,6 +393,10 @@ function submit_question(file_id, line_num, content) {
});
}
+function closeX_search(){
+ $("#search_response").hide();
+}
+
function search_symbol(args) {
// ev = window.event
@@ -413,17 +417,34 @@ function search_symbol(args) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
},
success: function (data) {
+ console.log(data.html_str);
if (data.status === 'success') {
// console.log(context);
- $("#search_response").css("top", mousePos.y);
+ $("#search_response").css("top", 400);
$("#search_response").css("left", mousePos.x);
- $("#search_response").html(data.html_str);
+ $(".search-title").remove();
+ $(".resultform").remove();
+ $("#search_response").append(data.html_str);
$("#search_response").show();
ev.stopPropagation();
}
}
});
}
+function onClick_FeedbackButton(key) {
+ if(key==1){
+ //key =1 正确路径
+ console.log(key)
+ }else{
+ //key=0 错误路径
+ console.log(key)
+ }
+
+}
+
+
+
+
navigation_map = new Map()
@@ -471,7 +492,7 @@ function show_navigation() {
str += "
" + name + "";
str += ""
}
-
+
str += ""
content += str;
}
@@ -492,8 +513,8 @@ function show_navigation() {
function deal_for_navigation_tree(){
- $("#navigation_tree").jstree()
- $("#navigation_tree").jstree().open_all()
+ $("#navigation_tree").jstree();
+ $("#navigation_tree").jstree().open_all();
$("#navigation_tree li").click(function(){
location.href = $(this).find("a").attr("href");
});
@@ -756,7 +777,7 @@ function generate_codereading_line(fileid,linenum,annos_count,issues_count,quest
htmlstr += generate_codereading_linestatus(fileid,linenum,annos_count,issues_count,questions_count,issues)
htmlstr += '
'
return htmlstr
-}
+}
function add_hrefTag_into_line(line,file_id){
var regex = /\w+\(/g
@@ -768,16 +789,16 @@ function add_hrefTag_into_line(line,file_id){
var replace_str = ''+search_symbol_str+'('
line=line.replace(strs[i],replace_str)
}
-
+
return line
}
return line
}
-
+
function generate_codereading_linenum_and_codeline(linenum,line,language,file_id){
var line= add_hrefTag_into_line(line,file_id)
- var htmlstr = ''
+ var htmlstr = ''
htmlstr += ''
htmlstr += linenum.toString()
htmlstr += '
'
@@ -792,14 +813,14 @@ function generate_codereading_linenum_and_codeline(linenum,line,language,file_id
}
function generate_codereading_linestatus(fileid,linenum,annos_count,issues_count,questions_count,issues){
- var htmlstr = ''
-
+ var htmlstr = ''
+
htmlstr += ''
htmlstr += ''
if(linenum in annos_count){
htmlstr += ''
- }
- htmlstr += ''
+ }
+ htmlstr += ''
htmlstr += ''
if(linenum in questions_count){
htmlstr += ''
@@ -807,12 +828,12 @@ function generate_codereading_linestatus(fileid,linenum,annos_count,issues_count
else if(linenum in issues_count){
htmlstr += ''
}
- htmlstr += ''
+ htmlstr += ''
htmlstr += ''
htmlstr += ''
- htmlstr += ''
+ htmlstr += ''
htmlstr += '
'
- return htmlstr
+ return htmlstr
}
// 添加一个新的标签页,
@@ -820,7 +841,7 @@ function generate_codereading_linestatus(fileid,linenum,annos_count,issues_count
// 如果标签页已经存在,则打开对应的标签页
// 并调用open_tab
function add_tab(project_id,path,filename) {
-
+
// var tree_node = $("#jstree").jstree("get_selected");
var path_before = path
//需要将path处理一下,因为css样式中/以及.是不行的
@@ -830,7 +851,7 @@ function add_tab(project_id,path,filename) {
}
var path_input = path;
path = path_predeal(path)
-
+
if (tabSet.has(path)) {
open_tab(path_input)
@@ -1367,7 +1388,7 @@ function submit_file_annotation(file_id, line_num, content) {
}else{
alert(data.msg)
}
-
+
}
});
}
@@ -1477,6 +1498,7 @@ function deal_votetag_color(vote_tag,msg,vote_value){
$(function(){
url = window.location.href;
$('#jstree').jstree();
+ $("#jstree").jstree().open_all();
$("#jstree").css("visibility","visible");
$.ajax({
@@ -1511,7 +1533,7 @@ $(function(){
project_id=data.project_id
path = data.path
filename = data.filename
-
+
add_tab(data.project_id, data.path, data.filename)
// 特殊处理,因为add_tab的逻辑会影响tree_nodes(),所以进行了处理
tree_nodes[path_after] = first_tabs_jstree_id
diff --git a/templates/projects/filesub/search-response.html b/templates/projects/filesub/search-response.html
index 542f270..fa29c74 100644
--- a/templates/projects/filesub/search-response.html
+++ b/templates/projects/filesub/search-response.html
@@ -7,9 +7,12 @@
{% for item in results %}
+
{% endfor %}
{% endif %}
diff --git a/templates/projects/source.html b/templates/projects/source.html
index 31fd019..1852856 100644
--- a/templates/projects/source.html
+++ b/templates/projects/source.html
@@ -53,8 +53,9 @@
-
-
+