1
0
mirror of https://github.com/moodle/moodle.git synced 2025-02-19 15:45:59 +01:00

MDL-31096 Add hiding of activity descriptions

This commit is contained in:
Andrew Robert Nicols 2012-04-26 10:39:47 +01:00
parent 9d40f585da
commit eac3ed52c7

@ -4,9 +4,10 @@ YUI.add('moodle-course-toolboxes', function(Y) {
var CSS = { var CSS = {
ACTIVITYLI : 'li.activity', ACTIVITYLI : 'li.activity',
COMMANDSPAN : 'span.commands', COMMANDSPAN : 'span.commands',
CONTENTAFTERLINK : 'div.contentafterlink',
DELETE : 'a.editing_delete', DELETE : 'a.editing_delete',
DIMCLASS : 'dimmed', DIMCLASS : 'dimmed',
DIMMEDLABELCLASS : 'dimmed_text', DIMMEDTEXT : 'dimmed_text',
EDITTITLECLASS : 'edittitle', EDITTITLECLASS : 'edittitle',
GENERICICONCLASS : 'iconsmall', GENERICICONCLASS : 'iconsmall',
GROUPSNONE : 'a.editing_groupsnone', GROUPSNONE : 'a.editing_groupsnone',
@ -79,7 +80,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
var dimarea; var dimarea;
var toggle_class; var toggle_class;
if (this.is_label(element)) { if (this.is_label(element)) {
toggle_class = CSS.DIMMEDLABELCLASS; toggle_class = CSS.DIMMEDTEXT;
dimarea = element.one(CSS.MODINDENTDIV + ' div'); dimarea = element.one(CSS.MODINDENTDIV + ' div');
} else { } else {
toggle_class = CSS.DIMCLASS; toggle_class = CSS.DIMCLASS;
@ -98,6 +99,8 @@ YUI.add('moodle-course-toolboxes', function(Y) {
// Change the UI // Change the UI
dimarea.toggleClass(toggle_class); dimarea.toggleClass(toggle_class);
// We need to toggle dimming on the description too
element.all(CSS.CONTENTAFTERLINK).toggleClass(CSS.DIMMEDTEXT);
var newstring = M.util.get_string(status, 'moodle'); var newstring = M.util.get_string(status, 'moodle');
hideicon.setAttrs({ hideicon.setAttrs({
'alt' : newstring, 'alt' : newstring,