diff --git a/cms/static/js/base.js b/cms/static/js/base.js
index 174ab10c89..e452936072 100644
--- a/cms/static/js/base.js
+++ b/cms/static/js/base.js
@@ -243,17 +243,17 @@ function createNewUnit(e) {
function deleteUnit(e) {
e.preventDefault();
- _deleteItem($(this).parents('li.leaf'), 'Unit');
+ _deleteItem($(this).parents('li.courseware-unit'), 'Unit');
}
function deleteSubsection(e) {
e.preventDefault();
- _deleteItem($(this).parents('li.branch'), 'Subsection');
+ _deleteItem($(this).parents('li.courseware-subsection'), 'Subsection');
}
function deleteSection(e) {
e.preventDefault();
- _deleteItem($(this).parents('section.branch'), 'Section');
+ _deleteItem($(this).parents('section.courseware-section'), 'Section');
}
function _deleteItem($el, type) {
diff --git a/cms/static/js/views/overview.js b/cms/static/js/views/overview.js
index 9dfb339b0c..0e34fc64a1 100644
--- a/cms/static/js/views/overview.js
+++ b/cms/static/js/views/overview.js
@@ -3,7 +3,7 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
function (domReady, $, ui, _, gettext, NotificationView, Draggabilly, ModalUtils, CancelOnEscape,
DateUtils, ModuleUtils) {
- var modalSelector = '.edit-subsection-publish-settings';
+ var modalSelector = '.edit-section-publish-settings';
var toggleSections = function(e) {
e.preventDefault();
@@ -21,20 +21,26 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
if ($button.hasClass('is-activated')) {
$section.addClass('collapsed');
// first child in order to avoid the icons on the subsection lists which are not in the first child
- $section.find('header .expand-collapse-icon').removeClass('collapse').addClass('expand');
+ $section.find('header .expand-collapse').removeClass('collapse').addClass('expand');
} else {
$section.removeClass('collapsed');
// first child in order to avoid the icons on the subsection lists which are not in the first child
- $section.find('header .expand-collapse-icon').removeClass('expand').addClass('collapse');
+ $section.find('header .expand-collapse').removeClass('expand').addClass('collapse');
}
};
var toggleSubmodules = function(e) {
e.preventDefault();
- $(this).toggleClass('expand').toggleClass('collapse');
- $(this).closest('.branch, .window').toggleClass('collapsed');
+ $(this).toggleClass('expand');
+ $(this).closest('.is-collapsible, .window').toggleClass('collapsed');
};
+
+ var closeModalNew = function (e) {
+ $('body').removeClass('dialog-is-shown');
+ $('.edit-section-publish-settings').removeClass('is-shown');
+ }
+
var editSectionPublishDate = function (e) {
e.preventDefault();
var $modal = $(modalSelector);
@@ -45,15 +51,17 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
$modal.find('.save-button').hide();
}
$modal.find('.section-name').html('"' + $(this).closest('.courseware-section').find('.section-name-span').text() + '"');
- ModalUtils.showModal();
+ //ModalUtils.showModal();
+ $('body').addClass('dialog-is-shown');
+ $('.edit-section-publish-settings').addClass('is-shown');
};
var saveSetSectionScheduleDate = function (e) {
e.preventDefault();
var datetime = DateUtils(
- $('.edit-subsection-publish-settings .start-date'),
- $('.edit-subsection-publish-settings .start-time')
+ $('.edit-section-publish-settings .start-date'),
+ $('.edit-section-publish-settings .start-time')
);
var locator = $(modalSelector).attr('data-locator');
@@ -89,10 +97,10 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
var $thisSection = $('.courseware-section[data-locator="' + locator + '"]');
var html = _.template(
'' +
- '' + gettext("Will Release:") + ' ' +
+ '' + gettext("Release date:") + ' ' +
gettext("{month}/{day}/{year} at {hour}:{minute} UTC") +
' ' +
- '' +
+ ' ' +
gettext("Edit") +
' ',
{year: datetime.getUTCFullYear(), month: pad2(datetime.getUTCMonth() + 1), day: pad2(datetime.getUTCDate()),
@@ -100,8 +108,9 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
locator: locator},
{interpolate: /\{(.+?)\}/g});
$thisSection.find('.section-published-date').html(html);
- ModalUtils.hideModal();
+ //ModalUtils.hideModal();
saving.hide();
+ closeModalNew();
});
};
@@ -159,7 +168,7 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
var $saveButton = $newSubsection.find('.new-subsection-name-save');
var $cancelButton = $newSubsection.find('.new-subsection-name-cancel');
- var parent = $(this).parents("section.branch").data("locator");
+ var parent = $(this).parents("section.courseware-section").data("locator");
$saveButton.data('parent', parent);
$saveButton.data('category', $(this).data('category'));
@@ -197,7 +206,7 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
var cancelNewSubsection = function (e) {
e.preventDefault();
- $(this).parents('li.branch').remove();
+ $(this).parents('li.courseware-subsection').remove();
};
var overviewDragger = {
@@ -310,7 +319,7 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
};
if (!ele.hasClass('collapsed')) {
ele.addClass('collapsed');
- ele.find('.expand-collapse-icon').first().addClass('expand').removeClass('collapse');
+ ele.find('.expand-collapse').first().addClass('expand').removeClass('collapse');
// onDragStart gets called again after the collapse, so we can't just store a variable in the dragState.
ele.addClass(this.expandOnDropClass);
}
@@ -406,7 +415,7 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
expandElement: function (ele) {
ele.removeClass('collapsed');
- ele.find('.expand-collapse-icon').first().removeClass('expand').addClass('collapse');
+ ele.find('.expand-collapse').first().removeClass('expand').addClass('collapse');
},
/*
@@ -500,13 +509,12 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
}
});
$('.toggle-button-sections').bind('click', toggleSections);
- $('.expand-collapse-icon').bind('click', toggleSubmodules);
+ $('.expand-collapse').bind('click', toggleSubmodules);
var $body = $('body');
- $body.on('click', '.section-published-date .edit-button', editSectionPublishDate);
- $body.on('click', '.section-published-date .schedule-button', editSectionPublishDate);
- $body.on('click', '.edit-subsection-publish-settings .save-button', saveSetSectionScheduleDate);
- $body.on('click', '.edit-subsection-publish-settings .cancel-button', ModalUtils.hideModal);
+ $body.on('click', '.section-published-date .edit-release-date', editSectionPublishDate);
+ $body.on('click', '.edit-section-publish-settings .action-save', saveSetSectionScheduleDate);
+ $body.on('click', '.edit-section-publish-settings .action-cancel', closeModalNew);
$('.new-courseware-section-button').bind('click', addNewSection);
$('.new-subsection-item').bind('click', addNewSubsection);
@@ -530,7 +538,7 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
'.unit',
'.unit-drag-handle',
'ol.sortable-unit-list',
- 'li.branch, article.subsection-body'
+ 'li.courseware-subsection, article.subsection-body'
);
});
diff --git a/cms/static/sass/_shame.scss b/cms/static/sass/_shame.scss
index 409e9098e5..099692c1d3 100644
--- a/cms/static/sass/_shame.scss
+++ b/cms/static/sass/_shame.scss
@@ -47,7 +47,7 @@
// ====================
// needed for poorly scoped margin rules on all content elements
-.branch .sortable-unit-list {
+.courseware-subsection .sortable-unit-list {
margin-bottom: 0;
}
diff --git a/cms/static/sass/elements/_edit_dialog.scss b/cms/static/sass/elements/_edit_dialog.scss
new file mode 100644
index 0000000000..27ec1d1cf1
--- /dev/null
+++ b/cms/static/sass/elements/_edit_dialog.scss
@@ -0,0 +1,179 @@
+// studio - elements - uploads
+// ========================
+
+body.course.feature-edit-dialog {
+
+ // dialog
+ .wrapper-dialog {
+ @extend %ui-depth5;
+ @include transition(all 0.05s ease-in-out);
+ position: fixed;
+ top: 0;
+ background: $black-t2;
+ width: 100%;
+ height: 100%;
+ text-align: center;
+
+ &:before {
+ content: '';
+ display: inline-block;
+ height: 100%;
+ vertical-align: middle;
+ margin-right: -0.25em; /* Adjusts for spacing */
+ }
+
+ .dialog {
+ @include box-sizing(border-box);
+ box-shadow: 0px 0px 7px $shadow-d1;
+ border-radius: ($baseline/5);
+ background-color: $gray-l4;
+ display: inline-block;
+ vertical-align: middle;
+ width: $baseline*23;
+ padding: 7px;
+ text-align: left;
+
+ .title {
+ @extend %t-title5;
+ margin-bottom: ($baseline/2);
+ font-weight: 600;
+ color: $black;
+ }
+
+ .message {
+ @extend %t-copy-sub2;
+ color: $gray;
+ }
+
+ .error {
+ color: $white;
+ }
+
+ form {
+ padding: 0;
+
+ .form-content {
+ box-shadow: 0 0 3px $shadow-d1;
+ padding: ($baseline*1.5);
+ background-color: $white;
+ }
+
+ .field {
+ margin-bottom: ($baseline/2);
+ }
+
+ label {
+ @include font-size(14);
+ display: block;
+ font-weight: bold;
+ }
+
+ input[type="text"] {
+ @extend %t-copy-sub2;
+ }
+
+ .message-status {
+ @include border-top-radius(2px);
+ @include box-sizing(border-box);
+ @include font-size(14);
+ display: none;
+ border-bottom: 2px solid $yellow;
+ margin: 0 0 20px 0;
+ padding: 10px 20px;
+ font-weight: 500;
+ background: $paleYellow;
+
+ .text {
+ display: inline-block;
+ }
+
+ &.error {
+ border-color: $red-d2;
+ background: $red-l1;
+ color: $white;
+ }
+
+ &.confirm {
+ border-color: $green-d2;
+ background: $green-l1;
+ color: $white;
+ }
+
+ &.is-shown {
+ display: block;
+ }
+ }
+
+
+ .actions {
+ padding: ($baseline*0.75) $baseline ($baseline/2) $baseline;
+
+
+
+ .action-item {
+ @extend %t-action4;
+ display: inline-block;
+ margin-right: ($baseline*0.75);
+
+ &:last-child {
+ margin-right: 0;
+ }
+ }
+
+ .action-primary {
+ @include blue-button();
+ @include font-size(12); // needed due to bad button mixins for now
+ border-color: $blue-d1;
+ color: $white;
+ }
+
+ a {
+ color: $blue;
+
+ &:hover {
+ color: $blue-s2;
+ }
+ }
+
+ }
+
+ }
+
+ }
+
+ }
+
+ // ====================
+
+
+
+ // dialog set-up
+ .wrapper-dialog {
+ visibility: hidden;
+ pointer-events: none;
+
+ .dialog {
+ opacity: 0;
+ }
+ }
+
+ // dialog showing/hiding
+ &.dialog-is-shown {
+
+ .wrapper-dialog {
+ -webkit-filter: blur(2px) grayscale(25%);
+ filter: blur(2px) grayscale(25%);
+ }
+
+ .wrapper-dialog.is-shown {
+ visibility: visible;
+ pointer-events: auto;
+
+ .dialog {
+ opacity: 1.0;
+ }
+ }
+ }
+
+
+}
diff --git a/cms/static/sass/style-app.scss b/cms/static/sass/style-app.scss
index 09409f779c..f6b20b06db 100644
--- a/cms/static/sass/style-app.scss
+++ b/cms/static/sass/style-app.scss
@@ -38,3 +38,4 @@
@import 'elements/modal'; // interstitial UI, dialogs, modal windows
@import 'elements/vendor'; // overrides to vendor-provided styling
@import 'elements/uploads';
+@import 'elements/edit_dialog';
diff --git a/cms/static/sass/views/_outline.scss b/cms/static/sass/views/_outline.scss
index 7a787bb5f0..4a8ac577a8 100644
--- a/cms/static/sass/views/_outline.scss
+++ b/cms/static/sass/views/_outline.scss
@@ -3,212 +3,186 @@
.view-outline {
- input.courseware-unit-search-input {
- float: left;
- width: 260px;
- background-color: #fff;
+ // page structure
+ .content-primary,
+ .content-supplementary {
+ @include box-sizing(border-box);
+ float: left;
}
- .branch {
+ .content-primary {
+ width: flex-grid(9, 12);
+ margin-right: flex-gutter();
- .section-item {
- @include clearfix();
+ .no-outline-content {
+ @extend %ui-well;
+ padding: ($baseline*2);
+ background-color: $gray-l4;
+ text-align: center;
+ color: $gray;
- .details {
- display: block;
- float: left;
- margin-bottom: 0;
- width: 650px;
- }
+ .new-button {
+ @include font-size(14);
+ margin-left: $baseline;
- .gradable-status {
- float: right;
- position: relative;
- top: -4px;
- right: 50px;
- width: 100px;
-
- .status-label {
- @include font-size(12);
- position: absolute;
- top: 2px;
- right: -5px;
- display: none;
- width: 110px;
- padding: 5px 40px 5px 10px;
- border-radius: 3px;
- color: $lightGrey;
- text-align: right;
- font-weight: bold;
- line-height: 16px;
- }
-
- .menu-toggle {
- z-index: 10;
- position: absolute;
- top: 0;
- right: 5px;
- padding: 5px;
- color: $mediumGrey;
-
- &:hover, &.is-active {
- color: $blue;
- }
- }
-
- [class^="icon-"] {
- vertical-align: middle;
- margin-top: -5px;
- display: inline-block;
- }
-
- .menu {
- @include font-size(12);
- @include transition(opacity $tmg-f2 linear 0s);
- border-radius: 4px;
- box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
- z-index: 1;
- display: none;
- opacity: 0.0;
- position: absolute;
- top: -1px;
- right: 0;
- margin: 0;
- padding: 8px 12px;
- background: $white;
- border: 1px solid $mediumGrey;
-
-
- li {
- width: 115px;
- margin-bottom: 3px;
- padding-bottom: 3px;
- border-bottom: 1px solid $lightGrey;
-
- &:last-child {
- margin-bottom: 0;
- padding-bottom: 0;
- border: none;
-
- a {
- color: $darkGrey;
- }
- }
- }
-
- a {
- color: $blue;
-
- &.is-selected {
- font-weight: bold;
- }
- }
- }
-
- // dropdown state
- &.is-active {
-
- .menu {
- z-index: 1000;
- display: block;
- opacity: 1.0;
- }
-
- .menu-toggle {
- z-index: 10000;
- }
- }
-
- // set state
- &.is-set {
-
- .menu-toggle {
- color: $blue;
- }
-
- .status-label {
- display: block;
- color: $blue;
- }
- }
+ [class^="icon-"] {
+ margin-right: ($baseline/2);
}
}
}
+ }
+
+ .content-supplementary {
+ width: flex-grid(3, 12);
+ }
+ // page header bits
+ .toggle-button-sections {
+ @include font-size(12);
+ display: none;
+ position: relative;
+ float: right;
+ margin-top: ($baseline/4);
+ color: $darkGrey;
+
+ &.is-shown {
+ display: block;
+ }
+
+ [class^="icon-"] {
+ @include font-size(11);
+ border-radius: 20px;
+ position: relative;
+ top: -1px;
+ display: inline-block;
+ margin-right: 2px;
+ line-height: 5px;
+ }
+
+ .label {
+ display: inline-block;
+ }
+ }
+
+
+ // new section, subsection, unit
+ .new-section-name,
+ .new-subsection-name-input {
+ @include font-size(16);
+ display: inline-block;
+ vertical-align: top;
+ width: 515px;
+ padding: ($baseline/4);
+ }
+
+ .new-section-name-save,
+ .new-subsection-name-save {
+ @include blue-button;
+ padding: 4px 20px 7px;
+ margin: 0 5px;
+ color: #fff !important;
+ }
+
+ .new-section-name-cancel,
+ .new-subsection-name-cancel {
+ @include white-button;
+ padding: 4px 20px 7px;
+ color: #8891a1 !important;
+ }
+
+ .new-subsection-item,
+ .new-unit-item {
+ @extend %ui-btn-flat-outline;
+ width: 100%;
+ margin: 0 0 ($baseline/2) 0;
+ border: 1px solid $gray-l3;
+ padding: ($baseline/2) 0;
+ color: $gray-l2;
+
+
+ &:hover {
+ box-shadow: none;
+ background-image: none;
+ }
+ }
+
+ .courseware-unit-new {
+ margin-right: ($baseline*1.5);
+ }
+
+
+ // general action list styles (section and subsection)
+ .expand-collapse {
+ @include transition(all $tmg-f2 linear 0s);
+ display: inline-block;
+ vertical-align: top;
+ margin: 0 ($baseline/4);
+ padding: 0;
+ color: $gray-l2;
+
+ &:hover {
+ color: $blue;
+ }
+
+ .ui-toggle-expansion {
+ @include transition(all $tmg-f2 ease-in-out 0s);
+ @include font-size(18);
+ display: inline-block;
+ vertical-align: middle;
+ margin-right: ($baseline/4);
+ color: $gray-l3;
+ }
+
+ &.expand .ui-toggle-expansion {
+ @include transform(rotate(-90deg));
+ @include transform-origin(50% 50%);
+ }
+
+ }
+
+ .actions-list {
+ display: inline-block;
+ margin-bottom: 0;
+ }
+
+ .actions-item {
+ @include font-size(13);
+ display: inline-block;
+ padding: 0 4px;
+ vertical-align: middle;
+
+ .action {
+ min-width: ($baseline*.75);
+ color: $gray-l2;
+
+ &:hover,
+ &.isset {
+ color: $blue;
+ visibility: visible;
+ }
+
+ //reset old drag handle style
+ &.drag-handle {
+ float: none;
+ margin: 0;
+ background: none;
+ text-align: center;
+ }
+
+ }
+ }
+
+
+ // section styles
.courseware-section {
@extend %ui-window;
@include transition(background $tmg-avg ease-in-out 0);
position: relative;
- margin-top: ($baseline);
- padding-bottom: ($baseline/2);
+ padding: ($baseline*1.5) $baseline $baseline $baseline;
&.collapsed {
- padding-bottom: 0;
- }
-
- label {
- float: left;
- line-height: 29px;
- }
-
- .datepair {
- float: left;
- margin-left: 10px;
- }
-
- .section-published-date {
- position: absolute;
- top: 19px;
- right: 80px;
- padding: 4px 10px;
- border-radius: 3px;
- background: $lightGrey;
- text-align: right;
-
- .published-status {
- @include font-size(12);
- margin-right: 15px;
-
- strong {
- font-weight: bold;
- }
- }
-
- .schedule-button {
- @include blue-button;
- }
-
- .edit-button {
- @include blue-button;
- }
-
- .schedule-button,
- .edit-button {
- @include font-size(11);
- padding: 3px 15px 5px;
- }
- }
-
- .datepair .date,
- .datepair .time {
- @include font-size(13);
- box-shadow: none;
- padding-left: 0;
- padding-right: 0;
- border: none;
- background: none;
- font-weight: bold;
- color: $blue;
- cursor: pointer;
- }
-
- .datepair .date {
- width: 80px;
- }
-
- .datepair .time {
- width: 65px;
+ padding-bottom: 0;
}
&.collapsed .subsection-list,
@@ -217,44 +191,65 @@
display: none !important;
}
- header {
- min-height: 75px;
+ &.new-section {
+
+ header {
@include clearfix();
+ height: auto;
+ border-bottom: 0;
+ }
- .item-details, .section-published-date {
+ .expand-collapse {
+ visibility: hidden;
+ }
+ .item-details {
+ padding: 25px 0 0 0;
+
+ .section-name {
+ float: none;
+ width: 100%;
+ }
+ }
+ }
+
+ .section {
+ @include clearfix();
+ min-height: 65px; // needed to align with edit input
+ margin-bottom: 0;
+ border: 0;
+ padding: 0;
+
+ // section name area
+ .item-details {
+ @include clearfix();
+ display: inline-block;
+ float: none;
+ padding: 0 0 ($baseline/2) 0;
+
+ .section-name {
+ @include font-size(19);
+ float: left;
+ width: 400px;
+ margin-right: 10px;
}
- .item-details {
- display: inline-block;
- padding: 20px 0 10px 0;
- @include clearfix();
+ .section-name-span {
+ @include transition(color $tmg-f2 linear 0s);
+ cursor: pointer;
- .section-name {
- @include font-size(19);
- float: left;
- margin-right: 10px;
- width: 350px;
- font-weight: bold;
- color: $blue;
- }
+ &:hover {
+ color: $blue;
+ }
+ }
- .section-name-span {
- @include transition(color $tmg-f2 linear 0s);
- cursor: pointer;
+ .section-name-edit {
+ position: relative;
+ width: 400px;
+ background: $white;
- &:hover {
- color: $orange;
- }
- }
-
- .section-name-edit {
- position: relative;
- width: 400px;
- background: $white;
-
- input {
- @include font-size(16);
+ input {
+ @include font-size(16);
}
.save-button {
@@ -268,11 +263,43 @@
padding: 7px 20px 7px;
}
}
+ }
+
+
+ // section specific action styles
+ .item-actions {
+ top: 0;
+ }
+
+ .actions-item {
+ padding: 0 0 0 8px;
+
+ &:last-child {
+ padding-right: 4px;
+ }
+
+ &.pubdate {
+ padding-right: 0;
+ }
+
+ .action {
+
+ &.pubdate {
+ visibility: hidden;
+ }
+
+ &:hover,
+ &.isset {
+ color: $blue;
+ visibility: visible;
+ }
+ }
.section-published-date {
- float: right;
+ padding: 4px 10px;
border-radius: 3px;
background: $lightGrey;
+ text-align: right;
.published-status {
@include font-size(12);
@@ -283,392 +310,286 @@
}
}
- .schedule-button {
- @include blue-button;
- }
+ &.released .section-published-date {
+ background-color: transparent;
+ color: $gray-l1;
- .edit-button {
- @include blue-button;
- }
+ a {
+ color: $gray-l2;
- .schedule-button,
- .edit-button {
- @include font-size(11);
- padding: 0 15px 2px 15px;
- }
- }
-
- .gradable-status {
- position: absolute;
- top: 20px;
- right: 70px;
- width: 145px;
-
- .status-label {
- @include font-size(12);
- border-radius: 3px;
- position: absolute;
- top: 0;
- right: 2px;
- display: none;
- width: 100px;
- padding: 10px 35px 10px 10px;
- background: $lightGrey;
- color: $lightGrey;
- text-align: right;
- font-weight: bold;
- line-height: 16px;
- }
-
- .menu-toggle {
- z-index: 10;
- position: absolute;
- top: 2px;
- right: 5px;
- padding: 5px;
- color: $lightGrey;
-
- &:hover, &.is-active {
+ &:hover {
color: $blue;
}
-
}
-
- .menu {
- @include font-size(12);
- @include transition(opacity $tmg-f2 linear 0s, display $tmg-f2 linear 0s);
- border-radius: 4px;
- box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
- z-index: 1;
- display: none;
- opacity: 0.0;
- position: absolute;
- top: -1px;
- left: 2px;
- margin: 0;
- padding: 8px 12px;
- background: $white;
- border: 1px solid $mediumGrey;
-
-
-
- li {
- width: 115px;
- margin-bottom: 3px;
- padding-bottom: 3px;
- border-bottom: 1px solid $lightGrey;
-
- &:last-child {
- margin-bottom: 0;
- padding-bottom: 0;
- border: none;
-
- a {
- color: $darkGrey;
- }
- }
- }
-
- a {
-
- &.is-selected {
- font-weight: bold;
- }
- }
- }
-
- // dropdown state
- &.is-active {
-
- .menu {
- z-index: 1000;
- display: block;
- opacity: 1.0;
- }
-
-
- .menu-toggle {
- z-index: 10000;
}
}
-
- // set state
- &.is-set {
-
- .menu-toggle {
- color: $blue;
- }
-
- .status-label {
- display: block;
- color: $blue;
- }
- }
-
- float: left;
- padding: 21px 0 0;
}
- }
-
- .item-actions {
- margin-top: 21px;
- margin-right: 12px;
-
- .edit-button,
- .delete-button {
- margin-top: -3px;
- }
- }
-
- .expand-collapse-icon {
- @include transition(none);
- float: left;
- margin: 25px 6px 16px 16px;
-
- &.expand {
- background-position: 0 0;
- }
-
- &.collapsed {
-
- }
- }
-
- .drag-handle {
- margin-left: 11px;
- }
- }
-
- h3 {
- @include font-size(19);
- font-weight: 700;
- color: $blue;
- }
-
- .section-name-span {
- @include transition(color $tmg-f2 linear 0s);
- cursor: pointer;
-
- &:hover {
- color: $orange;
- }
- }
-
- .section-name-form {
- margin-bottom: 15px;
- }
-
- .section-name-edit {
- input {
- @include font-size(16);
- }
-
- .save-button {
- @include blue-button;
- padding: 7px 20px 7px;
- margin-right: 5px;
- }
-
- .cancel-button {
- @include white-button;
- padding: 7px 20px 7px;
- }
- }
-
- h4 {
- @include font-size(12);
- color: #878e9d;
-
- strong {
- font-weight: bold;
- }
- }
-
- .list-header {
- @include linear-gradient(top, transparent, rgba(0, 0, 0, .1));
- background-color: #ced2db;
- border-radius: 3px 3px 0 0;
- }
-
- .subsection-list {
- margin: 0 12px;
-
- > ol {
- @include tree-view;
- border-top-width: 0;
- }
- }
-
- &.new-section {
-
- header {
- @include clearfix();
- height: auto;
- }
-
- .expand-collapse-icon {
- visibility: hidden;
- }
-
- .item-details {
- padding: 25px 0 0 0;
-
- .section-name {
- float: none;
- width: 100%;
- }
- }
}
}
- .toggle-button-sections {
- @include font-size(12);
- display: none;
- position: relative;
- float: right;
- margin-top: ($baseline/4);
- color: $darkGrey;
- &.is-shown {
+ // subsection styles
+ .courseware-subsection {
+ @include clearfix();
+ margin-bottom: 5px;
+
+ &.visible {
+ border-left: 5px solid $green;
+ }
+
+ &.mixed {
+ border-left: 5px solid $yellow-s1;
+ }
+
+ .status {
+ @extend %cont-text-sr;
+ }
+
+ .section-item {
+ @include transition(background $tmg-avg ease-in-out 0);
+ @include font-size(13);
+ position: relative;
+ display: block;
+ background-color: $gray-l5;
+ padding: 6px 8px 8px 16px;
+
+ &:hover {
+ background: $blue-l5;
+
+ .item-actions {
display: block;
+ }
+ }
+
+ &.editing {
+ background: $orange-l4;
+ }
+ }
+
+ .details {
+ display: block;
+ margin-bottom: 0;
+ width: 600px;
+
+ a {
+ color: $baseFontColor;
+ }
+ }
+ }
+
+ // gradable drop down
+ .gradable-status {
+ display: inline-block;
+ position: relative;
+
+ .status-label {
+ @include font-size(12);
+ width: 110px;
+ padding: 5px 40px 5px 10px;
+ border-radius: 3px;
+ color: transparent;
+ text-align: right;
+ font-weight: bold;
+ line-height: 16px;
+ }
+
+ .menu-toggle {
+ z-index: 10;
+ position: absolute;
+ top: 0;
+ right: 5px;
+ padding: 2px 5px;
+ color: $mediumGrey;
+
+ &:hover,
+ &.is-active {
+ color: $blue;
+ }
+
+ &:focus {
+ outline: 0;
}
[class^="icon-"] {
- @include font-size(11);
- border-radius: 20px;
- position: relative;
- top: -1px;
- display: inline-block;
- margin-right: 2px;
- line-height: 5px;
+ vertical-align: middle;
+ margin-top: -5px;
+ display: inline-block;
}
+ }
- .label {
- display: inline-block;
- }
- }
- .new-section-name,
- .new-subsection-name-input {
- width: 515px;
- }
-
- .new-section-name-save,
- .new-subsection-name-save {
- @include blue-button;
- padding: 4px 20px 7px;
- margin: 0 5px;
- color: #fff !important;
- }
-
- .new-section-name-cancel,
- .new-subsection-name-cancel {
- @include white-button;
- padding: 4px 20px 7px;
- color: #8891a1 !important;
- }
-
- .dummy-calendar {
+ // gradable dropdown menu default
+ .menu {
+ @include font-size(12);
+ @include transition(opacity $tmg-f2 linear 0s);
display: none;
+ opacity: 0.0;
+ z-index: 1;
position: absolute;
- top: 55px;
- left: 110px;
- z-index: 9999;
- border: 1px solid #3C3C3C;
- box-shadow: 0 1px 15px rgba(0, 0, 0, .2);
- }
+ top: -4px;
+ right: 0;
+ margin: 0;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
+ border: 1px solid $mediumGrey;
+ border-radius: 4px;
+ padding: 8px 12px;
+ background: $white;
- .preview {
- background: url(../img/preview.jpg) center top no-repeat;
- }
+ li {
+ width: 115px;
+ margin-bottom: 3px;
+ padding-bottom: 3px;
+ border-bottom: 1px solid $lightGrey;
- .edit-subsection-publish-settings {
- display: none;
- position: fixed;
- top: 100px;
- left: 50%;
- z-index: 99999;
- width: 600px;
- margin-left: -300px;
- background: #fff;
- text-align: center;
+ &:last-child {
+ margin-bottom: 0;
+ padding-bottom: 0;
+ border: none;
- .settings {
- padding: 40px;
- }
-
- h3 {
- @include font-size(34);
- font-weight: 300;
- }
-
- .picker {
- @include clearfix();
- margin: 30px 0 65px;
-
- .field {
- float: left;
- margin-right: ($baseline/2);
-
- &:first-child {
- margin-left: ($baseline*5);
- }
-
- &:last-child {
- margin-right: 0;
- }
-
- label, input {
- display: block;
- text-align: left;
- }
-
- label {
- @extend %t-copy-sub1;
- margin-bottom: ($baseline/4);
- }
+ .gradable-status-notgraded {
+ color: $darkGrey;
}
+ }
}
- .description {
- @include font-size(14);
- float: left;
- margin-top: 30px;
- line-height: 20px;
- width: 100%;
+ a {
+ color: $blue;
+
+ &.is-selected {
+ font-weight: bold;
+ }
+ }
+ }
+
+ // gradable dropdown state
+ &.is-active {
+
+ .menu {
+ z-index: 1000;
+ display: block;
+ opacity: 1.0;
}
- strong {
- font-weight: 700;
+ .menu-toggle {
+ z-index: 10000;
+ }
+ }
+
+ // set state
+ &.is-set {
+
+ .menu-toggle {
+ color: $blue;
}
- .start-date,
- .start-time {
- @include font-size(19);
- }
-
- .save-button {
- @include blue-button;
- margin-right: 10px;
- }
-
- .cancel-button {
- @include white-button;
- }
-
- .save-button,
- .cancel-button {
- @include font-size(16);
+ .status-label {
+ display: block;
+ color: $blue;
}
+ }
}
- .collapse-all-button {
- @include font-size(13);
- float: right;
- margin-top: 10px;
- color: $darkGrey;
+ // unit styles
+ .courseware-unit {
+ margin: ($baseline/4) 0 0 ($baseline*1.75);
+
+ &.add-new-unit {
+ margin-right: ($baseline*1.75);
+ }
+
+ .section-item {
+ border: 0;
+ background-color: $white;
+ }
+
+ .public-item {
+ color: $black;
+ }
+
+ .private-item {
+ color: $gray-l1;
+ }
+
+ .draft-item {
+ color: $yellow-d1;
+ }
+
+ .draft-item:after,
+ .public-item:after,
+ .private-item:after {
+ margin-left: 3px;
+ font-size: 9px;
+ font-weight: 600;
+ text-transform: uppercase;
+ }
+
+ .draft-item:after {
+ content: "- draft";
+ }
+
+ .private-item:after {
+ content: "- private";
+ }
}
+
+ // modal to edit section publish settings
+ .edit-section-publish-settings {
+
+ .picker {
+ @include clearfix();
+
+
+ .field {
+ float: left;
+ margin-right: ($baseline/2);
+
+ label, input {
+ display: block;
+ text-align: left;
+ }
+
+ label {
+ @extend %t-copy-sub1;
+ margin-bottom: ($baseline/4);
+ }
+ }
+ }
+
+ .description {
+ @include font-size(14);
+ float: left;
+ margin-top: 30px;
+ line-height: 20px;
+ width: 100%;
+ }
+
+ strong {
+ font-weight: 700;
+ }
+
+ .start-date,
+ .start-time {
+ @include font-size(19);
+ }
+
+ .save-button {
+ @include blue-button;
+ margin-right: 10px;
+ }
+
+ .cancel-button {
+ @include white-button;
+ }
+
+ .save-button,
+ .cancel-button {
+ @include font-size(16);
+ }
+ }
+
+
+
// UI: DnD - specific elems/cases - section
.courseware-section {
diff --git a/cms/templates/js/blank-slate-template.underscore b/cms/templates/js/blank-slate-template.underscore
new file mode 100644
index 0000000000..d395d40a42
--- /dev/null
+++ b/cms/templates/js/blank-slate-template.underscore
@@ -0,0 +1,19 @@
+
diff --git a/cms/templates/js/new-section-template.underscore b/cms/templates/js/new-section-template.underscore
new file mode 100644
index 0000000000..2d0cbaefff
--- /dev/null
+++ b/cms/templates/js/new-section-template.underscore
@@ -0,0 +1,15 @@
+
diff --git a/cms/templates/js/new-subsection-template.underscore b/cms/templates/js/new-subsection-template.underscore
new file mode 100644
index 0000000000..99f94c0464
--- /dev/null
+++ b/cms/templates/js/new-subsection-template.underscore
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+ ${_('New Unit')}
+
+
+
+
diff --git a/cms/templates/js/no-outline-content.underscore b/cms/templates/js/no-outline-content.underscore
new file mode 100644
index 0000000000..5d4774dd65
--- /dev/null
+++ b/cms/templates/js/no-outline-content.underscore
@@ -0,0 +1,3 @@
+
+
<%= gettext("You haven't added any sections to your course outline.") %> <%= gettext("Add your first section") %>
+
diff --git a/cms/templates/overview.html b/cms/templates/overview.html
index 61b00278a4..adc1e59ccb 100644
--- a/cms/templates/overview.html
+++ b/cms/templates/overview.html
@@ -7,7 +7,7 @@
from xmodule.modulestore.django import loc_mapper
%>
<%block name="title">${_("Course Outline")}%block>
-<%block name="bodyclass">is-signedin course view-outline%block>
+<%block name="bodyclass">is-signedin course view-outline feature-edit-dialog%block>
<%namespace name='static' file='static_content.html'/>
<%namespace name="units" file="widgets/units.html" />
@@ -49,64 +49,71 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
<%block name="header_extras">
+
+
+
%block>
@@ -135,130 +142,182 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
-
-
+
+
+
-
- <%
- course_locator = loc_mapper().translate_location(
- context_course.location.course_id, context_course.location, False, True
- )
- %>
-
- % for section in sections:
- <%
- section_locator = loc_mapper().translate_location(
- context_course.location.course_id, section.location, False, True
- )
- %>
-
- <%include file="widgets/_ui-dnd-indicator-before.html" />
+
+ <%
+ course_locator = loc_mapper().translate_location(
+ context_course.location.course_id, context_course.location, False, True
+ )
+ %>
+
+ % for section in sections:
+ <%
+ section_locator = loc_mapper().translate_location(
+ context_course.location.course_id, section.location, False, True
+ )
+ %>
+
+ <%include file="widgets/_ui-dnd-indicator-before.html" />
-
-
+
+ ${_('Expand/collapse this section')}
-
-
-
- <%
- if section.start is not None:
- start_date_str = section.start.strftime('%m/%d/%Y')
- start_time_str = section.start.strftime('%H:%M')
- else:
- start_date_str = ''
- start_time_str = ''
- %>
- %if section.start is None:
-
${_("This section has not been released.")}
-
${_("Schedule")}
- %else:
-
${_("Will Release:")}
- ${date_utils.get_default_time_display(section.start)}
-
${_("Edit")}
- %endif
-
-
-
-
-
-
-
-
- % for subsection in section.get_children():
- <%
- subsection_locator = loc_mapper().translate_location(
- context_course.location.course_id, subsection.location, False, True
- )
- %>
-
-
- <%include file="widgets/_ui-dnd-indicator-before.html" />
-
-
-
-
-
-
-
-
+
+
- ${units.enum_units(subsection)}
+
- <%include file="widgets/_ui-dnd-indicator-after.html" />
-
- % endfor
-
- <%include file="widgets/_ui-dnd-indicator-initial.html" />
-
-
-
+
- <%include file="widgets/_ui-dnd-indicator-after.html" />
-
- % endfor
-
-
-
+
+
+ <%
+ if section.start is not None:
+ start_date_str = section.start.strftime('%m/%d/%Y')
+ start_time_str = section.start.strftime('%H:%M')
+ else:
+ start_date_str = ''
+ start_time_str = ''
+ %>
+ %if section.start is None:
+
${_("This section is not scheduled for release")}
+
${_("Schedule")}
+ %else:
+
${_("Release date:")}
+ ${date_utils.get_default_time_display(section.start)}
+
${_("Edit section release date")}
+ %endif
+
+
+
+ Delete section
+
+
+ ${_("Drag to reorder section")}
+
+
+
+
+
+
+
+ % for subsection in section.get_children():
+ <%
+ subsection_locator = loc_mapper().translate_location(
+ context_course.location.course_id, subsection.location, False, True
+ )
+ %>
+
+
+ <%include file="widgets/_ui-dnd-indicator-before.html" />
+
+
+ ${units.enum_units(subsection)}
+
+ <%include file="widgets/_ui-dnd-indicator-after.html" />
+
+ % endfor
+
+ <%include file="widgets/_ui-dnd-indicator-initial.html" />
+
+
+
+
+
+
+
+ <%include file="widgets/_ui-dnd-indicator-after.html" />
+
+ % endfor
+
+
+
+
+
+
+
${_("What can I do on this page?")}
+
${_("You can create new sections and subsections, set the release date for sections, and create new units in existing subsections. You can set the assignment type for subsections that are to be graded, and you can open a subsection for further editing.")}
+
+
${_("In addition, you can drag and drop sections, subsections, and units to reorganize your course.")}
+
+
+
-
-
-
${_("Section Release Date")}
-
-
- ${_("Release Day")}
-
-
-
-
${_("Release Time")} (UTC )
-
-
+
+
+
+
-
-
${_('On the date set above, this section - {name} - will be released to students. Any units marked private will only be visible to admins.').format(name=' ')}
-
-
${_("Save")} ${_("Cancel")}
-
+
+
+
%block>
diff --git a/cms/templates/unit.html b/cms/templates/unit.html
index 2318e9cd97..5c613d4d0b 100644
--- a/cms/templates/unit.html
+++ b/cms/templates/unit.html
@@ -191,7 +191,6 @@ require(["domReady!", "jquery", "js/models/module_info", "coffee/src/views/unit"
-
${subsection.display_name_with_default}
${units.enum_units(subsection, actions=False, selected=unit.location)}
diff --git a/cms/templates/widgets/units.html b/cms/templates/widgets/units.html
index edc32ed947..f5f35736cb 100644
--- a/cms/templates/widgets/units.html
+++ b/cms/templates/widgets/units.html
@@ -18,7 +18,7 @@ This def will enumerate through a passed in subsection and list all of the units
<%
unit_locator = loc_mapper().translate_location(context_course.location.course_id, unit.location, False, True)
%>
-
<%include file="_ui-dnd-indicator-before.html" />
@@ -32,14 +32,18 @@ This def will enumerate through a passed in subsection and list all of the units
%>
@@ -47,11 +51,11 @@ This def will enumerate through a passed in subsection and list all of the units
<%include file="_ui-dnd-indicator-after.html" />
% endfor
-
+
<%include file="_ui-dnd-indicator-initial.html" />
- New Unit
+ New Unit
diff --git a/common/static/sass/_mixins-inherited.scss b/common/static/sass/_mixins-inherited.scss
index 7a3cb1633d..b59d193d5f 100644
--- a/common/static/sass/_mixins-inherited.scss
+++ b/common/static/sass/_mixins-inherited.scss
@@ -354,8 +354,8 @@
}
@mixin tree-view {
- border: 1px solid $mediumGrey;
- background: $lightGrey;
+ border: 0;
+ background: $white;
.branch {
margin-bottom: 0;
@@ -374,7 +374,7 @@
font-size: 13px;
&:hover {
- background: $orange-l4;
+ background: $blue-l5;
.item-actions {
display: block;
@@ -403,11 +403,11 @@
}
.private-item {
- color: #a4aab7;
+ color: $gray-l1;
}
.draft-item {
- color: #9f7d10;
+ color: $yellow-d1;
}
}