Skip to content

Commit

Permalink
General improvements to the layout of the hover item
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jun 5, 2010
1 parent 6bbe8af commit 0481e36
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions app/stylesheets/partials/_hover_dialog.sass
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.hover
position: relative
width: 418px
padding: 5px
top: 10px
margin: 13px 13px auto auto !important
h3
text-align: center
.title-fixed
position: fixed
top: 0
Expand Down
2 changes: 0 additions & 2 deletions app/stylesheets/screen.sass
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ body.salad
+no-bullets
:height auto
padding-top: 49px
.side_hover
padding-top: 10px
li
:padding 5px 0px
#panel
Expand Down
3 changes: 2 additions & 1 deletion app/views/common/_sidebar_list_content.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<% if !models.blank? %>
<ul id="<%= models.first.class.to_s.singularize.downcase %>_<%=assoc%>">
<ul id="<%= models.first.class.to_s.singularize.downcase %>_<%=assoc%>" class="ui-widget ui-widget-content ui-corner-all hover">
<% models.each_with_index do |model, index| %>
<li id="<%= models.first.class.to_s.singularize.downcase %>_<%=model.id%>_<%=assoc%>" class="<%= models.first.class.to_s.singularize.downcase %>_list_item side_hover" style="display: none;">
<h3><%=h display_item_title(model) %></h3>
<hr/>
<% if !model.send(assoc.to_sym).blank? %>
<ul>
<% model.send(assoc.to_sym).each_with_index do |item, item_index|%>
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/item_hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $(document).ready(function() {
$.fn.autoScroller = function(speed,height) {
var width = $(this).parent().width();
var $innerUnorderedList = $(this).find('ul');
$innerUnorderedList.css('height', height)
$innerUnorderedList.css('max-height', height)
.css('overflow-y', 'hidden');

$(this).parent().css('width', width);
Expand All @@ -27,7 +27,7 @@ $(document).ready(function() {
var sidebarPostfix = $('div#sidebar > ul').attr('id').split('_');
var $sidebar = $('div#sidebar > ul');
var hoverItem = 'li#' + $(this).attr('id') + '_' + sidebarPostfix[1];
var height = $('div#lists').outerHeight();
var height = $('div#lists').outerHeight() - $('div#footer').outerHeight();

if (!$(hoverItem).is(':visible')) {
$('div#sidebar').find('li.side_hover').hide();
Expand Down

0 comments on commit 0481e36

Please sign in to comment.