Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
fixed ordering in the menu system plugin (more logical now), made the…
Browse files Browse the repository at this point in the history
… crowdsound admin widget get shoved in after pageready so we aren't dependent on that response for page load
  • Loading branch information
Josh Adams committed Jan 8, 2009
1 parent 7be4d64 commit 936094b
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 5 deletions.
4 changes: 3 additions & 1 deletion app/views/layouts/admin.html.erb
Expand Up @@ -29,6 +29,7 @@
<%= javascript_include_tag 'ansuz/tree' %>
<%= javascript_include_tag 'jquery.clickmenu.pack.js' %>
<%= javascript_include_tag 'toggle-content-box.jquery.js' %>
<%= javascript_include_tag 'admin' %>
<!--[if lt IE 7.]><%= javascript_include_tag 'pngfix.js' %><![endif]-->
</head>
<body>
Expand Down Expand Up @@ -65,7 +66,8 @@
<div id='sidebar'>
<%= yield :sidebar -%>
<br /><br />
<script type='text/javascript' src='http://crowdsound.com/widgets/init?&aid=718&width=250'></script>
<div id='crowdsound_replacement'>
</div>
</div>
</div>
</div>
Expand Down
10 changes: 7 additions & 3 deletions app/views/shared/_top_nav.html.erb
@@ -1,8 +1,12 @@
<% entries.each do |page|
<% entries.each_with_index do |page, i|
isActive = @breadcrumb && (page == @breadcrumb[1] || page == @page)
klasses = []
klasses << "active" if isActive
klasses << "first" if i == 0
klasses << "last" if i == (entries.length - 1)
url = page.ancestor_path + page.name + "/" %>
<li <%= "class=\"active\"" if isActive -%>>
<a href='<%= url %>'><%= page.title -%></a>
<li class="<%= klasses.join(" ") -%>">
<a href='<%= url -%>'><%= page.title -%></a>
<% if page.linked_children.any? && page.parent_id -%>
<ul>
<%= render :partial => 'shared/top_nav', :locals => { :entries => page.linked_children } -%>
Expand Down
3 changes: 3 additions & 0 deletions public/javascripts/admin.js
@@ -0,0 +1,3 @@
jQuery(document).ready(function(){
jQuery('#crowdsound_replacement').html("<script type='text/javascript' src='http://crowdsound.com/widgets/init?&aid=718&width=250'></script>");
});
66 changes: 66 additions & 0 deletions public/themes/knewter/stylesheets/base.css
@@ -0,0 +1,66 @@
/* Layout */
body{
background: white;
color: #333;
font-family: Georgia,sans-serif;
}
#content_wrapper{
width: 920px;
margin: 0 auto;
}
#header h1{
font-size: 300%;
}
#navigation{
width: 850px;
margin-bottom: 40px;
}
#navigation h3{
display: none;
}
#navigation li{
float: left;
width: 100px;
position: relative;
z-index: 80;
}
#navigation li.first a{
padding-left: 0;
}
#navigation li a, #navigation li.active li a{
padding: 5px 10px;
display: block;
text-decoration: none;
cursor: pointer;
color: #555;
}
#navigation li.active li a:hover {
cursor: pointer;
}
#navigation li.active a,
#navigation li.active a:hover {
color: black;
cursor: default;
}
#navigation li a:hover {
color: black;
}
#navigation li ul{
display: none;
}
#navigation li li a{
}
#navigation li:hover ul{
display: block;
}
#footer{
margin-top: 40px;
}
/* End Layout */
/* Utilities */
.clear{
clear: both;
}
/* End Utilities */
/* Blog Posts */
/* End Blog Posts */
Expand Up @@ -16,7 +16,7 @@ def load_new_menu_entry
end

def load_menu_entries
@menu_entries = Ansuz::JAdams::MenuEntry.find(:all, :order => 'created_at DESC')
@menu_entries = Ansuz::JAdams::MenuEntry.find(:all, :order => 'position')
end
public
def new
Expand Down

0 comments on commit 936094b

Please sign in to comment.