|
@@ -20,36 +20,38 @@ const FilmStrip = {
|
20
|
20
|
},
|
21
|
21
|
|
22
|
22
|
/**
|
23
|
|
- * Initializes the filmstrip toolbar
|
|
23
|
+ * Initializes the filmstrip toolbar.
|
24
|
24
|
*/
|
25
|
25
|
_initFilmStripToolbar() {
|
26
|
|
- let toolbar = this._generateFilmStripToolbar();
|
|
26
|
+ // Do not show the toggle button in film strip only mode.
|
|
27
|
+ if (interfaceConfig.filmStripOnly)
|
|
28
|
+ return;
|
|
29
|
+
|
|
30
|
+ let toolbarContainerHTML = this._generateToolbarHTML();
|
27
|
31
|
let className = this.filmStripContainerClassName;
|
28
|
32
|
let container = document.querySelector(`.${className}`);
|
29
|
33
|
|
30
|
|
- UIUtil.prependChild(container, toolbar);
|
|
34
|
+ UIUtil.prependChild(container, toolbarContainerHTML);
|
31
|
35
|
|
32
|
|
- let iconSelector = '#hideVideoToolbar i';
|
|
36
|
+ let iconSelector = '#toggleFilmStripButton i';
|
33
|
37
|
this.toggleFilmStripIcon = document.querySelector(iconSelector);
|
34
|
38
|
},
|
35
|
39
|
|
36
|
40
|
/**
|
37
|
|
- * Generates HTML layout for filmstrip toolbar
|
|
41
|
+ * Generates HTML layout for filmstrip toggle button and wrapping container.
|
38
|
42
|
* @returns {HTMLElement}
|
39
|
43
|
* @private
|
40
|
44
|
*/
|
41
|
|
- _generateFilmStripToolbar() {
|
|
45
|
+ _generateToolbarHTML() {
|
42
|
46
|
let container = document.createElement('div');
|
43
|
47
|
let isVisible = this.isFilmStripVisible();
|
44
|
48
|
container.className = 'filmstrip__toolbar';
|
45
|
|
- if(!interfaceConfig.filmStripOnly) {
|
46
|
|
- container.innerHTML = `
|
47
|
|
- <button id="hideVideoToolbar">
|
48
|
|
- <i class="icon-menu-${isVisible ? 'down' : 'up'}">
|
49
|
|
- </i>
|
50
|
|
- </button>
|
51
|
|
- `;
|
52
|
|
- }
|
|
49
|
+ container.innerHTML = `
|
|
50
|
+ <button id="toggleFilmStripButton">
|
|
51
|
+ <i class="icon-menu-${isVisible ? 'down' : 'up'}">
|
|
52
|
+ </i>
|
|
53
|
+ </button>
|
|
54
|
+ `;
|
53
|
55
|
|
54
|
56
|
return container;
|
55
|
57
|
},
|
|
@@ -62,7 +64,7 @@ const FilmStrip = {
|
62
|
64
|
// Firing the event instead of executing toggleFilmstrip method because
|
63
|
65
|
// it's important to hide the filmstrip by UI.toggleFilmstrip in order
|
64
|
66
|
// to correctly resize the video area.
|
65
|
|
- $('#hideVideoToolbar').on('click',
|
|
67
|
+ $('#toggleFilmStripButton').on('click',
|
66
|
68
|
() => this.eventEmitter.emit(UIEvents.TOGGLE_FILM_STRIP));
|
67
|
69
|
|
68
|
70
|
this._registerToggleFilmstripShortcut();
|
|
@@ -162,11 +164,11 @@ const FilmStrip = {
|
162
|
164
|
return !this.filmStrip.hasClass('hidden');
|
163
|
165
|
},
|
164
|
166
|
|
165
|
|
- setupFilmStripOnly() {
|
166
|
|
- this.filmStrip.css({
|
167
|
|
- padding: "0px 0px 18px 0px",
|
168
|
|
- right: 0
|
169
|
|
- });
|
|
167
|
+ /**
|
|
168
|
+ * Adjusts styles for film-strip only mode.
|
|
169
|
+ */
|
|
170
|
+ setFilmStripOnly() {
|
|
171
|
+ this.filmStrip.addClass('filmstrip__videos-filmstripOnly');
|
170
|
172
|
},
|
171
|
173
|
|
172
|
174
|
/**
|