Skip to content

Commit fc64d89

Browse files
reosarevokmwiencek
andauthored
MBS-11530: Avoid common/MB/release code running on these
* MBS-11530: Avoid common/MB/release code running on these Using .collapse-medium here broke because common/MB/release actually has code that runs on clicking a .collapse-medium. For now, using collapse-re-medium / expand-re-medium to ensure a quick fix, but we shouldn't be running that code inside the release editor anyway, it's only relevant to a release's display page. * Move common/MB/release to release index script This code should only run on release index pages, so move it to release/index as a separate bundle that's only loaded on these pages. Co-authored-by: Michael Wiencek <[email protected]>
1 parent e25ed28 commit fc64d89

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

root/release/edit/tracklist.tt

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
<table class="advanced-format">
286286
<tr>
287287
<td class="icon">
288-
<button type="button" class="icon collapse-medium" data-click="toggleMedium" data-bind="css: { 'expand-medium': collapsed, 'collapse-medium': !collapsed() }, attr: { title: collapsed() ? '[% l('Expand medium') %]' : '[% l('Collapse medium') %]' }"></button>
288+
<button type="button" class="icon collapse-medium" data-click="toggleMedium" data-bind="css: { 'expand-re-medium': collapsed, 'collapse-re-medium': !collapsed() }, attr: { title: collapsed() ? '[% l('Expand medium') %]' : '[% l('Collapse medium') %]' }"></button>
289289
</td>
290290

291291
<td class="format">

root/release/index.tt

+2
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,6 @@
6161
[%- END -%]
6262
</div>
6363
[% END %]
64+
65+
[% script_manifest('release/index.js', {async => 'async'}) %]
6466
[%- END -%]

root/static/scripts/common.js

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ import(/* webpackChunkName: "common-menu" */ './common/MB/Control/Menu');
5454
import(
5555
/* webpackChunkName: "common-edit-search" */ './common/MB/edit_search'
5656
);
57-
import(/* webpackChunkName: "common-release" */ './common/MB/release');
5857
import(/* webpackChunkName: "common-ratings" */ './common/ratings');
5958
import(/* webpackChunkName: "common-tagger" */ './common/tagger');
6059
import(/* webpackChunkName: "common-cover-art" */ './common/coverart');

root/static/scripts/common/MB/release.js root/static/scripts/release/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
import $ from 'jquery';
1010

11-
import request from '../utility/request';
12-
import getBooleanCookie from '../utility/getBooleanCookie';
13-
import setCookie from '../utility/setCookie';
11+
import request from '../common/utility/request';
12+
import getBooleanCookie from '../common/utility/getBooleanCookie';
13+
import setCookie from '../common/utility/setCookie';
1414

1515
$(function () {
1616
var $bottomCredits = $('#bottom-credits');

root/static/styles/release-editor.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ fieldset.advanced-medium {
7777
&.expanded div.icon { display: block; }
7878

7979
button {
80-
&.collapse-medium {
80+
&.collapse-re-medium {
8181
background-image: data-uri('../images/icons/collapse.png');
8282
}
8383

84-
&.expand-medium {
84+
&.expand-re-medium {
8585
background-image: data-uri('../images/icons/expand.png');
8686
}
8787

webpack.client.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const entries = [
5555
'place/map',
5656
'recording/form',
5757
'recording/merge',
58+
'release/index',
5859
'release-editor',
5960
'release-group/index',
6061
'series',

0 commit comments

Comments
 (0)