Integrate visual styling into the course outline

This commit is contained in:
Andy Armstrong
2014-07-16 07:09:44 -04:00
committed by cahrens
parent c027f90dbc
commit a359065329
39 changed files with 796 additions and 447 deletions

View File

@@ -10,9 +10,13 @@ define(["jquery", "underscore", "gettext", "js/views/feedback_notification", "js
/**
* Toggles the expanded state of the current element.
*/
toggleExpandCollapse = function(target) {
toggleExpandCollapse = function(target, collapsedClass) {
// Support the old 'collapsed' option until fully switched over to is-collapsed
if (!collapsedClass) {
collapsedClass = 'collapsed';
}
target.closest('.expand-collapse').toggleClass('expand collapse');
target.closest('.is-collapsible, .window').toggleClass('collapsed');
target.closest('.is-collapsible, .window').toggleClass(collapsedClass);
target.closest('.is-collapsible').children('article').slideToggle();
};