Commit 3a612a4d by Tom Giannattasio

fixed reordering of subsection and units; they now save on update without error

parent 00f3db37
...@@ -62,7 +62,7 @@ $(document).ready(function() { ...@@ -62,7 +62,7 @@ $(document).ready(function() {
}); });
// Subsection reordering // Subsection reordering
$('.unit-list ol').sortable({ $('.subsection-list > ol').sortable({
axis: 'y', axis: 'y',
handle: '.section-item .drag-handle', handle: '.section-item .drag-handle',
update: onSubsectionReordered update: onSubsectionReordered
......
...@@ -38,8 +38,8 @@ input.courseware-unit-search-input { ...@@ -38,8 +38,8 @@ input.courseware-unit-search-input {
} }
} }
&.collapsed .unit-list, &.collapsed .subsection-list,
.collapsed .unit-list, .collapsed .subsection-list,
.collapsed > ol { .collapsed > ol {
display: none !important; display: none !important;
} }
...@@ -94,7 +94,7 @@ input.courseware-unit-search-input { ...@@ -94,7 +94,7 @@ input.courseware-unit-search-input {
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
} }
.unit-list { .subsection-list {
margin: 0 12px; margin: 0 12px;
> ol { > ol {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
width: 100%; width: 100%;
} }
.unit-list { .sortable-unit-list {
ol { ol {
@include tree-view; @include tree-view;
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<label>Format:</label> <label>Format:</label>
<input type="text" value="${subsection.metadata['format'] if 'format' in subsection.metadata else ''}" class="unit-subtitle" data-metadata-name="format"/> <input type="text" value="${subsection.metadata['format'] if 'format' in subsection.metadata else ''}" class="unit-subtitle" data-metadata-name="format"/>
</div> </div>
<div class="unit-list"> <div class="sortable-unit-list">
<label>Units:</label> <label>Units:</label>
${units.enum_units(subsection, subsection_units=subsection_units)} ${units.enum_units(subsection, subsection_units=subsection_units)}
</div> </div>
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<a href="#" class="drag-handle"></a> <a href="#" class="drag-handle"></a>
</div> </div>
</header> </header>
<div class="unit-list"> <div class="subsection-list">
<div class="list-header"> <div class="list-header">
<a href="#" class="new-subsection-item" data-template="${new_subsection_template}"> <a href="#" class="new-subsection-item" data-template="${new_subsection_template}">
<span class="new-folder-icon"></span>New Subsection <span class="new-folder-icon"></span>New Subsection
......
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