fix #1234 by checking on :review source view

This commit is contained in:
Reinier Balt 2012-01-23 12:27:49 +01:00
parent b7ee2f79f5
commit 8b13ee88ab
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<% if @saved -%>
TracksPages.page_notify('notice', '<%=t('projects.project_saved_status')%>', 5);
<% if source_view_is :project_list -%>
<% if source_view_is_one_of(:project_list, :review) -%>
update_project_list_page();
<% else # assume source_view :project
-%>
@ -79,7 +79,7 @@ function remove_and_re_add_project() {
# render it into the function.
-%>
function html_for_project_listing() {
return "<%= source_view_is(:project_list) ? escape_javascript(render(:partial => 'project_listing', :object => @project )) : "" %>";
return "<%= source_view_is_one_of(:project_list, :review) ? escape_javascript(render(:partial => 'project_listing', :object => @project, :locals=>{:suppress_drag_handle => source_view_is(:review)} )) : "" %>";
}
function html_for_sidebar() {