[mb-commits] branch, beta, updated. Merge branch 'mbs-5757-reduce-open-edit-time' into beta MBS-5757: reduce open...

MusicBrainz Git Server <[email protected]> Mon, 04 Feb 2013 01:22:13 +0000
Newsgroups gmane.comp.audio.musicbrainz.cvs
Message-ID <E1U2AlB-0007Km-D3@wiley>
The branch, beta has been updated
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=fa49d05aa2df78d04cbf8b85dddc97b74dcaac78 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=3b021ccfcb1099817db9b386becf308f61e9c9d7 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=f54e6b342ae717ae4d7dd874341a62e06647ea01 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=d5116cd49e42c659def5494d7c995042f9f2d280 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=78cba431e47ac810a25b40cdd5f618b84f8b8815 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=afcc99922a8ed1107d42cec356e46e565b7c4566 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=8446cef96b97e540af827744e607790d0cf004a2 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=174b8506b1692c9ff6e71288fa6f00ca7a459797 (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=1c3f8e5b7c2d41eb06269313e47dfee76c3a82dd (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=6b61eec5c9776a3f86e655f67f11e7faa47e8efd (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=ed183a2318cd5713129b77bab7f69c94e8cd273b (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=7f6056ffed1c0c7d531abd85dd605ce6757bd874 (commit)
      from  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=25c681cf30bb731f42ce38fa2df10898097bec06 (commit)

Summary of changes:
 lib/MusicBrainz/Server/Edit.pm                     |    2 +-
 .../WebService/Serializer/JSON/2/Relation.pm       |    1 +
 lib/MusicBrainz/Server/WebService/XMLSerializer.pm |    3 +-
 root/components/forms.tt                           |   19 ++++---
 root/release/add_cover_art.tt                      |    4 +-
 root/static/images/newimagegoeshere-125.png        |  Bin 6249 -> 0 bytes
 root/static/scripts/edit/MB/TextList.js            |   14 ++++-
 root/static/styles/edit.css                        |   13 +++++
 .../Server/Controller/WS/2/JSON/LookupArtist.pm    |    6 ++
 .../Server/Controller/WS/2/JSON/LookupRecording.pm |    1 +
 .../Server/Controller/WS/2/JSON/LookupWork.pm      |    2 +
 .../Server/Controller/WS/2/LookupArtist.pm         |    2 +-
 .../Server/Controller/WS/2/LookupRecording.pm      |    2 +-
 .../Server/Controller/WS/2/LookupRelationship.pm   |   50 ++++++++++----------
 .../Server/Controller/WS/2/LookupWork.pm           |    4 +-
 15 files changed, 80 insertions(+), 43 deletions(-)
 delete mode 100644 root/static/images/newimagegoeshere-125.png

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 fa49d05aa2df78d04cbf8b85dddc97b74dcaac78
Merge: 3b021cc 8446cef
Author: Ian McEwen <[email protected]>
Date:   Sun Feb 3 21:07:38 2013 -0700

    Merge branch 'mbs-5757-reduce-open-edit-time' into beta
    
    * mbs-5757-reduce-open-edit-time:
      MBS-5757: reduce open time for all edits to 7 days


commit 3b021ccfcb1099817db9b386becf308f61e9c9d7
Merge: f54e6b3 174b850
Author: Ian McEwen <[email protected]>
Date:   Sun Feb 3 21:07:19 2013 -0700

    Merge branch 'mbs-5742-iswcs-js' into beta
    
    * mbs-5742-iswcs-js:
      MBS-5742: clean up chained subtraction/addition, and last_item setting
      MBS-5742: use form.field.value.size instead of an explicit counter
      MBS-5742: require JS on ISWCs/IPIs only for interactive use

diff --cc root/components/forms.tt
index 7fc274e,8ddbfbe..ef8c452
--- a/root/components/forms.tt
+++ b/root/components/forms.tt
@@@ -104,13 -104,27 +104,23 @@@
                 class="text-list-row [%- r.form.field(field_name).html_name _ "-template" -%]">
                <input type="text" value="" name="" class="value" />
                <button class="nobutton icon remove">
 -                <img src="[% c.uri_for('/static/images/icons/delete_row.png') %]"
 -                     title="[% l('Remove {item}', item => item_name) %]"
 -                       alt="[% l('Remove {item}', item => item_name) %]" />
 +                <div class="remove-item icon img" title="[% l('Remove {item}', item => item_name) %]"></div>
                </button>
            </div>
+           [% FOR value=r.form.field(field_name).value -%]
+           <div class="text-list-row">
+               <input type="text" value="[% value %]" name="[% r.form.field(field_name).html_name %].[% loop.index() %]" class="value" />
+               <button class="nobutton icon remove">
+                 <img src="[% c.uri_for('/static/images/icons/delete_row.png') %]"
+                      title="[% l('Remove {item}', item => item_name) %]"
+                        alt="[% l('Remove {item}', item => item_name) %]" />
+               </button>
+           </div>
+           [% END -%]
            <div class="form-row-add">
 -            <button class="nobutton add">
 -              <span class="add-row">
 -                [% l('Add {item}', item => item_name) %]
 -              </span>
 -              <img src="[% c.uri_for('/static/images/icons/add_row.png') %]" />
 +            <button class="nobutton add" style="margin-right: 8px;">
 +              <span class="add-row" style="padding: 0 1em;">[% l('Add {item}', item => item_name) %]</span>
 +              <div class="add-item icon img" title="[% l('Add {item}', item => item_name) %]"></div>
              </button>
            </div>
        </div>

commit f54e6b342ae717ae4d7dd874341a62e06647ea01
Merge: d5116cd 78cba43
Author: Ian McEwen <[email protected]>
Date:   Sun Feb 3 21:06:58 2013 -0700

    Merge branch 'mbs-1774-ar-type-mbid' into beta
    
    * mbs-1774-ar-type-mbid:
      MBS-1774: update tests
      MBS-1774: add type-id attribute and key to webservice results for relations


commit d5116cd49e42c659def5494d7c995042f9f2d280
Merge: 25c681c 1c3f8e5
Author: Ian McEwen <[email protected]>
Date:   Sun Feb 3 21:06:27 2013 -0700

    Merge branch 'mbs-5617-add-cover-art-i18n' into beta
    
    * mbs-5617-add-cover-art-i18n:
      MBS-5617: tweak styling to remove explicit linebreaks, since I don't want to argue further
      MBS-5617: remove newimagegoeshere-125.png, replace with div/p and a translatable string


commit 78cba431e47ac810a25b40cdd5f618b84f8b8815
Author: Ian McEwen <[email protected]>
Date:   Tue Jan 29 21:06:53 2013 -0700

    MBS-1774: update tests

diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm
index b8ef65f..6b62e75 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm
@@ -132,6 +132,7 @@ test 'basic artist lookup, inc=url-rels' => sub {
                     direction => "forward",
                     url => "http://farm4.static.flickr.com/3652/3334818186_6e19173c33_b.jpg",
                     type => "image",
+                    "type-id" => '221132e9-e30e-43f2-a741-15afc4c5fa7c',
                     begin => JSON::null,
                     end => JSON::null,
                     ended => JSON::false,
@@ -140,6 +141,7 @@ test 'basic artist lookup, inc=url-rels' => sub {
                     direction => "forward",
                     url => "http://members.boardhost.com/wedlock/",
                     type => "online community",
+                    'type-id' => '35b3a50f-bf0e-4309-a3b4-58eeed8cee6a',
                     begin => JSON::null,
                     end => JSON::null,
                     ended => JSON::false,
@@ -148,6 +150,7 @@ test 'basic artist lookup, inc=url-rels' => sub {
                     direction => "forward",
                     url => "http://www.discogs.com/artist/Paul+Allgood",
                     type => "discogs",
+                    'type-id' => '04a5b104-a4c2-4bac-99a1-7b837c37d9e4',
                     begin => JSON::null,
                     end => JSON::null,
                     ended => JSON::false,
@@ -156,6 +159,7 @@ test 'basic artist lookup, inc=url-rels' => sub {
                     direction => "forward",
                     url => "http://www.imdb.com/name/nm4057169/",
                     type => "IMDb",
+                    'type-id' => '94c8b0cc-4477-4106-932c-da60e63de61c',
                     begin => JSON::null,
                     end => JSON::null,
                     ended => JSON::false,
@@ -164,6 +168,7 @@ test 'basic artist lookup, inc=url-rels' => sub {
                     direction => "forward",
                     url => "http://www.paulallgood.com/",
                     type => "blog",
+                    'type-id' => 'eb535226-f8ca-499d-9b18-6a144df4ae6f',
                     begin => JSON::null,
                     end => JSON::null,
                     ended => JSON::false,
@@ -713,6 +718,7 @@ test 'artist lookup with artist relations' => sub {
             relations => [
                 {
                     type => 'member of band',
+                    'type-id' => '5be4c609-9afa-4ea0-910b-12ffb71e3821',
                     direction => 'forward',
                     artist => {
                         id => "802673f0-9b88-4e8a-bb5c-dd01d68b086f",
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm
index 12ae3e9..74209f7 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm
@@ -223,6 +223,7 @@ test 'recording lookup with release relationships' => sub {
             relations => [
                 {
                     type => 'samples material',
+                    'type-id' => '967746f9-9d79-456c-9d1e-50116f0b27fc',
                     direction => 'forward',
                     release => {
                         asin => JSON::null,
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupWork.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupWork.pm
index 7dc450b..c9690ad 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupWork.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupWork.pm
@@ -89,6 +89,7 @@ test 'work lookup with recording relationships' => sub {
             relations => [
                 {
                     type => "performance",
+                    'type-id' => 'fdc57134-e05c-30bc-aff6-425684475276',
                     direction => "backward",
                     recording => {
                         id => "162630d9-36d2-4a8d-ade1-1c77440b34e7",
@@ -102,6 +103,7 @@ test 'work lookup with recording relationships' => sub {
                 },
                 {
                     type => "performance",
+                    'type-id' => 'fdc57134-e05c-30bc-aff6-425684475276',
                     direction => "backward",
                     recording => {
                         id => "eb818aa4-d472-4d2b-b1a9-7fe5f1c7d26e",
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupArtist.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupArtist.pm
index 10f515c..ca1f39d 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupArtist.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupArtist.pm
@@ -301,7 +301,7 @@ ws_test 'artist lookup with artist relations',
             <begin>1985-09-23</begin>
         </life-span>
         <relation-list target-type="artist">
-            <relation type="member of band">
+            <relation type-id="5be4c609-9afa-4ea0-910b-12ffb71e3821" type="member of band">
                 <target>802673f0-9b88-4e8a-bb5c-dd01d68b086f</target><begin>2001</begin>
                 <artist id="802673f0-9b88-4e8a-bb5c-dd01d68b086f">
                     <name>7人祭</name><sort-name>7nin Matsuri</sort-name>
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm
index 67b5577..99c4899 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm
@@ -159,7 +159,7 @@ ws_test 'recording lookup with release relationships',
         <title>Dear Diary</title>
         <length>86666</length>
         <relation-list target-type="release">
-            <relation type="samples material">
+            <relation type-id="967746f9-9d79-456c-9d1e-50116f0b27fc" type="samples material">
                 <target>4ccb3e54-caab-4ad4-94a6-a598e0e52eec</target>
                 <begin>2008</begin>
                 <release id="4ccb3e54-caab-4ad4-94a6-a598e0e52eec">
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm
index 6052c41..b691349 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm
@@ -28,16 +28,16 @@ ws_test 'artist lookup with url relationships',
     <artist type="Person" id="472bc127-8861-45e8-bc9e-31e8dd32de7a">
         <name>Distance</name><sort-name>Distance</sort-name><disambiguation>UK dubstep artist Greg Sanders</disambiguation>
         <relation-list target-type="url">
-            <relation type="blog">
+            <relation type-id="eb535226-f8ca-499d-9b18-6a144df4ae6f" type="blog">
                 <target>http://dj-distance.blogspot.com/</target>
             </relation>
-            <relation type="wikipedia">
+            <relation type-id="29651736-fa6d-48e4-aadc-a557c6add1cb" type="wikipedia">
                 <target>http://en.wikipedia.org/wiki/Distance_(musician)</target>
             </relation>
-            <relation type="discogs">
+            <relation type-id="04a5b104-a4c2-4bac-99a1-7b837c37d9e4" type="discogs">
                 <target>http://www.discogs.com/artist/DJ+Distance</target>
             </relation>
-            <relation type="myspace">
+            <relation type-id="bac47923-ecde-4b59-822e-d08f0cd10156" type="myspace">
                 <target>http://www.myspace.com/djdistancedub</target>
             </relation>
         </relation-list>
@@ -54,7 +54,7 @@ ws_test 'artist lookup with non-url relationships',
             <begin>1986-11-05</begin>
         </life-span>
         <relation-list target-type="recording">
-            <relation type="vocal">
+            <relation type-id="0fdbe3c6-7700-4a31-ae54-b53f06ae1cfa" type="vocal">
                 <target>0cf3008f-e246-428f-abc1-35f87d584d60</target>
                 <attribute-list><attribute>guest</attribute></attribute-list>
                 <recording id="0cf3008f-e246-428f-abc1-35f87d584d60">
@@ -84,7 +84,7 @@ ws_test 'release lookup with release relationships',
             <back>false</back>
         </cover-art-archive>
         <relation-list target-type="release">
-            <relation type="transl-tracklisting">
+            <relation type-id="fc399d47-23a7-4c28-bfcf-0607a562b644" type="transl-tracklisting">
                 <target>b3b7e934-445b-4c68-a097-730c6a6d47e6</target>
                 <attribute-list><attribute>transliterated</attribute></attribute-list>
                 <release id="b3b7e934-445b-4c68-a097-730c6a6d47e6">
@@ -117,21 +117,21 @@ ws_test 'recording lookup with artist relationships and credits',
             </name-credit>
         </artist-credit>
         <relation-list target-type="artist">
-            <relation type="producer">
+            <relation type-id="5c0ceac3-feb4-41f0-868d-dc06f6e27fc0" type="producer">
                 <target>22dd2db3-88ea-4428-a7a8-5cd3acf23175</target>
                 <direction>backward</direction>
                 <artist id="22dd2db3-88ea-4428-a7a8-5cd3acf23175">
                     <name>m-flo</name><sort-name>m-flo</sort-name>
                 </artist>
             </relation>
-            <relation type="programming">
+            <relation type-id="36c50022-44e0-488d-994b-33f11d20301e" type="programming">
                 <target>22dd2db3-88ea-4428-a7a8-5cd3acf23175</target>
                 <direction>backward</direction>
                 <artist id="22dd2db3-88ea-4428-a7a8-5cd3acf23175">
                     <name>m-flo</name><sort-name>m-flo</sort-name>
                 </artist>
             </relation>
-            <relation type="vocal">
+            <relation type-id="0fdbe3c6-7700-4a31-ae54-b53f06ae1cfa" type="vocal">
                 <target>a16d1433-ba89-4f72-a47b-a370add0bb55</target>
                 <direction>backward</direction>
                 <attribute-list><attribute>guest</attribute></attribute-list>
@@ -150,16 +150,16 @@ ws_test 'label lookup with label and url relationships',
     <label type="Original Production" id="72a46579-e9a0-405a-8ee1-e6e6b63b8212">
         <name>rhythm zone</name><sort-name>rhythm zone</sort-name><country>JP</country>
         <relation-list target-type="url">
-            <relation type="wikipedia">
+            <relation type-id="51e9db21-8864-49b3-aa58-470d7b81fa50" type="wikipedia">
                 <target>http://en.wikipedia.org/wiki/Rhythm_Zone</target>
             </relation>
-            <relation type="wikipedia">
+            <relation type-id="51e9db21-8864-49b3-aa58-470d7b81fa50" type="wikipedia">
                 <target>http://ja.wikipedia.org/wiki/Rhythm_zone</target>
             </relation>
-            <relation type="official site">
+            <relation type-id="fe108f43-acb9-4ad1-8be3-57e6ec5b17b6" type="official site">
                 <target>http://rzn.jp/</target>
             </relation>
-            <relation type="discogs">
+            <relation type-id="5b987f87-25bc-4a2d-b3f1-3618795b8207" type="discogs">
                 <target>http://www.discogs.com/label/Rhythm+Zone</target>
             </relation>
         </relation-list>
@@ -175,10 +175,10 @@ ws_test 'release group lookup with url relationships',
         <first-release-date>2004-03-17</first-release-date>
         <primary-type>Single</primary-type>
         <relation-list target-type="url">
-            <relation type="wikipedia">
+            <relation type-id="6578f0e9-1ace-4095-9de8-6e517ddb1ceb" type="wikipedia">
                 <target>http://en.wikipedia.org/wiki/The_Love_Bug_(song)</target>
             </relation>
-            <relation type="wikipedia">
+            <relation type-id="6578f0e9-1ace-4095-9de8-6e517ddb1ceb" type="wikipedia">
                 <target>http://ja.wikipedia.org/wiki/The_Love_Bug</target>
             </relation>
         </relation-list>
@@ -218,7 +218,7 @@ ws_test 'release lookup with recording-level relationships',
                             <title>Reverend Charisma</title>
                             <length>256666</length>
                             <relation-list target-type="work">
-                                <relation type="performance">
+                                <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                                     <target>e8d55116-1ea6-339a-a059-228d71c2f27d</target>
                                     <work id="e8d55116-1ea6-339a-a059-228d71c2f27d">
                                         <title>Reverend Charisma</title>
@@ -234,7 +234,7 @@ ws_test 'release lookup with recording-level relationships',
                             <title>Dear Diary</title>
                             <length>86666</length>
                             <relation-list target-type="work">
-                                <relation type="performance">
+                                <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                                     <target>2cd04f80-fbd7-343f-8499-bf0028f0f530</target>
                                     <work id="2cd04f80-fbd7-343f-8499-bf0028f0f530">
                                         <title>Dear Diary</title>
@@ -250,7 +250,7 @@ ws_test 'release lookup with recording-level relationships',
                             <title>Black Sundress</title>
                             <length>213666</length>
                             <relation-list target-type="work">
-                                <relation type="performance">
+                                <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                                     <target>b07e71c7-1cc7-3c6f-8c31-22be30a472dd</target>
                                     <work id="b07e71c7-1cc7-3c6f-8c31-22be30a472dd">
                                         <title>Black Sundress</title>
@@ -266,7 +266,7 @@ ws_test 'release lookup with recording-level relationships',
                             <title>Allegiance?WTF?</title>
                             <length>266666</length>
                             <relation-list target-type="work">
-                                <relation type="performance">
+                                <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                                     <target>c4a1c334-ccd3-37df-b248-40653cefb181</target>
                                     <work id="c4a1c334-ccd3-37df-b248-40653cefb181">
                                         <title>Allegiance?WTF?</title>
@@ -282,7 +282,7 @@ ws_test 'release lookup with recording-level relationships',
                             <title>Maggie&amp;Heidi</title>
                             <length>254666</length>
                             <relation-list target-type="work">
-                                <relation type="performance">
+                                <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                                     <target>b26203e5-73cb-3579-b575-a12d8b3f8209</target>
                                     <work id="b26203e5-73cb-3579-b575-a12d8b3f8209">
                                         <title>Maggie&amp;Heidi</title>
@@ -306,7 +306,7 @@ ws_test 'release lookup with recording-level relationships',
                             <title>Still Unsatisfied</title>
                             <length>230666</length>
                             <relation-list target-type="work">
-                                <relation type="performance">
+                                <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                                     <target>9c38c012-9b30-30a2-a2fb-4b44afdc3973</target>
                                     <work id="9c38c012-9b30-30a2-a2fb-4b44afdc3973">
                                         <title>Still Unsatisfied</title>
@@ -322,13 +322,13 @@ ws_test 'release lookup with recording-level relationships',
                             <title>Asseswaving</title>
                             <length>274666</length>
                             <relation-list target-type="work">
-                                <relation type="performance">
+                                <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                                     <target>f5cdd40d-6dc3-358b-8d7d-22dd9d8f87a8</target>
                                     <work id="f5cdd40d-6dc3-358b-8d7d-22dd9d8f87a8">
                                         <title>Asseswaving</title>
                                         <language>jpn</language>
                                         <relation-list target-type="artist">
-                                            <relation type="composer">
+                                            <relation type-id="21d842db-81d4-4d30-a0bd-8c6cc07e1dc2" type="composer">
                                                 <target>472bc127-8861-45e8-bc9e-31e8dd32de7a</target>
                                                 <direction>backward</direction>
                                                 <artist id="472bc127-8861-45e8-bc9e-31e8dd32de7a">
@@ -367,13 +367,13 @@ ws_test 'recording lookup with work-level relationships',
         <title>Asseswaving</title>
         <length>274666</length>
         <relation-list target-type="work">
-            <relation type="performance">
+            <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
                 <target>f5cdd40d-6dc3-358b-8d7d-22dd9d8f87a8</target>
                 <work id="f5cdd40d-6dc3-358b-8d7d-22dd9d8f87a8">
                     <title>Asseswaving</title>
                     <language>jpn</language>
                     <relation-list target-type="artist">
-                        <relation type="composer">
+                        <relation type-id="21d842db-81d4-4d30-a0bd-8c6cc07e1dc2" type="composer">
                             <target>472bc127-8861-45e8-bc9e-31e8dd32de7a</target>
                             <direction>backward</direction>
                             <artist id="472bc127-8861-45e8-bc9e-31e8dd32de7a">
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupWork.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupWork.pm
index 267e253..bb79025 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupWork.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupWork.pm
@@ -72,7 +72,7 @@ ws_test 'work lookup with recording relationships',
     <iswc>T-000.000.002-0</iswc>
     <iswc-list><iswc>T-000.000.002-0</iswc></iswc-list>
     <relation-list target-type="recording">
-      <relation type="performance">
+      <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
         <target>162630d9-36d2-4a8d-ade1-1c77440b34e7</target>
         <direction>backward</direction>
         <recording id="162630d9-36d2-4a8d-ade1-1c77440b34e7">
@@ -80,7 +80,7 @@ ws_test 'work lookup with recording relationships',
           <length>296026</length>
         </recording>
       </relation>
-      <relation type="performance">
+      <relation type-id="fdc57134-e05c-30bc-aff6-425684475276" type="performance">
         <target>eb818aa4-d472-4d2b-b1a9-7fe5f1c7d26e</target>
         <direction>backward</direction>
         <recording id="eb818aa4-d472-4d2b-b1a9-7fe5f1c7d26e">

commit afcc99922a8ed1107d42cec356e46e565b7c4566
Author: Ian McEwen <[email protected]>
Date:   Tue Jan 29 18:08:00 2013 -0700

    MBS-1774: add type-id attribute and key to webservice results for relations

diff --git a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Relation.pm b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Relation.pm
index d20701d..f4d9d13 100644
--- a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Relation.pm
+++ b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Relation.pm
@@ -14,6 +14,7 @@ sub serialize
     my $body;
 
     $body->{type} = $entity->link->type->name;
+    $body->{"type-id"} = $entity->link->type->gid;
     $body->{direction} = $entity->direction == 2 ? "backward" : "forward";
 
     $body = merge ($body, date_period ($entity->link));
diff --git a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
index 3a5bbb7..1096323 100644
--- a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
+++ b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
@@ -741,6 +741,7 @@ sub _serialize_relation
 
     my @list;
     my $type = $rel->link->type->name;
+    my $type_id = $rel->link->type->gid;
 
     push @list, $gen->target($rel->target_key);
     push @list, $gen->direction('backward') if ($rel->direction == $MusicBrainz::Server::Entity::Relationship::DIRECTION_BACKWARD);
@@ -759,7 +760,7 @@ sub _serialize_relation
         $self->$method(\@list, $gen, $rel->target, $inc, $stash);
     }
 
-    push @$data, $gen->relation({ type => $type }, @list);
+    push @$data, $gen->relation({ type => $type, "type-id" => $type_id }, @list);
 }
 
 sub _serialize_puid_list

commit 8446cef96b97e540af827744e607790d0cf004a2
Author: Ian McEwen <[email protected]>
Date:   Tue Jan 29 14:16:20 2013 -0700

    MBS-5757: reduce open time for all edits to 7 days

diff --git a/lib/MusicBrainz/Server/Edit.pm b/lib/MusicBrainz/Server/Edit.pm
index 831d056..ea456c2 100644
--- a/lib/MusicBrainz/Server/Edit.pm
+++ b/lib/MusicBrainz/Server/Edit.pm
@@ -169,7 +169,7 @@ sub edit_conditions
 {
     return {
         map { $_ =>
-               { duration      => 14,
+               { duration      => 7,
                  votes         => $REQUIRED_VOTES,
                  expire_action => $EXPIRE_ACCEPT,
                  auto_edit     => 1 }

commit 174b8506b1692c9ff6e71288fa6f00ca7a459797
Author: Ian McEwen <[email protected]>
Date:   Tue Jan 29 12:01:27 2013 -0700

    MBS-5742: clean up chained subtraction/addition, and last_item setting

diff --git a/root/components/forms.tt b/root/components/forms.tt
index 6b3bab7..8ddbfbe 100644
--- a/root/components/forms.tt
+++ b/root/components/forms.tt
@@ -129,7 +129,7 @@
           </div>
       </div>
       <script>
-         MB.Form.TextList ("[%- r.form.field(field_name).html_name -%]").init([% r.form.field(field_name).value.size - 1 %]);
+         MB.Form.TextList ("[%- r.form.field(field_name).html_name -%]").init([% r.form.field(field_name).value.size %]);
       </script>
 
       [% field_errors(r.form, field_name) %]
diff --git a/root/static/scripts/edit/MB/TextList.js b/root/static/scripts/edit/MB/TextList.js
index 956dfac..26fce80 100644
--- a/root/static/scripts/edit/MB/TextList.js
+++ b/root/static/scripts/edit/MB/TextList.js
@@ -26,7 +26,7 @@ MB.Form.TextList = function (input) {
     var $template = $('.' + template.replace (/\./g, '\\.'));
     var counter = 0;
 
-    var last_item = null;
+    var last_item = input;
 
     self.removeEvent = function (event) {
         $(this).closest ('div.text-list-row').remove();
@@ -35,9 +35,7 @@ MB.Form.TextList = function (input) {
     };
 
     self.init = function(max_index) {
-        last_item = input;
-
-        counter = max_index + 1;
+        counter = max_index;
         $template.parent()
             .find('div.text-list-row input.value')
             .siblings('button.remove')
@@ -47,8 +45,6 @@ MB.Form.TextList = function (input) {
     };
 
     self.add = function (init_value) {
-        last_item = input;
-
         $template.clone ()
             .removeClass (template)
             .insertAfter ($template.parent ().find ('div.text-list-row').last ())

commit 1c3f8e5b7c2d41eb06269313e47dfee76c3a82dd
Author: Ian McEwen <[email protected]>
Date:   Mon Jan 28 22:48:35 2013 -0700

    MBS-5617: tweak styling to remove explicit linebreaks, since I don't want to argue further

diff --git a/root/release/add_cover_art.tt b/root/release/add_cover_art.tt
index f6b05f2..8c094ab 100644
--- a/root/release/add_cover_art.tt
+++ b/root/release/add_cover_art.tt
@@ -36,7 +36,7 @@
         [%- IF !artwork.id -%]
           <div class="editimage thumb-position">
             <div class="image-placeholder">
-              <p>[% l('New<br />Image<br />Goes<br />Here') %]</p>
+              <p>[% l('New Image Goes Here') %]</p>
             </div>
             <div>
               <button class="left">&larr;</button>
diff --git a/root/static/styles/edit.css b/root/static/styles/edit.css
index ed4c656..27dfb7f 100644
--- a/root/static/styles/edit.css
+++ b/root/static/styles/edit.css
@@ -377,8 +377,8 @@ div.editimage.selected p.currently-selected { display: block; }
 }
 
 .image-placeholder p {
-    margin: 22% auto 0 auto;
+    margin: 15% auto 0 auto;
     display: block;
-    font-size: larger;
+    font-size: 200%;
     text-align: center;
 }

commit 6b61eec5c9776a3f86e655f67f11e7faa47e8efd
Author: Ian McEwen <[email protected]>
Date:   Fri Jan 25 14:29:02 2013 -0700

    MBS-5742: use form.field.value.size instead of an explicit counter

diff --git a/root/components/forms.tt b/root/components/forms.tt
index db5cf97..6b3bab7 100644
--- a/root/components/forms.tt
+++ b/root/components/forms.tt
@@ -109,7 +109,6 @@
                        alt="[% l('Remove {item}', item => item_name) %]" />
               </button>
           </div>
-          [% SET counter=0 %]
           [% FOR value=r.form.field(field_name).value -%]
           <div class="text-list-row">
               <input type="text" value="[% value %]" name="[% r.form.field(field_name).html_name %].[% loop.index() %]" class="value" />
@@ -119,7 +118,6 @@
                        alt="[% l('Remove {item}', item => item_name) %]" />
               </button>
           </div>
-          [% SET counter = loop.index() %]
           [% END -%]
           <div class="form-row-add">
             <button class="nobutton add">
@@ -131,7 +129,7 @@
           </div>
       </div>
       <script>
-         MB.Form.TextList ("[%- r.form.field(field_name).html_name -%]").init([% counter %]);
+         MB.Form.TextList ("[%- r.form.field(field_name).html_name -%]").init([% r.form.field(field_name).value.size - 1 %]);
       </script>
 
       [% field_errors(r.form, field_name) %]

commit ed183a2318cd5713129b77bab7f69c94e8cd273b
Author: Ian McEwen <[email protected]>
Date:   Thu Jan 24 15:58:45 2013 -0700

    MBS-5742: require JS on ISWCs/IPIs only for interactive use

diff --git a/root/components/forms.tt b/root/components/forms.tt
index 59ddc73..db5cf97 100644
--- a/root/components/forms.tt
+++ b/root/components/forms.tt
@@ -109,6 +109,18 @@
                        alt="[% l('Remove {item}', item => item_name) %]" />
               </button>
           </div>
+          [% SET counter=0 %]
+          [% FOR value=r.form.field(field_name).value -%]
+          <div class="text-list-row">
+              <input type="text" value="[% value %]" name="[% r.form.field(field_name).html_name %].[% loop.index() %]" class="value" />
+              <button class="nobutton icon remove">
+                <img src="[% c.uri_for('/static/images/icons/delete_row.png') %]"
+                     title="[% l('Remove {item}', item => item_name) %]"
+                       alt="[% l('Remove {item}', item => item_name) %]" />
+              </button>
+          </div>
+          [% SET counter = loop.index() %]
+          [% END -%]
           <div class="form-row-add">
             <button class="nobutton add">
               <span class="add-row">
@@ -119,14 +131,7 @@
           </div>
       </div>
       <script>
-         MB.Form.TextList ("[%- r.form.field(field_name).html_name -%]")
-         [%- FOR value=r.form.field(field_name).value -%]
-           .add ("[%- value -%]")
-         [%- END -%]
-         [%- IF !r.form.field(field_name).value.size -%]
-           .add ('')
-         [%- END -%]
-         ;
+         MB.Form.TextList ("[%- r.form.field(field_name).html_name -%]").init([% counter %]);
       </script>
 
       [% field_errors(r.form, field_name) %]
diff --git a/root/static/scripts/edit/MB/TextList.js b/root/static/scripts/edit/MB/TextList.js
index 2cf62b1..956dfac 100644
--- a/root/static/scripts/edit/MB/TextList.js
+++ b/root/static/scripts/edit/MB/TextList.js
@@ -34,6 +34,18 @@ MB.Form.TextList = function (input) {
         return false;
     };
 
+    self.init = function(max_index) {
+        last_item = input;
+
+        counter = max_index + 1;
+        $template.parent()
+            .find('div.text-list-row input.value')
+            .siblings('button.remove')
+            .bind('click.mb', self.removeEvent);
+
+        return self;
+    };
+
     self.add = function (init_value) {
         last_item = input;
 

commit 7f6056ffed1c0c7d531abd85dd605ce6757bd874
Author: Ian McEwen <[email protected]>
Date:   Tue Jan 22 15:26:32 2013 -0700

    MBS-5617: remove newimagegoeshere-125.png, replace with div/p and a translatable string

diff --git a/root/release/add_cover_art.tt b/root/release/add_cover_art.tt
index 9be9f6a..f6b05f2 100644
--- a/root/release/add_cover_art.tt
+++ b/root/release/add_cover_art.tt
@@ -35,7 +35,9 @@
 
         [%- IF !artwork.id -%]
           <div class="editimage thumb-position">
-            <img class="editimage" src="[% c.uri_for('/static/images/newimagegoeshere-125.png') %]" />
+            <div class="image-placeholder">
+              <p>[% l('New<br />Image<br />Goes<br />Here') %]</p>
+            </div>
             <div>
               <button class="left">&larr;</button>
               <button class="right" style="float: right;">&rarr;</button>
diff --git a/root/static/images/newimagegoeshere-125.png b/root/static/images/newimagegoeshere-125.png
deleted file mode 100644
index 56a7faa..0000000
Binary files a/root/static/images/newimagegoeshere-125.png and /dev/null differ
diff --git a/root/static/styles/edit.css b/root/static/styles/edit.css
index 0fb4b18..ed4c656 100644
--- a/root/static/styles/edit.css
+++ b/root/static/styles/edit.css
@@ -369,3 +369,16 @@ div.editimage button.set-cover-art {
 
 div.editimage p.currently-selected { display: none; }
 div.editimage.selected p.currently-selected { display: block; }
+
+.image-placeholder {
+    width: 125px;
+    height: 125px;
+    border: 2px solid gray;
+}
+
+.image-placeholder p {
+    margin: 22% auto 0 auto;
+    display: block;
+    font-size: larger;
+    text-align: center;
+}

-----------------------------------------------------------------------


hooks/post-receive
-- 
mb_server

_______________________________________________
MusicBrainz-commits mailing list
[email protected]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-commits