1、增加开启关闭匿评时弹框

2、增加js调用是等待的样式
This commit is contained in:
sw 2015-03-20 11:37:56 +08:00
parent 69d1fdb699
commit b6b479f6f9
6 changed files with 53 additions and 26 deletions

View File

@ -698,11 +698,11 @@ module CoursesHelper
case bid.comment_status
when 0
# <a href="#" class="fr mr10 work_edit">关闭匿评</a>
link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...'
link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'fr mr10 work_edit'
when 1
link_to '关闭匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true
link_to '关闭匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit'
when 2
# <a href="#" style="background:#8e8e8e;">匿评结束</a>
"<span class='fr mr10 pr_join_span '>匿评结束</span>".html_safe
end
end
end

View File

@ -3,16 +3,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>开启匿评功能</title>
<style>
body{ font-size:12px; font-family:"微软雅黑","宋体"; background:#fff; font-style:normal;}
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;}
div,img,tr,td,textarea{ border:0;}
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
ul,li{ list-style-type:none}
.cl{ clear:both; overflow:hidden; }
a{ text-decoration:none; }
a:hover{ text-decoration:underline;}
/* 匿名评分弹框 */
.anonymos{width:480px;height:180px;position:fixed;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.ni_con { width:425px; margin:25px 30px;}

View File

@ -17,21 +17,23 @@
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'problem_tit fl fb c_dblue') %>
<div class="cl mb5"></div>
<p class="fl ">已提交的作业 ( <%= link_to bid.homeworks.count, course_for_bid_path(bid.id), :class => 'c_red'%> )</p>
<a href="#" class="fr mr10 work_edit">关闭匿评</a>
<a href="courses_hworkedit.html" class="fr mr10 work_edit">编辑</a>
<% if @is_teacher%>
<%= bid_anonymous_comment(bid)%>
<%= link_to(l(:button_edit),edit_bid_path(:course_id =>@course.id, :bid_id => bid.id), :class => "fr mr10 work_edit") %>
<% end %>
<div class="cl"></div>
<p id="news_description" class="news_description mt5">项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题<br /> 创建时间 2014-11-26 10:19</p>
<div class="news_foot" onclick="show_more_msg02();">展开更多信息 <span class="g-arr-down"><img src="images/jiantou.jpg" width="12" height="6" /></span></div>
<p id="bid_description_<%= bid.id%>" class="news_description mt5">
<%= textilizable bid, :description %>
<br /> 创建时间 <%= format_time bid.created_on%></p>
<div class="news_foot" onclick="bid_show_more_des(<%= bid.id%>);">展开更多信息
<span class="g-arr-down"><img src="/images/jiantou.jpg" width="12" height="6" /></span>
</div>
</div>
<div class="cl"></div>
</div>
<% end%>
<ul class="wlist" >
<li><a href="#">下一页</a></li>
<li><a href="#">...</a></li>
<li><a href="#">2</a></li>
<li class="wlist_select" ><a href="#">1</a></li>
<li><a href="#">上一页</a></li>
<ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>

View File

@ -129,9 +129,7 @@
<%= link_to( "+#{l(:label_course_news_new)}", course_news_index_path(@course), :class => 'subnav_green c_white') if is_teacher %>
</div>
<div class="subNav">
<%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %>
<%= link_to "(#{@course.attachments.count})", course_files_path(@course), :class => "subnav_num c_orange" %>
<%= link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
<%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %><%= link_to "(#{@course.attachments.count})", course_files_path(@course), :class => "subnav_num c_orange" %><%= link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
</div>
<div class="subNav">
<%= link_to l(:label_course_board), course_boards_path(@course), :class => "f14 c_blue02" %>
@ -185,6 +183,13 @@
<div class="cl"></div>
</div><!--Container end-->
<%= render :partial => 'layouts/new_feedback' %>
<div id="ajax-indicator" style="display:none;">
<span>
<%= l(:label_loading) %>
</span>
</div>
<div id="ajax-modal" style="display:none;"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -25,6 +25,11 @@ function show_more_msg()
$("#course_description").toggleClass("course_description_none");
}
function bid_show_more_des(id)
{
$("#bid_description_" + id).toggleClass("news_description_none");
}
$(document).ready(function () {
$("#RSide").css("min-height",$("#LSide").height()-30);
});

View File

@ -180,3 +180,28 @@ html{ overflow-x:hidden;}
.show_btn {background-position:-119px 0;}
.msgserver a {color:#15bccf; }
.msgserver a:hover { text-decoration:underline; }
/***** Ajax indicator ******/
#ajax-indicator {
position: absolute; /* fixed not supported by IE */
background-color:#eee;
border: 1px solid #bbb;
top:35%;
left:40%;
width:20%;
font-weight:bold;
text-align:center;
padding:0.6em;
z-index:100000;
opacity: 0.5;
}
html>body #ajax-indicator { position: fixed; }
#ajax-indicator span {
background-position: 0% 40%;
background-repeat: no-repeat;
background-image: url(../images/loading.gif);
padding-left: 26px;
vertical-align: bottom;
}