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

This commit is contained in:
cxt 2017-09-05 17:06:28 +08:00
commit 04bc8c4b42
15 changed files with 76 additions and 70 deletions

View File

@ -9,7 +9,7 @@
<% end %>
<% sy_author = User.find(sy.tea_id) %>
<div class="task-index-list-box-top">
<a href="<%= course_path(sy) %>" title="<%= sy.name %>" target="_blank">
<a href="<%= course_path(sy) %>" target="_blank">
<p class="font-14 task-index-list-title two_lines_show">
<%= sy.name %>
</p>

View File

@ -1,10 +1,10 @@
<form action="<%= courses_path(:select => @select, :is_end => @is_end) %>" data-remote="true" class="fl ml15" id="search_syllabuses_name" >
<form action="<%= courses_path(:select => @select, :is_end => @is_end) %>" data-remote="true" class="fr ml15" id="search_syllabuses_name" >
<div class="searchFor fr" style="margin-top: -3px">
<div class="searchCon">
<input type="text" class="searchinput" name="search" value="<%= @search %>" placeholder="请输入实训名称的关键字进行搜索" style="background: none;"/>
<i class="fa fa-close mr5 color-dark-grey" onclick="colse_searchbox();" title="搜索"></i>
</div>
<i class="fa fa-search mr5 color-dark-grey search_icon" onclick="search_shixun()" style="margin:10px" title="搜索"></i>
<i class="fa fa-search mr5 color-dark-grey search_icon" onclick="search_shixun()" style="margin:10px" data-tip-down="搜索"></i>
</div>
</form>

View File

@ -12,11 +12,11 @@
<!-- <li><span class="color-orange font-bd"><%#= @create_syllabuses_count %></span><br/><span>你已创建</span></li>-->
</ul>
</div>
<div class="clearfix mb15 fl">
<div class="clearfix mb15 fl" style="width:100%;">
<a href="<%= courses_path(:select => "all", :is_end => @is_end,:search => @search) %>" id="courses_index_syllabuses_1" class="course_filtrate fl course_filtrate_bg" data-tab="all" data-remote="true">全部课堂</a>
<a href="<%= courses_path(:select => "create", :is_end => @is_end, :search => @search) %>" id="courses_index_syllabuses_2" class="course_filtrate fl" data-tab="create" data-remote="true">我管理的</a>
<a href="<%= courses_path(:select => "join", :is_end => @is_end, :search => @search) %>" id="courses_index_syllabuses_3" class="course_filtrate fl" data-tab="join" data-remote="true">我参与的</a>
<a href="<%= courses_path(:select => "end", :is_end => 1) %>" id="courses_index_syllabuses_4" class="course_filtrate fl" data-tab="end" data-remote="true">查看归档</a>
<!-- <li class="edu-dropdown fl ml15 mr5" id="thirdly_select" style="width: 100px">
<a href="javascript:void(0);" class="edu-dropdown-toggle" id="all_syllabuses" >所有课程<i class="fa fa-caret-down ml20"></i></a>
@ -29,8 +29,8 @@
<%= render :partial => "course_index_search" %>
</div>
<a href="<%= courses_path(:select => "end", :is_end => 1) %>" id="courses_index_syllabuses_4" class="color-grey fr" data-tab="end" data-remote="true">查看归档</a>
<a href="<%= courses_path(:select => "return", :is_end => 0) %>" class="color-grey fr undis" id="courses_index_syllabuses_5" data-remote="true">返回</a>
<!--<a href="<%#= courses_path(:select => "end", :is_end => 1) %>" id="courses_index_syllabuses_4" class="color-grey fr" data-tab="end" data-remote="true">查看归档</a>-->
<!--<a href="<%#= courses_path(:select => "return", :is_end => 0) %>" class="color-grey fr undis" id="courses_index_syllabuses_5" data-remote="true">返回</a>-->
<div class="cl"></div>
<div class="content clearfix" id="intelligence_course_list">
<%= render :partial => 'courses/courseList' %>
@ -144,18 +144,18 @@
});
/* -------------------恢复标签到初始位置-------------------- */
function reset_label_status(){
$(".course_filtrate").removeClass("course_filtrate_bg");
$("#courses_index_syllabuses_1").addClass("course_filtrate_bg");
$("input[name='search']").val("");
}
/* ---------------点击查看归档的返回----------------- */
$("#courses_index_syllabuses_5").on("click", function(){
reset_label_status()
});
/* ------------------查看归档----------------------- */
$("#courses_index_syllabuses_4").on("click", function(){
reset_label_status()
});
// function reset_label_status(){
// $(".course_filtrate").removeClass("course_filtrate_bg");
// $("#courses_index_syllabuses_1").addClass("course_filtrate_bg");
// $("input[name='search']").val("");
// }
// /* ---------------点击查看归档的返回----------------- */
// $("#courses_index_syllabuses_5").on("click", function(){
// reset_label_status()
// });
//
// /* ------------------查看归档----------------------- */
// $("#courses_index_syllabuses_4").on("click", function(){
// reset_label_status()
// });
</script>

View File

@ -3,11 +3,11 @@ $("#courses_index_syllabuses_1").attr('href', '<%= courses_path(:select => "all"
$("#courses_index_syllabuses_2").attr('href', '<%= courses_path(:select => "create", :is_end => @is_end, :search => @search) %>');
$("#courses_index_syllabuses_3").attr('href', '<%= courses_path(:select => "join", :is_end => @is_end, :search => @search) %>');
<% if params[:select] == "end" %>
$("#courses_index_syllabuses_4").hide();
$("#courses_index_syllabuses_5").show();
// $("#courses_index_syllabuses_4").hide();
// $("#courses_index_syllabuses_5").show();
<% elsif params[:select] == "return" %>
$("#courses_index_syllabuses_4").show();
$("#courses_index_syllabuses_5").hide();
// $("#courses_index_syllabuses_4").show();
// $("#courses_index_syllabuses_5").hide();
<% end %>
$("#all_syllabuses").html("<%= @syllabuses_num %>");
$("#my_syllabuses").html("<%= @join_syllabuses_count + @create_syllabuses_count %>");

View File

@ -16,9 +16,11 @@
<li id="tab_nav_1" class="tab_hover" onclick="HoverLi1(1);">
<a href="javascript:void(0);" class="tab_type" style="font-size: 16px">过关任务</a>
</li>
<% unless @shixun.propaedeutics.blank? %>
<li id="tab_nav_2" onclick="HoverLi1(2);">
<a href="javascript:void(0);" class="tab_type" style="font-size: 16px">背景知识</a>
</li>
<% end %>
<% unless @game_challenge.answer.blank? %>
<li id="tab_nav_3" onclick="open_answer('<%= @game.identifier %>', '<%= @myshixun.identifier %>')">
<a href="javascript:void(0);" class="tab_type" style="font-size: 16px">参考答案</a>

View File

@ -12,7 +12,7 @@
<% if game.try(:status) == 0 %>
<h4 class=" -task-list-title fl"><%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
<% if @myshixun.shixun.try(:status) == 2 %>
<a class="fr " data-tip-down="待完成"><i class="fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center" ></i></a>
<a class="fr"><i data-tip-down="待完成" class="fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center" ></i></a>
<% end %>
<% elsif game.try(:status) == 1 %>
<% if @myshixun.shixun.try(:status) == 2 %>
@ -24,12 +24,12 @@
<% elsif game.try(:status) == 2 %>
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
<% if @myshixun.shixun.try(:status) == 2 %>
<a class="fr" data-tip-down="已解决"><i class="fa fa-check-circle fr font-18 mt5 color-light-green w20_center" ></i></a>
<a class="fr"><i data-tip-down="已解决" class="fa fa-check-circle fr font-18 mt5 color-light-green w20_center" ></i></a>
<% end %>
<% elsif game.try(:status) == 3 %>
<% if @myshixun.shixun.try(:status) == 2 %>
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
<a class="fr" data-tip-down="未解锁"><i class="fa fa-play-circle fr font-18 mt5 color-grey w20_center" ></i></a>
<a class="fr"><i data-tip-down="未解锁" class="fa fa-play-circle fr font-18 mt5 color-grey w20_center" ></i></a>
<% else %>
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
<% end %>

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" id="edit_my_account"><i class="fa fa-pencil font-16" data-tip-down="编辑资料"></i></a>
<a href="javascript:void(0);" class="fr mb10" id="edit_my_account"><i class="fa fa-pencil font-16" data-tip-down="编辑资料"></i><span class="ml10 color-grey">编辑</span></a>
<div class="cl"></div>
<ul>

View File

@ -1,11 +1,4 @@
<ul class="nav_check_item clearfix">
<li class="fl <%= @order == 'myshixun_count' ? 'check_nav' : "" %>">
<%= link_to "最热", search_shixuns_path(:order => "myshixun_count", :shixun_status => @shixun_status, :status => @status, :language => @language, :search => @search, :trainee => @trainee, :major =>@major, :course => @course, :sort => @sort), :remote => true %>
</li>
<li class="fl <%= @order == 'created_at' ? 'check_nav' : "" %>">
<%= link_to "最新", search_shixuns_path(:order => "created_at", :shixun_status => @shixun_status, :status => @status, :language => @language, :search => @search, :trainee => @trainee, :major =>@major, :course => @course, :sort => @sort), :remote => true %>
</li>
</ul>
<div class="task-index-list clearfix mb20 mh320">
<% if @shixuns.blank? %>
<div style="background: #fff;padding-bottom: 15px;" class="user_bg_shadow">

View File

@ -1,32 +1,32 @@
<% update_visiti_count @shixun %>
<% update_visiti_count @shixun %>
<div class="task-header">
<div class="task-header-info">
<h2 class="fl">
<h2 class="fl font-24">
<a href="<%= user_path(@shixun.owner) %>" class="task-header-name fl"><%= @shixun.owner.try(:show_name) %></a>
<span class="ml5 mr5 fl">/ </span><p class="task-header-title fl" title="<%= @shixun.name %>"><%= @shixun.name %></p>
<span class="ml5 mr5 fl">/ </span><p class="task-header-title fl"><%= @shixun.name %></p>
</h2>
<!-- <div><%#= link_to "测试", shixun_test_shixun_path(@shixun), :class => "fl ml10 mr10" %></div>-->
<% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => @shixun.id).first %>
<% if allow_shixun_exec(@shixun) %>
<% if @shixun.status == 0 %>
<% if User.current.manager_of_shixun?(@shixun) %>
<%= link_to "模拟实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15", :id => "shixun_operation",:remote => true %>
<%= link_to "模拟实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15 mt10", :id => "shixun_operation",:remote => true %>
<%#= link_to_shixun_exec myshixun, @shixun, '模拟实战' %>
<a href="javascript:void(0);" data-option="1" onclick="apply_publish_shixun('<%= publish_shixun_path(@shixun) %>')" id="apply_publish_shixun" class="fr shixun-task-btn task-btn-green mr15">申请发布</a>
<%#= link_to "申请发布", publish_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15", :id => "challenge_begin", :remote => true %>
<a href="javascript:void(0);" data-option="1" onclick="apply_publish_shixun('<%= publish_shixun_path(@shixun) %>')" id="apply_publish_shixun" class="fr shixun-task-btn task-btn-green mr15 mt10">申请发布</a>
<%#= link_to "申请发布", publish_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15 mt10", :id => "challenge_begin", :remote => true %>
<% end %>
<% elsif @shixun.status == 1 %>
<%= link_to "模拟实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15", :id => "shixun_operation", :remote => true %>
<%= link_to "模拟实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15 mt10", :id => "shixun_operation", :remote => true %>
<%#= link_to_shixun_exec myshixun, @shixun, '模拟实战' %>
<% if User.current.manager_of_shixun?(@shixun) %>
<%= link_to "撤销发布", cancel_publish_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-grey-white mr15", :id => "challenge_begin" %>
<%= link_to "撤销发布", cancel_publish_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-grey-white mr15 mt10", :id => "challenge_begin" %>
<% end %>
<% elsif @shixun.status == 2 %>
<% if myshixun.blank? %>
<%= link_to "开始实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15", :id => "shixun_operation", :remote => true %>
<%= link_to "开始实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15 mt10", :id => "shixun_operation", :remote => true %>
<%#= link_to_shixun_exec myshixun, @shixun, '开始实战' %>
<% else %>
<%= link_to "继续实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15", :id => "shixun_operation", :remote => true %>
<%= link_to "继续实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15 mt10", :id => "shixun_operation", :remote => true %>
<!--<a href="javascript:void(0);" onclick="apply_send_shixun()" id="apply_send_shixun" class="fr shixun-task-btn task-btn-green mr15">发送至</a>-->
<% end %>
<%# if User.current.manager_of_shixun?(@shixun) %>
@ -34,7 +34,7 @@
<%# end %>
<% elsif @shixun.status == 3 %>
<% unless myshixun.blank? %>
<%= link_to "继续实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15", :id => "shixun_operation", :remote => true %>
<%= link_to "继续实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15 mt10", :id => "shixun_operation", :remote => true %>
<!--<a href="javascript:void(0);" onclick="apply_send_shixun()" id="apply_send_shixun" class="fr shixun-task-btn task-btn-green mr15">发送至</a>-->
<% end %>
<a href="javascript:void(0);" class="fr shixun-task-ban-btn mr15">已关闭</a>
@ -42,9 +42,9 @@
<% end %>
<div class="cl"></div>
<% unless User.current.manager_of_shixun?(@shixun) %>
<span class="font-12 color-grey fl"><%= @shixun.language %></span>
<span class="font-12 color-grey fl ml20"><%= @shixun.shixun_trainee %></span>
<span class="font-12 color-grey fl ml20"><%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %></span>
<span class="font-16 color-grey fl" data-tip-down = "技术平台"><%= @shixun.language %></span>
<span class="font-16 color-grey fl ml20" data-tip-down = "面向学员"><%= @shixun.shixun_trainee %></span>
<span class="font-16 color-grey fl ml20" data-tip-down = "适用课程"><%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %></span>
<% end %>
</div>
</div>

View File

@ -30,11 +30,11 @@
</div>
<span class="fr more_check geng_down">
<span class="color-grey">更多</span>
<i class="fa fa-angle-down mr5 color-grey" title="更多"></i>
<i class="fa fa-angle-down mr5 color-grey" data-tip-down="更多"></i>
</span>
<span class="fr more_check shou_up" style="display: none;">
<span class="color-grey">收起</span>
<i class="fa fa-angle-up mr5 color-grey shou_up" title="收起"></i>
<i class="fa fa-angle-up mr5 color-grey shou_up" data-tip-down="收起"></i>
</span>
</div>
<div class="course-nav-row bottomdashed1 clearfix">
@ -170,16 +170,26 @@
<div class="searchFor fr">
<div class="searchCon">
<input type="text" class="searchinput" name="search" placeholder="请输入实训名称的关键字进行搜索"/>
<i class="fa fa-close mr5 color-dark-grey" onclick="colse_searchbox();" title="搜索"></i>
<i class="fa fa-close mr5 color-dark-grey" onclick="colse_searchbox();" data-tip-down="关闭"></i>
</div>
<i class="fa fa-search mr5 color-dark-grey search_icon" onclick="search_shixun()" style="margin:10px" title="搜索"></i>
<i class="fa fa-search mr5 color-dark-grey search_icon" onclick="search_shixun()" style="margin:10px" data-tip-down="搜索"></i>
</div>
</div>
</div>
</form>
<div id="shixun_list_content">
<%= render "shixun_list" %>
<ul class="nav_check_item clearfix">
<li class="fl <%= @order == 'myshixun_count' ? 'check_nav' : "" %>">
<%= link_to "最热", search_shixuns_path(:order => "myshixun_count", :shixun_status => @shixun_status, :status => @status, :language => @language, :search => @search, :trainee => @trainee, :major =>@major, :course => @course, :sort => @sort), :remote => true %>
</li>
<li class="fl <%= @order == 'created_at' ? 'check_nav' : "" %>">
<%= link_to "最新", search_shixuns_path(:order => "created_at", :shixun_status => @shixun_status, :status => @status, :language => @language, :search => @search, :trainee => @trainee, :major =>@major, :course => @course, :sort => @sort), :remote => true %>
</li>
</ul>
<div id="shixun_list_content_2">
<%= render "shixun_list" %>
</div>
</div>
</div>
</div>
@ -317,6 +327,7 @@
})
//点击搜索图标,显示搜索框
$(".search_icon").click(function(){
console.log($("#shixun_index_search_form").serialize());
if($(".searchCon").is(":visible")){
$.ajax({
url: '/shixuns/search',
@ -349,6 +360,7 @@
//搜索实训
function search_shixun(){
console.log($("#shixun_index_search_form").serialize());
if($(".searchCon").is(":visible")){
$.ajax({
url: '/shixuns/search',

View File

@ -1,2 +1,2 @@
$("#shixun_course_search").html("<%= escape_javascript( render :partial => 'shixuns/shixun_course_search') %>");
$("#shixun_list_content").html('<%= escape_javascript( render :partial => 'shixuns/shixun_list') %>');
$("#shixun_list_content_2").html('<%= escape_javascript( render :partial => 'shixuns/shixun_list') %>');

View File

@ -2,7 +2,7 @@
<p style="line-height: 42px;">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> &gt; <%= link_to "实训路径", subjects_path() %>
&gt; <span>编辑</span>
&gt; <span>编辑实训路径</span>
</p>
<div class="edu-con-top user_bg_shadow">
<span class="ml15 color-grey font-16">编辑实训路径</span>

View File

@ -2,7 +2,7 @@
<p style="line-height: 42px;">
<i class="fa fa-map-marker mr5 color-grey"></i>
<%= link_to User.current.show_name, user_path(User.current) %> &gt; <%= link_to "实训路径", subjects_path() %>
&gt; <span>新建</span>
&gt; <span>新建实训路径</span>
</p>
<div class="edu-con-top user_bg_shadow">
<span class="ml15 color-grey3 font-16">新建实训路径</span>

View File

@ -82,7 +82,6 @@ $(function(){
$("#comment_news").focus();
}
// end
// 点击全部任务向右侧展开
$("#all_task_show").on("click", function(e){
c = 0;
@ -280,12 +279,12 @@ function game_praise(obj_id, obj_type){
praiseStatus = true; //已赞
praise_count.html(data.praise_tread_count);
$("#game_praise_tread").children("i").addClass("color-light-green");
$("#game_praise_tread").attr("title", "取消点赞")
$("#game_praise_tread").attr("data-tip-left", "取消点赞")
}else{
praiseStatus = false; //取消赞
praise_count.html(data.praise_tread_count);
$("#game_praise_tread").children("i").removeClass("color-light-green");
$("#game_praise_tread").attr("title", "点赞")
$("#game_praise_tread").attr("data-tip-left", "点赞")
}
}
});
@ -306,12 +305,12 @@ function game_tread(obj_id){
treadStatus = true; // 取消踩
tread_count.html(data.praise_tread_count);
$("#game_tread").children("i").addClass("color-orange");
$("#game_tread").attr("title", "取消踩")
$("#game_tread").attr("data-tip-right", "取消踩")
}else{
treadStatus = false; // 已踩
tread_count.html(data.praise_tread_count);
$("#game_tread").children("i").removeClass("color-orange");
$("#game_tread").attr("title", "踩");
$("#game_tread").attr("data-tip-right", "踩");
}
}
});

View File

@ -73,17 +73,17 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top:
.task-popup-content{ padding:0px 15px 15px 15px;}
.task-popup-submit{ margin: 0 auto 15px; width: 120px;}
/* TPM */
.task-header{ width: 100%;min-width:1200px; background:url("/images/task/task-bg-header.png") 0 0 repeat-x; height: 100px;}
.task-header-info{ width: 1200px; margin: 0 auto; color:#fff; padding:30px 0;}
.task-header{ width: 100%;min-width:1200px; background:url("/images/task/task-bg-header.png");height: 180px;background-size: cover;;display: flex;align-items: center;}
.task-header-info{ width: 1200px; margin: 0 auto; color:#fff}
.task-header-info h2 a,.task-header-info h2{ font-weight: normal;color:#fff;}
a.task-header-name{ max-width:200px;}
.task-header-title{ display: block; max-width:750px;word-wrap: break-word;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.task-header-nav{ width: 100%;min-width:1200px; height:50px; background:#282c37;}
.task-header-nav{ width: 100%;min-width:1200px; height:50px;box-shadow:0px 0px 8px #ccc;}
.task-header-navs{ width: 1200px; margin: 0 auto;}
.task-header-navs li{ float: left;}
.task-header-navs li a{ display: block; height: 50px; padding:0 50px; color:#fff; text-align: center; font-size: 16px; line-height: 50px;}
.task-header-navs li a:hover{ color:#29bd8b;}
.task-header-navs li a.active{ background:#29bd8b;color:#fff;}
.task-header-navs li a{ display: block; height: 50px; padding:0 50px; color:#666; text-align: center; font-size: 16px; line-height: 50px;}
.task-header-navs li a:hover{ color:#FC7033;}
.task-header-navs li a.active{ ;border-bottom: 2px solid #FC7033;color:#FC7033;}
.task-pm-content{ width: 1200px; margin: 0 auto; min-height:566px}
.task-pm-box{ width: 100%; background: #fff; border: 1px solid #e8e8e8;}
.task-paner-con{ padding:15px; color:#666; line-height:2.0;}