Skip to content

Commit

Permalink
fix pages/edit display mode to show/hide add seciton button
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Woodall committed Jan 4, 2013
1 parent c6a8629 commit 7c9e571
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/assets/javascripts/pages.js
Expand Up @@ -99,14 +99,17 @@ function toggleDisplayMode(mode) {
case "edit":
$(".section, .block").addClass("editable");
$(".block .content").show();
$(".add-section").show();
break;
case "organize":
$(".section, .block").addClass("editable");
$(".block .content").hide();
$(".add-section").show();
break;
case "preview":
$(".section, .block").removeClass("editable");
$(".block .content").show();
$(".add-section").hide();
break;
}
displayMode = mode;
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/edit.html.haml
Expand Up @@ -8,7 +8,7 @@

#sections
= render :partial => "sections/section", :collection => @page.sections.asc(:position), :locals => { :editable => true }
.row-fluid
.row-fluid.add-section
%a.btn.span12{ :id => "add_section", :role => "button", :"data-toggle" => "modal", :"href" => "#section-catalog"}= icon('plus')+" Add Section Here"

= render :partial => "block_catalog"
Expand Down

0 comments on commit 7c9e571

Please sign in to comment.