From 0009430b594f33c2575d95ad12cc3bd61090016f Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Fri, 25 Jan 2013 14:30:51 -0500 Subject: [PATCH 1/2] min height on droppable areas and add padding to top/bottom on hover. --- cms/static/js/base.js | 2 ++ cms/static/sass/_courseware.scss | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index 01a8d6450e..ee8df97b28 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -112,12 +112,14 @@ $(document).ready(function() { accept : '.unit', greedy: true, tolerance: "pointer", + hoverClass: "dropover", drop: onUnitReordered }); $('.subsection-list > ol').droppable({ // why don't we have a more useful class for subsections than id-holder? accept : '.id-holder', // '.unit, .id-holder', tolerance: "pointer", + hoverClass: "dropover", drop: onSubsectionReordered, greedy: true }); diff --git a/cms/static/sass/_courseware.scss b/cms/static/sass/_courseware.scss index 2fe4605a33..2ef3e68c44 100644 --- a/cms/static/sass/_courseware.scss +++ b/cms/static/sass/_courseware.scss @@ -643,4 +643,12 @@ input.courseware-unit-search-input { margin-top: 10px; font-size: 13px; color: $darkGrey; +} + +.ui-droppable { + min-height: 22px; + &.dropover { + padding-top: 11px; + padding-bottom: 11px; + } } \ No newline at end of file From 8a6dc040a95dff86177af780e3d6d8a610f6fe97 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Fri, 25 Jan 2013 15:26:25 -0500 Subject: [PATCH 2/2] studio - styled first children in an overview's subsection list for drag and drop work --- cms/static/sass/_courseware.scss | 45 +++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/cms/static/sass/_courseware.scss b/cms/static/sass/_courseware.scss index 2ef3e68c44..4ea110f4c8 100644 --- a/cms/static/sass/_courseware.scss +++ b/cms/static/sass/_courseware.scss @@ -25,18 +25,18 @@ input.courseware-unit-search-input { width: 145px; .status-label { - position: absolute; - top: 2px; - right: -5px; - display: none; - width: 110px; - padding: 5px 40px 5px 10px; - @include border-radius(3px); - color: $lightGrey; - text-align: right; - font-size: 12px; - font-weight: bold; - line-height: 16px; + position: absolute; + top: 2px; + right: -5px; + display: none; + width: 110px; + padding: 5px 40px 5px 10px; + @include border-radius(3px); + color: $lightGrey; + text-align: right; + font-size: 12px; + font-weight: bold; + line-height: 16px; } .menu-toggle { @@ -645,10 +645,19 @@ input.courseware-unit-search-input { color: $darkGrey; } +// sort/drag and drop .ui-droppable { - min-height: 22px; - &.dropover { - padding-top: 11px; - padding-bottom: 11px; - } -} \ No newline at end of file + min-height: 20px; + + &.dropover { + padding-top: 10px; + padding-bottom: 10px; + } +} + +ol.ui-droppable .branch:first-child .section-item { + border-top: none; +} + + +