组织门户二级目录添加分栏"|"以及登录未登录位置控制

This commit is contained in:
Tim 2016-05-09 18:44:20 +08:00
parent 65bcca76c1
commit cf1cf58bab
23 changed files with 5428 additions and 5394 deletions

View File

@ -101,10 +101,11 @@
<a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
</li>
<!--二级目录-->
<div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;">
<div class="<%= User.current.logged? ? "sn-row sn-subnav-position2 sn-grey-opacity" : "sn-row sn-subnav-position sn-grey-opacity" %>" style="display:none;">
<ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
<% field.sub_domains.each do |subdomain| %>
<li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %></li>
<li class="sn-subnav-slice">|</li>
<% end %>
</ul>
</div>
@ -201,6 +202,9 @@
$(".sn-grey-opacity").mouseout(function(){
$(this).hide();
});
$(".sn-sub-nav").each(function(){
$(this).children(".sn-subnav-slice:last").hide();
});
</script>
<!--add by huang-->

View File

@ -44,6 +44,9 @@
$(".sn-grey-opacity").mouseout(function(){
$(this).hide();
});
$(".sn-sub-nav").each(function(){
$(this).children(".sn-subnav-slice:last").hide();
});
});
</script>
@ -115,10 +118,11 @@
<a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
</li>
<!--二级目录-->
<div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;">
<div class="<%= User.current.logged? ? "sn-row sn-subnav-position2 sn-grey-opacity" : "sn-row sn-subnav-position sn-grey-opacity" %>" style="display:none;">
<ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
<% field.sub_domains.each do |subdomain| %>
<li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey" %></li>
<li class="sn-subnav-slice">|</li>
<% end %>
</ul>
</div>

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160504060751) do
ActiveRecord::Schema.define(:version => 20160506104128) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -485,7 +485,7 @@ ActiveRecord::Schema.define(:version => 20160504060751) do
t.integer "viewed"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "content"
t.text "content"
t.integer "status"
t.integer "apply_user_id"
t.integer "apply_result"
@ -1779,6 +1779,31 @@ ActiveRecord::Schema.define(:version => 20160504060751) do
add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id"
add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id"
create_table "sub_document_comments", :force => true do |t|
t.text "content"
t.text "title"
t.integer "sub_domain_id"
t.integer "creator_id"
t.integer "parent_id"
t.integer "reply_id"
t.integer "locked"
t.integer "sticky"
t.integer "org_subfield_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "sub_domains", :force => true do |t|
t.integer "org_subfield_id"
t.integer "priority", :default => 0
t.string "name"
t.string "field_type"
t.integer "hide", :default => 0
t.integer "status", :default => 0
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "subfield_subdomain_dirs", :force => true do |t|
t.integer "org_subfield_id"
t.string "name"

View File

@ -32,7 +32,7 @@ a:hover,a:active{color:#24366e;}
.sn-font-grey3 {color:#999;}
a.sn-link-blue {color:#24366e;}
a.sn-link-white {color:#fff;}
a.sn-link-grey {color:#999;}
a.sn-link-grey {color:#666;}
a.sn-link-grey:hover {color:#24366e;}
a.sn-link-grey2 {color:#888;}
a.sn-link-select {color:#809df9;}
@ -69,7 +69,8 @@ a.sn-search-button {width:53px; height:40px; border:1px solid #ccc; border-left:
.nav-element-default, .nav-element {float:left; padding-top:11px; padding-bottom:12px; margin-right:50px;}
.nav-element-default a, .nav-element a {display:inline-block; padding:8px 6px; border-radius:5px;}
.nav-element-default a:hover, .nav-element a:hover {background-color:#809df9;}
.sn-subnav-position {position:fixed; left:0; top:203px; z-index:99;}
.sn-subnav-position {position:fixed; left:0; top:190px; z-index:99;}
.sn-subnav-position2 {position:fixed; left:0; top:203px; z-index:99;}
.sn-sub-nav {width:1200px; margin:0 auto; font-size:14px; position:relative; line-height:1;}
.sn-sub-nav li {color:#999; float:left;}
.sn-sub-nav li a {height:40px; line-height:40px; vertical-align:middle; margin:0 5px; padding:0 5px; display:inline-block;}