1.更新css样式文件

2.增加相关图片
3.分页空间支持ajax刷新界面
4.修改分页控件显示样式
This commit is contained in:
sw 2014-10-31 11:48:40 +08:00
parent e6fdda1702
commit fd5b7ac468
11 changed files with 79 additions and 29 deletions

View File

@ -32,7 +32,7 @@
<div class="cl"></div>
<div class="ctt">
<div class="dis" id="tbc_01">
<%= render :partial => 'homework_attach/homeworks_list', :locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid}%>
<%= render :partial => 'homework_attach/homeworks_list', :locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => false}%>
</div><!---未批作业结束-->
</div>
</div>

View File

@ -62,5 +62,4 @@
<% end %>
<% else %>
<% end %>
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote%></ul>

View File

@ -1,3 +1,4 @@
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list', :locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid} )) %>');
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true} )) %>');
for(var i=1;i<=5;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
$("#tb_2").removeClass().addClass("hovertab");

View File

@ -1,4 +1,5 @@
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list', :locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid} )) %>');
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true} )) %>');
for(var i=1;i<=5;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
$("#tb_3").removeClass().addClass("hovertab");

View File

@ -1,3 +1,4 @@
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list', :locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid} )) %>');
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true} )) %>');
for(var i=1;i<=5;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
$("#tb_1").removeClass().addClass("hovertab");

View File

@ -219,22 +219,32 @@ module Redmine
#Added by Nie guanghui
#Designed for pagination.
def pagination_links_each(paginator, count=nil, options={}, &block)
options.assert_valid_keys :per_page_links
#options.assert_valid_keys :per_page_links
per_page_links = options.delete(:per_page_links)
#per_page_links = options.delete(:per_page_links)
per_page_links = options[:per_page_links]
remote = options[:remote] ? options[:remote] : false
per_page_links = false if count.nil?
page_param = paginator.page_param
html = ''
if paginator.previous_page
# \xc2\xab(utf-8) = &#171;
text = "\xc2\xab " + l(:label_previous)
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous') << '</li>' + ' '
if remote
text = l(:label_previous)
else
text = "\xc2\xab " + l(:label_previous)
end
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous', :remote => remote) << '</li>' + ' '
end
unless paginator.previous_page
if paginator.next_page
text = "\xc2\xab " + l(:label_previous)
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous') << '</li>' + ' '
if remote
text = l(:label_previous)
else
text = "\xc2\xab " + l(:label_previous)
end
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous', :remote => remote) << '</li>' + ' '
end
end
@ -244,25 +254,35 @@ module Redmine
html << '<li>' << content_tag('span', '...', :class => 'spacer') << '</li>' + ' '
end
if page == paginator.page
html << '<li>' << content_tag('span', page.to_s, :class => 'current-page') << '</li>'
if remote
html << '<li>' << content_tag('span', page.to_s, :class => 'select') << '</li>'
else
html << '<li>' << content_tag('span', page.to_s, :class => 'current-page') << '</li>'
end
else
html << '<li>' << yield(page.to_s, {page_param => page}, :class => 'page') << '</li>'
html << '<li>' << yield(page.to_s, {page_param => page}, :class => 'page', :remote => remote) << '</li>'
end
html << ' '
previous = page
end
if paginator.next_page
# \xc2\xbb(utf-8) = &#187;
text = l(:label_next) + " \xc2\xbb"
html << '<li>' << yield(text, {page_param => paginator.next_page}, :class => 'next') << '</li>' + ' '
if remote
text = l(:label_next)
else
text = l(:label_next) + " \xc2\xbb"
end
html << '<li>' << yield(text, {page_param => paginator.next_page}, :class => 'next', :remote => remote) << '</li>' + ' '
end
unless paginator.next_page
if paginator.previous_page
# \xc2\xbb(utf-8) = &#187;
text = l(:label_front) + " \xc2\xbb"
html << "<li>" << yield(text, {page_param => paginator.next_page}, :class => 'next') << "</li>" + ' '
if remote
text = l(:label_next)
else
text = l(:label_next) + " \xc2\xbb"
end
html << "<li>" << yield(text, {page_param => paginator.next_page}, :class => 'next', :remote => remote) << "</li>" + ' '
end
end

View File

@ -1,7 +1,7 @@
/* CSS Document */
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
div,img,tr,td{ border:0;}
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; }
@ -19,6 +19,8 @@ a:hover{ text-decoration:underline;}
.tb_{ background-color: #eaeaea; height:40px; }
.tb_ ul{height:40px; }
.tb_ li{float:left;height:35px;width: 90px;cursor:pointer; font-size:14px; padding-top:5px; text-align:center; }
a.tb_all{ margin-left:235px; font-size:12px; display:block; height:23px; padding-top:4px; width:90px; color:#7a7a7a; border:1px solid #cbcbcb; background:#fff; text-align: center;}
a:hover.tb_all{ background:#eaeaea; text-decoration:none;}
/* 控制显示与隐藏css类 */
.normaltab { color:#64bdd9 ; }
@ -30,18 +32,19 @@ a:hover{ text-decoration:underline;}
.c_red{ color:#de030d;}
.f_12{ font-size:12px;}
.w_40{ width:40px; border:1px solid red;}
.dis ul{ height:75px; border-bottom:1px dashed #64bdd9;}
.dis ul li{ float:left;}
.dis ul li a{ display:block; color:#15bccf;}
.pic_head{ width:40px; padding:8px 15px 0 8px; }
.pic_head a{ text-align:center; width:40px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.dis ul li a{ display:block; color:#15bccf; }
.pic_head{ width:40px; padding:8px 15px 0 8px;}
.pic_head a{ text-align:center; width:40px; overflow:hidden;}
.pic_head img{ border:1px solid #fff;}
.pic_head img:hover{border:1px solid #15bccf;}
.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:43px;}
.wscore{ padding-top:22px; color:#888888;width:96px;}
.dis ul li.wping{margin-left:16px; }
.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:35px;}
.wscore{ padding-top:22px; color:#888888; width:96px;}
.dis ul li.wping{margin-left:12px; }
.dis ul li.wping a{ margin-top:18px; margin-bottom:3px; width:43px; height:23px; background:#15bccf; color:#fff; text-align:center; padding-top:3px;}
.dis ul li.wping a:hover{ background-color:#03a1b3;}
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
@ -51,9 +54,12 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.code_list a{ color:#787878;}
.fr{ float:right;}
.c_grey{ color:#999; font-weight:normal;}
.dis ul li.wname02 a{ width:200px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wmine{ margin:12px 0 0 10px;}
.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;}
.msg_box{ width:693px; height:170px; border-bottom:1px dashed #CCC; padding-top:20px;}
.msg_box h4{ margin-left:15px;border-style: none;}
.msg_box h4{ margin-left:15px;}
.msg_box textarea{width:660px;height:90px;padding:2px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 15px; color:#666; font-size:12px;}
.msg_box a{ float:right; display:block; width:50px; height:22px; background:#15bccf; color:#fff; margin-right:10px; text-align:center; margin-top:5px; }
.msg_box a:hover{ background-color:#03a1b3; text-decoration:none;}
@ -99,6 +105,28 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}
/* 创建作业 */
.Newwork{ width:918px; height:418px; border:1px solid #c3c3c3;}
.N_top{ height:35px; background:#e5e5e5; border:1px solid #fff; width:891px; padding:5px 10px 0 15px;}
.N_top h2{ color:#616161; font-size:14px; float:left;}
.N_top a{ float:right; font-size:14px; color:#15bccf; display:block; background:url(images/pic_ad.png) 0 5px no-repeat; height:20px; width:60px; padding-left:16px;}
.N_con{ color:#484747; font-weight:bold; width:720px; margin:15px auto;}
.N_con p{ margin-bottom:15px;}
.w430{ width:430px;}
.w350{ width:350px;}
.w620{ width:580px; height:160px; border:1px solid #CCC;}
.bo{height:26px; border:1px solid #CCC; }
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:10px;}
a:hover.tijiao{ background:#0f99a9;}
/* 匿名评分弹框 */
#popbox02{width:480px;height:200px;position:absolute;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;}
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
.ni_con { width:425px; margin:25px 30px;}
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}
.ni_con p{ color:#808181;}
.ni_con a:hover{ text-decoration:none;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB