实训套件界面修改,以及tab样式的公用

This commit is contained in:
caishi 2017-08-01 08:57:44 +08:00
parent 2df90b3376
commit 56d520c569
13 changed files with 56 additions and 49 deletions

View File

@ -11,11 +11,11 @@
</div>
<div class="edu-con-top clearfix">
<p class="fl task-form-50 ml15">
<%= link_to '全部', homework_bank_index_path(:type => @type), :class => 'edu-filter-cir-grey mr5 active', :id => 'homework_bank_pro_0', :remote => true %>
<%= link_to '编程', homework_bank_index_path(:type => @type, :property => 2), :class => 'edu-filter-cir-grey mr5', :id => 'homework_bank_pro_2', :remote => true %>
<%= link_to '普通', homework_bank_index_path(:type => @type, :property => 1), :class => 'edu-filter-cir-grey mr5', :id => 'homework_bank_pro_1', :remote => true %>
<%= link_to '分组', homework_bank_index_path(:type => @type, :property => 3), :class => 'edu-filter-cir-grey mr5', :id => 'homework_bank_pro_3', :remote => true %>
<%= link_to '实训', homework_bank_index_path(:type => @type, :property => 4), :class => 'edu-filter-cir-grey mr5', :id => 'homework_bank_pro_4', :remote => true %>
<%= link_to '全部', homework_bank_index_path(:type => @type), :class => 'edu-filter-cir-grey mr5 active font-12 fl', :id => 'homework_bank_pro_0', :remote => true %>
<%= link_to '编程', homework_bank_index_path(:type => @type, :property => 2), :class => 'edu-filter-cir-grey mr5 font-12 fl', :id => 'homework_bank_pro_2', :remote => true %>
<%= link_to '普通', homework_bank_index_path(:type => @type, :property => 1), :class => 'edu-filter-cir-grey mr5 font-12 fl', :id => 'homework_bank_pro_1', :remote => true %>
<%= link_to '分组', homework_bank_index_path(:type => @type, :property => 3), :class => 'edu-filter-cir-grey mr5 font-12 fl', :id => 'homework_bank_pro_3', :remote => true %>
<%= link_to '实训', homework_bank_index_path(:type => @type, :property => 4), :class => 'edu-filter-cir-grey mr5 font-12 fl', :id => 'homework_bank_pro_4', :remote => true %>
<%#= link_to '试卷', homework_bank_path(:type => @type, :property => 5), :class => 'edu-filter-cir-grey mr5', :remote => true %>
</p>
<a href="javascript:void(0)" onclick="alert_choose_homework_bank_type('<%= %>')" class="task-btn task-btn-blue fr mr15 mt5">新建</a>

View File

@ -1,10 +1,9 @@
<script>
function g(o){return document.getElementById(o);}
function HoverLi(n, url){
for(var i=1;i<=3;i++){
$('#edu-tab-nav-'+i).removeClass('edu-new-tab-hover');
}
$('#edu-tab-nav-'+n).addClass('edu-new-tab-hover');
$(".new-tab-nav").removeClass('background-orange');
$(n).addClass('background-orange');
$.get(url, {}, function(data){});
}
</script>
@ -14,11 +13,11 @@
<div class="edu-con-bg01 mt15">
<div class="">
<div class="edu-tab clearfix mb20">
<ul id="edu-tab-nav">
<li id="edu-tab-nav-1" class="<%= @type == '1' ? 'edu-new-tab-hover' : '' %>" onclick="HoverLi(1, '<%= homework_bank_index_path() %>');">
<ul id="edu-tab-nav" class="border-bottom-orange">
<li id="edu-tab-nav-1" class="new-tab-nav <%= @type == '1' ? 'background-orange' : '' %>" onclick="HoverLi(this, '<%= homework_bank_index_path() %>');">
<a href="javascript:void(0);" class="tab_type">我的题库</a>
</li>
<li id="edu-tab-nav-2" class="<%= @type == '2' ? 'edu-new-tab-hover' : '' %>" onclick="HoverLi(2, '<%= homework_bank_index_path(:type => 2) %>');">
<li id="edu-tab-nav-2" class="new-tab-nav <%= @type == '2' ? 'background-orange' : '' %>" onclick="HoverLi(this, '<%= homework_bank_index_path(:type => 2) %>');">
<a href="javascript:void(0);" class="tab_type">公共题库</a>
</li>
</ul>

View File

@ -15,6 +15,6 @@ $(".edu-filter-cir-grey").removeClass("active");
<% end %>
<% end %>
if(<%= params[:type] == '2' %>){
$("#edu-tab-nav-1").removeClass("edu-new-tab-hover");
$("#edu-tab-nav-2").addClass("edu-new-tab-hover");
$("#edu-tab-nav-1").removeClass("background-orange");
$("#edu-tab-nav-2").addClass("background-orange");
}

View File

@ -7,11 +7,11 @@
<script type="text/javascript">
function HoverLi(n){
for(var i=1;i<=2;i++){
$('#edu-tab-nav-'+i).removeClass('edu-new-tab-hover');
$('#edu-tab-nav-'+i).removeClass('background-orange');
$('#edu-tab-con-'+i).addClass('undis');
}
$('#edu-tab-con-'+n).removeClass('undis');
$('#edu-tab-nav-'+n).addClass('edu-new-tab-hover');
$('#edu-tab-nav-'+n).addClass('background-orange');
}
</script>
@ -31,12 +31,12 @@
<div class="edu-con-bg01 mt15">
<div class="">
<div class="edu-tab clearfix mb20">
<ul id="edu-tab-nav">
<li id="edu-tab-nav-1" class="edu-new-tab-hover" onclick="HoverLi(1);">
<ul id="edu-tab-nav" class="border-bottom-orange">
<li id="edu-tab-nav-1" class="new-tab-nav background-orange" onclick="HoverLi(1);">
<a href="javascript:void(0);" class="tab_type">详情</a>
</li>
<% if @is_admin %>
<li id="edu-tab-nav-2" onclick="HoverLi(2);">
<li id="edu-tab-nav-2" class="new-tab-nav" onclick="HoverLi(2);">
<a href="javascript:void(0);" class="tab_type">参考答案</a>
</li>
<% end %>

View File

@ -1,9 +1,9 @@
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type) %>" class="<%= @order.nil? ? "active" : "" %> edu-filter-cir-grey mr5 " data-remote="true">全部</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type) %>" class="<%= @order.nil? ? "active" : "" %> edu-filter-cir-grey mr5 font-12 fl" data-remote="true">全部</a>
<% if @is_teacher %>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 0, :search => @search) %>" class="<%= @order == "0" ? "active" : "" %> edu-filter-cir-grey mr5" data-remote="true">挂起</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 0, :search => @search) %>" class="<%= @order == "0" ? "active" : "" %> edu-filter-cir-grey mr5 font-12 fl" data-remote="true">挂起</a>
<% end %>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 1, :search => @search) %>" class="<%= @order == "1" ? "active" : "" %> edu-filter-cir-grey mr5" data-remote="true">提交中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 3, :search => @search) %>" class="<%= @order == "3" ? "active" : "" %> edu-filter-cir-grey mr5" data-remote="true">匿评中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 4, :search => @search) %>" class="<%= @order == "4" ? "active" : "" %> edu-filter-cir-grey mr5" data-remote="true">申诉中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 5, :search => @search) %>" class="<%= @order == "5" ? "active" : "" %> edu-filter-cir-grey mr5" data-remote="true">评阅中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 6, :search => @search) %>" class="<%= @order == "6" ? "active" : "" %> edu-filter-cir-grey mr5" data-remote="true">已结束</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 1, :search => @search) %>" class="<%= @order == "1" ? "active" : "" %> edu-filter-cir-grey mr5 font-12 fl" data-remote="true">提交中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 3, :search => @search) %>" class="<%= @order == "3" ? "active" : "" %> edu-filter-cir-grey mr5 font-12 fl" data-remote="true">匿评中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 4, :search => @search) %>" class="<%= @order == "4" ? "active" : "" %> edu-filter-cir-grey mr5 font-12 fl" data-remote="true">申诉中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 5, :search => @search) %>" class="<%= @order == "5" ? "active" : "" %> edu-filter-cir-grey mr5 font-12 fl" data-remote="true">评阅中</a>
<a href="<%= homework_common_index_path(:course => @course.id, :homework_type => @homework_type, :order => 6, :search => @search) %>" class="<%= @order == "6" ? "active" : "" %> edu-filter-cir-grey mr5 font-12 fl" data-remote="true">已结束</a>

View File

@ -12,11 +12,11 @@
});
function HoverLi(n){
for(var i=1;i<=3;i++){
$('#edu-tab-nav-'+i).removeClass('edu-new-tab-hover');
$('#edu-tab-nav-'+i).removeClass('background-orange');
$('#edu-tab-con-'+i).addClass('undis');
}
$('#edu-tab-con-'+n).removeClass('undis');
$('#edu-tab-nav-'+n).addClass('edu-new-tab-hover');
$('#edu-tab-nav-'+n).addClass('background-orange');
}
</script>
@ -36,15 +36,15 @@
<div class="edu-con-bg01 mt15">
<div class="">
<div class="edu-tab clearfix mb20 user_bg_shadow">
<ul id="edu-tab-nav">
<li id="edu-tab-nav-1" class="edu-new-tab-hover" onclick="HoverLi(1);">
<ul id="edu-tab-nav" class="border-bottom-orange">
<li id="edu-tab-nav-1" class="new-tab-nav background-orange" onclick="HoverLi(1);">
<a href="javascript:void(0);" class="tab_type">作业详情</a>
</li>
<li id="edu-tab-nav-2" onclick="HoverLi(2);">
<li id="edu-tab-nav-2" class="new-tab-nav" onclick="HoverLi(2);">
<a href="javascript:void(0);" class="tab_type">作品列表</a>
</li>
<% if @homework.homework_type!= 4 && @is_teacher || (@homework.answer_public && @homework.homework_detail_manual.comment_status > 2) %>
<li id="edu-tab-nav-3" onclick="HoverLi(3);">
<li id="edu-tab-nav-3" class="new-tab-nav" onclick="HoverLi(3);">
<a href="javascript:void(0);" class="tab_type">参考答案</a>
</li>
<% end %>

View File

@ -4,10 +4,10 @@
<p class="clearfix">
<span class="fl font-bd font-18">简介</span>
<% if User.current.manager_of_subject?(@subject) && @subject.status == 0 %>
<a href="<%= edit_subject_path(@subject) %>"><i class="fa fa-pencil fr mt10 mr5 color-grey edit-produce"></i></a>
<a href="<%= edit_subject_path(@subject) %>"><i class="fa fa-pencil fr mt10 mr5 color-grey-c edit-produce"></i></a>
<% end %>
</p>
<div class="mt15 color-grey <%= @subject.description.blank? ? 'color-light-grey' : '' %>">
<div class="mt15 color-dark-grey <%= @subject.description.blank? ? 'color-light-grey' : '' %>">
<%= @subject.description.blank? ? "暂未填写" : @subject.description %>
</div>
</div>
@ -60,8 +60,9 @@
<% shixun = stage_shixun.shixun %>
<div class="clearfix pt10 pb10 pl20 stage-info-line pr20" id="stage_shixun_<%= shixun.id %>" style="cursor: pointer;" onclick="shixun_link('<%= shixun.identifier %>')">
<li class="fl li-width63">
<i class="fa fa-gamepad color-light-green font-20"></i>
<span class="font-bd color-dark-grey"><%= shixun.name %></span>
<span class="panel-inner-icon fl mr10 mt5 color_white font-12"><%= index + 1 %></span>
<!--<i class="fa fa-gamepad color-light-green font-20"></i>-->
<span class="font-bd color-grey3"><%= shixun.name %></span>
</li>
<li class="fl li-width15">
<i class="fa fa-tasks color-light-green font-16 mr5" title="实训任务"></i>

View File

@ -58,14 +58,14 @@
<div class="edu-class-inner mb20">
<div class="with75 fl">
<div class="edu-tab clearfix mb20 user_bg_shadow">
<ul id="edu-tab-nav">
<li id="edu-tab-nav-1" class="edu-new-tab-hover new-tab-nav" onclick="HoverLi(1);">
<ul id="edu-tab-nav" class="border-bottom-orange">
<li id="edu-tab-nav-1" class="new-tab-nav background-orange" onclick="HoverLi(1);">
<a href="javascript:void(0);" class="tab_type">授课大纲</a>
</li>
<li id="edu-tab-nav-2">
<li id="edu-tab-nav-2" class="new-tab-nav">
<%= link_to '课程资源库', syllabus_resources_syllabus_path(@syllabus), :remote => true, :class => 'tab_type' %>
</li>
<li id="edu-tab-nav-3">
<li id="edu-tab-nav-3" class="new-tab-nav">
<%= link_to '课程题库', syllabus_homeworks_syllabus_path(@syllabus), :remote => true, :class => 'tab_type' %>
</li>
</ul>

View File

@ -1,7 +1,8 @@
$("#edu-tab-con-3").html("<%= escape_javascript(render :partial => 'syllabus_homeworks') %>");
document.getElementById('edu-tab-nav-1').className='edu-tab-nomal';
document.getElementById('edu-tab-nav-2').className='edu-tab-nomal';
$(".new-tab-nav").removeClass("background-orange");
document.getElementById('edu-tab-con-1').className='undis';
document.getElementById('edu-tab-con-2').className='undis';
document.getElementById('edu-tab-nav-3').className='edu-new-tab-hover';
$("#edu-tab-nav-3").addClass("background-orange");
document.getElementById('edu-tab-con-3').className='dis';

View File

@ -1,7 +1,7 @@
$("#edu-tab-con-2").html("<%= escape_javascript(render :partial => 'syllabus_resources') %>");
document.getElementById('edu-tab-nav-1').className='edu-tab-nomal';
document.getElementById('edu-tab-nav-3').className='edu-tab-nomal';
$(".new-tab-nav").removeClass("background-orange");
document.getElementById('edu-tab-con-1').className='undis';
document.getElementById('edu-tab-con-3').className='undis';
document.getElementById('edu-tab-nav-2').className='edu-new-tab-hover';
$("#edu-tab-nav-2").addClass("background-orange");
document.getElementById('edu-tab-con-2').className='dis';

View File

@ -2,12 +2,14 @@ var syMemberLastSearchCondition = '';
function g(o){return document.getElementById(o);}
function HoverLi(n){
$('.new-tab-nav').removeClass("background-orange");
for(var i=1;i<=3;i++){
g('edu-tab-nav-'+i).className='edu-tab-nomal';
//g('edu-tab-nav-'+i).className='edu-tab-nomal';
g('edu-tab-con-'+i).className='undis';
}
g('edu-tab-con-'+n).className='dis';
g('edu-tab-nav-'+n).className='edu-new-tab-hover';
$('#edu-tab-nav-'+n).addClass("background-orange");
//g('edu-tab-nav-'+n).className='edu-new-tab-hover';
}
// 课程首页

View File

@ -294,3 +294,8 @@ input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#c4c4c4;}
/*班级讨论区置顶的样式*/
.btn-cir-red {background: red; color: #fff; font-weight: normal;}
.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;border-radius: 15px;line-height: 20px;font-size: 12px;}
/*圆形绿色背景---------22*/
.panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
/*15*/
.panel-inner-icon{width: 18px;height: 18px;line-height: 18px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}

View File

@ -64,7 +64,6 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top:
.content-submitbox{ width:120px; margin: 15px auto; height:135px;}
.panel-inner{ background:#EFF2F7; margin:15px; padding:15px;}
.panel-inner-title{ font-size: 14px; color: #666; max-width:85%; line-height:30px;word-wrap: break-word; margin-bottom: 10px}
.panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
.panel-footer{ min-width:1000px; height: 210px!important;}
/* 弹框 */
.task-popup-text-center{ text-align: center; color: #666;}