diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py
index 4a500c9e16..cd9c00c09c 100644
--- a/cms/djangoapps/contentstore/features/common.py
+++ b/cms/djangoapps/contentstore/features/common.py
@@ -43,9 +43,9 @@ def i_confirm_with_ok(_step):
@step(u'I press the "([^"]*)" delete icon$')
def i_press_the_category_delete_icon(_step, category):
if category == 'section':
- css = 'a.delete-button.delete-section-button span.delete-icon'
+ css = 'a.action.delete-section-button'
elif category == 'subsection':
- css = 'a.delete-button.delete-subsection-button span.delete-icon'
+ css = 'a.action.delete-subsection-button'
else:
assert False, 'Invalid category: %s' % category
world.css_click(css)
@@ -254,7 +254,7 @@ def create_course_with_unit():
world.wait_for_js_to_load()
css_selectors = [
- 'div.section-item a.expand-collapse-icon', 'a.new-unit-item'
+ 'div.section-item a.expand-collapse', 'a.new-unit-item'
]
for selector in css_selectors:
world.css_click(selector)
diff --git a/cms/djangoapps/contentstore/features/section.py b/cms/djangoapps/contentstore/features/section.py
index b6f55969bb..b1e9ee2e12 100644
--- a/cms/djangoapps/contentstore/features/section.py
+++ b/cms/djangoapps/contentstore/features/section.py
@@ -29,7 +29,7 @@ def i_have_added_new_section(_step):
@step('I click the Edit link for the release date$')
def i_click_the_edit_link_for_the_release_date(_step):
- button_css = 'div.section-published-date a.edit-button'
+ button_css = 'div.section-published-date a.edit-release-date'
world.css_click(button_css)
@@ -88,7 +88,7 @@ def i_see_a_release_date_for_my_section(_step):
status_text = world.css_text(css)
# e.g. 11/06/2012 at 16:25
- msg = 'Will Release:'
+ msg = 'Release date:'
date_regex = r'(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d?, \d{4}'
if not re.search(date_regex, status_text):
print status_text, date_regex
@@ -117,7 +117,7 @@ def the_section_release_date_picker_not_visible(_step):
def the_section_release_date_is_updated(_step):
css = 'span.published-status'
status_text = world.css_text(css)
- assert_equal(status_text, 'Will Release: 12/25/2013 at 00:00 UTC')
+ assert_equal(status_text, 'Release date: 12/25/2013 at 00:00 UTC')
def save_section_name(name):
diff --git a/cms/static/coffee/spec/views/overview_spec.coffee b/cms/static/coffee/spec/views/overview_spec.coffee
index 2082e4747b..02de783412 100644
--- a/cms/static/coffee/spec/views/overview_spec.coffee
+++ b/cms/static/coffee/spec/views/overview_spec.coffee
@@ -6,65 +6,77 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
appendSetFixtures """
"""
-
+
appendSetFixtures """
-
-
-
Section Release Date
-
-
-
-
-
-
-
-
On the date set above, this section – – will be released to students. Any units marked private will only be visible to admins.
-
-
-
SaveCancel
-
-
+
+
"""
-
+
appendSetFixtures """
-
+
"""
-
+
appendSetFixtures """
-
- -
+
+ -
-
-
-
+
+
+
- -
+
-
-
+
- -
+
-
"""
-
+
spyOn(Overview, 'saveSetSectionScheduleDate').andCallThrough()
# Have to do this here, as it normally gets bound in document.ready()
- $('a.save-button').click(Overview.saveSetSectionScheduleDate)
+ $('a.action-save').click(Overview.saveSetSectionScheduleDate)
$('a.delete-section-button').click(deleteSection)
$(".edit-subsection-publish-settings .start-date").datepicker()
@@ -79,22 +91,22 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
'.unit',
'.unit-drag-handle',
'ol.sortable-unit-list',
- 'li.branch, article.subsection-body'
+ 'li.courseware-subsection, article.subsection-body'
)
-
+
afterEach ->
delete window.analytics
delete window.course_location_analytics
@notificationSpy.reset()
-
+
it "should save model when save is clicked", ->
- $('a.edit-button').click()
- $('a.save-button').click()
+ $('a.edit-release-date').click()
+ $('a.action-save').click()
expect(Overview.saveSetSectionScheduleDate).toHaveBeenCalled()
it "should show a confirmation on save", ->
- $('a.edit-button').click()
- $('a.save-button').click()
+ $('a.edit-release-date').click()
+ $('a.action-save').click()
expect(@notificationSpy).toHaveBeenCalled()
# Fails sporadically in Jenkins.
@@ -113,7 +125,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
# $('a.delete-section-button').click()
# $('a.action-primary').click()
# expect(@notificationSpy).toHaveBeenCalled()
-
+
describe "findDestination", ->
it "correctly finds the drop target of a drag", ->
$ele = $('#unit-1')
@@ -123,7 +135,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
destination = Overview.overviewDragger.findDestination($ele, 1)
expect(destination.ele).toBe($('#unit-2'))
expect(destination.attachMethod).toBe('before')
-
+
it "can drag and drop across section boundaries, with special handling for first element", ->
$ele = $('#unit-1')
$ele.offset(
@@ -142,7 +154,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
destination = Overview.overviewDragger.findDestination($ele, 1)
expect(destination.ele).toBe($('#unit-4'))
expect(destination.attachMethod).toBe('after')
-
+
it "can drag and drop across section boundaries, with special handling for last element", ->
$ele = $('#unit-4')
$ele.offset(
@@ -161,7 +173,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
destination = Overview.overviewDragger.findDestination($ele, -1)
expect(destination.ele).toBe($('#unit-3'))
expect(destination.attachMethod).toBe('before')
-
+
it "can drag into an empty list", ->
$ele = $('#unit-1')
$ele.offset(
@@ -171,7 +183,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
destination = Overview.overviewDragger.findDestination($ele, 1)
expect(destination.ele).toBe($('#subsection-list-3'))
expect(destination.attachMethod).toBe('prepend')
-
+
it "reports a null destination on a failed drag", ->
$ele = $('#unit-1')
$ele.offset(
@@ -182,7 +194,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
ele: null
attachMethod: ""
)
-
+
it "can drag into a collapsed list", ->
$('#subsection-2').addClass('collapsed')
$ele = $('#unit-2')
@@ -194,7 +206,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
expect(destination.ele).toBe($('#subsection-list-2'))
expect(destination.parentList).toBe($('#subsection-2'))
expect(destination.attachMethod).toBe('prepend')
-
+
describe "onDragStart", ->
it "sets the dragState to its default values", ->
expect(Overview.overviewDragger.dragState).toEqual({})
@@ -211,7 +223,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
lastY: 0,
dragDirection: 0
)
-
+
it "collapses expanded elements", ->
expect($('#subsection-1')).not.toHaveClass('collapsed')
Overview.overviewDragger.onDragStart(
@@ -221,7 +233,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
)
expect($('#subsection-1')).toHaveClass('collapsed')
expect($('#subsection-1')).toHaveClass('expand-on-drop')
-
+
describe "onDragMove", ->
beforeEach ->
@scrollSpy = spyOn(window, 'scrollBy').andCallThrough()
@@ -239,7 +251,7 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
)
expect($('#unit-2')).toHaveClass('drop-target drop-target-before')
expect($ele).toHaveClass('valid-drop')
-
+
it "does not add CSS class to the drop destination if out of bounds", ->
$ele = $('#unit-1')
dragY = $ele.offset().top + 10
@@ -252,19 +264,19 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base
)
expect($('#unit-2')).not.toHaveClass('drop-target drop-target-before')
expect($ele).not.toHaveClass('valid-drop')
-
+
it "scrolls up if necessary", ->
Overview.overviewDragger.onDragMove(
{element: $('#unit-1')}, '', {clientY: 2}
)
expect(@scrollSpy).toHaveBeenCalledWith(0, -10)
-
+
it "scrolls down if necessary", ->
Overview.overviewDragger.onDragMove(
{element: $('#unit-1')}, '', {clientY: (window.innerHeight - 5)}
)
expect(@scrollSpy).toHaveBeenCalledWith(0, 10)
-
+
describe "onDragEnd", ->
beforeEach ->
@reorderSpy = spyOn(Overview.overviewDragger, 'handleReorder')
diff --git a/cms/static/js/views/overview.js b/cms/static/js/views/overview.js
index 0e34fc64a1..90e7831c9e 100644
--- a/cms/static/js/views/overview.js
+++ b/cms/static/js/views/overview.js
@@ -31,7 +31,7 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
var toggleSubmodules = function(e) {
e.preventDefault();
- $(this).toggleClass('expand');
+ $(this).toggleClass('expand').toggleClass('collapse');
$(this).closest('.is-collapsible, .window').toggleClass('collapsed');
};
@@ -100,9 +100,9 @@ define(["domReady", "jquery", "jquery.ui", "underscore", "gettext", "js/views/fe
'' + gettext("Release date:") + ' ' +
gettext("{month}/{day}/{year} at {hour}:{minute} UTC") +
'' +
- '' +
- gettext("Edit") +
- '',
+ ' ' +
+ gettext("Edit section release date") +
+ '',
{year: datetime.getUTCFullYear(), month: pad2(datetime.getUTCMonth() + 1), day: pad2(datetime.getUTCDate()),
hour: pad2(datetime.getUTCHours()), minute: pad2(datetime.getUTCMinutes()),
locator: locator},
diff --git a/cms/static/sass/views/_outline.scss b/cms/static/sass/views/_outline.scss
index 4a8ac577a8..1c0547866c 100644
--- a/cms/static/sass/views/_outline.scss
+++ b/cms/static/sass/views/_outline.scss
@@ -76,6 +76,9 @@
padding: ($baseline/4);
}
+ .new-subsection-name-input {
+ @include font-size(14);
+ }
.new-section-name-save,
.new-subsection-name-save {
@include blue-button;
@@ -166,7 +169,7 @@
&.drag-handle {
float: none;
margin: 0;
- background: none;
+ background: transparent url(../img/drag-handles.png) right 5px no-repeat;
text-align: center;
}
diff --git a/cms/templates/js/blank-slate-template.underscore b/cms/templates/js/blank-slate-template.underscore
deleted file mode 100644
index d395d40a42..0000000000
--- a/cms/templates/js/blank-slate-template.underscore
+++ /dev/null
@@ -1,19 +0,0 @@
-
diff --git a/cms/templates/js/new-section-template.underscore b/cms/templates/js/new-section-template.underscore
deleted file mode 100644
index 2d0cbaefff..0000000000
--- a/cms/templates/js/new-section-template.underscore
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/cms/templates/js/new-subsection-template.underscore b/cms/templates/js/new-subsection-template.underscore
deleted file mode 100644
index 99f94c0464..0000000000
--- a/cms/templates/js/new-subsection-template.underscore
+++ /dev/null
@@ -1,18 +0,0 @@
- -
-
-
-
-
- -
-
- ${_('New Unit')}
-
-
-
-
diff --git a/cms/templates/js/no-outline-content.underscore b/cms/templates/js/no-outline-content.underscore
deleted file mode 100644
index 5d4774dd65..0000000000
--- a/cms/templates/js/no-outline-content.underscore
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
<%= 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 adc1e59ccb..9d43115b66 100644
--- a/cms/templates/overview.html
+++ b/cms/templates/overview.html
@@ -164,7 +164,7 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
<%include file="widgets/_ui-dnd-indicator-before.html" />
@@ -211,14 +211,14 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
context_course.location.course_id, subsection.location, False, True
)
%>
-
<%include file="widgets/_ui-dnd-indicator-before.html" />
@@ -283,12 +283,10 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
aria-hidden=""
role="dialog">