修改了tabs页面,字体大小

This commit is contained in:
huangjingquan 2013-09-02 12:49:17 +08:00
parent 844f1d2dcf
commit c4df893eab
8 changed files with 172 additions and 36 deletions

View File

@ -34,6 +34,7 @@ class BidsController < ApplicationController
limit = @bid_count % @limit
@bids = @bids.offset(@offset).limit(limit).all.reverse
end
@s_state = 0
when '1'
unless @offset == 0
@bids = @bids.reorder('bids.commit').offset(@offset).limit(@limit).all.reverse
@ -41,6 +42,7 @@ class BidsController < ApplicationController
limit = @bid_count % @limit
@bids = @bids.reorder('bids.commit').offset(@offset).limit(limit).all.reverse
end
@s_state = 1
when '2'
unless @offset == 0
@bids = @bids.offset(@offset).limit(@limit).all.reverse
@ -48,6 +50,7 @@ class BidsController < ApplicationController
limit = @bid_count % @limit
@bids = @bids.offset(@offset).limit(@limit).all.reverse
end
@s_state = 0
end
else
unless @offset == 0
@ -56,6 +59,7 @@ class BidsController < ApplicationController
limit = @bid_count % @limit
@bids = @bids.offset(@offset).limit(limit).all.reverse
end
@s_state = 0
end
#end
# @limit = api_offset_and_limit({:limit => 5})

View File

@ -19,6 +19,9 @@ class ProjectsController < ApplicationController
menu_item :overview
menu_item :roadmap, :only => :roadmap
menu_item :settings, :only => :settings
menu_item l(:label_sort_by_time), :only => :index
menu_item l(:label_sort_by_active), :only => :index
menu_item l(:label_sort_by_influence), :only => :index
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ]
before_filter :authorize, :except => [:watcherlist, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics, :feedback, :project_respond]
@ -104,6 +107,7 @@ class ProjectsController < ApplicationController
@project_pages = Paginator.new @project_count, @limit, params['page']
@offset ||= @project_pages.reverse_offset
#@projects = @projects.offset(@offset).limit(@limit).order('created_on DESC').all
if params[:project_sort_type].present?
case params[:project_sort_type]
@ -118,6 +122,7 @@ class ProjectsController < ApplicationController
end
@projects = @projects.offset(@offset).limit(limit).all.reverse
end
@s_type = 0
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
# @projects = @projects[@offset, @limit]
when '1'
@ -131,6 +136,7 @@ class ProjectsController < ApplicationController
end
@projects = @projects.includes(:project_status).reorder('project_statuses.changesets_count').offset(@offset).limit(limit).all.reverse
end
@s_type = 1
#@projects = @projects[@offset, @limit]
when '2'
@ -144,6 +150,7 @@ class ProjectsController < ApplicationController
end
@projects = @projects.includes(:project_status).reorder('project_statuses.watchers_count').offset(@offset).limit(limit).all.reverse
end
@s_type = 2
end
else
@offset ||= @project_pages.reverse_offset
@ -156,6 +163,7 @@ class ProjectsController < ApplicationController
end
@projects = @projects.offset(@offset).limit(limit).all.reverse
end
@s_type = 0
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
# @projects = @projects[@offset, @limit]

View File

@ -37,4 +37,18 @@ module BidsHelper
Bid.tagged_with(tag_name).order('updated_on desc')
end
def sort_bid(state)
content = ''.html_safe
case state
when 0
content << content_tag('li', link_to(l(:label_sort_by_time), calls_path(:bid_sort_type => '0'), :class=>"selected"), :class=>"selected")
content << content_tag('li', link_to(l(:label_sort_by_active), calls_path(:bid_sort_type => '1')))
when 1
content << content_tag('li', link_to(l(:label_sort_by_time), calls_path(:bid_sort_type => '0')))
content << content_tag('li', link_to(l(:label_sort_by_active), calls_path(:bid_sort_type => '1'), :class=>"selected"), :class=>"selected")
end
content = content_tag('ul', content)
content_tag('div', content, :class => "tabs")
end
end

View File

@ -36,6 +36,28 @@ module ProjectsHelper
]
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
end
def sort_project(state)
content = ''.html_safe
case state
when 0
content << content_tag('li', link_to(l(:label_sort_by_time), projects_path(:project_sort_type => '0'), :class=>"selected"), :class=>"selected")
content << content_tag('li', link_to(l(:label_sort_by_active), projects_path(:project_sort_type => '1')))
content << content_tag('li', link_to(l(:label_sort_by_influence), projects_path(:project_sort_type => '2')))
when 1
content << content_tag('li', link_to(l(:label_sort_by_time), projects_path(:project_sort_type => '0')))
content << content_tag('li', link_to(l(:label_sort_by_active), projects_path(:project_sort_type => '1'), :class=>"selected"), :class=>"selected")
content << content_tag('li', link_to(l(:label_sort_by_influence), projects_path(:project_sort_type => '2')))
when 2
content << content_tag('li', link_to(l(:label_sort_by_time), projects_path(:project_sort_type => '0')))
content << content_tag('li', link_to(l(:label_sort_by_active), projects_path(:project_sort_type => '1')))
content << content_tag('li', link_to(l(:label_sort_by_influence), projects_path(:project_sort_type => '2'), :class=>"selected"), :class=>"selected")
end
content = content_tag('ul', content)
content_tag('div', content, :class => "tabs")
end
def parent_project_select_tag(project)
selected = project.parent

View File

@ -28,8 +28,8 @@
</div>
<% end %>
<div class="pagination" style="border-bottom: 1px solid rgb(223,223,223); width: 95%; margin-left: 2%; margin-top: 15px" >
<%= sort_bid(@s_state)%>
<!-- <div class="pagination" style="border-bottom: 1px solid rgb(223,223,223); width: 95%; margin-left: 2%; margin-top: 15px" >
<ul style="margin-right:0px">
<li>
<%= link_to l(:label_sort_by_time), calls_path(:bid_sort_type => '0') %>
@ -40,8 +40,8 @@
<!-- <li>
<%= link_to l(:label_sort_by_influence), calls_path(:bid_sort_type => '2') %>
</li> -->
</ul>
</div>
<!-- </ul>
</div> -->
<div id="bid-show">
<%= render :partial => 'bid_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>

View File

@ -19,19 +19,20 @@
</div>
<%end%>
<div class="pagination" style="border-bottom: 1px solid rgb(223,223,223); width: 95%; margin-left: 2%; margin-top: 15px" >
<ul style="margin-right:0px">
<%= sort_project(@s_type)%>
<!-- <div class="pagination_list">
<ul>
<li>
<%= link_to l(:label_sort_by_time), projects_path(:project_sort_type => '0') %>
<%= link_to l(:label_sort_by_time), projects_path(:project_sort_type => '0'),:class=>"test_new" %>
</li>
<li>
<%= link_to l(:label_sort_by_active), projects_path(:project_sort_type => '1') %>
<%= link_to l(:label_sort_by_active), projects_path(:project_sort_type => '1'),:class=>"test_new" %>
</li>
<li>
<%= link_to l(:label_sort_by_influence), projects_path(:project_sort_type => '2') %>
<%= link_to l(:label_sort_by_influence), projects_path(:project_sort_type => '2'),:class=>"test_new" %>
</li>
</ul>
</div>
</div> -->
<div id="projects-index">

View File

@ -1,7 +1,7 @@
html {overflow-y:scroll;}
body { font-family: Verdana, sans-serif; font-size: 13px; color:#484848; margin: 0; padding: 0; min-width: 900px; } /*modified by linchun*/
body { font-family:'微软雅黑', Verdana, sans-serif; font-size: 13px; color:#484848; margin: 0; padding: 0; min-width: 900px; } /*modified by linchun*/
h1, h2, h3, h4 {font-family: "Trebuchet MS", Verdana, sans-serif;padding: 2px 10px 1px 0px;margin: 0 0 10px 0;}
h1, h2, h3, h4 {font-family: '微软雅黑', "Trebuchet MS", Verdana, sans-serif;padding: 2px 10px 1px 0px;margin: 0 0 10px 0;}
#content h1, h2, h3, h4 {color: #555;}
h2, .wiki h1 {font-size: 20px;}
h3, .wiki h2 {font-size: 16px;}
@ -177,7 +177,7 @@ ul.tool li{list-style-type:none;
}
.font_welcome_tdescription{
font-family: 微软雅黑;
font-family: '微软雅黑';
font-size: 20px;
color: #5c5c5c;
}
@ -209,7 +209,7 @@ ul.tool li{list-style-type:none;
}
.font_lighter2{
font-family:微软雅黑;
font-family:'微软雅黑';
color:#9a9a9a;
font-size:14px;
}
@ -217,7 +217,7 @@ ul.tool li{list-style-type:none;
.font_lighter_welcome{
color:#acaeb1;
font-size:12px;
font-family:宋体;
font-family:微软雅黑;
}
.font_lighter_sidebar{
/*font-family:微软雅黑;*/
@ -254,6 +254,7 @@ ul.tool li{list-style-type:none;
.welcone_left{
margin-top: 60px;
margin-left: 90px;
float:left;
width: 49%;
@ -429,7 +430,7 @@ a.htags{
padding: 0px 4px 0px 4px;
margin:0 3px;
}
.contextdescription2{font-family: arial;
.contextdescription2{font-family: '微软雅黑';
font-size:12px;
font-weight:ligher;
color:#7e7e7e;
@ -537,14 +538,14 @@ ul.context_projects li {list-style-type:none;
margin-left:auto;
text-align: left;
font-family:黑体
font-size:24px;
font-weight:bold;
text-decoration:;
color:#000000;
}
.firdtname_project{
font-family:Arial
font-size:12px;
font-weight:bold;
text-decoration:;
@ -947,7 +948,7 @@ margin-left:-10px;
.project_right_tag{margin-top:44%;}
.project_homepage_tag{float:left; margin-top:9%;color:#000000;}
.project_infor_tag{float:auto;color:#000000;padding-left: 15px;}
.project_page_tag{float:right;color:#C0C0C0; font-family: Verdana;font-size: 13px;}
.project_page_tag{float:right;color:#C0C0C0; font-family: '微软雅黑';font-size: 13px;}
.wiki_text{font-size:small;color:#000000;}
.user_setting{float:right; color:#000000;padding-right: 10px;}
.line_color{color:#000000;}
@ -955,7 +956,7 @@ margin-left:-10px;
.project_right_tag{margin-top:40%;}
.project_homepage_tag{padding-left:570px;color:#000000;}
.project_infor_tag{float:auto;color:#000000;padding-left: 15px; }
.project_page_tag{float:right;color:#C0C0C0; font-family: Verdana;font-size: 13px;}
.project_page_tag{float:right;color:#C0C0C0; font-family: '微软雅黑';font-size: 13px;}
.wiki_text{font-size:small;color:#000000;}
.user_setting
{
@ -981,7 +982,7 @@ margin-left:-10px;
height:50px;
}
#header a {font-family: Verdana, sans-serif; font-size: 12px; color:#808080;}
#header a {font-family:'微软雅黑', Verdana, sans-serif; font-size: 12px; color:#808080;}
#login-form_new table/*Added by young*/
{
padding:20px 25px;
@ -1148,7 +1149,7 @@ ul.projects li {list-style-type:none;
#projects-index ul.projects ul.projects { border-left: 3px solid #e0e0e0; padding-left:1em;}
#projects-index ul.projects li.root {margin-bottom: 1em;}
#projects-index ul.projects li.child {margin-top: 1em;}
#projects-index ul.projects div.root a.project {font-family: "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
#projects-index ul.projects div.root a.project {font-family:'微软雅黑', "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
.my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; }
#notified-projects ul, #tracker_project_ids ul {max-height:250px; overflow-y:auto;}
@ -1247,8 +1248,8 @@ fieldset#notified_events .parent { padding-left: 20px; }
span.required {color: #bb0000;}
.summary {font-style: italic;}
#attachments_fields input.description {margin-left:4px; width:340px;}
#attachments_fields span {display:block; white-space:nowrap;}
#attachments_fields input.description {margin-left:4px; width:340px; }
#attachments_fields span {display:block; white-space:nowrap; font-family:'微软雅黑';}
#attachments_fields input.filename {border:0; height:1.8em; width:150px; color:#555; background-color:inherit; background:url(../images/attachment.png) no-repeat 1px 50%; padding-left:18px;}/*Modified by young*/
#attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
#attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
@ -1428,7 +1429,7 @@ p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;}
#roadmap table.progress td { height: 1.2em; }
/***** Tabs *****/
/**
#content .tabs_new {height: 2.6em; margin-bottom:1.2em; margin-top: 0.8em; position:relative; overflow:hidden;}
#content .tabs_new {height: 2.6em; margin-bottom:1.2em; margin-top: 0.8em; position:relative; overflow:hidden;}
#content .tabs_new ul {margin:0; position:absolute; bottom:0; padding-left: 0.5em; width: 2000px; border-bottom: 1px solid #15BCCF;}
#content .tabs_new ul li {
width:75px;
@ -1447,10 +1448,9 @@ p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;}
line-height:1.2em;
padding-top: 6px;
padding-bottom: 2px;
text-align: center;
text-align: center;
border: 1px solid #15BCCF;
border-bottom: 0px solid #15BCCF;
border-bottom: 0px solid #15BCCF;
background-color: #fff;
color:#999;
font-weight:bold;
@ -1458,10 +1458,52 @@ p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;}
border-top-right-radius:4px;
}
**/
/*added by huang*/
/*.pagination_list{height: 3em; margin-bottom:1.2em; position:relative; overflow:hidden;}
.pagination_list ul{margin:0; position:absolute; bottom:0; padding-left:0.5em; width:2000px; border-bottom: 1px solid #15BCCF;}
.pagination_list ul li{
float:left;
list-style-type:none;
white-space:nowrap;
margin-right:4px;
background:#fff;
position:relative;
margin-bottom:-1px;
}
.test_new{
background: #000;
color: #000;
padding-bottom: -1px;
}
.pagination_list ul li a{
border: 1px solid #15BCCF;
display:block;
font-size: 0.9em;
text-decoration: none;
line-height:1.3em;
padding:2px 6px 2px 6px;
background-color:#fff;
color:#606060;
font-weight:bold;
border-top-left-radius:3px;
border-top-right-radius:3px;
}
.pagination_list ul li a:hover{background-color: #E2F4FF;
text-decoration:none;
margin-bottom:-1px;}
.pagination_list ul li a.selected{
background-color: #000;
border: 1px solid #000;
border-bottom: 1px solid #000;
color:#111;
}
.pagination_list ul li a.selected:hover {background-color: #000;}*/
/*end*/
#content .tabs {height: 2.6em; margin-bottom:1.2em; position:relative; overflow:hidden;}
#content .tabs ul {margin:0; position:absolute; bottom:0; padding-left:0.5em; width:2000px; border-bottom: 1px solid #15BCCF;}
#content .tabs ul li {
#content .tabs ul {margin:0; position:absolute; bottom:0; padding-left:0.5em; font-family: 14px; width:2000px; border-bottom: 1px solid #15BCCF;}
#content .tabs ul li {
float:left;
list-style-type:none;
white-space:nowrap;
@ -1473,7 +1515,7 @@ p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;}
#content .tabs ul li a{
display:block;
font-size: 0.9em;
font-size: 14px;
text-decoration: none;
line-height:1.3em;
padding:2px 6px 2px 6px;
@ -1525,8 +1567,9 @@ button.tab-right {
}
/*added by young*/
/***** Settings Tabs *****/
/*modified by huang*/
#content .tabs_new {height: 2.6em; margin-bottom:1.2em; margin-top: 0.8em; position:relative; overflow:hidden;}
#content .tabs_new ul {margin:0; position:absolute; bottom:0; padding-left: 0.5em; width: 2000px; border-bottom: 1px solid #15BCCF;}
#content .tabs_new ul {margin:0; position:absolute; bottom:0; padding-left: 0.5em; width: 2000px; border-bottom: 1px solid #15BCCF;font-size:14px;}
#content .tabs_new ul li {
width:77px; /*modified by linchun*/
float:left;
@ -1548,7 +1591,7 @@ button.tab-right {
border: 1px solid #15BCCF;
/*border-bottom: 0px solid #15BCCF;*/
background-color: rgba(228, 247, 245, 0.64); # added by bai
color:#606060;
font-weight:bold;
border-top-left-radius:4px;
@ -1567,7 +1610,7 @@ button.tab-right {
color:#FFF;
}
#content .tabs_new ul li a.selected:hover {background-color: #fff;}
#content .tabs_new ul li a.selected:hover {background-color: #15BCCC;}
div.tabs_new-buttons { position:absolute; right: 0; width: 48px; height: 24px; background: white; bottom: 0; border-bottom: 1px solid #bbbbbb; }
@ -1594,7 +1637,46 @@ button.tab_new-right {
background: #eeeeee url(../images/bullet_arrow_right.png) no-repeat 50% 50%;
border-top-right-radius:3px;
}
/*end by young*/
/*added by huang*/
#content_ .tabs {height: 3.5em; margin-bottom:1.2em; position:relative; overflow:hidden;}
#content_ .tabs ul {margin:0; position:absolute; bottom:0; padding-left:0.5em; width:2000px; border-bottom: 1px solid #15BCCF;font-size:14px;}
#content_ .tabs ul li {
float:left;
list-style-type:none;
white-space:nowrap;
margin-right:0px;
background:#fff;
position:relative;
margin-bottom:-1px;
}
#content_ .tabs ul li a{
display:block;
font-size: 14px;
text-decoration: none;
line-height:1.3em;
padding:4px 6px 4px 6px;
background-color:#fff;
color:#606060;
font-weight:bold;
border-top-left-radius:3px;
border-top-right-radius:3px;
}
#content_ .tabs ul li a:hover {
background-color: #fff;
text-decoration:none;
}
#content_ .tabs ul li a.selected {
background-color: #fff;
border: 1px solid #15BCCF;
border-bottom: 1px solid #fff;
color:#111;
}
#content_ .tabs ul li a.selected:hover {background-color: #E2F4FF;}
/*end*/
/***** Diff *****/
.diff_out { background: #fcc; }
.diff_out span { background: #faa; }

View File

@ -1350,6 +1350,11 @@ div.pagination ul {
margin-left: 0px;
margin-top: 0px;
}
div.pagination ul li{
font-size: 14px;
text-decoration:none;
}
div.user-bottom {
margin-left: 64px;