Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop

This commit is contained in:
daiao 2017-09-01 15:18:29 +08:00
commit 54fa965c36
13 changed files with 147 additions and 23 deletions

View File

@ -16,13 +16,13 @@ module ChallengesHelper
game = Game.where(:challenge_id => challenge_id, :user_id => User.current.id).first
case game.try(:status)
when 0
"待完成&nbsp;&nbsp;<a title='待完成'><i class='fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center'></i></a>".html_safe
"待完成&nbsp;&nbsp;<a><i data-tip-down='待完成' class='fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center'></i></a>".html_safe
when 1
"<a title='评测中'><i class='fa fa-unlock-alt fr font-18 mt5 -text-danger w20_center'></i></a>".html_safe
"<a><i data-tip-down='评测中' class='fa fa-unlock-alt fr font-18 mt5 -text-danger w20_center'></i></a>".html_safe
when 2
"已完成&nbsp;&nbsp;<a title='已解决'><i class='fa fa-check-circle fr font-18 mt5 color-light-green w20_center' ></i></a>".html_safe
"已完成&nbsp;&nbsp;<a><i data-tip-down='已解决' class='fa fa-check-circle fr font-18 mt5 color-light-green w20_center' ></i></a>".html_safe
when 3,nil
"未解锁&nbsp;&nbsp;<a title='未解锁'><i class='fa fa-play-circle fr font-18 mt5 color-grey w20_center' ></i></a>".html_safe
"未解锁&nbsp;&nbsp;<a><i data-tip-down='未解锁' class='fa fa-play-circle fr font-18 mt5 color-grey w20_center' ></i></a>".html_safe
end
end
end

View File

@ -16,11 +16,11 @@
<h4 class="fl panel-inner-title">
<span class="panel-inner-icon mr10 fl mt5">
<% if challenge.st == 0 %>
<i class="fa fa-code font-16 color_white" title="实践任务"></i>
<i class="fa fa-code font-16 color_white" data-tip-down="实践任务"></i>
<% elsif challenge.st == 1 %>
<i class="fa fa-th-list color_white" title="多选任务"></i>
<i class="fa fa-th-list color_white" data-tip-down="多选任务"></i>
<% elsif challenge.st == 2 %>
<img src="/images/bigdata/singel.png" style="margin-bottom: 3px" title="单选任务">
<img src="/images/bigdata/singel.png" style="margin-bottom: 3px" data-tip-down="单选任务">
<% end%>
</span>
<!-- <i class="fa fa-dot-circle-o font-18 color-green mr10"></i>-->
@ -39,15 +39,15 @@
<% if User.current.manager_of_shixun?(@shixun) %>
<p class="fr" id="shixun_icon_<%= index %>">
<% if @shixun.status == 0 %>
<a href="javascript:void(0);" class="mr5" onclick="delete_confirm_box_2('<%= shixun_challenge_path(challenge, :shixun_id => @shixun) %>', '确定要删除该任务吗?')" data-tip-down="删除" ><i class="fa fa-trash-o color-grey font-16" ></i></a>
<a href="javascript:void(0);" class="mr5" onclick="delete_confirm_box_2('<%= shixun_challenge_path(challenge, :shixun_id => @shixun) %>', '确定要删除该任务吗?')" ><i class="fa fa-trash-o color-grey font-16" data-tip-down="删除"></i></a>
<% unless challenge.position < 2 %>
<a href="<%= index_up_shixun_challenge_path(challenge, :shixun_id => @shixun) %>" data-tip-down="上移" data-remote="true"><i class="fa fa-long-arrow-up color-grey font-16 mr5" ></i></a>
<a href="<%= index_up_shixun_challenge_path(challenge, :shixun_id => @shixun) %>" data-remote="true"><i class="fa fa-long-arrow-up color-grey font-16 mr5" data-tip-down="上移"></i></a>
<% end %>
<% if @shixun.challenges.count != challenge.position %>
<a href="<%= index_down_shixun_challenge_path(challenge, :shixun_id => @shixun) %>" data-tip-down="下移" data-remote="true"><i class="fa fa-long-arrow-down color-grey font-16 mr5" ></i></a>
<a href="<%= index_down_shixun_challenge_path(challenge, :shixun_id => @shixun) %>" data-remote="true"><i class="fa fa-long-arrow-down color-grey font-16 mr5" data-tip-down="下移"></i></a>
<% end %>
<% end %>
<a href="<%= edit_shixun_challenge_path(challenge, :shixun_id => @shixun) %>" data-tip-down="编辑"><i class="fa fa-pencil-square-o color-grey font-16 mr5" ></i></a>
<a href="<%= edit_shixun_challenge_path(challenge, :shixun_id => @shixun) %>" ><i class="fa fa-pencil-square-o color-grey font-16 mr5" data-tip-down="编辑"></i></a>
<!-- <a href="#" title="删除" ><i class="fa fa-trash-o color-grey font-16 mr5" ></i></a>-->
<!--<a href="#" title="排名" ><i class="fa fa-signal color-grey font-16 mr5 " ></i></a>-->
</p>

View File

@ -12,7 +12,7 @@
<% end %>
<div class="task-pm-box mt20">
<div class="panel-header">
<h3 class="shixun_title">简介</h3>
<h3 class="shixun_title" style="height:40px;line-height:40px;">简介</h3>
</div>
<div class="task-paner-con break_full_word new_li" id="challenge_editorMd_description">

View File

@ -68,10 +68,10 @@
<%= render :partial => "games/shixun_comment_block" %>
<li class="fl mt10 ml20 " style="width:54px;margin-bottom:10px;"><a href="javascript:void(0);" onclick="send_dis_to_shixun()" class="course-bth-blue color_white">发送</a></li>
<li class="fl ml20 mt15" style="width:85px;margin-bottom:10px;">
<span title="<%= @praise.nil? ? "点赞" : "取消点赞" %>" onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20">
<span data-tip-left="<%= @praise.nil? ? "点赞" : "取消点赞" %>" onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20">
<i class="fa fa-thumbs-up font-20 mr3 <%= @praise.nil? ? "" : "color-light-green" %>" alt="赞" ></i><span class="font-12 font-bd" id="game_praise_count"><%= @praise_count %></span>
</span>
<span title="<%= @tread.nil? ? "踩" : "取消踩" %>" onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;">
<span data-tip-right="<%= @tread.nil? ? "踩" : "取消踩" %>" onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;">
<i class="fa fa-thumbs-down font-20 mr3 <%= @tread.nil? ? "" : "color-orange" %>" ></i><span class="font-12 font-bd" id="game_tread_count"><%= @tread_count %></span>
</span>
</li>

View File

@ -19,5 +19,7 @@
url: "<%= refresh_game_list_myshixun_game_path(game, :myshixun_id => myshixun) %>",
dataType: "script"
});
};
//$("#all_task_show").css("display","none");
}
</script>

View File

@ -12,7 +12,7 @@
</li>
<div class="fr mt5 -horizontal">
<% if @path == @game.challenge.path.try(:strip) %>
<a href="javascript:void(0);" onclick="delete_confirm_box('<%= reset_original_code_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %>', '你在本文件中修改的内容将丢失<br />是否确定重新加载初始代码');" title="恢复初始代码"><i class="fa fa-rotate-left font-18 mr5"></i></a>
<a href="javascript:void(0);" onclick="delete_confirm_box('<%= reset_original_code_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %>', '你在本文件中修改的内容将丢失<br />是否确定重新加载初始代码');" data-tip-left="恢复初始代码"><i class="fa fa-rotate-left font-18 mr5"></i></a>
<% end %>
<a href="javascript:void(0);" onclick="repository_extend_and_zoom();" id="extend_and_zoom"><i class="fa fa-expand font-16"></i></a>
</div>

View File

@ -261,7 +261,7 @@
<div id="show_account_div" class="">
<div class="panel-form mr15 mt30">
<a href="javascript:void(0);" class="fr mb10" title="编辑资料" id="edit_my_account"><i class="fa fa-edit font-16"></i></a>
<a href="javascript:void(0);" class="fr mb10" id="edit_my_account"><i class="fa fa-edit font-16" data-tip-down="编辑资料"></i></a>
<div class="cl"></div>
<ul>

View File

@ -74,3 +74,119 @@ function showPreview(source) {
}
</script>
<!--<script>-->
<!--// function showPreview(source) {-->
<!--// var file = source.files[0];-->
<!--// if(window.FileReader) {-->
<!--// var fr = new FileReader();-->
<!--// fr.onloadend = function(e) {-->
<!--// document.getElementById("avatar_image").src = e.target.result;-->
<!--// };-->
<!--// fr.readAsDataURL(file);-->
<!--// }-->
<!--// }-->
<!--</script>-->
<!--<div class="col-width-10 mt20" style="padding:20px 0 0 300px">-->
<!--<div class="clearfix ml30">-->
<!--<div class="fl" style="border:1px solid #eaeaea;width:120px;height:120px;">-->
<!--<img style="width:100%;height:100%;" src="bg1.jpg"/>-->
<!--</div>-->
<!--<input type="hidden" value="<%#= @school_name%>" name="school_name" class="w150">-->
<!--<%#= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar ml25")%>-->
<!--<a type="button" onclick="$('#file').click();" style="margin: 90px 0 0 0px;padding: 2px 5px;cursor: pointer;text-decoration: none;width: 70px;" class="fl color-grey">上传图片</a>-->
<!--<%#= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>-->
<!--<a type="button"style="margin: 90px 0 0 0px;padding: 2px 5px;cursor: pointer;text-decoration: none;width: 70px;" class="fl color-grey">删除图片</a>-->
<!--<div class="cl"></div>-->
<!--</div>-->
<!--<div class="">-->
<!--<div class="panel-form mr15">-->
<!--<ul>-->
<!--<li class="clearfix">-->
<!--<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>单位全称:</label>-->
<!--<input id="schoolname" type="text" class="task-form-40 task-height-40 panel-box-sizing fl" onBlur='ifNameRepeat();' onFocus='$("#schoolrepeatnotice").hide();$("#schoolrepeatnotice").attr("value",1);' placeholder="学校名称或者工作单位名称">-->
<!--<i id="school_name_check" class="fa font-16 ml5 mt10 fl"></i>-->
<!--<span class="color-orange fl hint none" id="schoolrepeatnotice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>名称已存在</span>-->
<!--</li>-->
<!--<li class="clearfix mb10">-->
<!--<label class="panel-form-label1 fl" >&nbsp;</label>-->
<!--<div class="fl"><span>示例:</span>-->
<!--<p><i class="fa fa-check-circle font-16 color-light-green mr5"></i>国防科学技术大学</p>-->
<!--<p><i class="fa fa-times-circle font-16 color-orange mr5"></i>国防科学技术大学四方坪校区</p>-->
<!--<p><i class="fa fa-times-circle font-16 color-orange mr5"></i>国防科学技术大学计算机学院</p>-->
<!--</div>-->
<!--</li>-->
<!--<li class="clearfix">-->
<!--<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>子单位全称:</label>-->
<!--<input id="schoolname" type="text" class="task-form-40 task-height-40 panel-box-sizing fl" onBlur='ifNameRepeat();' onFocus='$("#schoolrepeatnotice").hide();$("#schoolrepeatnotice").attr("value",1);' placeholder="学院名称或者部门名称">-->
<!--<i id="school_name_check" class="fa font-16 ml5 mt10 fl"></i>-->
<!--<span class="color-orange fl hint none" id="schoolrepeatnotice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>名称已存在</span>-->
<!--</li>-->
<!--<li class="clearfix mb10">-->
<!--<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>地区:</label>-->
<!--<select onchange="showcity(this.value, document.getElementById('schoolCity'));" name="province" id="schollProvince" class="fl task-height-40 task-form-20" style="width:19%; ">-->
<!--<option value="">--请选择省份--</option>-->
<!--<option value="北京">北京</option>-->
<!--<option value="上海">上海</option>-->
<!--<option value="广东">广东</option>-->
<!--<option value="江苏">江苏</option>-->
<!--<option value="浙江">浙江</option>-->
<!--<option value="重庆">重庆</option>-->
<!--<option value="安徽">安徽</option>-->
<!--<option value="福建">福建</option>-->
<!--<option value="甘肃">甘肃</option>-->
<!--<option value="广西">广西</option>-->
<!--<option value="贵州">贵州</option>-->
<!--<option value="海南">海南</option>-->
<!--<option value="河北">河北</option>-->
<!--<option value="黑龙江">黑龙江</option>-->
<!--<option value="河南">河南</option>-->
<!--<option value="湖北">湖北</option>-->
<!--<option value="湖南">湖南</option>-->
<!--<option value="江西">江西</option>-->
<!--<option value="吉林">吉林</option>-->
<!--<option value="辽宁">辽宁</option>-->
<!--<option value="内蒙古">内蒙古</option>-->
<!--<option value="宁夏">宁夏</option>-->
<!--<option value="青海">青海</option>-->
<!--<option value="山东">山东</option>-->
<!--<option value="山西">山西</option>-->
<!--<option value="陕西">陕西</option>-->
<!--<option value="四川">四川</option>-->
<!--<option value="天津">天津</option>-->
<!--<option value="新疆">新疆</option>-->
<!--<option value="西藏">西藏</option>-->
<!--<option value="云南">云南</option>-->
<!--<option value="香港">香港特别行政区</option>-->
<!--<option value="澳门">澳门特别行政区</option>-->
<!--<option value="台湾">台湾</option>-->
<!--<option value="海外">海外</option>-->
<!--</select>-->
<!--<select name="city" id="schoolCity" class="fl task-height-40" style="width:19%;margin-left:2%;"></select>-->
<!--<div class="cl"></div>-->
<!--<span class="color-orange fl hint none" id="province_notice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请选择省份和城市</span>-->
<!--</li>-->
<!--<li class="clearfix mb10">-->
<!--<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>详细地址:</label>-->
<!--<input type="text" id="address" class="task-form-40 task-height-40 panel-box-sizing fl" placeholder="请填写完整的地址信息">-->
<!--<div class="cl"></div>-->
<!--<span class="color-orange fl hint none" id="address_notice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请填写单位的详细地址</span>-->
<!--</li>-->
<!--<li class="clearfix" style="margin-left:50%;">-->
<!--<a href="javascript:void(0);" onclick="hideModal();" id="" class="task-btn mr10">取消</a>-->
<!--<a href="javascript:void(0);" id="" class="task-btn task-btn-blue ">确定</a>-->
<!--</li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->

View File

@ -33,7 +33,7 @@
<% stage.stage_shixuns.each_with_index do |stage_shixun, index| %>
<% shixun = stage_shixun.shixun %>
<div class="clearfix pt10 pb10 paragraph pl20 pr20" id="stage_shixun_<%= shixun.id %>"
style="<%= allow_shixun_exec(shixun) ? "" : "cursor: pointer" %>;" onclick="<%= allow_shixun_exec(shixun) ? "" : "shixun_link('#{shixun.identifier}')" %>">
style="<%= allow_shixun_exec(shixun) ? "" : "cursor: pointer" %>;" onclick="<%= allow_shixun_exec(shixun) ? "" : (shixun.status < 2 && !User.current.manager_of_shixun?(shixun) ? "" : "shixun_link('#{shixun.identifier}')") %>">
<li class="fl li-width63">
<i class="fa fa-sort-up color-grey-c fl transform90 font-18 icon-set mr5"></i>
<span class="color-grey3 paragraph_name"><%= s_index + 1 %>-<%= index + 1 %>&nbsp;&nbsp;<%= shixun.name %></span>
@ -68,7 +68,7 @@
<% end %>
<% end %>
<% if shixun.status < 2 && !User.current.manager_of_shixun?(shixun) %>
<a class="task-btn task-btn-grey ml10" style="display: none">正在完善</a>
<a class="task-btn task-btn-grey ml10" style="display: none;cursor: default;">正在完善</a>
<% else %>
<%= link_to "查看详情", shixun_path(shixun), :class => "task-btn task-btn-green ml10", :style=>"display: none", :target => "_blank" %>
<% end %>

View File

@ -22,7 +22,7 @@
<% end %>
</span>
<!--<span class=" ml30">No.501 排名 </span>-->
<span class="w150 fl"><%= format_time(shixun.updated_at) %> 开启 </span>
<span class="w150 fl"><%= format_time(shixun.updated_at) %> 更新 </span>
</p>
</div>
<a href="<%= shixun_path(shixun) %>" class="fr task-btn task-btn-blue mt15">查看详情</a>

View File

@ -120,7 +120,7 @@ $(function(){
$desc.show().css({
left:$(this).offset().left +30,
opacity:0.7,
top:$(this).offset().top-$desc.height()/4
top:$(this).offset().top-$desc.height()/8
});
});
$("[data-tip-left]").live("mouseenter",function(){
@ -129,7 +129,7 @@ $(function(){
$desc.show().css({
left:$(this).offset().left-$desc.width()-10,
opacity:0.7,
top:$(this).offset().top-$desc.height()/4
top:$(this).offset().top-$desc.height()/8
});
});

View File

@ -536,6 +536,7 @@ function search_group_member_submit(){
}
function submit_new_student_work(type){
console.log($("#_file").attr("name"));
var result = true;
if(student_work_description_editor.isEmpty()){
result = false;
@ -557,9 +558,13 @@ function submit_new_student_work(type){
notice_box("成员人数不符合要求");
}
}
// if(lebel_file_uploding!==0){
// result = false;
// notice_box("有文件正在上传请洒红后提交");
// }
if(result){
student_work_description_editor.sync();
$("#student_work_form").submit();
//$("#student_work_form").submit();
}
}

View File

@ -92,6 +92,7 @@ a.task-header-name{ max-width:200px;}
.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; }
.panel-form-label1{ display:inline-block; width:20%; min-width:90px; text-align:right; line-height:40px; }
.panel-form input,.panel-form textarea{ border:1px solid #e2e2e2;color:#666;line-height: 1.9;}
.panel-box-sizing{-moz-box-sizing: border-box; /*Firefox3.5+*/-webkit-box-sizing: border-box; /*Safari3.2+*/-o-box-sizing: border-box; /*Opera9.6*/-ms-box-sizing: border-box; /*IE8*/box-sizing: border-box; }
input.panel-form-width-690{ padding:5px;width:90%; height:40px; min-width:700px;}