jclic 2.1.21 → 2.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/jclic-node.js +9 -8
- package/dist/jclic-node.js.map +1 -1
- package/dist/jclic.min.js +2 -2
- package/dist/jclic.min.js.map +1 -1
- package/package.json +4 -4
- package/src/GlobalData.js +1 -1
- package/src/JClicPlayer.js +2 -2
- package/src/bags/MediaBag.js +6 -5
- package/dist/1078.jclic-node.js +0 -282
- package/dist/1078.jclic-node.js.map +0 -1
- package/dist/1196.jclic-node.js +0 -808
- package/dist/1196.jclic-node.js.map +0 -1
- package/dist/1253.jclic-node.js +0 -1432
- package/dist/1253.jclic-node.js.map +0 -1
- package/dist/13.jclic-node.js +0 -103
- package/dist/13.jclic-node.js.map +0 -1
- package/dist/1567.jclic-node.js +0 -2313
- package/dist/1567.jclic-node.js.map +0 -1
- package/dist/1588.jclic-node.js +0 -602
- package/dist/1588.jclic-node.js.map +0 -1
- package/dist/1725.jclic-node.js +0 -836
- package/dist/1725.jclic-node.js.map +0 -1
- package/dist/1731.jclic-node.js +0 -438
- package/dist/1731.jclic-node.js.map +0 -1
- package/dist/1842.jclic-node.js +0 -651
- package/dist/1842.jclic-node.js.map +0 -1
- package/dist/2160.jclic-node.js +0 -1016
- package/dist/2160.jclic-node.js.map +0 -1
- package/dist/222.jclic-node.js +0 -129
- package/dist/222.jclic-node.js.map +0 -1
- package/dist/2316.jclic-node.js +0 -949
- package/dist/2316.jclic-node.js.map +0 -1
- package/dist/2355.jclic-node.js +0 -371
- package/dist/2355.jclic-node.js.map +0 -1
- package/dist/2366.jclic-node.js +0 -431
- package/dist/2366.jclic-node.js.map +0 -1
- package/dist/2379.jclic-node.js +0 -202
- package/dist/2379.jclic-node.js.map +0 -1
- package/dist/2437.jclic-node.js +0 -450
- package/dist/2437.jclic-node.js.map +0 -1
- package/dist/2531.jclic-node.js +0 -869
- package/dist/2531.jclic-node.js.map +0 -1
- package/dist/2608.jclic-node.js +0 -160
- package/dist/2608.jclic-node.js.map +0 -1
- package/dist/2715.jclic-node.js +0 -554
- package/dist/2715.jclic-node.js.map +0 -1
- package/dist/277.jclic-node.js +0 -22
- package/dist/277.jclic-node.js.map +0 -1
- package/dist/2921.jclic-node.js +0 -660
- package/dist/2921.jclic-node.js.map +0 -1
- package/dist/2952.jclic-node.js +0 -101
- package/dist/2952.jclic-node.js.map +0 -1
- package/dist/3018.jclic-node.js +0 -421
- package/dist/3018.jclic-node.js.map +0 -1
- package/dist/3019.jclic-node.js +0 -682
- package/dist/3019.jclic-node.js.map +0 -1
- package/dist/3231.jclic-node.js +0 -274
- package/dist/3231.jclic-node.js.map +0 -1
- package/dist/331.jclic-node.js +0 -115
- package/dist/331.jclic-node.js.map +0 -1
- package/dist/3391.jclic-node.js +0 -276
- package/dist/3391.jclic-node.js.map +0 -1
- package/dist/3502.jclic-node.js +0 -671
- package/dist/3502.jclic-node.js.map +0 -1
- package/dist/3653.jclic-node.js +0 -982
- package/dist/3653.jclic-node.js.map +0 -1
- package/dist/371.jclic.min.js +0 -2
- package/dist/371.jclic.min.js.map +0 -1
- package/dist/3856.jclic-node.js +0 -575
- package/dist/3856.jclic-node.js.map +0 -1
- package/dist/4112.jclic-node.js +0 -659
- package/dist/4112.jclic-node.js.map +0 -1
- package/dist/4123.jclic-node.js +0 -910
- package/dist/4123.jclic-node.js.map +0 -1
- package/dist/427.jclic-node.js +0 -894
- package/dist/427.jclic-node.js.map +0 -1
- package/dist/4483.jclic-node.js +0 -327
- package/dist/4483.jclic-node.js.map +0 -1
- package/dist/4548.jclic-node.js +0 -1078
- package/dist/4548.jclic-node.js.map +0 -1
- package/dist/466.jclic-node.js +0 -99
- package/dist/466.jclic-node.js.map +0 -1
- package/dist/485.jclic-node.js +0 -783
- package/dist/485.jclic-node.js.map +0 -1
- package/dist/4921.jclic-node.js +0 -500
- package/dist/4921.jclic-node.js.map +0 -1
- package/dist/5091.jclic-node.js +0 -239
- package/dist/5091.jclic-node.js.map +0 -1
- package/dist/520.jclic-node.js +0 -550
- package/dist/520.jclic-node.js.map +0 -1
- package/dist/5312.jclic-node.js +0 -1126
- package/dist/5312.jclic-node.js.map +0 -1
- package/dist/5338.jclic-node.js +0 -212
- package/dist/5338.jclic-node.js.map +0 -1
- package/dist/5344.jclic-node.js +0 -229
- package/dist/5344.jclic-node.js.map +0 -1
- package/dist/5550.jclic-node.js +0 -238
- package/dist/5550.jclic-node.js.map +0 -1
- package/dist/5626.jclic-node.js +0 -614
- package/dist/5626.jclic-node.js.map +0 -1
- package/dist/5977.jclic-node.js +0 -1081
- package/dist/5977.jclic-node.js.map +0 -1
- package/dist/6148.jclic-node.js +0 -345
- package/dist/6148.jclic-node.js.map +0 -1
- package/dist/6176.jclic-node.js +0 -481
- package/dist/6176.jclic-node.js.map +0 -1
- package/dist/6221.jclic-node.js +0 -1072
- package/dist/6221.jclic-node.js.map +0 -1
- package/dist/6238.jclic-node.js +0 -718
- package/dist/6238.jclic-node.js.map +0 -1
- package/dist/6454.jclic-node.js +0 -1413
- package/dist/6454.jclic-node.js.map +0 -1
- package/dist/6565.jclic-node.js +0 -294
- package/dist/6565.jclic-node.js.map +0 -1
- package/dist/6579.jclic-node.js +0 -719
- package/dist/6579.jclic-node.js.map +0 -1
- package/dist/6715.jclic-node.js +0 -148
- package/dist/6715.jclic-node.js.map +0 -1
- package/dist/6777.jclic-node.js +0 -171
- package/dist/6777.jclic-node.js.map +0 -1
- package/dist/6782.jclic-node.js +0 -1611
- package/dist/6782.jclic-node.js.map +0 -1
- package/dist/6847.jclic-node.js +0 -601
- package/dist/6847.jclic-node.js.map +0 -1
- package/dist/6856.jclic-node.js +0 -252
- package/dist/6856.jclic-node.js.map +0 -1
- package/dist/696.jclic-node.js +0 -1821
- package/dist/696.jclic-node.js.map +0 -1
- package/dist/698.jclic-node.js +0 -583
- package/dist/698.jclic-node.js.map +0 -1
- package/dist/704.jclic-node.js +0 -80
- package/dist/704.jclic-node.js.map +0 -1
- package/dist/7046.jclic-node.js +0 -735
- package/dist/7046.jclic-node.js.map +0 -1
- package/dist/7220.jclic-node.js +0 -156
- package/dist/7220.jclic-node.js.map +0 -1
- package/dist/7257.jclic-node.js +0 -931
- package/dist/7257.jclic-node.js.map +0 -1
- package/dist/743.jclic-node.js +0 -583
- package/dist/743.jclic-node.js.map +0 -1
- package/dist/757.jclic-node.js +0 -1072
- package/dist/757.jclic-node.js.map +0 -1
- package/dist/7781.jclic-node.js +0 -202
- package/dist/7781.jclic-node.js.map +0 -1
- package/dist/7912.jclic-node.js +0 -2103
- package/dist/7912.jclic-node.js.map +0 -1
- package/dist/827.jclic-node.js +0 -708
- package/dist/827.jclic-node.js.map +0 -1
- package/dist/8276.jclic-node.js +0 -409
- package/dist/8276.jclic-node.js.map +0 -1
- package/dist/8322.jclic-node.js +0 -498
- package/dist/8322.jclic-node.js.map +0 -1
- package/dist/8641.jclic-node.js +0 -360
- package/dist/8641.jclic-node.js.map +0 -1
- package/dist/8837.jclic-node.js +0 -651
- package/dist/8837.jclic-node.js.map +0 -1
- package/dist/8895.jclic-node.js +0 -151
- package/dist/8895.jclic-node.js.map +0 -1
- package/dist/9072.jclic-node.js +0 -1285
- package/dist/9072.jclic-node.js.map +0 -1
- package/dist/9078.jclic-node.js +0 -935
- package/dist/9078.jclic-node.js.map +0 -1
- package/dist/9103.jclic-node.js +0 -718
- package/dist/9103.jclic-node.js.map +0 -1
- package/dist/9359.jclic-node.js +0 -145
- package/dist/9359.jclic-node.js.map +0 -1
- package/dist/9409.jclic-node.js +0 -921
- package/dist/9409.jclic-node.js.map +0 -1
- package/dist/9513.jclic-node.js +0 -720
- package/dist/9513.jclic-node.js.map +0 -1
- package/dist/9704.jclic-node.js +0 -81
- package/dist/9704.jclic-node.js.map +0 -1
- package/dist/9950.jclic-node.js +0 -827
- package/dist/9950.jclic-node.js.map +0 -1
package/dist/6847.jclic-node.js
DELETED
|
@@ -1,601 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 6847;
|
|
3
|
-
exports.ids = [6847,6777];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 6777:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
|
-
/* harmony export */ });
|
|
12
|
-
/* unused harmony export Counter */
|
|
13
|
-
/**
|
|
14
|
-
* File : skins/Counter.js
|
|
15
|
-
* Created : 07/05/2015
|
|
16
|
-
* By : Francesc Busquets <francesc@gmail.com>
|
|
17
|
-
*
|
|
18
|
-
* JClic.js
|
|
19
|
-
* An HTML5 player of JClic activities
|
|
20
|
-
* https://projectestac.github.io/jclic.js
|
|
21
|
-
*
|
|
22
|
-
* @source https://github.com/projectestac/jclic.js
|
|
23
|
-
*
|
|
24
|
-
* @license EUPL-1.2
|
|
25
|
-
* @licstart
|
|
26
|
-
* (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
|
|
27
|
-
*
|
|
28
|
-
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
29
|
-
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
30
|
-
* You may not use this work except in compliance with the Licence.
|
|
31
|
-
*
|
|
32
|
-
* You may obtain a copy of the Licence at:
|
|
33
|
-
* https://joinup.ec.europa.eu/software/page/eupl
|
|
34
|
-
*
|
|
35
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
36
|
-
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
37
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
38
|
-
* Licence for the specific language governing permissions and limitations
|
|
39
|
-
* under the Licence.
|
|
40
|
-
* @licend
|
|
41
|
-
* @module
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* This class encapsulates the operation of a numeric counter, used to display the current
|
|
46
|
-
* values of score, actions and time.
|
|
47
|
-
*/
|
|
48
|
-
class Counter {
|
|
49
|
-
/**
|
|
50
|
-
* Counter constructor
|
|
51
|
-
* @param {string} id - The type of information stored on this counter
|
|
52
|
-
* @param {external:jQuery} [$div] - The HTML element where this counter will show values (can be _null_)
|
|
53
|
-
*/
|
|
54
|
-
constructor(id, $div) {
|
|
55
|
-
if (id)
|
|
56
|
-
this.id = id;
|
|
57
|
-
if ($div)
|
|
58
|
-
this.$div = $div;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Gets the current display value of this counter
|
|
63
|
-
* @returns {number}
|
|
64
|
-
*/
|
|
65
|
-
getDisplayValue() {
|
|
66
|
-
let result = this.countDown > 0 ? this.countDown - this.value : this.value;
|
|
67
|
-
if (this.displayDiffFrom)
|
|
68
|
-
result = result - this.displayDiffFrom.value;
|
|
69
|
-
return Math.max(0, Math.min(this.MAX_DISPLAY_VALUE, result));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Paints the value of this counter on screen
|
|
74
|
-
* (method to be overridden by subclasses)
|
|
75
|
-
*/
|
|
76
|
-
refreshDisplay() {
|
|
77
|
-
if (this.$div)
|
|
78
|
-
this.$div.html(this.enabled ? (this.getDisplayValue() + 1000).toString().substring(1) : '000');
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Enables or disables this counter
|
|
83
|
-
* @param {boolean} enabled - State been assigned to this counter
|
|
84
|
-
*/
|
|
85
|
-
setEnabled(enabled) {
|
|
86
|
-
if (this.enabled !== enabled) {
|
|
87
|
-
this.enabled = enabled;
|
|
88
|
-
if (this.$div) {
|
|
89
|
-
this.refreshDisplay();
|
|
90
|
-
this.$div.css('opacity', this.enabled ? 1.0 : 0.3);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Sets the initial value of the counter
|
|
97
|
-
* @param {number} maxValue - Value from which the countdown will start
|
|
98
|
-
*/
|
|
99
|
-
setCountDown(maxValue) {
|
|
100
|
-
if (this.countDown !== (this.countDown = maxValue))
|
|
101
|
-
this.refreshDisplay();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Increments by one the value of this counter
|
|
106
|
-
*/
|
|
107
|
-
incValue() {
|
|
108
|
-
this.value++;
|
|
109
|
-
if (this.enabled)
|
|
110
|
-
this.refreshDisplay();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Sets a specific value to this counter
|
|
115
|
-
* @param {number} value - The value to set
|
|
116
|
-
*/
|
|
117
|
-
setValue(value) {
|
|
118
|
-
if (this.enabled && this.value !== (this.value = value))
|
|
119
|
-
this.refreshDisplay();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
Object.assign(Counter.prototype, {
|
|
124
|
-
/**
|
|
125
|
-
* Type of counter (usually: `score`, `actions` or `time`)
|
|
126
|
-
* @name module:skins/Counter.Counter#id
|
|
127
|
-
* @type {string} */
|
|
128
|
-
id: '',
|
|
129
|
-
/**
|
|
130
|
-
* The HTML element where this counter shows its value
|
|
131
|
-
* @name module:skins/Counter.Counter#$div
|
|
132
|
-
* @type {external:jQuery}
|
|
133
|
-
*/
|
|
134
|
-
$div: null,
|
|
135
|
-
/**
|
|
136
|
-
* Current value of this counter
|
|
137
|
-
* @name module:skins/Counter.Counter#value
|
|
138
|
-
* @type {number} */
|
|
139
|
-
value: 0,
|
|
140
|
-
/**
|
|
141
|
-
* When set, the counter displays a countdown from this value to zero
|
|
142
|
-
* @name module:skins/Counter.Counter#countDown
|
|
143
|
-
* @type {number} */
|
|
144
|
-
countDown: 0,
|
|
145
|
-
/**
|
|
146
|
-
* Flag indicating if this counter is currently enabled
|
|
147
|
-
* @name module:skins/Counter.Counter#enabled
|
|
148
|
-
* @type {boolean} */
|
|
149
|
-
enabled: true,
|
|
150
|
-
/**
|
|
151
|
-
* Maximum value to be displayed by this counter
|
|
152
|
-
* @name module:skins/Counter.Counter#MAX_DISPLAY_VALUE
|
|
153
|
-
* @type {number} */
|
|
154
|
-
MAX_DISPLAY_VALUE: 999,
|
|
155
|
-
/**
|
|
156
|
-
* An optional Counter used as a subtractor to display the current value.
|
|
157
|
-
* Useful to display `errors` subtracting `score` from `actions`.
|
|
158
|
-
* @name module:skins/Counter.Counter#displayDiffFrom
|
|
159
|
-
* @type {module:skins/Counter.Counter}
|
|
160
|
-
*/
|
|
161
|
-
displayDiffFrom: null,
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Counter);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
/***/ }),
|
|
168
|
-
|
|
169
|
-
/***/ 6847:
|
|
170
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
171
|
-
|
|
172
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
173
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
174
|
-
/* harmony export */ });
|
|
175
|
-
/* unused harmony export CustomSkin */
|
|
176
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7750);
|
|
177
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
|
178
|
-
/* harmony import */ var _Skin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(757);
|
|
179
|
-
/* harmony import */ var _Counter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6777);
|
|
180
|
-
/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1253);
|
|
181
|
-
/* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7912);
|
|
182
|
-
/* harmony import */ var _boxes_ActiveBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1725);
|
|
183
|
-
/**
|
|
184
|
-
* File : skins/CustomSkin.js
|
|
185
|
-
* Created : 12/02/2018
|
|
186
|
-
* By : Francesc Busquets <francesc@gmail.com>
|
|
187
|
-
*
|
|
188
|
-
* JClic.js
|
|
189
|
-
* An HTML5 player of JClic activities
|
|
190
|
-
* https://projectestac.github.io/jclic.js
|
|
191
|
-
*
|
|
192
|
-
* @source https://github.com/projectestac/jclic.js
|
|
193
|
-
*
|
|
194
|
-
* @license EUPL-1.2
|
|
195
|
-
* @licstart
|
|
196
|
-
* (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
|
|
197
|
-
*
|
|
198
|
-
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
199
|
-
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
200
|
-
* You may not use this work except in compliance with the Licence.
|
|
201
|
-
*
|
|
202
|
-
* You may obtain a copy of the Licence at:
|
|
203
|
-
* https://joinup.ec.europa.eu/software/page/eupl
|
|
204
|
-
*
|
|
205
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
206
|
-
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
207
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
208
|
-
* Licence for the specific language governing permissions and limitations
|
|
209
|
-
* under the Licence.
|
|
210
|
-
* @licend
|
|
211
|
-
* @module
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Custom {@link module:skins/Skin.Skin Skin} for JClic.js, built assembling specific cuts of a canvas (usually a PNG file) defined in an XML file
|
|
223
|
-
* @extends module:skins/Skin.Skin
|
|
224
|
-
*/
|
|
225
|
-
class CustomSkin extends _Skin_js__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* CustomSkin constructor
|
|
229
|
-
*
|
|
230
|
-
* @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and
|
|
231
|
-
* realize the media objects needed tot build the Skin.
|
|
232
|
-
* @param {string} [name] - The skin class name
|
|
233
|
-
* @param {object} [options] - Optional parameter with additional options
|
|
234
|
-
*/
|
|
235
|
-
constructor(ps, name = null, options = null) {
|
|
236
|
-
// CustomSkin extends [Skin](Skin.html)
|
|
237
|
-
super(ps, name, options);
|
|
238
|
-
//console.log(this.options)
|
|
239
|
-
|
|
240
|
-
this.$mainPanel = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div/>', { class: 'JClicCustomMainPanel' });
|
|
241
|
-
this.$gridPanel = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div/>', { class: 'JClicGridPanel' });
|
|
242
|
-
for (let i = 0; i < 9; i++)
|
|
243
|
-
this.$gridPanel.append(jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div/>', { class: `JClicCell JClicCell${i + 1}` }));
|
|
244
|
-
this.$mainPanel.append(this.$gridPanel);
|
|
245
|
-
this.$playerCnt.detach().addClass('JClicPlayerCell').appendTo(this.$mainPanel);
|
|
246
|
-
this.$div.prepend(this.$mainPanel);
|
|
247
|
-
|
|
248
|
-
// Add buttons
|
|
249
|
-
if (options.buttons) {
|
|
250
|
-
Object.keys(options.buttons.button).forEach(k => {
|
|
251
|
-
const k2 = k === 'about' ? 'reports' : k;
|
|
252
|
-
const msg = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getMsg */ .qG)(this.msgKeys[k2] || k2);
|
|
253
|
-
this.buttons[k2] = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<button/>', { class: `JClicBtn JClicTransform Btn-${k2}`, title: msg, 'aria-label': msg, disabled: typeof this.msgKeys[k2] === 'undefined' })
|
|
254
|
-
.on('click', evt => { if (ps.actions[k2]) ps.actions[k2].processEvent(evt); });
|
|
255
|
-
this.$mainPanel.append(this.buttons[k2]);
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// Add message box
|
|
260
|
-
if (options.rectangle.messages) {
|
|
261
|
-
this.msgBox = new _boxes_ActiveBox_js__WEBPACK_IMPORTED_MODULE_5__["default"]();
|
|
262
|
-
this.msgBox.role = 'message';
|
|
263
|
-
this.$msgBoxDiv = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div/>', { class: 'JClicMsgBox' })
|
|
264
|
-
.on('click', () => {
|
|
265
|
-
this.msgBox.playMedia(ps);
|
|
266
|
-
return false;
|
|
267
|
-
});
|
|
268
|
-
this.$mainPanel.append(this.$msgBoxDiv);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
// Add counters
|
|
272
|
-
if (false !== this.ps.options.counters && options.counters && options.counters.counter) {
|
|
273
|
-
jquery__WEBPACK_IMPORTED_MODULE_0___default().each(_Skin_js__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.counters, (name, _val) => {
|
|
274
|
-
if (options.counters.counter[name]) {
|
|
275
|
-
const msg = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getMsg */ .qG)(name);
|
|
276
|
-
this.counters[name] = new _Counter_js__WEBPACK_IMPORTED_MODULE_2__["default"](name, jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div/>', { class: `JClicCounter JClicTransform Counter-${name}`, title: msg, 'aria-label': msg })
|
|
277
|
-
.html('000')
|
|
278
|
-
.appendTo(this.$mainPanel));
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// Add progress animation
|
|
284
|
-
if (options.progressAnimation) {
|
|
285
|
-
this.$progressAnimation = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div/>', { class: 'JClicProgressAnimation JClicTransform' });
|
|
286
|
-
this.$mainPanel.append(this.$progressAnimation);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Enables or disables the `tabindex` attribute of the main buttons. Useful when a modal dialog
|
|
293
|
-
* overlay is active, to avoid direct access to controls not related with the dialog.
|
|
294
|
-
* @param {boolean} status - `true` to make main controls navigable, `false` otherwise
|
|
295
|
-
*/
|
|
296
|
-
enableMainButtons(status) {
|
|
297
|
-
this.$mainPanel.find('.JClicBtn').attr('tabindex', status ? '0' : '-1');
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Computes the CSS styles used by this skin in thre moodes: main, half ant twoThirds.
|
|
302
|
-
* The resulting strings will be stored in `cssVariants`
|
|
303
|
-
* @returns {string}
|
|
304
|
-
*/
|
|
305
|
-
_computeStyleSheets() {
|
|
306
|
-
const
|
|
307
|
-
maxw = this.options.dimension.preferredSize.width,
|
|
308
|
-
maxh = this.options.dimension.preferredSize.height;
|
|
309
|
-
|
|
310
|
-
this.twoThirdsMedia = { width: maxw, height: maxh };
|
|
311
|
-
this.halfMedia = {
|
|
312
|
-
width: Math.round(2 * maxw / 3),
|
|
313
|
-
height: Math.round(2 * maxh / 3)
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
// Panels:
|
|
317
|
-
const
|
|
318
|
-
ph0 = this.options.rectangle.frame.left,
|
|
319
|
-
ph1 = ph0 + this.options.rectangle.player.left,
|
|
320
|
-
ph2 = ph0 + this.options.slicer.left,
|
|
321
|
-
ph3 = ph0 + this.options.slicer.right,
|
|
322
|
-
ph4 = ph1 + this.options.rectangle.player.width,
|
|
323
|
-
ph5 = ph0 + this.options.rectangle.frame.width,
|
|
324
|
-
pv0 = this.options.rectangle.frame.top,
|
|
325
|
-
pv1 = pv0 + this.options.rectangle.player.top,
|
|
326
|
-
pv2 = pv0 + this.options.slicer.top,
|
|
327
|
-
pv3 = pv0 + this.options.slicer.bottom,
|
|
328
|
-
pv4 = pv1 + this.options.rectangle.player.height,
|
|
329
|
-
pv5 = pv0 + this.options.rectangle.frame.height,
|
|
330
|
-
imgElement = this.ps.project.mediaBag.getElement(this.options.image, true),
|
|
331
|
-
imgUrl = imgElement.data && imgElement.data.src ? imgElement.data.src : '',
|
|
332
|
-
box1 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph0, pv0, ph2 - ph0, pv2 - pv0)) : '',
|
|
333
|
-
box2 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph2 - ph0, pv0, ph3 - ph2, pv2 - pv0)) : '',
|
|
334
|
-
box3 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph3, pv0, ph5 - ph3, pv2 - pv0)) : '',
|
|
335
|
-
box4 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph0, pv2 - pv0, ph2 - ph0, pv3 - pv2)) : '',
|
|
336
|
-
box6 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph3 - ph0, pv2 - pv0, ph5 - ph3, pv3 - pv2)) : '',
|
|
337
|
-
box7 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph0, pv3 - pv0, ph2 - ph0, pv5 - pv3)) : '',
|
|
338
|
-
box8 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph2 - ph0, pv3 - pv0, ph3 - ph2, pv5 - pv3)) : '',
|
|
339
|
-
box9 = imgElement.data ? (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getImgClipUrl */ .HR)(imgElement.data, new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(ph3, pv3 - pv0, ph5 - ph3, pv5 - pv3)) : '';
|
|
340
|
-
|
|
341
|
-
let css = `
|
|
342
|
-
.ID .JClicCustomMainPanel {flex-grow:1;position:relative;background-color: ${(0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .checkColor */ .I4)(this.options.color.fill.value)};}
|
|
343
|
-
.ID .JClicGridPanel {position:absolute;width:100%;height:100%;display:grid;grid-template-columns:${ph2 - ph0}px 1fr ${ph5 - ph3}px;grid-template-rows:${pv2 - pv0}px 1fr ${pv5 - pv3}px;}
|
|
344
|
-
.ID .JClicCell {background-repeat:no-repeat;background-size:contain;}
|
|
345
|
-
.ID .JClicPlayerCell {position:absolute;top:${pv1 - pv0}px;right:${ph5 - ph4}px;bottom:${pv5 - pv4}px;left:${ph1 - ph0}px;}
|
|
346
|
-
.ID .JClicCell1 {background-image:url(${box1});}
|
|
347
|
-
.ID .JClicCell2 {background-image:url(${box2});background-repeat:repeat-x;}
|
|
348
|
-
.ID .JClicCell3 {background-image:url(${box3});}
|
|
349
|
-
.ID .JClicCell4 {background-image:url(${box4});background-repeat:repeat-y;}
|
|
350
|
-
.ID .JClicCell5 {}
|
|
351
|
-
.ID .JClicCell6 {background-image:url(${box6});background-repeat:repeat-y;}
|
|
352
|
-
.ID .JClicCell7 {background-image:url(${box7});}
|
|
353
|
-
.ID .JClicCell8 {background-image:url(${box8});background-repeat:repeat-x;}
|
|
354
|
-
.ID .JClicCell9 {background-image:url(${box9});}`;
|
|
355
|
-
|
|
356
|
-
let cssHalf = `
|
|
357
|
-
.ID .JClicGridPanel {grid-template-columns:${Math.round((ph2 - ph0) / 2)}px 1fr ${Math.round((ph5 - ph3) / 2)}px;grid-template-rows:${Math.round((pv2 - pv0) / 2)}px 1fr ${Math.round((pv5 - pv3) / 2)}px;}
|
|
358
|
-
.ID .JClicPlayerCell {top:${Math.round((pv1 - pv0) / 2)}px;right:${Math.round((ph5 - ph4) / 2)}px;bottom:${Math.round((pv5 - pv4) / 2)}px;left:${Math.round((ph1 - ph0) / 2)}px;}
|
|
359
|
-
.ID .JClicTransform {transform: scale(0.5);}`;
|
|
360
|
-
|
|
361
|
-
let cssTwoThirds = `
|
|
362
|
-
.ID .JClicGridPanel {grid-template-columns:${Math.round(2 * (ph2 - ph0) / 3)}px 1fr ${Math.round(2 * (ph5 - ph3) / 3)}px;grid-template-rows:${Math.round(2 * (pv2 - pv0) / 3)}px 1fr ${Math.round(2 * (pv5 - pv3) / 3)}px;}
|
|
363
|
-
.ID .JClicPlayerCell {top:${Math.round(2 * (pv1 - pv0) / 3)}px;right:${Math.round(2 * (ph5 - ph4) / 3)}px;bottom:${Math.round(2 * (pv5 - pv4) / 3)}px;left:${Math.round(2 * (ph1 - ph0) / 3)}px;}
|
|
364
|
-
.ID .JClicTransform {transform: scale(0.666);}`;
|
|
365
|
-
|
|
366
|
-
// Buttons:
|
|
367
|
-
if (this.options.buttons) {
|
|
368
|
-
const bt = this.options.buttons;
|
|
369
|
-
let wBase = 30, hBase = 30, offsetBase = {};
|
|
370
|
-
if (bt.settings) {
|
|
371
|
-
if (bt.settings.dimension) {
|
|
372
|
-
wBase = bt.settings.dimension.width || wBase;
|
|
373
|
-
hBase = bt.settings.dimension.height || hBase;
|
|
374
|
-
}
|
|
375
|
-
if (bt.settings.offset)
|
|
376
|
-
Object.assign(offsetBase, bt.settings.offset);
|
|
377
|
-
}
|
|
378
|
-
Object.keys(this.options.buttons.button).forEach(k => {
|
|
379
|
-
const
|
|
380
|
-
btn = bt.button[k],
|
|
381
|
-
k2 = k === 'about' ? 'reports' : k;
|
|
382
|
-
let w = wBase, h = hBase, offset = offsetBase;
|
|
383
|
-
if (btn.settings) {
|
|
384
|
-
if (btn.settings.dimension) {
|
|
385
|
-
w = btn.settings.dimension.width || w;
|
|
386
|
-
h = btn.settings.dimension.height || h;
|
|
387
|
-
}
|
|
388
|
-
if (btn.settings.offset)
|
|
389
|
-
offset = Object.assign({}, offsetBase, btn.settings.offset);
|
|
390
|
-
}
|
|
391
|
-
const
|
|
392
|
-
x = btn.point.pos.left,
|
|
393
|
-
xp = x < ph2 ? `left:${x}` : `right:${ph5 - x - w}`,
|
|
394
|
-
xpHalf = x < ph2 ? `left:${Math.round(x / 2 - w / 4)}` : `right:${Math.round((ph5 - x - w) / 2 - w / 4)}`,
|
|
395
|
-
xpTwoThirds = x < ph2 ? `left:${Math.round(2 * x / 3 - w / 6)}` : `right:${Math.round(2 * (ph5 - x - w) / 3 - w / 6)}`,
|
|
396
|
-
y = btn.point.pos.top,
|
|
397
|
-
yp = y < pv2 ? `top:${y}` : `bottom:${pv5 - y - h}`,
|
|
398
|
-
ypHalf = y < pv2 ? `top:${Math.round(y / 2 - h / 4)}` : `bottom:${Math.round((pv5 - y - h) / 2 - h / 4)}`,
|
|
399
|
-
ypTwoThirds = y < pv2 ? `top:${Math.round(2 * y / 3 - h / 6)}` : `bottom:${Math.round(2 * (pv5 - y - h) / 3 - h / 6)}`,
|
|
400
|
-
xs = btn.point.source.left,
|
|
401
|
-
ys = btn.point.source.top;
|
|
402
|
-
css += `.ID .Btn-${k2} {position:absolute;${xp}px;${yp}px;width:${w}px;height:${h}px;background:url(${imgUrl}) !important;background-position:-${xs}px -${ys}px !important;}\n`;
|
|
403
|
-
cssHalf += `.ID .Btn-${k2} {${xpHalf}px;${ypHalf}px;}\n`;
|
|
404
|
-
cssTwoThirds += `.ID .Btn-${k2} {${xpTwoThirds}px;${ypTwoThirds}px;}\n`;
|
|
405
|
-
if (offset.active)
|
|
406
|
-
css += `.ID .Btn-${k2}:active {background-position:-${xs + offset.active.right}px -${ys + offset.active.down}px !important;}\n`;
|
|
407
|
-
if (offset.over)
|
|
408
|
-
css += `.ID .Btn-${k2}:hover {background-position:-${xs + offset.over.right}px -${ys + offset.over.down}px !important;}\n`;
|
|
409
|
-
if (offset.disabled)
|
|
410
|
-
css += `.ID .Btn-${k2}:disabled {background-position:-${xs + offset.disabled.right}px -${ys + offset.disabled.down}px !important;}\n`;
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
// Counters:
|
|
415
|
-
if (this.options.counters && this.options.counters.settings) {
|
|
416
|
-
const cnt = this.options.counters;
|
|
417
|
-
let wBase = 35, hBase = 20;
|
|
418
|
-
if (cnt.settings.dimension && cnt.settings.dimension.counter) {
|
|
419
|
-
wBase = (cnt.settings.dimension.counter.width || wBase);
|
|
420
|
-
hBase = cnt.settings.dimension.counter.height || hBase;
|
|
421
|
-
}
|
|
422
|
-
let wLb = 37, hLb = 14;
|
|
423
|
-
if (cnt.settings.dimension && cnt.settings.dimension.label) {
|
|
424
|
-
wLb = (cnt.settings.dimension.label.width || wLb);
|
|
425
|
-
hLb = cnt.settings.dimension.label.height || hLb;
|
|
426
|
-
}
|
|
427
|
-
let bColor = 'black';
|
|
428
|
-
if (cnt.style && cnt.style.color && cnt.style.color.foreground)
|
|
429
|
-
bColor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .checkColor */ .I4)(cnt.style.color.foreground.value || bColor);
|
|
430
|
-
let lbFntSize = hLb - 4;
|
|
431
|
-
let lbFntFamily = 'Roboto';
|
|
432
|
-
if (cnt.style && cnt.style.font && cnt.style.font.label) {
|
|
433
|
-
lbFntSize = Math.max(8, cnt.style.font.label.size || lbFntSize);
|
|
434
|
-
lbFntFamily = `${cnt.style.font.label.family || 'Roboto'},Roboto,sans-serif`;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
css += `.ID .JClicCounter {font-size:${hBase - 2}px;color:${bColor}}\n`;
|
|
438
|
-
Object.keys(this.options.counters.counter).forEach(k => {
|
|
439
|
-
const
|
|
440
|
-
counter = cnt.counter[k];
|
|
441
|
-
let w = wBase, h = hBase;
|
|
442
|
-
const
|
|
443
|
-
x = counter.point.counter.left,
|
|
444
|
-
xl = counter.point.label.left || (x - Math.round((wLb - wBase) / 2)),
|
|
445
|
-
xp = x < ph2 ? `left:${x}` : `right:${ph5 - x - w}`,
|
|
446
|
-
xpHalf = x < ph2 ? `left:${Math.round(x / 2 - w / 4)}` : `right:${Math.round((ph5 - x - w) / 2 - w / 4)}`,
|
|
447
|
-
xpTwoThirds = x < ph2 ? `left:${Math.round(2 * x / 3 - w / 6)}` : `right:${Math.round(2 * (ph5 - x - w) / 3 - w / 6)}`,
|
|
448
|
-
y = counter.point.counter.top,
|
|
449
|
-
yl = counter.point.label.top || (y - hLb),
|
|
450
|
-
yp = y < pv2 ? `top:${y}` : `bottom:${pv5 - y - h}`,
|
|
451
|
-
ypHalf = y < pv2 ? `top:${Math.round(y / 2 - h / 4)}` : `bottom:${Math.round((pv5 - y - h) / 2 - h / 4)}`,
|
|
452
|
-
ypTwoThirds = y < pv2 ? `top:${Math.round(2 * y / 3 - h / 6)}` : `bottom:${Math.round(2 * (pv5 - y - h) / 3 - h / 6)}`;
|
|
453
|
-
// counter:
|
|
454
|
-
css += `.ID .Counter-${k} {position:absolute;${xp}px;${yp}px;width:${w}px;height:${h}px;line-height:${h}px;}\n`;
|
|
455
|
-
// label:
|
|
456
|
-
css += `.ID .Counter-${k}:before {content:"${(0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .getMsg */ .qG)(k)}";font-size:${lbFntSize}px;font-family:${lbFntFamily};width:${wLb}px;height:${hLb}px;line-height:${hLb}px;position:absolute;top:${yl - y}px;left:${xl - x}px;}`;
|
|
457
|
-
// reduced sizes:
|
|
458
|
-
cssHalf += `.ID .Counter-${k} {${xpHalf}px;${ypHalf}px;}\n`;
|
|
459
|
-
cssTwoThirds += `.ID .Counter-${k} {${xpTwoThirds}px;${ypTwoThirds}px;}\n`;
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// Progress animation:
|
|
464
|
-
if (this.options.progressAnimation) {
|
|
465
|
-
const pa = this.options.progressAnimation;
|
|
466
|
-
let w = 30, h = 30;
|
|
467
|
-
if (pa.dimension) {
|
|
468
|
-
w = pa.dimension.width || w;
|
|
469
|
-
h = pa.dimension.height || h;
|
|
470
|
-
}
|
|
471
|
-
const
|
|
472
|
-
x = pa.point.pos.left,
|
|
473
|
-
xp = x < ph2 ? `left:${x}` : `right:${ph5 - x - w}`,
|
|
474
|
-
xpHalf = x < ph2 ? `left:${Math.round(x / 2 - w / 4)}` : `right:${Math.round((ph5 - x - w) / 2 - w / 4)}`,
|
|
475
|
-
xpTwoThirds = x < ph2 ? `left:${Math.round(2 * x / 3 - w / 6)}` : `right:${Math.round(2 * (ph5 - x - w) / 3 - w / 6)}`,
|
|
476
|
-
y = pa.point.pos.top,
|
|
477
|
-
yp = y < pv2 ? `top:${y}` : `bottom:${pv5 - y - h}`,
|
|
478
|
-
ypHalf = y < pv2 ? `top:${Math.round(y / 2 - h / 4)}` : `bottom:${Math.round((pv5 - y - h) / 2 - h / 4)}`,
|
|
479
|
-
ypTwoThirds = y < pv2 ? `top:${Math.round(2 * y / 3 - h / 6)}` : `bottom:${Math.round(2 * (pv5 - y - h) / 3 - h / 6)}`,
|
|
480
|
-
xs = pa.point.source.left,
|
|
481
|
-
ys = pa.point.source.top;
|
|
482
|
-
css += `.ID .JClicProgressAnimation {position:absolute;${xp}px;${yp}px;width:${w}px;height:${h}px;background:url(${imgUrl});background-position:-${xs}px -${ys}px;}\n`;
|
|
483
|
-
cssHalf += `.ID .JClicProgressAnimation {${xpHalf}px;${ypHalf}px;}\n`;
|
|
484
|
-
cssTwoThirds += `.ID .JClicProgressAnimation {${xpTwoThirds}px;${ypTwoThirds}px;}\n`;
|
|
485
|
-
|
|
486
|
-
if (pa.frames && pa.direction) {
|
|
487
|
-
const
|
|
488
|
-
dx = (pa.step || w) * (pa.direction === 'right' ? 1 : pa.direction === 'left' ? -1 : 0),
|
|
489
|
-
dy = (pa.step || h) * (pa.direction === 'down' ? 1 : pa.direction === 'up' ? -1 : 0);
|
|
490
|
-
css += `\n@keyframes anim {100% {background-position:${(xs + dx * pa.frames) * -1}px ${(ys + dy * pa.frames) * -1}px;}}\n.ID .JClicProgressAnimation {animation: anim ${pa.frames * pa.delay}ms steps(${pa.frames}) infinite;}`;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
// Messages box:
|
|
495
|
-
if (this.options.rectangle.messages) {
|
|
496
|
-
const
|
|
497
|
-
bx = this.options.rectangle.messages,
|
|
498
|
-
left = ph0 + bx.left,
|
|
499
|
-
right = ph5 - bx.width - bx.left - ph0,
|
|
500
|
-
tb = bx.top < pv2 ? `top:${bx.top}` : `bottom:${pv5 - bx.height - bx.top}`,
|
|
501
|
-
tbHalf = bx.top < pv2 ? `top:${Math.round(bx.top / 2)}` : `bottom:${Math.round((pv5 - bx.height - bx.top) / 2)}`,
|
|
502
|
-
tbTwoThirds = bx.top < pv2 ? `top:${Math.round(2 * bx.top / 3)}` : `bottom:${Math.round(2 * (pv5 - bx.height - bx.top) / 3)}`;
|
|
503
|
-
|
|
504
|
-
css += `.ID .JClicMsgBox {position:absolute;left:${left}px;right:${right}px;height:${bx.height}px;${tb}px;}`;
|
|
505
|
-
cssHalf += `.ID .JClicMsgBox {left:${Math.round(left / 2)}px;right:${Math.round(right / 2)}px;height:${Math.round(bx.height / 2)}px;${tbHalf}px;}`;
|
|
506
|
-
cssTwoThirds += `.ID .JClicMsgBox {left:${Math.round(2 * left / 3)}px;right:${Math.round(2 * right / 3)}px;height:${Math.round(2 * bx.height / 3)}px;${tbTwoThirds}px;}`;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
// TODO: Implement status messages?
|
|
510
|
-
|
|
511
|
-
// Store results in `cssVariants`
|
|
512
|
-
this.cssVariants = {
|
|
513
|
-
default: this.mainCSS + css,
|
|
514
|
-
half: cssHalf,
|
|
515
|
-
twoThirds: cssTwoThirds
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Returns the CSS styles used by this skin. This method should be called only from
|
|
521
|
-
* the `Skin` constructor, and overridded by subclasses if needed.
|
|
522
|
-
* @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'
|
|
523
|
-
* @override
|
|
524
|
-
* @returns {string}
|
|
525
|
-
*/
|
|
526
|
-
_getStyleSheets(media = 'default') {
|
|
527
|
-
if (!this.cssVariants)
|
|
528
|
-
this._computeStyleSheets();
|
|
529
|
-
return `${super._getStyleSheets(media)}${this.cssVariants[media] || ''}`;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/**
|
|
533
|
-
* Sets/unsets the 'wait' state
|
|
534
|
-
* @override
|
|
535
|
-
* @param {boolean} status - Whether to set or unset the wait status. When `undefined`, the
|
|
536
|
-
* `waitCursorCount` member is evaluated to decide if the wait state should be activated or deactivated.
|
|
537
|
-
*/
|
|
538
|
-
setWaitCursor(status) {
|
|
539
|
-
super.setWaitCursor(status);
|
|
540
|
-
if (this.$progressAnimation)
|
|
541
|
-
this.$progressAnimation.css('animation-play-state', this.waitCursorCount > 0 ? 'running' : 'paused');
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
Object.assign(CustomSkin.prototype, {
|
|
546
|
-
/**
|
|
547
|
-
* Class name of this skin. It will be used as a base selector in the definition of all CSS styles.
|
|
548
|
-
* @name module:skins/CustomSkin.CustomSkin#skinId
|
|
549
|
-
* @override
|
|
550
|
-
* @type {string} */
|
|
551
|
-
skinId: 'JClicCustomSkin',
|
|
552
|
-
/**
|
|
553
|
-
* The name of the image file to be used as a base of this skin.
|
|
554
|
-
* @name module:skins/CustomSkin.CustomSkin#image
|
|
555
|
-
* @type {string} */
|
|
556
|
-
image: null,
|
|
557
|
-
/**
|
|
558
|
-
* Styles used in this skin
|
|
559
|
-
* @name module:skins/CustomSkin.CustomSkin#skinCSS
|
|
560
|
-
* @override
|
|
561
|
-
* @type {string} */
|
|
562
|
-
mainCSS: '\
|
|
563
|
-
.ID .JClicPlayerCnt {margin:0;}\
|
|
564
|
-
.ID .JClicBtn:focus {outline:0;}\
|
|
565
|
-
.ID .JClicCounter {font-family:Roboto,sans-serif;text-align:center;}',
|
|
566
|
-
/**
|
|
567
|
-
* Specifc styles (`default`, `half` and `twoThirds`) computed at run-time,
|
|
568
|
-
* based on the provided XML file
|
|
569
|
-
* @name module:skins/CustomSkin.CustomSkin#cssVariants
|
|
570
|
-
* @type {object} */
|
|
571
|
-
cssVariants: null,
|
|
572
|
-
/**
|
|
573
|
-
* Key ids of currently supported buttons, associated with its helper literal
|
|
574
|
-
* @name module:skins/CustomSkin.CustomSkin#msgKeys
|
|
575
|
-
* @type {object} */
|
|
576
|
-
msgKeys: {
|
|
577
|
-
next: 'Next activity',
|
|
578
|
-
prev: 'Previous activity',
|
|
579
|
-
info: 'Information',
|
|
580
|
-
help: 'Help',
|
|
581
|
-
reports: 'Reports',
|
|
582
|
-
// TODO: Implement audio on/off!
|
|
583
|
-
audio: 'Audio on/off',
|
|
584
|
-
reset: 'Reset activity',
|
|
585
|
-
},
|
|
586
|
-
/**
|
|
587
|
-
* Graphic indicator of loading progress
|
|
588
|
-
* @name module:skins/CustomSkin.Skin#$progressAnimation
|
|
589
|
-
* @type {external:jQuery} */
|
|
590
|
-
$progressAnimation: null,
|
|
591
|
-
});
|
|
592
|
-
|
|
593
|
-
// Register this class in the list of available skins
|
|
594
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Skin_js__WEBPACK_IMPORTED_MODULE_1__["default"].registerClass('custom', CustomSkin));
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
/***/ })
|
|
598
|
-
|
|
599
|
-
};
|
|
600
|
-
;
|
|
601
|
-
//# sourceMappingURL=6847.jclic-node.js.map
|