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

This commit is contained in:
huang 2017-08-25 20:48:31 +08:00
commit 0ddfa360af
7 changed files with 136 additions and 126 deletions

View File

@ -13,7 +13,7 @@
<li class="blacktab_con" onclick="check_tab('blacktab_con','blacktab_hover',this);">
<a href="javascript:void(0);" class="tab_type tab_color" >评测信息</a>
</li>
<a href="javascript:void(0);" onclick="valuation_extend_and_zoom();" id="valuation_extend_and_zoom"><i class="fa fa-expand font-16 color-grey fr mt10 mr15" ></i></a>
<a href="javascript:void(0);" onclick="valuation_extend_and_zoom();" id="valuation_extend_and_zoom"><i class="fa fa-arrows-alt font-16 color-grey fr mt10 mr15" ></i></a>
<div class="cl"></div>
</ul>
<div class="cl"></div>

View File

@ -14,7 +14,7 @@
<% 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>
<% end %>
<a href="javascript:void(0);" onclick="repository_extend_and_zoom();" id="extend_and_zoom"><i class="fa fa-arrows-alt font-16"></i></a>
<a href="javascript:void(0);" onclick="repository_extend_and_zoom();" id="extend_and_zoom"><i class="fa fa-expand font-16"></i></a>
</div>
<div class="cl"></div>
</ul>

View File

@ -1,9 +1,11 @@
<div class="wrap-big mt20 pr" style="min-height: 600px">
<div class="popup_tip_box fontGrey2" style="right:-222px; top:68px;position: absolute">
<div class="popup_tip_box fontGrey2" style="right:-315px; top:68px;position: absolute">
<em></em>
<span></span>
<p class="font-12">
提交代码时,账号请用绑定的邮箱<br/>密码请用平台登录密码
使用Git提交代码时请在Git客户端填写如下信息<br/>
* 用户名:请使用您绑定的邮箱<br/>
* 口令:请使用您的登录口令<br/>
</p>
</div>
<div class="repository_con" style="line-height:1.9;">

View File

@ -22,7 +22,7 @@
<!--<span class="color-orange ml20 fl none" style="margin-left: 12%;" id="new_subject_intro_notice"><i class="fa fa-exclamation-circle mr5" ></i>请输入描述</span>-->
<!--</li>-->
<li class="clearfix pt20">
<label class="panel-form-label label fl">简介</label>
<label class="panel-form-label label fl"><span class="color-orange">*</span>简介</label>
<textarea name="subject[description]" id="new_subject_description" class="task task-height-220 panel-box-sizing task-form-80 fl color-grey ml20"></textarea>
<div class="cl"></div>
<span class="color-orange ml20 fl none" style="margin-left: 12%;" id="new_subject_description_notice"><i class="fa fa-exclamation-circle mr5" ></i>请输入简介</span>

View File

@ -1,111 +1,117 @@
<div class="with75 fl">
<!--简介-->
<% if !@subject.description.blank? || User.current.manager_of_subject?(@subject) %>
<div class="pb20 produce-content bor-bottom-greyE">
<p class="clearfix">
<% if User.current.manager_of_subject?(@subject) %>
<a href="<%= edit_subject_path(@subject) %>"><i class="fa fa-pencil fr mt10 mr5 color-grey-c edit-produce"data-tip-down="编辑"></i></a>
<% end %>
</p>
<div class="mt10 color-dark-grey <%= @subject.description.blank? ? 'color-light-grey' : '' %>">
<%= @subject.description.blank? ? "暂未填写" : "简介:"+@subject.description %>
</div>
</div>
<% end %>
<!--新版阶段列表-->
<div class="lesson-saved-list mb20">
<% count = 0 %>
<% @stages.each_with_index do |stage, s_index| %>
<div class="lesson-saved-list-item pt10 pb10 bor-bottom-greyE" id="stage_div_<%= stage.id %>">
<p class="clearfix title-line">
<i class="fa fa-pause-circle color-light-green font-16 transform90"></i>
<span class="font-16 font-bd">第<%= s_index + 1 %>章&nbsp;&nbsp;<%= stage.name %></span>
<% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
<a href="javascript:void(0);" class="fr" onclick="edit_stage(<%= stage.id %>)"><i class="fa fa-pencil mt8 color-grey-c edit" data-tip-down="编辑"></i></a>
<a href="javascript:void(0);" class="fr" onclick="delete_confirm_box_2('<%= stage_path(stage) %>', '确定要删除该阶段吗?');"><i class="fa fa-trash mt8 mr10 color-grey-c delete" data-tip-down="删除"></i></a>
<% else %>
<a href="javascript:void(0);" onclick="for_paragraph(this)" class="fr"><i class="fa fa-sort-down mt8 color-grey-c"></i></a>
<!--简介-->
<% if !@subject.description.blank? || User.current.manager_of_subject?(@subject) %>
<div class="pb20 produce-content bor-bottom-greyE">
<p class="clearfix">
<% if User.current.manager_of_subject?(@subject) %>
<a href="<%= edit_subject_path(@subject) %>"><i class="fa fa-pencil fr mt10 mr5 color-grey-c edit-produce"data-tip-down="编辑"></i></a>
<% end %>
</p>
<div class="detail_for_paragraph clearfix">
<p class="ml20 color-dark-grey mt10 mb10"><%= stage.description %></p>
<% stage.stage_shixuns.each_with_index do |stage_shixun, index| %>
<% shixun = stage_shixun.shixun %>
<div class="clearfix pt10 pb10 ml20 pl10 mb10 paragraph" id="stage_shixun_<%= shixun.id %>" style="cursor: pointer;" onclick="shixun_link('<%= shixun.identifier %>')">
<li class="fl li-width63">
<i class="fa fa-sort-up color-grey-c fl mt5 mr10 transform90 font-18"></i>
<span class="color-grey3 paragraph_name"><%= s_index + 1 %>-<%= index + 1 %>&nbsp;&nbsp;<%= shixun.name %></span>
</li>
<li class="fr mr20 status_li">
<% if @subject.status < 2 %>
<span class="color-grey paragraph_status"><%= shixun.shixun_status %></span>
<% else %>
<% case my_shixun_status(shixun, User.current) %>
<% when '已通关' %>
<span class="status_sx">已通关</span>&nbsp;&nbsp;<i class="fr fa fa-check-circle color-light-green font-18 mr5 mt5" title="已通关"></i>
<% when '未通关' %>
<span class="status_sx">未通关</span>&nbsp;&nbsp;<i class="fr fa fa-play-circle color-light-green font-18 mr5 mt5" title="未通关"></i>
<% when '未开启' %>
<span class="status_sx">未开启</span>&nbsp;&nbsp;<i class="fr fa fa-play-circle color-grey-c font-18 mr5 mt5" title="未开启"></i>
<% end %>
<% end %>
<% if shixun.status > 1 %>
<% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => shixun.id).first %>
<% if myshixun.blank? %>
<%= link_to "开始实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange ", :style=>"display: none", :id => "shixun_operation", :remote => true %>
<% else %>
<%= link_to "继续实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange", :style=>"display: none", :id => "shixun_operation", :remote => true %>
<% end %>
<% end %>
</li>
</div>
<% end %>
<div class="mt10 color-dark-grey <%= @subject.description.blank? ? 'color-light-grey' : '' %>">
<%= @subject.description.blank? ? "暂未填写" : "简介:"+@subject.description %>
</div>
</div>
<% end %>
</div>
<% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
<div class="lesson-edit-content mb20">
<% if @stages.count == 0 %>
<%= form_for('', :url => {:controller => 'stages', :action => 'create', :subject => @subject.id}, :method => "post", :html => {:id => 'new_stage_form'}) do |f| %>
<div class="stage-item mb20 clearfix user_bg_shadow">
<div class="stage clearfix mb20">
<li class="fl font-16 font-bd">阶段<span class="font-16 font-bd">1</span></li>
<li class="fr">
<a class="task-btn color_white bc-grey del-editstage" onclick="deleditstage(this);">删除</a>
<a class="course-bth-blue color_white" onclick="saveeidtsatge(this);">保存</a>
</li>
</div>
<div class="stage-entry clearfix">
<li class="clearfix ml10 mr10">
<label class="fl"><span class="color-orange mr5">*</span>名称:</label>
<input class="stage-name fl" name="stage_name" style="background: none;" maxlength="100" placeholder="请输入阶段名称,最多100个字符,如基础知识、第1章等" size="100" type="text">
<p class="color-red clearfix" style="height: 20px;width: 90%;margin-left: 55px"><span id="stage_name_notice" style="display: none;"><i class="fa fa-exclamation-circle color-red mr5"></i>阶段名称不能为空</span></p>
</li>
<li class="clearfix ml10 mb15">
<label class="fl">&nbsp;&nbsp;&nbsp;描述:</label>
<textarea name="stage_des" placeholder="请输入阶段描述最多200个字符" class="bewrite task-height-100"></textarea>
</li>
<li class="clearfix" style="width: 90%;padding-left: 65px">
<%= link_to '+选择实训', choose_subject_shixun_subject_path(@subject), :remote => true, :class => 'add-sx' %>
<p class="color-orange" style="height: 25px;">
<span id="sx_none_notice" class="fl none">至少选择一个实训</span>
<span id="sx_notice" class="fr">选择实训后,在页面上通过拖拽进行排序调整</span>
</p>
</li>
</div>
<div class="adding-stage-item clearfix" id="sortable">
</div>
<!--新版阶段列表-->
<div class="lesson-saved-list mb20">
<% count = 0 %>
<% @stages.each_with_index do |stage, s_index| %>
<div class="lesson-saved-list-item pt10 pb10 bor-bottom-greyE" id="stage_div_<%= stage.id %>">
<p class="clearfix title-line">
<i class="fa fa-pause-circle color-light-green font-16 transform90"></i>
<span class="font-16 font-bd">第<%= s_index + 1 %>章&nbsp;&nbsp;<%= stage.name %></span>
<% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
<a href="javascript:void(0);" class="fr" onclick="edit_stage(<%= stage.id %>)"><i class="fa fa-pencil mt8 color-grey-c edit" data-tip-down="编辑"></i></a>
<a href="javascript:void(0);" class="fr" onclick="delete_confirm_box_2('<%= stage_path(stage) %>', '确定要删除该阶段吗?');"><i class="fa fa-trash mt8 mr10 color-grey-c delete" data-tip-down="删除"></i></a>
<% else %>
<a href="javascript:void(0);" onclick="for_paragraph(this)" class="fr"><i class="fa fa-sort-down mt8 color-grey-c"></i></a>
<% end %>
</p>
<div class="detail_for_paragraph clearfix">
<p class="ml20 color-dark-grey mt10 mb10"><%= stage.description %></p>
<% stage.stage_shixuns.each_with_index do |stage_shixun, index| %>
<% shixun = stage_shixun.shixun %>
<div class="clearfix pt10 pb10 ml20 pl10 mb10 paragraph" id="stage_shixun_<%= shixun.id %>" style="cursor: pointer;" <%= shixun.status > 1 ? "" : "onclick='shixun_link('#{shixun.identifier}')'" %>>
<li class="fl li-width63">
<i class="fa fa-sort-up color-grey-c fl mt5 mr10 transform90 font-18"></i>
<span class="color-grey3 paragraph_name"><%= s_index + 1 %>-<%= index + 1 %>&nbsp;&nbsp;<%= shixun.name %></span>
</li>
<li class="fr mr20 status_li">
<% if @subject.status < 2 %>
<span class="color-grey paragraph_status"><%= shixun.shixun_status %></span>
<% else %>
<% if shixun.status > 1 %>
<% case my_shixun_status(shixun, User.current) %>
<% when '已通关' %>
<span class="status_sx">已通关</span>&nbsp;&nbsp;<i class="fr fa fa-check-circle color-light-green font-18 mr5 mt5" title="已通关"></i>
<% when '未通关' %>
<span class="status_sx">未通关</span>&nbsp;&nbsp;<i class="fr fa fa-play-circle color-light-green font-18 mr5 mt5" title="未通关"></i>
<% when '未开启' %>
<span class="status_sx">未开启</span>&nbsp;&nbsp;<i class="fr fa fa-play-circle color-grey-c font-18 mr5 mt5" title="未开启"></i>
<% end %>
<% else %>
<span class="status_sx">等待审核</span>&nbsp;&nbsp;<i class="fr fa fa-exclamation-circle u-color-light-red font-18 mr5 mt5" title="已通关"></i>
<% end %>
<% end %>
<% if allow_shixun_exec(shixun) %>
<% if shixun.status > 1 %>
<% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => shixun.id).first %>
<% if myshixun.blank? %>
<%= link_to "开始实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange ", :style=>"display: none", :id => "shixun_operation", :remote => true %>
<% else %>
<%= link_to "继续实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange", :style=>"display: none", :id => "shixun_operation", :remote => true %>
<% end %>
<% end %>
<% end %>
</li>
</div>
<% end %>
</div>
<% end %>
<% end %>
</div>
<div class="mb20 boxborder-dashed-orange color-light-grey click_add">
+点击新建阶段选择1至多个实训项目组成一个阶段
</div>
<% end %>
</div>
<% end %>
</div>
<% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
<div class="lesson-edit-content mb20">
<% if @stages.count == 0 %>
<%= form_for('', :url => {:controller => 'stages', :action => 'create', :subject => @subject.id}, :method => "post", :html => {:id => 'new_stage_form'}) do |f| %>
<div class="stage-item mb20 clearfix user_bg_shadow">
<div class="stage clearfix mb20">
<li class="fl font-16 font-bd">阶段<span class="font-16 font-bd">1</span></li>
<li class="fr">
<a class="task-btn color_white bc-grey del-editstage" onclick="deleditstage(this);">删除</a>
<a class="course-bth-blue color_white" onclick="saveeidtsatge(this);">保存</a>
</li>
</div>
<div class="stage-entry clearfix">
<li class="clearfix ml10 mr10">
<label class="fl"><span class="color-orange mr5">*</span>名称:</label>
<input class="stage-name fl" name="stage_name" style="background: none;" maxlength="100" placeholder="请输入阶段名称,最多100个字符,如基础知识、第1章等" size="100" type="text">
<p class="color-red clearfix" style="height: 20px;width: 90%;margin-left: 55px"><span id="stage_name_notice" style="display: none;"><i class="fa fa-exclamation-circle color-red mr5"></i>阶段名称不能为空</span></p>
</li>
<li class="clearfix ml10 mb15">
<label class="fl">&nbsp;&nbsp;&nbsp;描述:</label>
<textarea name="stage_des" placeholder="请输入阶段描述最多200个字符" class="bewrite task-height-100"></textarea>
</li>
<li class="clearfix" style="width: 90%;padding-left: 65px">
<%= link_to '+选择实训', choose_subject_shixun_subject_path(@subject), :remote => true, :class => 'add-sx' %>
<p class="color-orange" style="height: 25px;">
<span id="sx_none_notice" class="fl none">至少选择一个实训</span>
<span id="sx_notice" class="fr">选择实训后,在页面上通过拖拽进行排序调整</span>
</p>
</li>
</div>
<div class="adding-stage-item clearfix" id="sortable">
</div>
</div>
<% end %>
<% end %>
</div>
<div class="mb20 boxborder-dashed-orange color-light-grey click_add">
+点击新建阶段选择1至多个实训项目组成一个阶段
</div>
<% end %>
</div>
<div class="with25 fr">
<div class="edu-class-right-box ml15 mb20 user_bg_shadow bor-grey-e pl15 pt15 pr15">
@ -119,7 +125,7 @@
<div class="edu-class-right-box ml15 user_bg_shadow bor-grey-e pl15 pt15 pr15">
<p class="font-16">教学名师
<% if User.current == @subject.user %>
<i class="fa fa-pencil fr mt10 mr5 color-grey-c edit-produce font-12"data-tip-down="编辑" onclick="edit_produce();"></i>
<i class="fa fa-pencil fr mt10 mr5 color-grey-c edit-produce font-12"data-tip-down="编辑" onclick="edit_produce();"></i>
<% end %>
</p>
<div style="text-align: center" class="bor-bottom-greyE mb10">
@ -160,17 +166,19 @@
$(".paragraph").hover(function(){
if($(this).find(".status_li a").length>0){
$(this).find(".status_li a").show();
$(this).find(".status_li i").hide();
$(this).find(".status_li span").hide();
}
},function(){
$(this).find(".status_li a").hide();
$(this).find(".status_li i").show();
$(this).find(".status_li span").show();
})
$("#user_produce_text").blur(function(){
if($(this).val() != $(this).siblings(".produce").html()){
$.post(
'/users/' + $("#current_user_id").val() + '/edit_brief_introduction',
'/users/' + $("#current_user_id").val() + '/edit_brief_introduction',
{ brief_introduction: $(this).val() },
function (data) {
}
@ -279,8 +287,8 @@
}
}
//缩放章节实训
function for_paragraph(item){
$(item).parent("p").siblings(".detail_for_paragraph").slideToggle(500);
}
//缩放章节实训
function for_paragraph(item){
$(item).parent("p").siblings(".detail_for_paragraph").slideToggle(500);
}
</script>

View File

@ -42,54 +42,54 @@
<ul class="fl ml20">
<% if @user.authentication %>
<li class="pr user-info-span" title="已实名认证">
<li class="pr user-info-span" data-tip-down="已实名认证">
<i class="fa fa-user color-light-green" aria-hidden="true"></i><!--已实名认证-->
</li>
<% else %>
<% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 1).last %>
<% if apply_auth && apply_auth.status == 0 %>
<li class="pr user-info-span" title="实名认证中">
<li class="pr user-info-span" data-tip-down="实名认证中">
<i class="fa fa-user u-color-light-red" aria-hidden="true"></i><!--实名认证中-->
</li>
<% else %>
<li class="pr user-info-span" title="还未实名认证">
<li class="pr user-info-span" data-tip-down="未实名认证">
<i class="fa fa-user u-color-light-grey" aria-hidden="true"></i><!--还未实名认证-->
</li>
<% end %>
<% end %>
<% if @user.professional_certification %>
<li class="pr user-info-span" title="已职业认证">
<li class="pr user-info-span" data-tip-down="已职业认证">
<i class="fa fa-list-alt color-light-green" aria-hidden="true"></i><!--已职业认证-->
</li>
<% else %>
<% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 2).last %>
<% if apply_auth && apply_auth.status == 0 %>
<li class="pr user-info-span" title="职业认证中">
<li class="pr user-info-span" data-tip-down="职业认证中">
<i class="fa fa-list-alt u-color-light-red" aria-hidden="true"></i><!--职业认证中-->
</li>
<% else %>
<li class="pr user-info-span" title="还未职业认证">
<li class="pr user-info-span" data-tip-down="未职业认证">
<i class="fa fa-list-alt u-color-light-grey" aria-hidden="true"></i><!--还未职业认证-->
</li>
<% end %>
<% end %>
<% if @user.try(:phone).blank? %>
<li class="pr user-info-span font-16" title="还未绑定手机">
<li class="pr user-info-span font-16" data-tip-down="未绑定手机">
<i class="fa fa-mobile u-color-light-grey" aria-hidden="true"></i><!--还未绑定手机-->
</li>
<% else %>
<li class="pr user-info-span font-16" title="已绑定手机">
<li class="pr user-info-span font-16" data-tip-down="已绑定手机">
<i class="fa fa-mobile color-light-green" aria-hidden="true"></i><!--已绑定手机-->
</li>
<% end %>
<% if @user.try(:mail).blank? %>
<li class="pr user-info-span" title="还未绑定邮箱">
<li class="pr user-info-span" data-tip-down="未绑定邮箱">
<i class="fa fa-envelope u-color-light-grey" aria-hidden="true"></i><!--还未绑定邮箱-->
</li>
<% else %>
<li class="pr user-info-span" title="已绑定邮箱">
<li class="pr user-info-span" data-tip-down="已绑定邮箱">
<i class="fa fa-envelope color-light-green" aria-hidden="true"></i><!--已绑定邮箱-->
</li>
<% end %>

View File

@ -222,14 +222,14 @@ function repository_extend_and_zoom(){
nGameRes.addClass("-flex-basic100");
nGameEva.addClass("-flex-basic0");
nRIcon.addClass("fa-compress");
nRIcon.removeClass("fa-arrows-alt");
nRIcon.removeClass("fa-expand");
nMove.hide();
control = 1;
}else if(control == 1){
nGameRes.removeClass("-flex-basic100");
nGameEva.removeClass("-flex-basic0");
nRIcon.removeClass("fa-compress");
nRIcon.addClass("fa-arrows-alt");
nRIcon.addClass("fa-expand");
nMove.show();
control = 0;
}
@ -248,14 +248,14 @@ function valuation_extend_and_zoom(){
if(control_1 == 0){
nGameRes.addClass("-flex-basic0");
nGameEva.addClass("-flex-basic100");
nVIcon.removeClass("fa-expand");
nVIcon.removeClass("fa-arrows-alt");
nVIcon.addClass("fa-compress");
nMove.hide();
control_1 = 1;
}else if(control_1 == 1){
nGameRes.removeClass("-flex-basic0");
nGameEva.removeClass("-flex-basic100");
nVIcon.addClass("fa-expand");
nVIcon.addClass("fa-arrows-alt");
nVIcon.removeClass("fa-compress");
nMove.show();
control_1 = 0;