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 |
* Tiny Media plugin helper function to build queryable data selectors.
|
|
|
18 |
*
|
|
|
19 |
* @module tiny_media/selectors
|
|
|
20 |
* @copyright 2022 Huong Nguyen <huongnv13@gmail.com>
|
|
|
21 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
22 |
*/
|
|
|
23 |
|
|
|
24 |
export default {
|
|
|
25 |
IMAGE: {
|
|
|
26 |
actions: {
|
|
|
27 |
submit: '.tiny_image_urlentrysubmit',
|
|
|
28 |
imageBrowser: '.openimagebrowser',
|
|
|
29 |
addUrl: '.tiny_image_addurl',
|
|
|
30 |
deleteImage: '.tiny_image_deleteicon',
|
|
|
31 |
},
|
|
|
32 |
elements: {
|
|
|
33 |
form: 'form.tiny_image_form',
|
|
|
34 |
alignSettings: '.tiny_image_button',
|
|
|
35 |
alt: '.tiny_image_altentry',
|
|
|
36 |
altWarning: '.tiny_image_altwarning',
|
|
|
37 |
height: '.tiny_image_heightentry',
|
|
|
38 |
width: '.tiny_image_widthentry',
|
|
|
39 |
url: '.tiny_image_urlentry',
|
|
|
40 |
urlWarning: '.tiny_image_urlwarning',
|
|
|
41 |
size: '.tiny_image_size',
|
|
|
42 |
presentation: '.tiny_image_presentation',
|
|
|
43 |
constrain: '.tiny_image_constrain',
|
|
|
44 |
customStyle: '.tiny_image_customstyle',
|
|
|
45 |
preview: '.tiny_image_preview',
|
|
|
46 |
previewBox: '.tiny_image_preview_box',
|
|
|
47 |
loaderIcon: '.tiny_image_loader',
|
|
|
48 |
loaderIconContainer: '.tiny_image_loader_container',
|
|
|
49 |
insertImage: '.tiny_image_insert_image',
|
|
|
50 |
modalFooter: '.modal-footer',
|
|
|
51 |
dropzoneContainer: '.tiny_image_dropzone_container',
|
|
|
52 |
fileInput: '#tiny_image_fileinput',
|
|
|
53 |
fileNameLabel: '.tiny_image_filename',
|
|
|
54 |
sizeOriginal: '.tiny_image_sizeoriginal',
|
|
|
55 |
sizeCustom: '.tiny_image_sizecustom',
|
|
|
56 |
properties: '.tiny_image_properties',
|
|
|
57 |
},
|
|
|
58 |
styles: {
|
|
|
59 |
responsive: 'img-fluid',
|
|
|
60 |
},
|
|
|
61 |
},
|
|
|
62 |
EMBED: {
|
|
|
63 |
actions: {
|
|
|
64 |
submit: '.tiny_media_submit',
|
|
|
65 |
mediaBrowser: '.openmediabrowser',
|
|
|
66 |
},
|
|
|
67 |
elements: {
|
|
|
68 |
form: 'form.tiny_media_form',
|
|
|
69 |
source: '.tiny_media_source',
|
|
|
70 |
track: '.tiny_media_track',
|
|
|
71 |
mediaSource: '.tiny_media_media_source',
|
|
|
72 |
linkSource: '.tiny_media_link_source',
|
|
|
73 |
linkSize: '.tiny_media_link_size',
|
|
|
74 |
posterSource: '.tiny_media_poster_source',
|
|
|
75 |
posterSize: '.tiny_media_poster_size',
|
|
|
76 |
displayOptions: '.tiny_media_display_options',
|
|
|
77 |
name: '.tiny_media_name_entry',
|
|
|
78 |
title: '.tiny_media_title_entry',
|
|
|
79 |
url: '.tiny_media_url_entry',
|
|
|
80 |
width: '.tiny_media_width_entry',
|
|
|
81 |
height: '.tiny_media_height_entry',
|
|
|
82 |
trackSource: '.tiny_media_track_source',
|
|
|
83 |
trackKind: '.tiny_media_track_kind_entry',
|
|
|
84 |
trackLabel: '.tiny_media_track_label_entry',
|
|
|
85 |
trackLang: '.tiny_media_track_lang_entry',
|
|
|
86 |
trackDefault: '.tiny_media_track_default',
|
|
|
87 |
mediaControl: '.tiny_media_controls',
|
|
|
88 |
mediaAutoplay: '.tiny_media_autoplay',
|
|
|
89 |
mediaMute: '.tiny_media_mute',
|
|
|
90 |
mediaLoop: '.tiny_media_loop',
|
|
|
91 |
advancedSettings: '.tiny_media_advancedsettings',
|
|
|
92 |
linkTab: 'li[data-medium-type="link"]',
|
|
|
93 |
videoTab: 'li[data-medium-type="video"]',
|
|
|
94 |
audioTab: 'li[data-medium-type="audio"]',
|
|
|
95 |
linkPane: '.tab-pane[data-medium-type="link"]',
|
|
|
96 |
videoPane: '.tab-pane[data-medium-type="video"]',
|
|
|
97 |
audioPane: '.tab-pane[data-medium-type="audio"]',
|
|
|
98 |
trackSubtitlesTab: 'li[data-track-kind="subtitles"]',
|
|
|
99 |
trackCaptionsTab: 'li[data-track-kind="captions"]',
|
|
|
100 |
trackDescriptionsTab: 'li[data-track-kind="descriptions"]',
|
|
|
101 |
trackChaptersTab: 'li[data-track-kind="chapters"]',
|
|
|
102 |
trackMetadataTab: 'li[data-track-kind="metadata"]',
|
|
|
103 |
trackSubtitlesPane: '.tab-pane[data-track-kind="subtitles"]',
|
|
|
104 |
trackCaptionsPane: '.tab-pane[data-track-kind="captions"]',
|
|
|
105 |
trackDescriptionsPane: '.tab-pane[data-track-kind="descriptions"]',
|
|
|
106 |
trackChaptersPane: '.tab-pane[data-track-kind="chapters"]',
|
|
|
107 |
trackMetadataPane: '.tab-pane[data-track-kind="metadata"]',
|
|
|
108 |
},
|
|
|
109 |
mediaTypes: {
|
|
|
110 |
link: 'LINK',
|
|
|
111 |
video: 'VIDEO',
|
|
|
112 |
audio: 'AUDIO',
|
|
|
113 |
},
|
|
|
114 |
trackKinds: {
|
|
|
115 |
subtitles: 'SUBTITLES',
|
|
|
116 |
captions: 'CAPTIONS',
|
|
|
117 |
descriptions: 'DESCRIPTIONS',
|
|
|
118 |
chapters: 'CHAPTERS',
|
|
|
119 |
metadata: 'METADATA',
|
|
|
120 |
},
|
|
|
121 |
},
|
|
|
122 |
};
|