From 4b81715054824fbbccd021ed15964c6d9e6531e2 Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Tue, 5 Sep 2017 09:40:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=87=A0=E4=B8=AAissue=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_courseList.html.erb | 2 +- .../courses/_course_index_search.html.erb | 2 +- app/views/games/_game_show.html.erb | 2 ++ app/views/games/_games_list.html.erb | 6 ++--- app/views/shixuns/_shixun_list.html.erb | 9 +------- app/views/shixuns/index.html.erb | 22 ++++++++++++++----- app/views/shixuns/search.js.erb | 2 +- app/views/subjects/edit.html.erb | 2 +- app/views/subjects/new.html.erb | 2 +- public/javascripts/edu/edu_tpi.js | 9 ++++---- 10 files changed, 32 insertions(+), 26 deletions(-) diff --git a/app/views/courses/_courseList.html.erb b/app/views/courses/_courseList.html.erb index 60214c4cd..229d4d19d 100644 --- a/app/views/courses/_courseList.html.erb +++ b/app/views/courses/_courseList.html.erb @@ -9,7 +9,7 @@ <% end %> <% sy_author = User.find(sy.tea_id) %>
- +

<%= sy.name %>

diff --git a/app/views/courses/_course_index_search.html.erb b/app/views/courses/_course_index_search.html.erb index 7214be2ab..92592c4bc 100644 --- a/app/views/courses/_course_index_search.html.erb +++ b/app/views/courses/_course_index_search.html.erb @@ -4,7 +4,7 @@
- + diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb index 0daa13b4b..5248930d6 100644 --- a/app/views/games/_game_show.html.erb +++ b/app/views/games/_game_show.html.erb @@ -16,9 +16,11 @@
  • 过关任务
  • + <% unless @shixun.propaedeutics.blank? %>
  • 背景知识
  • + <% end %> <% unless @game_challenge.answer.blank? %>
  • 参考答案 diff --git a/app/views/games/_games_list.html.erb b/app/views/games/_games_list.html.erb index 29e3f87cf..b4e7ae879 100644 --- a/app/views/games/_games_list.html.erb +++ b/app/views/games/_games_list.html.erb @@ -12,7 +12,7 @@ <% if game.try(:status) == 0 %>

    <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %>

    <% if @myshixun.shixun.try(:status) == 2 %> - + <% end %> <% elsif game.try(:status) == 1 %> <% if @myshixun.shixun.try(:status) == 2 %> @@ -24,12 +24,12 @@ <% elsif game.try(:status) == 2 %>

    <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %>

    <% if @myshixun.shixun.try(:status) == 2 %> - + <% end %> <% elsif game.try(:status) == 3 %> <% if @myshixun.shixun.try(:status) == 2 %>

    <%= challenge.try(:subject) %>

    - + <% else %>

    <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %>

    <% end %> diff --git a/app/views/shixuns/_shixun_list.html.erb b/app/views/shixuns/_shixun_list.html.erb index 1eff29eba..184a19a98 100644 --- a/app/views/shixuns/_shixun_list.html.erb +++ b/app/views/shixuns/_shixun_list.html.erb @@ -1,11 +1,4 @@ - +
    <% if @shixuns.blank? %>
    diff --git a/app/views/shixuns/index.html.erb b/app/views/shixuns/index.html.erb index 9697fa7ff..900b16976 100644 --- a/app/views/shixuns/index.html.erb +++ b/app/views/shixuns/index.html.erb @@ -30,11 +30,11 @@
    更多 - +
    @@ -170,16 +170,26 @@
    - +
    - +
    - <%= render "shixun_list" %> + +
    + <%= render "shixun_list" %> +
    @@ -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', diff --git a/app/views/shixuns/search.js.erb b/app/views/shixuns/search.js.erb index 9f7277e26..69f751670 100644 --- a/app/views/shixuns/search.js.erb +++ b/app/views/shixuns/search.js.erb @@ -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') %>'); \ No newline at end of file +$("#shixun_list_content_2").html('<%= escape_javascript( render :partial => 'shixuns/shixun_list') %>'); \ No newline at end of file diff --git a/app/views/subjects/edit.html.erb b/app/views/subjects/edit.html.erb index 5502f5c62..ff2dc7f76 100644 --- a/app/views/subjects/edit.html.erb +++ b/app/views/subjects/edit.html.erb @@ -2,7 +2,7 @@

    <%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to "实训路径", subjects_path() %> - > 编辑 + > 编辑实训路径

    编辑实训路径 diff --git a/app/views/subjects/new.html.erb b/app/views/subjects/new.html.erb index 41a3efda6..d6dfe04c0 100644 --- a/app/views/subjects/new.html.erb +++ b/app/views/subjects/new.html.erb @@ -2,7 +2,7 @@

    <%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to "实训路径", subjects_path() %> - > 新建 + > 新建实训路径

    新建实训路径 diff --git a/public/javascripts/edu/edu_tpi.js b/public/javascripts/edu/edu_tpi.js index d31ae9a57..370f4fdaa 100644 --- a/public/javascripts/edu/edu_tpi.js +++ b/public/javascripts/edu/edu_tpi.js @@ -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", "踩"); } } }); From 0f08ed146f96a9f3a298bf03b67e62027d19991a Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Tue, 5 Sep 2017 14:26:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=AF=BE=E5=A0=82tab?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/_course_index_search.html.erb | 2 +- app/views/courses/index.html.erb | 36 +++++++++---------- app/views/courses/index.js.erb | 8 ++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/views/courses/_course_index_search.html.erb b/app/views/courses/_course_index_search.html.erb index 7214be2ab..70d2e99d3 100644 --- a/app/views/courses/_course_index_search.html.erb +++ b/app/views/courses/_course_index_search.html.erb @@ -1,4 +1,4 @@ -
    +
    diff --git a/app/views/courses/index.html.erb b/app/views/courses/index.html.erb index aea82e37a..49dd1a06e 100644 --- a/app/views/courses/index.html.erb +++ b/app/views/courses/index.html.erb @@ -12,11 +12,11 @@
    -
    +
    @is_end,:search => @search) %>" id="courses_index_syllabuses_1" class="course_filtrate fl course_filtrate_bg" data-tab="all" data-remote="true">全部课堂 @is_end, :search => @search) %>" id="courses_index_syllabuses_2" class="course_filtrate fl" data-tab="create" data-remote="true">我管理的 @is_end, :search => @search) %>" id="courses_index_syllabuses_3" class="course_filtrate fl" data-tab="join" data-remote="true">我参与的 - + 1) %>" id="courses_index_syllabuses_4" class="course_filtrate fl" data-tab="end" data-remote="true">查看归档 +
    <%= 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() +// }); diff --git a/app/views/courses/index.js.erb b/app/views/courses/index.js.erb index 2d8b0c8bc..4f63f7829 100644 --- a/app/views/courses/index.js.erb +++ b/app/views/courses/index.js.erb @@ -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 %>"); From 0b3f855c0114f31bb34ef944cf79d9c10753fb0e Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Tue, 5 Sep 2017 17:04:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?issue=E5=88=97=E8=A1=A8=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 2 +- app/views/shixuns/_shixun_top.html.erb | 28 +++++++++++++------------- public/stylesheets/css/taskstyle.css | 12 +++++------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 8d2fef399..293d2ff9d 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -261,7 +261,7 @@
    - + 编辑
      diff --git a/app/views/shixuns/_shixun_top.html.erb b/app/views/shixuns/_shixun_top.html.erb index dc1d66c69..3ec051456 100644 --- a/app/views/shixuns/_shixun_top.html.erb +++ b/app/views/shixuns/_shixun_top.html.erb @@ -1,32 +1,32 @@ -<% update_visiti_count @shixun %> + <% update_visiti_count @shixun %>
      -

      +

      <%= @shixun.owner.try(:show_name) %> - /

      <%= @shixun.name %>

      + /

      <%= @shixun.name %>

      <% 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, '模拟实战' %> - 申请发布 - <%#= link_to "申请发布", publish_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15", :id => "challenge_begin", :remote => true %> + 申请发布 + <%#= 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 %> <% 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 %> <% end %> 已关闭 @@ -42,9 +42,9 @@ <% end %>
      <% unless User.current.manager_of_shixun?(@shixun) %> - <%= @shixun.language %> - <%= @shixun.shixun_trainee %> - <%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %> + <%= @shixun.language %> + <%= @shixun.shixun_trainee %> + <%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %> <% end %>
      diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 33eda6b7c..ebc5806d5 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -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;}