Skip to content

Commit

Permalink
Now using our include script.
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed May 12, 2010
1 parent c6dd034 commit 2265950
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions app/views/features/show.rjs.erb
@@ -1,20 +1,4 @@
$('div.list').replaceWith("<%= escape_javascript(render :partial => '/common/sortable_list',:locals => {:models => @feature_stories, :item_name => 'story', :assoc => 'step', :order =>true})%>");
$('div#lists ul').customSortable();
$('div#sidebar').html("<%= escape_javascript(render :partial => '/common/sidebar_list_content', :locals => {:models => @feature_stories, :assoc => 'steps'})%>");

// Ideally we should not duplicate this functionality, need to find a way to centralise it
$(document).ready(function() {

var hoverItem = function() {
$classArray = $(this).attr('id');
$sidebarPostfix = $('div#sidebar > ul').attr('id').split('_');

$hover_class = 'li#' + $classArray + '_' + $sidebarPostfix[1];
$($hover_class).toggle();
};

$("div.list_item").each(function(event) {
$(this).mouseover(hoverItem);
$(this).mouseout(hoverItem);
});
});
$.include('/javascripts/item_hover.js');

0 comments on commit 2265950

Please sign in to comment.