[mb-commits] branch, beta, updated. Merge branch 'beta' of ssh://git.musicbrainz.org:10015/ musicbrainz-server int...
MusicBrainz Git Server <[email protected]> Tue, 15 Jan 2013 10:20:00 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1Tv3cd-0002Ve-Vz@wiley> |
The branch, beta has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=c27215820e3ef0ac600d2267539ea23de04b66fd (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=d303db03ba099e8d0d8e53765c3f5487fc68d98b (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=fad66f00323fdf13a593c3a0a63f491aa6664cbd (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=2fef60954ef27b4e1c1e3d2dba8402f4d978ae71 (commit)
Summary of changes:
root/static/scripts/common/MB/utility.js | 5 -----
.../static/scripts/edit/MB/Control/ArtistCredit.js | 8 ++++----
.../release-editor/MB/Control/ReleaseEdits.js | 2 +-
.../release-editor/MB/Control/ReleaseRecordings.js | 2 +-
.../release-editor/MB/Control/ReleaseTracklist.js | 2 +-
.../scripts/release-editor/MB/TrackParser.js | 12 ++++++------
6 files changed, 13 insertions(+), 18 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 c27215820e3ef0ac600d2267539ea23de04b66fd
Merge: d303db0 2fef609
Author: Oliver Charles <[email protected]>
Date: Tue Jan 15 10:13:41 2013 +0000
Merge branch 'beta' of ssh://git.musicbrainz.org:10015/musicbrainz-server into beta
* 'beta' of ssh://git.musicbrainz.org:10015/musicbrainz-server: (49 commits)
Try fixing the edit ID conflict a different way
Revert "Change edit ID number in webservice.sql, conflicting with statistics.sql"
Change edit ID number in webservice.sql, conflicting with statistics.sql
Change editor name in webservice.sql, since it seems to be breaking a unique constraint in tests
MBS-5749: Add edit profile link to 401 error page
MBS-5702: Tweak link to wikipedia below wikipedia extracts
MBS-5691: link ISRCs in the artist recording list view
MBS-5415 revert: missed a spot
i18n: revert MBS-5415, as it's proven unworkable
Change to using a directory full of hooks, rather than a single file.
MBS-4536: Add some cover art to webservice.sql and update tests
MBS-4536: Fix other webservice tests that were broken
MBS-4536: Don't output cover-art-archive data in JSON if it's not loaded
MBS-5651: Fix unescaped quotes in msg* strings.
MBS-5651: Escape quotes in msg* strings.
MBS-5651: Run the revised script.
MBS-5651: Handle the "barcode" link as well.
MBS-5651: Remove a trailing space in the string cleanup script.
MBS-5651: Updated *.po with the altered string.
MBS-5651: Add script to fix changed strings for translators' convenience.
...
commit d303db03ba099e8d0d8e53765c3f5487fc68d98b
Merge: 5a6ebf5 fad66f0
Author: Oliver Charles <[email protected]>
Date: Tue Jan 15 10:13:28 2013 +0000
Merge remote-tracking branch 'bitmap/mbs-5540' into beta
* bitmap/mbs-5540:
MBS-5540: Release editor eats tracklists
commit fad66f00323fdf13a593c3a0a63f491aa6664cbd
Author: Michael Wiencek <[email protected]>
Date: Wed Jan 9 21:31:27 2013 +0000
MBS-5540: Release editor eats tracklists
After parsing a tracklist and changing an AC, there were issues where
the placeholder attribute on the credit input would return undefined.
Nuke MB.utility.trim and get the artist name differently.
diff --git a/root/static/scripts/common/MB/utility.js b/root/static/scripts/common/MB/utility.js
index d0eb2e9..3aee3fd 100644
--- a/root/static/scripts/common/MB/utility.js
+++ b/root/static/scripts/common/MB/utility.js
@@ -243,11 +243,6 @@ MB.utility.unformatTrackLength = function (duration)
return (hours + minutes + seconds) * 1000;
};
-MB.utility.trim = function (str)
-{
- return str.replace (/\s+/g, " ").replace (/^ /, "").replace (/ $/, "");
-}
-
MB.utility.renderArtistCredit = function (ac) {
var html = '';
$.each(ac.names, function(name) {
diff --git a/root/static/scripts/edit/MB/Control/ArtistCredit.js b/root/static/scripts/edit/MB/Control/ArtistCredit.js
index 14a6e93..39d3ad1 100644
--- a/root/static/scripts/edit/MB/Control/ArtistCredit.js
+++ b/root/static/scripts/edit/MB/Control/ArtistCredit.js
@@ -718,16 +718,16 @@ MB.Control.ArtistCreditContainer = function($target, $container) {
if(item.isEmpty ())
return;
- var artistcredit = item.$credit.val () ?
- item.$credit.val () : item.$credit.attr ('placeholder');
+ var artistname = _.clean(item.$name.val()),
+ artistcredit = _.clean(item.$credit.val()) || artistname;
ret.push({
'artist': {
- 'name': MB.utility.trim (item.$name.val ()),
+ 'name': artistname,
'id': item.$id.val (),
'gid': item.$gid.val ()
},
- 'name': MB.utility.trim (artistcredit),
+ 'name': artistcredit,
'join_phrase': item.$join.val () || ''
});
});
diff --git a/root/static/scripts/release-editor/MB/Control/ReleaseEdits.js b/root/static/scripts/release-editor/MB/Control/ReleaseEdits.js
index edef7a2..15248c7 100644
--- a/root/static/scripts/release-editor/MB/Control/ReleaseEdits.js
+++ b/root/static/scripts/release-editor/MB/Control/ReleaseEdits.js
@@ -100,7 +100,7 @@ MB.Control.ReleaseEdits = function ($edits) {
var from = tracklist ? tracklist[idx] : null;
var to = {
- 'name': MB.utility.trim (trk.$title.val ()),
+ 'name': _.clean (trk.$title.val ()),
'length': trk.getDuration (from ? from.length : null),
'artist_credit': trk.artist_credit.toData ()
};
diff --git a/root/static/scripts/release-editor/MB/Control/ReleaseRecordings.js b/root/static/scripts/release-editor/MB/Control/ReleaseRecordings.js
index 9445f43..0dc5c42 100644
--- a/root/static/scripts/release-editor/MB/Control/ReleaseRecordings.js
+++ b/root/static/scripts/release-editor/MB/Control/ReleaseRecordings.js
@@ -255,7 +255,7 @@ MB.Control.ReleaseRecordingsTrack = function (parent, disc, track, row) {
self.$matches.find ('input.recordingmatch').bind ('change.mb', self.change);
- var artistname = MB.utility.trim (self.$row.next ().find ('.track-artist').text ());
+ var artistname = _.clean (self.$row.next ().find ('.track-artist').text ());
self.select = MB.Control.ReleaseRecordingsSelect (self.$container, artistname, self.change);
self.addBubble (
diff --git a/root/static/scripts/release-editor/MB/Control/ReleaseTracklist.js b/root/static/scripts/release-editor/MB/Control/ReleaseTracklist.js
index 484f05a..ba968f1 100644
--- a/root/static/scripts/release-editor/MB/Control/ReleaseTracklist.js
+++ b/root/static/scripts/release-editor/MB/Control/ReleaseTracklist.js
@@ -1160,7 +1160,7 @@ MB.Control.ReleaseTracklist = function () {
$va.each (function (idx, elem) {
var $trkrow = $(elem).parents ('tr.track-artist-credit').prevAll('*:eq(0)');
- var disc = MB.utility.trim ($trkrow.parents ('fieldset.advanced-disc').find ('legend').text ());
+ var disc = _.clean ($trkrow.parents ('fieldset.advanced-disc').find ('legend').text ());
if (!affected.hasOwnProperty (disc))
{
diff --git a/root/static/scripts/release-editor/MB/TrackParser.js b/root/static/scripts/release-editor/MB/TrackParser.js
index e54b7bb..82212b0 100644
--- a/root/static/scripts/release-editor/MB/TrackParser.js
+++ b/root/static/scripts/release-editor/MB/TrackParser.js
@@ -33,11 +33,11 @@ MB.TrackParser.Artist = function (track, artist) {
self.addNew = function (name) {
self.names.push ({
'artist': {
- 'name': MB.utility.trim (name),
+ 'name': _.clean (name),
'id': '',
'gid': ''
},
- 'name': MB.utility.trim (name),
+ 'name': _.clean (name),
'join_phrase': null
});
};
@@ -221,7 +221,7 @@ MB.TrackParser.Track = function (position, line, parent) {
self.position = position;
self.number = position;
- self.line = MB.utility.trim (line);
+ self.line = _.clean (line);
self.parent = parent;
self.duration = null;
self.name = '';
@@ -397,7 +397,7 @@ MB.TrackParser.Track = function (position, line, parent) {
};
self.clean = function () {
- self.title = MB.utility.trim (self.title)
+ self.title = _.clean (self.title)
.replace (/(.*),\sThe$/i, "The $1")
.replace (/\s*,/g, ",");
};
@@ -426,7 +426,7 @@ MB.TrackParser.Parser = function (disc, serialized) {
* track position. */
var lineno = 1;
$.each (lines, function (idx, item) {
- item = MB.utility.trim (item);
+ item = _.clean (item);
if (item === '')
return;
@@ -444,7 +444,7 @@ MB.TrackParser.Parser = function (disc, serialized) {
var map = {};
$.each (self.originals, function (idx, track) {
- var trackname = MB.utility.trim (track.name);
+ var trackname = _.clean (track.name);
if (map[trackname] === undefined) {
map[trackname] = [];
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server