Commit 27f23395 by Frances Botsford Committed by David Baumgold

additional refinements to PDF textbooks, including making the edit buttons work again

parent 7b02932f
......@@ -13,8 +13,7 @@ body.course.textbooks {
margin-right: flex-gutter();
.no-textbook-content {
@include box-shadow(0 0 4px $shadow-d1 inset);
@include border-radius(2px);
@extend .ui-well;
padding: $baseline*2;
background-color: $gray-l4;
text-align: center;
......@@ -22,15 +21,16 @@ body.course.textbooks {
.button {
margin-left: $baseline;
@include font-size(14);
}
}
.textbook {
@extend .window;
position: relative;
padding: $baseline ($baseline*1.5);
.view-textbook {
padding: $baseline ($baseline*1.5);
header {
margin-bottom: 0;
......@@ -90,22 +90,11 @@ body.course.textbooks {
}
.actions {
@include transition(opacity .15s .25s ease-in-out);
@include clearfix();
display: inline-block;
vertical-align: middle;
float: right;
width: flex-grid(2,9);
margin: ($baseline/2) 0 0 flex-gutter();
opacity: 0.0;
pointer-events: none;
text-align: right;
/*
position: absolute;
top: $baseline;
right: $baseline;
*/
.action {
display: inline-block;
......@@ -144,29 +133,22 @@ body.course.textbooks {
width: 100%;
background: $white;
.wrapper-form {
padding: $baseline ($baseline*1.5);
}
fieldset {
margin-bottom: $baseline;
}
.actions {
@include box-shadow(inset 0 1px 2px $shadow);
border-top: 1px solid $gray-l1;
padding: ($baseline*0.75) $baseline;
background: $gray-l6;
.action-add-chapter {
@extend .t-action2;
@include transition(all .15s);
display: block;
width: 100%;
margin-bottom: ($baseline*1.5);
border-radius: 5px;
border: none;
padding: $baseline;
background-color: $blue-l3;
color: $white;
font-weight: 600;
&:hover {
background: #5597DD;
}
}
// add a chapter is below with chapters styling
.action-primary {
@include blue-button;
......@@ -204,7 +186,7 @@ body.course.textbooks {
}
.list-input,
.chapters-fields,
.textbook-fields {
list-style: none;
......@@ -356,6 +338,25 @@ body.course.textbooks {
}
}
}
.action-add-chapter {
@extend .t-action2;
@include transition(all .15s);
display: block;
width: 100%;
margin: ($baseline*1.5) 0 0 0;
border-radius: 5px;
border: none;
padding: $baseline;
background-color: $blue-l3;
color: $white;
font-weight: 600;
&:hover {
background: #5597DD;
}
}
}
}
}
......
<div class="no-textbook-content">
<p><%= gettext("You haven't added any textbooks to this course yet.") %><a href="#" class="button upload-button new-button"><%= gettext("Add your first textbook") %></a></p>
<p><%= gettext("You haven't added any textbooks to this course yet.") %><a href="#" class="button upload-button new-button"><i class="icon-plus"></i><%= gettext("Add your first textbook") %></a></p>
</div>
<form class="edit-textbook" id="edit_textbook_form">
<div class="wrapper-form">
<% if (errors) { %>
<div id="edit_textbook_error" class="message message-status message-status error" name="edit_textbook_error">
<%= errors %>
......@@ -16,10 +17,11 @@
<fieldset class="chapters-fields">
<legend class="sr"><%= gettext("Chapter(s) information") %></legend>
<ol class="chapters list-input enum"></ol>
</fieldset>
<div class="actions">
<button class="action action-add-chapter"><i class="icon-plus"></i> <%= gettext("Add a Chapter") %></button>
</fieldset>
</div>
<div class="actions">
<button class="action action-primary" type="submit"><%= gettext("Save") %></button>
<button class="action action-secondary action-cancel"><%= gettext("Cancel") %></button>
</div>
......
<div class="view-textbook">
<div class="wrap-textbook">
<header>
<h3 class="textbook-title"><%= name %></h3>
</header>
......@@ -15,6 +17,21 @@
</p>
<% } %>
<% if(showChapters) { %>
<ol class="chapters">
<% chapters.each(function(chapter) { %>
<li class="chapter">
<span class="chapter-name"><%= chapter.get('name') %></span>
<span class="chapter-asset-path"><%= chapter.get('asset_path') %></span>
</li>
<% }) %>
</ol>
<% } %>
</div>
<ul class="actions textbook-actions">
<li class="action action-view">
<a href="#" class="view"><%= gettext("view in course") %></a>
......@@ -29,14 +46,4 @@
<% if(showChapters) { %>
<ol class="chapters">
<% chapters.each(function(chapter) { %>
<li class="chapter">
<span class="chapter-name"><%= chapter.get('name') %></span>
<span class="chapter-asset-path"><%= chapter.get('asset_path') %></span>
</li>
<% }) %>
</ol>
<% } %>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment