1 |
efrain |
1 |
// This file is part of Moodle - http://moodle.org/
|
|
|
2 |
//
|
|
|
3 |
// Moodle is free software: you can redistribute it and/or modify
|
|
|
4 |
// it under the terms of the GNU General Public License as published by
|
|
|
5 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
6 |
// (at your option) any later version.
|
|
|
7 |
//
|
|
|
8 |
// Moodle is distributed in the hope that it will be useful,
|
|
|
9 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
10 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
11 |
// GNU General Public License for more details.
|
|
|
12 |
//
|
|
|
13 |
// You should have received a copy of the GNU General Public License
|
|
|
14 |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
15 |
|
|
|
16 |
/**
|
|
|
17 |
* Common CSS selectors for the forum UI.
|
|
|
18 |
*
|
|
|
19 |
* @module mod_forum/selectors
|
|
|
20 |
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
|
|
21 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
22 |
*/
|
|
|
23 |
define([], function() {
|
|
|
24 |
return {
|
|
|
25 |
subscription: {
|
|
|
26 |
toggle: "[data-type='subscription-toggle'][data-action='toggle']",
|
|
|
27 |
},
|
|
|
28 |
summary: {
|
|
|
29 |
actions: "[data-container='discussion-summary-actions']"
|
|
|
30 |
},
|
|
|
31 |
post: {
|
|
|
32 |
post: '[data-region="post"]',
|
|
|
33 |
action: '[data-region="post-action"]',
|
|
|
34 |
actionsContainer: '[data-region="post-actions-container"]',
|
|
|
35 |
authorName: '[data-region="author-name"]',
|
|
|
36 |
forumCoreContent: "[data-region-content='forum-post-core']",
|
|
|
37 |
forumContent: "[data-content='forum-post']",
|
|
|
38 |
forumSubject: "[data-region-content='forum-post-core-subject']",
|
|
|
39 |
inpageCancelButton: "button[name='cancelbtn']",
|
|
|
40 |
inpageReplyButton: "button",
|
|
|
41 |
inpageReplyLink: "[data-action='collapsible-link']",
|
|
|
42 |
inpageReplyCancelButton: "[data-action='cancel-inpage-reply']",
|
|
|
43 |
inpageReplyCreateButton: "[data-action='create-inpage-reply']",
|
|
|
44 |
inpageReplyContainer: '[data-region="inpage-reply-container"]',
|
|
|
45 |
inpageReplyContent: "[data-content='inpage-reply-content']",
|
|
|
46 |
inpageReplyForm: "form[data-content='inpage-reply-form']",
|
|
|
47 |
inpageSubmitBtn: "[data-action='forum-inpage-submit']",
|
|
|
48 |
inpageSubmitBtnText: "[data-region='submit-text']",
|
|
|
49 |
loadingIconContainer: "[data-region='loading-icon-container']",
|
|
|
50 |
repliesContainer: "[data-region='replies-container']",
|
|
|
51 |
replyCount: '[data-region="reply-count"]',
|
|
|
52 |
modeSelect: "select[name='mode']",
|
|
|
53 |
showReplies: '[data-action="show-replies"]',
|
|
|
54 |
hideReplies: '[data-action="hide-replies"]',
|
|
|
55 |
repliesVisibilityToggleContainer: '[data-region="replies-visibility-toggle-container"]'
|
|
|
56 |
},
|
|
|
57 |
lock: {
|
|
|
58 |
toggle: "[data-action='toggle'][data-type='lock-toggle']",
|
|
|
59 |
icon: "[data-region='locked-icon']"
|
|
|
60 |
},
|
|
|
61 |
favourite: {
|
|
|
62 |
toggle: "[data-type='favorite-toggle'][data-action='toggle']",
|
|
|
63 |
},
|
|
|
64 |
pin: {
|
|
|
65 |
toggle: "[data-type='pin-toggle'][data-action='toggle']",
|
|
|
66 |
},
|
|
|
67 |
discussion: {
|
|
|
68 |
tools: '[data-container="discussion-tools"]',
|
|
|
69 |
item: '[data-region="discussion-list-item"]',
|
|
|
70 |
lockedLabel: "[data-region='locked-label']",
|
|
|
71 |
subscribedLabel: "[data-region='subscribed-label']",
|
|
|
72 |
timedLabel: "[data-region='timed-label']",
|
|
|
73 |
},
|
|
|
74 |
};
|
|
|
75 |
});
|