[mb-commits] branch, beta, updated. Merge remote-tracking branch 'bitmap/fix-ac-rendering' into beta Fix the arti...
MusicBrainz Git Server <[email protected]>
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1TUj5R-0005Gp-RX@wiley> |
The branch, beta has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=8bfc991d2ee2fa6e921bc89c37abf37e55c51a30 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=fbb4ce3d4f4468bf95443427be968c25d5f8a7af (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=2d8bf6fe9eb1ea9fbbdefc1f9dd174d3f41dd6e8 (commit)
Summary of changes:
.../relationship-editor/RelationshipEditor.js | 8 +++---
root/static/scripts/tests/RelationshipEditor.js | 27 ++++++++++++++++++++
2 files changed, 31 insertions(+), 4 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8bfc991d2ee2fa6e921bc89c37abf37e55c51a30
Merge: 2d8bf6f fbb4ce3
Author: Ian McEwen <[email protected]>
Date: Sat Nov 3 12:08:26 2012 -0700
Merge remote-tracking branch 'bitmap/fix-ac-rendering' into beta
commit fbb4ce3d4f4468bf95443427be968c25d5f8a7af
Author: Michael Wiencek <[email protected]>
Date: Fri Nov 2 00:34:28 2012 +0000
Fix the artist credit rendering function, add test
diff --git a/root/static/scripts/relationship-editor/RelationshipEditor.js b/root/static/scripts/relationship-editor/RelationshipEditor.js
index fd818f1..bc3daf3 100644
--- a/root/static/scripts/relationship-editor/RelationshipEditor.js
+++ b/root/static/scripts/relationship-editor/RelationshipEditor.js
@@ -222,7 +222,7 @@ parseTrack = function(track, release) {
recording.artistCredit = "";
if (!Util.compareArtistCredits(release.artist_credit, track.artist_credit))
- recording.artistCredit = renderArtistCredit(track.artist_credit);
+ recording.artistCredit = UI.renderArtistCredit(track.artist_credit);
return RE.Entity(recording);
};
@@ -396,12 +396,12 @@ function initButtons() {
}
-function renderArtistCredit(obj) {
+UI.renderArtistCredit = function(obj) {
var html = "", name;
for (var i = 0; name = obj[i]; i++)
- html += RE.Entity(name.artist, "artist").rendering() + name.joinphrase;
+ html += RE.Entity(name.artist, "artist").rendering + name.joinphrase;
return html;
-}
+};
$(function() {
diff --git a/root/static/scripts/tests/RelationshipEditor.js b/root/static/scripts/tests/RelationshipEditor.js
index eab800e..4244e23 100644
--- a/root/static/scripts/tests/RelationshipEditor.js
+++ b/root/static/scripts/tests/RelationshipEditor.js
@@ -709,6 +709,33 @@ MB.tests.RelationshipEditor.RelationshipEditor = function() {
QUnit.equal(recording.name, "Love Me Do", "recording name");
QUnit.equal(recording.id, 6393661, "recording id");
QUnit.equal(recording.gid, "87ec065e-f139-41b9-b3b9-f746addf5b1e", "recording gid");
+
+ // test artist credit rendering
+ var ac = [
+ {
+ artist: {
+ sortname: "Sheridan, Tony",
+ name: "Tony Sheridan",
+ id: 117906,
+ gid: "7f9a3245-df19-4681-8314-4a4c1281dc74"
+ },
+ joinphrase: " & "
+ },
+ {
+ artist: {
+ sortname: "Beatles, The",
+ name: "The Beatles",
+ id: 303,
+ gid: "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d"
+ },
+ joinphrase: ""
+ }
+ ];
+
+ QUnit.equal(RE.UI.renderArtistCredit(ac),
+ '<a href="/artist/7f9a3245-df19-4681-8314-4a4c1281dc74" target="_blank" title="Sheridan, Tony">Tony Sheridan</a> & ' +
+ '<a href="/artist/b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d" target="_blank" title="Beatles, The">The Beatles</a>',
+ "artist credit rendering");
});
};
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server