Skip to content

Commit

Permalink
MDL-66481 mod_forum: Move timed discussion indicator
Browse files Browse the repository at this point in the history
* Move it under the discussion column.
* Change it to look like a label
* Plus limit the group name to 15 characters
* Plus some accessibility fixes:
  - Add labels to column headings.
  - Set discussion name as a row heading.
  • Loading branch information
junpataleta committed Sep 26, 2019
1 parent 1a9e5cb commit a78070a
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 56 deletions.
2 changes: 1 addition & 1 deletion mod/forum/amd/build/discussion_list.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mod/forum/amd/build/discussion_list.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mod/forum/amd/build/selectors.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mod/forum/amd/build/selectors.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions mod/forum/amd/src/discussion_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ define([

e.preventDefault();
});

root.on('click', Selectors.discussion.timedLabel, function(e) {
// Prevent clicking on the timed discussion label from causing the page to jump.
e.preventDefault();
});
};

return {
Expand Down
1 change: 1 addition & 0 deletions mod/forum/amd/src/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ define([], function() {
item: '[data-region="discussion-list-item"]',
lockedLabel: "[data-region='locked-label']",
subscribedLabel: "[data-region='subscribed-label']",
timedLabel: "[data-region='timed-label']",
},
};
});
4 changes: 4 additions & 0 deletions mod/forum/lang/en/forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,12 @@
$string['discussthistopic'] = 'Discuss this topic';
$string['displayend'] = 'Display end';
$string['displayend_help'] = 'This setting specifies whether a forum post should be hidden after a certain date. Note that administrators can always view forum posts.';
$string['displayenddate'] = 'Display end: {$a}.';
$string['displaymode'] = 'Display mode';
$string['displayperiod'] = 'Display period';
$string['displaystart'] = 'Display start';
$string['displaystart_help'] = 'This setting specifies whether a forum post should be displayed from a certain date. Note that administrators can always view forum posts.';
$string['displaystartdate'] = 'Display start: {$a}.';
$string['displaywordcount'] = 'Display word count';
$string['displaywordcount_help'] = 'This setting specifies whether the word count of each post should be displayed or not.';
$string['duedate'] = 'Due date';
Expand Down Expand Up @@ -637,6 +639,8 @@
$string['thisforumisthrottled'] = 'This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at {$a->blockafter} posting(s) in {$a->blockperiod}';
$string['thisforumisdue'] = 'The due date for posting to this forum was {$a}.';
$string['thisforumhasduedate'] = 'The due date for posting to this forum is {$a}.';
$string['timed'] = 'Timed';
$string['timeddiscussion'] = 'Timed discussion';
$string['timedhidden'] = 'Timed status: Hidden from students';
$string['timedposts'] = 'Timed posts';
$string['timedvisible'] = 'Timed status: Visible to all users';
Expand Down
Loading

0 comments on commit a78070a

Please sign in to comment.