Commit 72c9d9f7 by chrisndodge

Merge pull request #1352 from MITx/feature/dhm/drag

min height on droppable areas and add padding to top/bottom on hover.
parents c9a877b7 8a6dc040
...@@ -112,12 +112,14 @@ $(document).ready(function() { ...@@ -112,12 +112,14 @@ $(document).ready(function() {
accept : '.unit', accept : '.unit',
greedy: true, greedy: true,
tolerance: "pointer", tolerance: "pointer",
hoverClass: "dropover",
drop: onUnitReordered drop: onUnitReordered
}); });
$('.subsection-list > ol').droppable({ $('.subsection-list > ol').droppable({
// why don't we have a more useful class for subsections than id-holder? // why don't we have a more useful class for subsections than id-holder?
accept : '.id-holder', // '.unit, .id-holder', accept : '.id-holder', // '.unit, .id-holder',
tolerance: "pointer", tolerance: "pointer",
hoverClass: "dropover",
drop: onSubsectionReordered, drop: onSubsectionReordered,
greedy: true greedy: true
}); });
......
...@@ -644,3 +644,20 @@ input.courseware-unit-search-input { ...@@ -644,3 +644,20 @@ input.courseware-unit-search-input {
font-size: 13px; font-size: 13px;
color: $darkGrey; color: $darkGrey;
} }
// sort/drag and drop
.ui-droppable {
min-height: 20px;
&.dropover {
padding-top: 10px;
padding-bottom: 10px;
}
}
ol.ui-droppable .branch:first-child .section-item {
border-top: none;
}
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