导入题库题目弹框样式更改

This commit is contained in:
Tim 2016-03-01 17:28:49 +08:00
parent 7d66c06a56
commit 11592bdbcc
6 changed files with 72 additions and 68 deletions

View File

@ -1,9 +1,9 @@
<div class="subjectInfo">题目信息</div>
<div class="subjectWrap">
<div class="subject-pop-info">题目信息</div>
<div class="subject-pop-wrap">
<% if homework.nil? %>
<span class="c_red" id="homework_notice_span">请先在左侧选择作业</span>
<% else %>
<div class="subjectIntro mb15">标题:<%=homework.name %><br />
<div class="subject-pop-intro mb15">标题:<%=homework.name %><br />
来源:<%=homework.course.name %><br />
<% if homework.homework_type == 2 && homework.homework_detail_programing %>
编程语言:<%=homework.language_name %><br/>
@ -15,15 +15,15 @@
<br />
描述如下:
</div>
<div class="subjectContent" id="homework_description">
<div class="subject-pop-content" id="homework_description">
<%=homework.description.html_safe %>
</div>
<% if homework.homework_type == 2 %>
<div class="subjectContent mt10">
<div class="subject-pop-content mt10">
测试集:<%=homework.homework_tests.count %>组
</div>
<% elsif homework.homework_type ==3 && homework.homework_detail_group %>
<div class="subjectContent mt10">
<div class="subject-pop-content mt10">
分组人数:<%=homework.homework_detail_group.min_num %> - <%=homework.homework_detail_group.max_num %>人
</div>
<% end %>

View File

@ -1,4 +1,4 @@
<input type="text" name="search" placeholder="输入关键词进行搜索" class="subjectSearch fr" />
<input type="text" name="search" placeholder="输入关键词进行搜索" class="subject-pop-search fr" />
<script type="text/javascript">
var lastSearchCondition = '';
var count = 0;

View File

@ -1,12 +1,13 @@
<% homeworks.each do |homework| %>
<ul class="subjectRow">
<li class="subjectName fl hidden">
<ul class="subject-pop-row">
<li class="subject-pop-name fl hidden">
<label onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id) %>')">
<input type="radio" name="checkMenu" class="mr5" style="vertical-align:middle;" value="<%= homework.id%>"/>
<span title="<%= homework.name%>"><%= homework.name%></span>
</label>
</li>
<li class="subjectType fl">
<li class="subject-pop-from fl hidden">攻城狮</li>
<li class="subject-pop-type fl">
<% case homework.homework_type %>
<% when 1 %>
普通
@ -16,9 +17,9 @@
分组
<% end %>
</li>
<li class="subjectCount fl"><%= homework.quotes %></li>
<li class="subjectPublisher fl hidden"><%= homework.user.show_name %></li>
<li class="fl subjectDate"><%=format_date homework.publish_time %></li>
<li class="subject-pop-publisher fl hidden"><%= homework.user.show_name %></li>
<li class="subject-pop-count fl"><%= homework.quotes %></li>
<li class="subject-pop-date fl"><%=format_date homework.publish_time %></li>
</ul>
<% end %>
<script type="text/javascript">

View File

@ -1,19 +1,20 @@
<div class="w985"> <a href="javascript:void(0);" class="popupClose" onclick="hideModal()"></a>
<div class="w985"> <a href="javascript:void(0);" class="popup-close" onclick="hideModal()"></a>
<div class="f16 fb fontBlue mb10">选用题库中的题目</div>
<div class="subjectList fl mr10">
<a href="<%= user_homework_type_user_path(@user) %>" id="public_homeworks_choose" class="subjectChoose chooseActive fl" data-remote="true">公共题库</a>
<a href="<%= user_homework_type_user_path(@user,:type=>'2') %>" id="user_homeworks_choose" class="subjectChoose fl" data-remote="true">我的题库</a>
<div class="subject-list fl mr10">
<a href="<%= user_homework_type_user_path(@user) %>" id="public_homeworks_choose" class="subject-choose choose-active fl" data-remote="true">公共题库</a>
<a href="<%= user_homework_type_user_path(@user,:type=>'2') %>" id="user_homeworks_choose" class="subject-choose fl" data-remote="true">我的题库</a>
<div id="homework_search_input">
<%=render :partial=>'homework_search_input', :locals=>{:type=>@type} %>
</div>
<div class="cl"></div>
<div>
<ul class="subjectBanner mt10">
<li class="subjectName fl hidden"><span style="padding-left:15px;">作业名称</span></li>
<li class="subjectType fl">类型</li>
<li class="subjectCount fl">引用数</li>
<li class="subjectPublisher fl">贡献者</li>
<li class="fl subjectDate">发布时间</li>
<ul class="subject-pop-banner mt10">
<li class="subject-pop-name fl hidden"><span style="padding-left:15px;">作业名称</span></li>
<li class="subject-pop-from fl">来源</li>
<li class="subject-pop-type fl">类别</li>
<li class="subject-pop-publisher fl">贡献者</li>
<li class="subject-pop-count fl">引用数</li>
<li class="subject-pop-date fl">发布时间</li>
</ul>
</div>
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
@ -35,18 +36,18 @@
</div>
<div class="cl"></div>
</div>
<div class="subjectDetail fl" id="homework_detail_information">
<div class="subject-detail fl" id="homework_detail_information">
<%=render :partial=>'homework_detail_information', :locals=>{:homework=>nil} %>
</div>
<div class="cl"></div>
</div>
<script type="text/javascript">
$("#public_homeworks_choose").click(function(){
$(this).toggleClass("chooseActive");
$("#user_homeworks_choose").toggleClass("chooseActive");
$(this).toggleClass("choose-active");
$("#user_homeworks_choose").toggleClass("choose-active");
});
$("#user_homeworks_choose").click(function(){
$(this).toggleClass("chooseActive");
$("#public_homeworks_choose").toggleClass("chooseActive");
$(this).toggleClass("choose-active");
$("#public_homeworks_choose").toggleClass("choose-active");
});
</script>

View File

@ -1438,26 +1438,27 @@ span.at a{color:#269ac9;text-decoration: none;}
.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
/*导入题库样式*/
.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
.subjectList {width:585px;}
.subjectDetail {width:385px;}
a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
a.chooseActive {background-color:#269ac9; color:#ffffff;}
.subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
.subjectBanner li {height:40px; line-height:40px; vertical-align:middle;}
.subjectName {width:270px; padding-left:10px; padding-right:10px;}
.subjectPublisher {width:80px; text-align:center;}
.subjectDate {width:80px; text-align:center;}
.subjectType {width:70px; text-align:center;}
.subjectCount {width:65px; text-align:center;}
.subjectRow {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
.subjectRow li {height:30px; line-height:30px; vertical-align:middle;}
.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;outline: none;}
.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:470px; overflow-y:auto;}
.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
.popup-wrapper {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
.subject-list {width:585px;}
.subject-detail {width:385px;}
a.subject-choose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
a.choose-active {background-color:#269ac9; color:#ffffff;}
.subject-pop-banner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
.subject-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
.subject-pop-name {width:200px; padding-left:10px; padding-right:10px;}
.subject-pop-publisher {width:80px; text-align:center;}
.subject-pop-date {width:75px; text-align:center;}
.subject-pop-row {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
.subject-pop-row li {height:30px; line-height:30px; vertical-align:middle;}
.subject-pop-search {border:1px solid #dddddd; height:32px; width:250px;}
.subject-pop-info {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
.subject-pop-wrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:475px; overflow-y:auto;}
.subject-pop-intro {color:#585858; line-height:18px; font-size:12px;}
.subject-pop-content {color:#888888; line-height:18px; font-size:12px;}
.popup-close {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
.subject-pop-type {width:50px; text-align:center;}
.subject-pop-count {width:60px; text-align:center;}
.subject-pop-from {width:100px; text-align:center;}
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}

View File

@ -1025,26 +1025,27 @@ a:hover.userCancel{border:1px solid #888888; }
.relatePWrap{max-height: 210px;overflow:hidden;}
/*导入题库样式*/
.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
.subjectList {width:585px;}
.subjectDetail {width:385px;}
a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
a.chooseActive {background-color:#269ac9; color:#ffffff;}
.subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
.subjectBanner li {height:40px; line-height:40px; vertical-align:middle;}
.subjectName {width:270px; padding-left:10px; padding-right:10px;}
.subjectPublisher {width:80px; text-align:center;}
.subjectDate {width:80px; text-align:center;}
.subjectType {width:70px; text-align:center;}
.subjectCount {width:65px; text-align:center;}
.subjectRow {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
.subjectRow li {height:30px; line-height:30px; vertical-align:middle;}
.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;outline: none;}
.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:470px; overflow-y:auto;}
.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
.popup-wrapper {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
.subject-list {width:585px;}
.subject-detail {width:385px;}
a.subject-choose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
a.choose-active {background-color:#269ac9; color:#ffffff;}
.subject-pop-banner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
.subject-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
.subject-pop-name {width:200px; padding-left:10px; padding-right:10px;}
.subject-pop-publisher {width:80px; text-align:center;}
.subject-pop-date {width:75px; text-align:center;}
.subject-pop-row {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
.subject-pop-row li {height:30px; line-height:30px; vertical-align:middle;}
.subject-pop-search {border:1px solid #dddddd; height:32px; width:250px;}
.subject-pop-info {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
.subject-pop-wrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:475px; overflow-y:auto;}
.subject-pop-intro {color:#585858; line-height:18px; font-size:12px;}
.subject-pop-content {color:#888888; line-height:18px; font-size:12px;}
.popup-close {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
.subject-pop-type {width:50px; text-align:center;}
.subject-pop-count {width:60px; text-align:center;}
.subject-pop-from {width:100px; text-align:center;}
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}