Commit 18a6a048 by Mat Peterson Committed by Ben McMorran

added JS to outline page after bulk publishing rewrite

parent 9f8f64cf
......@@ -395,7 +395,8 @@ def course_listing(request):
'user': request.user,
'request_course_creator_url': reverse('contentstore.views.request_course_creator'),
'course_creator_status': _get_course_creator_status(request.user),
'allow_unicode_course_id': settings.FEATURES.get('ALLOW_UNICODE_COURSE_ID', False)
'allow_unicode_course_id': settings.FEATURES.get('ALLOW_UNICODE_COURSE_ID', False),
'allow_course_reruns': settings.FEATURES.get('ALLOW_COURSE_RERUNS', True)
})
......
/**
* This page is used to show the user an outline of the course.
*/
define(["jquery", "underscore", "gettext", "js/views/pages/base_page", "js/views/utils/xblock_utils",
define(["domReady", "jquery", "underscore", "gettext", "js/views/pages/base_page", "js/views/utils/xblock_utils",
"js/views/course_outline"],
function ($, _, gettext, BasePage, XBlockViewUtils, CourseOutlineView) {
function (domReady, $, _, gettext, BasePage, XBlockViewUtils, CourseOutlineView) {
var expandedLocators, CourseOutlinePage;
CourseOutlinePage = BasePage.extend({
......@@ -149,5 +149,20 @@ define(["jquery", "underscore", "gettext", "js/views/pages/base_page", "js/views
}
};
var dismissNotification = function (e) {
e.preventDefault();
$.ajax({
url: $('.dismiss-button').data('dismiss-link'),
type: 'DELETE',
success: function(result) {
$('.wrapper-alert-announcement').removeClass('is-shown').addClass('is-hidden')
}
});
};
domReady(function () {
$('.dismiss-button').bind('click', dismissNotification);
});
return CourseOutlinePage;
}); // end define();
......@@ -132,7 +132,7 @@ require(["domReady!", "jquery", "jquery.form", "js/index"], function(doc, $) {
% endif
<!-- STATE: processing courses -->
%if len(unsucceeded_course_actions) > 0:
%if allow_course_reruns and len(unsucceeded_course_actions) > 0:
<div class="courses courses-processing">
<h3 class="title">Courses Being Processed</h3>
......@@ -248,7 +248,7 @@ require(["domReady!", "jquery", "jquery.form", "js/index"], function(doc, $) {
</a>
<ul class="item-actions course-actions">
% if course_creator_status=='granted':
% if allow_course_reruns and course_creator_status=='granted':
<li class="action action-rerun">
<a href="${rerun_link}" class="button rerun-button">${_("Re-run Course")}</a>
</li>
......
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