修复代码丢失左侧导航 定位问题

右侧说明框条,多余文字去掉,数字间距跳整
代码演示最后一页加上提示
函数打勾和打×按钮点击之后消失
评论,问题 查看评论 框点击都居中显示
去掉比赛可见几字
改为提交成功,当前小组标注数量排名第2”
候选跳转函数(请帮忙反馈正确的跳转候选,在正确跳转函数后面打钩)”
下面的提示语改为“未找到候选跳转函数”
右侧顶部不能点击按钮隐藏,默认保留我的注释并跳转对应页面
This commit is contained in:
杨树明775174143 2018-09-30 22:22:48 +08:00
parent f6bf3dd253
commit 1dc3d163ec
12 changed files with 71 additions and 2072 deletions

View File

@ -122,7 +122,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'codepedia',
'USER': 'root',
'PASSWORD': 'codepedia123',
'PASSWORD': 'root',
'HOST': '127.0.0.1'
}
}

View File

@ -220,4 +220,7 @@ html {
.WPGstep .topWPGnext:hover{
background: none gray
}
.WPGstepTitle{
width: 10rem;
}

View File

@ -524,7 +524,7 @@ a:hover {
.panel-leftfont {
display: block;
float: left;
width: 90px;
/*width: 90px;*/
text-align: left;
color: #EAEAEA;
font-size: 13px;
@ -634,10 +634,10 @@ a:hover {
/* 提交评论框 */
#ItemcommentPanel {
position: absolute;
right: 60px;
width: 4rem;
top: 19px;
position: fixed;
right: 6rem;
width: 5rem;
top: 3rem;
border-radius: 4px;
background-color: #fff;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
@ -699,14 +699,15 @@ a:hover {
#ItemquestionPanel {
width: 700px;
position: absolute;
position: fixed;
max-height: 500px;
overflow-y: auto;
background-color: #fff;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
top: 23px;
right:5.5rem;
top: 2rem;
border-radius: 4px;
right: 32px;
z-index: 3;
color:black;
padding: 15px 0px 3px 0px;
@ -911,14 +912,14 @@ pre.prettyprint {
margin-top: 10px;
}
.addno-panel {
position: absolute;
width: 410px;
position: fixed;
width: 440px;
border: 1px solid #ccc;
border-radius: 5px;
background: #fff;
z-index: 1;
right: 5px;
top: 27px;
z-index: 236;
right: 7rem;
top: 2rem;
display: none;
}

View File

@ -1,4 +1,5 @@
/* Float & Clear */
.none{display:none;}
.clear{ zoom:1;}
.clear:after {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.cl{ clear:both; overflow:hidden; }

View File

@ -565,7 +565,7 @@ function submit_annotation(file_id, line_num, content) {
$("#"+id).before(html);
if(data.status == "success"){
if(data.rank){
layer.msg('标注提交成功,当前小组排名为:'+data.rank);
layer.msg('提交成功,当前小组标注数量排名第:'+data.rank);
}
}else{
layer.msg(data.msg);
@ -664,7 +664,8 @@ function search_symbol(args,line_num,function_name) {
}
});
}
function onClick_FeedbackButton(answer_type,file_id,path_and_lineno,line_num,function_name) {
function onClick_FeedbackButton(answer_type,file_id,path_and_lineno,line_num,function_name,This) {
$(This).hide()
// 获取到当前的答案
$.ajax({
cache: false,
@ -978,7 +979,10 @@ function open_tab(path,archor) {
$('#jstree').jstree("deselect_all", true);
$('#jstree').jstree("select_node", tree_nodes[path]);
setTimeout(function timer() {
var offsettop=$("#"+tree_nodes[path]).position().top;
$("#filelist-content").scrollTop(offsettop);
},500)
var tabcontent = document.getElementsByClassName("codereading");
for (var i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
@ -1323,6 +1327,10 @@ function highlight_jstree_node(project_id,path_after){
$('#jstree').jstree("deselect_all", true);
$('#jstree').jstree("select_node", tree_nodes[path]);
// location.href="#"+tree_node
setTimeout(function timer() {
var offsettop=$("#"+tree_nodes[path]).position().top;
$("#filelist-content").scrollTop(offsettop);
},500)
}
},error:function(jqXHR, textStatus, errorThrown){
if(jqXHR.readyState===0&&jqXHR.status===0){
@ -1484,9 +1492,9 @@ function inject_addnoPanel_html(item,file_id,linenum) {
$("#ItemcommentPanel").remove();
$("#ItemquestionPanel").remove();
// '<div class="trangle-op"></div>'+
html_str = '<div class="addno-panel source-addno-panel" id="addno-panelsource-addno-panel" style="display:block">'+
'<div class="trangle-op"></div>'+
'<div class="put-content">'+
'<div class="put-content newput-selectspanactive">为该行或该代码块添加注释或者提问:</div>'+
'<p class="put-select clearfix" id="addno-select-'+linenum+'">'+
@ -1506,6 +1514,8 @@ function inject_addnoPanel_html(item,file_id,linenum) {
if(file_id===oldfile_id&&linenum===oldline_num){
$("#addno-text-"+file_id+"-"+linenum).val(olditem_value);
}
$( "#addno-panelsource-addno-panel" ).draggable();
}

File diff suppressed because it is too large Load Diff

View File

@ -7,17 +7,17 @@
{% if isdir == 0 %}
<p class="ques-title">
{% comment %} 您可见{{ annos|length }}个注释 {% endcomment %}
该代码文件共有{{ annotation_length }}个注释,比赛结束后全部可见
该代码文件共有{{ annotation_length }}个注释
</p>
{% endif %}
{% if isdir == 1 %}
<p class="ques-title">
该代码模块共有{{ annotation_length }}个注释,比赛结束后全部可见
该代码模块共有{{ annotation_length }}个注释
</p>
{% endif %}
{% else %}
<p class="ques-title">
该行或该代码块共有{{annotation_length}}个注释,比赛结束后全部可见
该行或该代码块共有{{annotation_length}}个注释
</p>
{% endif %}

View File

@ -4,22 +4,22 @@
<p class="right-item-title">Module Summary</p>
<p class="clearfix">
<span class="panel-leftfontnew">Project Url:</span>
<span class="panel-leftfontnew">Project:</span>
<span class="panel-right newpanel-right" title="{{project_url}}"><a style="color:white" href="{{project_url}}" target="_blank">{{project_url}}</a></span>
</p>
<p class="clearfix">
<span class="panel-leftfontnew">Module Path:</span>
<span class="panel-leftfontnew">Module:</span>
<span class="panel-right newpanel-right" title="{{path}}">{{path}}</span>
</p>
{% else %}
<p class="right-item-title">File Summary</p>
<p class="clearfix">
<span class="panel-leftfontnew">Project Url:</span>
<span class="panel-leftfontnew">Project:</span>
<span class="panel-right newpanel-right" title="{{project_url}}"><a style="color:white" href="{{project_url}}" target="_blank">{{project_url}}</a></span>
</p>
<p class="clearfix">
<span class="panel-leftfontnew">File Path:</span>
<span class="panel-leftfontnew">File:</span>
<span class="panel-right newpanel-right" title="{{path}}">{{path}}</span>
</p>
{% endif %}
@ -78,7 +78,7 @@
</span>
<div class="addno-panel" id="addno-panel-{{file_id}}" style="top: 303px;right: 35px;">
<div class="trangle-op"></div>
{# <div class="trangle-op"></div>#}
<div class="put-content">
{% if isdir %}
<div class="put-content newput-selectspanactive">为该代码模块添加注释或者提问:</div>

View File

@ -16,26 +16,26 @@
<span>个人记录</span>
<i class="fa fa-caret-down color-grey-c fl mt22 ml5"></i>
<ul class="downList">
<li>
<a href="">提交代码</a>
<li class="none">
<a href="/users/userinfo-anno">提交代码</a>
</li>
<li class="none">
<a href="/users/userinfo-anno">我的问题</a>
</li>
<li class="none">
<a href="/users/userinfo-anno">我的回答</a>
</li>
<li>
<a href="">我的问题</a>
<a href="/users/userinfo-anno">我的注释</a>
</li>
<li>
<a href="">我的回答</a>
<li class="none">
<a href="/users/userinfo-anno">我的评论</a>
</li>
<li>
<a href="">我的注释</a>
<li class="none">
<a href="/users/userinfo-anno">我的点赞</a>
</li>
<li>
<a href="">我的评论</a>
</li>
<li>
<a href="">我的点赞</a>
</li>
<li>
<a href="">我的点踩</a>
<li class="none">
<a href="/users/userinfo-anno">我的点踩</a>
</li>
<li>
<a href="{% url 'users:logout' %}">退出</a>

View File

@ -1,8 +1,8 @@
<p class="search-title">候选跳转函数(请在跳转确认后,在正确跳转后面打钩;点击右上角可以关闭候选函数</p>
<p class="search-title">候选跳转函数(请帮忙反馈正确的跳转候选,在正确跳转函数后面打钩</p>
<div class="resultform">
{% if results|length == 0 %}
<div style="margin-left: 45%; padding: 10px;"></div>
<div style="margin-left: 45%; padding: 10px;">未找到候选跳转函数</div>
{% else %}
{% for item in results %}
@ -10,8 +10,8 @@
<span class="fl">{{ forloop.counter }}. </span>
<a class="fl mr20" href="javascript:void(0)" class="re-path" title="{{item.2}}" onclick='add_tab({{project_id}},"{{item.1}}","{{item.0}}")'>{{ item.2|safe }}</a>
<a class="fl" href="javascript:void(0)" class="path-content" title="{{item.3}}" onclick='add_tab({{project_id}},"{{item.1}}","{{item.0}}")'>{{ item.3|safe }}</a>
<div class="fr FontFatimes" onclick='onClick_FeedbackButton(0,{{current_file_id}},"{{item.1}}",{{line_num}},"{{function_name}}");'><i class="fa fa-times" aria-hidden="true"></i></div>
<div class="fr FontFaCheck" onclick='onClick_FeedbackButton(1,{{current_file_id}},"{{item.1}}",{{line_num}},"{{function_name}}");'><i class="fa fa-check" aria-hidden="true"></i></div>
<div class="fr FontFatimes" onclick='onClick_FeedbackButton(0,{{current_file_id}},"{{item.1}}",{{line_num}},"{{function_name}}",this);'><i class="fa fa-times" aria-hidden="true"></i></div>
<div class="fr FontFaCheck" onclick='onClick_FeedbackButton(1,{{current_file_id}},"{{item.1}}",{{line_num}},"{{function_name}}",this);'><i class="fa fa-check" aria-hidden="true"></i></div>
</div>
{% endfor %}

View File

@ -210,7 +210,7 @@
steplist.newGuidStep("#codepanel","4.打开项目代码文件:","{% static 'css/img/4.png' %}");
steplist.newGuidStep("#codepanel","5.为代码文件添加标注:","{% static 'css/img/5.png' %}");
steplist.newGuidStep("#codepanel","6.为代码行/块添加标注:","{% static 'css/img/6.png' %}");
steplist.newGuidStep("#codepanel","7.点击下面链接查看代码标注范例:",[{code:"C++ - TensorFlow/.../tensor_slice.cc",codepath:"http://120.132.101.149/projects/tensorflow/tensorflow/core/framework/tensor_slice.cc#"},{code:"Java - Hadoop/.../Mapper.java",codepath:"http://120.132.101.149/projects/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Mapper.java#"},{code:" Python - Nova/.../db.py",codepath:"http://120.132.101.149/projects/OpenStack-nova/nova/servicegroup/drivers/db.py#"}]);
steplist.newGuidStep("#codepanel","7.点击下面链接查看代码标注范例:(如果进入标注后项目结构等显示不正常请Ctr+Shift+Delete 清除浏览器缓存后刷新页面即可,后续可以通过点击页面右上方的help链接可随时查看标注使用提示:",[{code:"C++ - TensorFlow/.../tensor_slice.cc",codepath:"http://120.132.101.149/projects/tensorflow/tensorflow/core/framework/tensor_slice.cc#"},{code:"Java - Hadoop/.../Mapper.java",codepath:"http://120.132.101.149/projects/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Mapper.java#"},{code:" Python - Nova/.../db.py",codepath:"http://120.132.101.149/projects/OpenStack-nova/nova/servicegroup/drivers/db.py#"}]);
steplist.startGuide();
}
});
@ -254,7 +254,7 @@
steplist.newGuidStep("#codepanel","4.打开项目代码文件:","{% static 'css/img/4.png' %}");
steplist.newGuidStep("#codepanel","5.为代码文件添加标注:","{% static 'css/img/5.png' %}");
steplist.newGuidStep("#codepanel","6.为代码行/块添加标注:","{% static 'css/img/6.png' %}");
steplist.newGuidStep("#codepanel","7.点击下面链接查看代码标注范例:",[
steplist.newGuidStep("#codepanel","7.点击下面链接查看代码标注范例:(如果进入标注后项目结构等显示不正常请Ctr+Shift+Delete 清除浏览器缓存后刷新页面即可,后续可以通过点击页面右上方的help链接可随时查看标注使用提示)",[
{code:"C++ - TensorFlow/.../tensor_slice.cc",codepath:"http://120.132.101.149/projects/tensorflow/tensorflow/core/framework/tensor_slice.cc#"},
{code:"Java - Hadoop/.../Mapper.java",codepath:"http://120.132.101.149/projects/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Mapper.java#"},
{code:" Python - Nova/.../db.py",codepath:"http://120.132.101.149/projects/OpenStack-nova/nova/servicegroup/drivers/db.py#"}

View File

@ -42,14 +42,14 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">个人记录<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="">提交代码</a></li>
<li><a href="">我的问题</a></li>
<li><a href="">我的回答</a></li>
<li><a href="">我的注释</a></li>
<li><a href="">我的评论</a></li>
<li><a href="">我的点赞</a></li>
<li><a href="">我的点踩</a></li>
<li><a href="{% url 'users:logout' %}">退出</a></li>
<li class="none"><a href="/users/userinfo-anno">提交代码</a></li>
<li class="none"><a href="/users/userinfo-anno">我的问题</a></li>
<li class="none"><a href="/users/userinfo-anno">我的回答</a></li>
<li><a href="/users/userinfo-anno">我的注释</a></li>
<li class="none"><a href="/users/userinfo-anno">我的评论</a></li>
<li class="none"><a href="/users/userinfo-anno">我的点赞</a></li>
<li class="none"><a href="/users/userinfo-anno">我的点踩</a></li>
<li ><a href="{% url 'users:logout' %}">退出</a></li>
</ul>
</li>
{% else %}