removed new course button on click to prevent multiple instantiations
This commit is contained in:
@@ -588,6 +588,8 @@ function hideToastMessage(e) {
|
||||
function addNewSection(e, isTemplate) {
|
||||
e.preventDefault();
|
||||
|
||||
$(e.target).hide();
|
||||
|
||||
var $newSection = $($('#new-section-template').html());
|
||||
var $cancelButton = $newSection.find('.new-section-name-cancel');
|
||||
$('.new-courseware-section-button').after($newSection);
|
||||
|
||||
@@ -26,7 +26,8 @@ a {
|
||||
h1 {
|
||||
float: left;
|
||||
font-size: 28px;
|
||||
margin: 36px 6px;
|
||||
font-weight: 300;
|
||||
margin: 24px 6px;
|
||||
}
|
||||
|
||||
.waiting {
|
||||
@@ -345,8 +346,9 @@ body.show-wip {
|
||||
}
|
||||
|
||||
.new-button {
|
||||
@include grey-button;
|
||||
padding: 20px 0;
|
||||
@include blue-button;
|
||||
font-size: 13px;
|
||||
padding: 8px 20px 10px;
|
||||
text-align: center;
|
||||
|
||||
&.big {
|
||||
|
||||
@@ -8,6 +8,7 @@ input.courseware-unit-search-input {
|
||||
|
||||
}
|
||||
|
||||
|
||||
.courseware-section {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
@@ -139,6 +140,10 @@ input.courseware-unit-search-input {
|
||||
}
|
||||
}
|
||||
|
||||
.section-name-form {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.section-name-edit {
|
||||
input {
|
||||
font-size: 16px;
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<h1>Courseware</h1>
|
||||
<div class="page-actions"></div>
|
||||
<article class="courseware-overview" data-course-id="${context_course.location.url()}">
|
||||
<a href="#" class="new-button big new-courseware-section-button"><span class="plus-icon"></span> New Section</a>
|
||||
<a href="#" class="new-button new-courseware-section-button"><span class="plus-icon white"></span> New Section</a>
|
||||
% for section in sections:
|
||||
<section class="courseware-section branch" data-id="${section.location}">
|
||||
<header>
|
||||
|
||||
Reference in New Issue
Block a user