|
|
Choosing A Webhost: |
[mb-commits] r7907 - mb_server/trunk/htdocs/edit/album: msg#00131audio.musicbrainz.cvs
Author: keschte Date: 2006-06-22 18:54:04 +0000 (Thu, 22 Jun 2006) New Revision: 7907 Modified: mb_server/trunk/htdocs/edit/album/move.html mb_server/trunk/htdocs/edit/album/sac.html Log: updated to new artistfilter variable names. fixed #1630 Modified: mb_server/trunk/htdocs/edit/album/move.html =================================================================== --- mb_server/trunk/htdocs/edit/album/move.html 2006-06-22 16:15:02 UTC (rev 7906) +++ mb_server/trunk/htdocs/edit/album/move.html 2006-06-22 18:54:04 UTC (rev 7907) @@ -36,7 +36,7 @@ # fields set by /comp/artistfilter $search => "" - $selectedartist => "" + $artistfilter_newartistid => "" $newartistid => "" # default for move tracks flag @@ -48,6 +48,7 @@ </%args> <%perl> + # use new terminology, copy over entries from # album list to releaseid list. if (@releaseid < @album) { for (@album) { push @releaseid, $_; } } @@ -103,10 +104,10 @@ # form step 2/3: load selected artist from the database, and # fill in the required fields my $newartist = undef; - $selectedartist ||= $newartistid; - if ($selectedartist ne "") + $artistfilter_newartistid ||= $newartistid; + if ($artistfilter_newartistid ne "") { - $newartist = &$GetCachedArtist($selectedartist); + $newartist = &$GetCachedArtist($artistfilter_newartistid); $newartistid = $newartist->GetId; } @@ -122,6 +123,34 @@ $m->comp("/comp/redirect", $url); } + + # The add new artist button was pressed + elsif ($submitvalue =~ m/Add New Artist/i) + { + # prepare returnurl for add artist form + my $returnurl = "/edit/album/move.html"; + my %returnargs; + $returnargs{"releaseid"} = \@releaseid; + + $returnurl = sprintf "$returnurl?%s&artistfilter_newartistid=", $m->comp("/comp/args-to-querystring.inc", %returnargs); + $returnurl = uri_escape($returnurl); + + # prepare url for redirecting to artist form + my $addartisturl = "/edit/artist/add.html?name=$search&returnurl=$returnurl"; + return $m->comp("/comp/redirect", $addartisturl); + } + + # important: pressing the select other artist button or the + # search button has to clear the selected artist possibly + # selected before (or the first of the list of found artists + # in the search results if the search was triggered + # automatically). + elsif ($submitvalue =~ m/Select Other Artist|Search/i) + { + $newartist = undef; + $newartistid = undef; + } + elsif ($submitvalue =~ m/Enter Edit/i and defined $newartist) { Modified: mb_server/trunk/htdocs/edit/album/sac.html =================================================================== --- mb_server/trunk/htdocs/edit/album/sac.html 2006-06-22 16:15:02 UTC (rev 7906) +++ mb_server/trunk/htdocs/edit/album/sac.html 2006-06-22 18:54:04 UTC (rev 7907) @@ -34,7 +34,7 @@ $releaseid => "" # fields set by /comp/artistfilter - $selectedartist => "" + $artistfilter_newartistid => "" $newartistid => "" $search => "" @@ -70,10 +70,10 @@ # form step 2/3: load selected artist from the database, and # fill in the required fields my $newartist = undef; - $selectedartist ||= $newartistid; - if ($selectedartist ne "") + $artistfilter_newartistid ||= $newartistid; + if ($artistfilter_newartistid ne "") { - $newartist = $m->comp("/comp/loadartist", $mb, $selectedartist); + $newartist = $m->comp("/comp/loadartist", $mb, $artistfilter_newartistid); $newartistid = $newartist->GetId; } @@ -97,7 +97,7 @@ my $returnurl = "/edit/album/sac.html"; my %returnargs; $returnargs{"releaseid"} = $releaseid; - $returnurl = sprintf "$returnurl?%s&selectedartist=", $m->comp("/comp/args-to-querystring.inc", %returnargs); + $returnurl = sprintf "$returnurl?%s&artistfilter_newartistid=", $m->comp("/comp/args-to-querystring.inc", %returnargs); $returnurl = uri_escape($returnurl); # prepare url for redirecting to artist form @@ -245,7 +245,8 @@ <table class="formstyle"> <& /comp/artistfilter, search => $search, - submitvalue => $submitvalue, &> + submitvalue => $submitvalue, + &> </table> <div>
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [mb-commits] r7906 - libmusicbrainz/trunk/python, root |
|---|---|
| Next by Date: | [mb-commits] r7908 - in mb_server/trunk/htdocs: comp/release edit/album, root |
| Previous by Thread: | [mb-commits] r7906 - libmusicbrainz/trunk/python, root |
| Next by Thread: | [mb-commits] r7908 - in mb_server/trunk/htdocs: comp/release edit/album, root |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |