Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[mb-commits] r8865 - in mb_server/trunk/htdocs: comp comp/release css edit/: msg#00069

audio.musicbrainz.cvs

Subject: [mb-commits] r8865 - in mb_server/trunk/htdocs: comp comp/release css edit/albumbatch scripts show/artist

Author: luks
Date: 2007-02-25 13:49:39 +0000 (Sun, 25 Feb 2007)
New Revision: 8865

Modified:
mb_server/trunk/htdocs/comp/language
mb_server/trunk/htdocs/comp/release/release_begin
mb_server/trunk/htdocs/css/main.css
mb_server/trunk/htdocs/edit/albumbatch/done.html
mb_server/trunk/htdocs/scripts/collapsereleases.js
mb_server/trunk/htdocs/show/artist/index.html
Log:
Remove unneeded whitespace from the main release listing on artist page. Ported
the 'Batch edit' code from JavaScript to plain HTML.

Modified: mb_server/trunk/htdocs/comp/language
===================================================================
--- mb_server/trunk/htdocs/comp/language 2007-02-25 11:09:47 UTC (rev
8864)
+++ mb_server/trunk/htdocs/comp/language 2007-02-25 13:49:39 UTC (rev
8865)
@@ -6,19 +6,18 @@
$title .= ' / ' if defined $lang and defined $script;
$title .= $script->GetName() if defined $script;

-</%perl>
+ if ($title ne "" and defined $lang)
+ {
+ $m->out('<abbr title="');
+ $m->out($m->interp->apply_escapes($title, 'h'));
+ $m->out('">');
+ $m->out($m->interp->apply_escapes($lang->GetISOCode3T(), 'h'));
+ $m->out('</abbr>');
+ }
+ else
+ {
+ $m->out('-');
+ }

-% if ($title ne "" and defined $lang)
-% {
-
- <span class="explain" title="<% $title %>"><% $lang->GetISOCode3T()
%></span>
-
-% }
-% else
-% {
-
- -
-
-% }
-
-%# vi: set ts=4 sw=4 ft=mason :
+</%perl>
+%# vi: set ts=4 sw=4 ft=mason :
\ No newline at end of file

Modified: mb_server/trunk/htdocs/comp/release/release_begin
===================================================================
--- mb_server/trunk/htdocs/comp/release/release_begin 2007-02-25 11:09:47 UTC
(rev 8864)
+++ mb_server/trunk/htdocs/comp/release/release_begin 2007-02-25 13:49:39 UTC
(rev 8865)
@@ -108,15 +108,8 @@

% if ($session{"uid"} && !$nonalbum && $showtag)
% {
-
- <td class="batchop" id="batchop::<% $releaseid %>">
- <form method="post"
action="/edit/albumbatch/done.html">
- <div>
- <input type="hidden"
id="tagchecked::<% $releaseid %>" value="<% $tagchecked %>" />
- <input type="hidden"
name="releaseid<% $releaseid %>" value="<% $tagchecked ? "off" : "on" %>" />
- <input type="submit"
name="submit" value="<% $tagchecked ? "Remove" : "Select" %>" />
- </div>
- </form>
+ <td class="batchop">
+ <input type="checkbox" name="releaseid<%
$releaseid %>" <% $tagchecked ? 'checked="checked"' : "" |n %>" />
</td>
% }
</tr>

Modified: mb_server/trunk/htdocs/css/main.css
===================================================================
--- mb_server/trunk/htdocs/css/main.css 2007-02-25 11:09:47 UTC (rev 8864)
+++ mb_server/trunk/htdocs/css/main.css 2007-02-25 13:49:39 UTC (rev 8865)
@@ -724,6 +724,14 @@
text-align: center
}

+#CompactReleaseList td.rdate,
+#CompactReleaseList td.rst,
+#CompactReleaseList td.trm,
+#CompactReleaseList td.trk,
+#CompactReleaseList td.did {
+ white-space: nowrap;
+}
+
/* tag box */
#CompactReleaseList td.rtag {
padding: 0 0.6em;

Modified: mb_server/trunk/htdocs/edit/albumbatch/done.html
===================================================================
--- mb_server/trunk/htdocs/edit/albumbatch/done.html 2007-02-25 11:09:47 UTC
(rev 8864)
+++ mb_server/trunk/htdocs/edit/albumbatch/done.html 2007-02-25 13:49:39 UTC
(rev 8865)
@@ -53,23 +53,7 @@
$id = $1 if (/releaseid(\d+)/);
next if (!defined $id || $ARGS{$_} eq "");

- if ($ARGS{$_} eq "off")
- {
- my $i = 0;
- foreach (@releaseids)
- {
- if ($_ == $id)
- {
- splice(@releaseids, $i, 1);
- last;
- }
- $i++;
- }
- }
- else
- {
- push @releaseids, $id;
- }
+ push @releaseids, $id;
}

# Remove dupes
@@ -269,6 +253,7 @@
</table>
<& /comp/tableend &>

+ <form method="post" action="/edit/albumbatch/done.html">
<& /comp/layout/editformbegin, title => "With selected releases,
do...", mp => 1 &>
<table>
<tr>
@@ -279,14 +264,9 @@
<img src="/images/es/maximize.gif"
alt="Minimize all releases" />
<a href="javascript:; //"
onclick="collapsereleases.toggleAll(false); return false;">Minimize all</a></td>
<td style="padding-right: 40px; ">
- <form method="post"
action="/edit/albumbatch/done.html" id="BatchOp">
- <div
id="batchop::removereleases">
- <input type="hidden"
name="url" value="<% $referer %>" />
-
-% for (@releaseids) { $m->comp("/comp/form/hiddenfield", "releaseid".$_,
"on"); }
-
- </div>
- </form>
+ <input type="hidden" name="url"
value="<% $referer %>" />
+ <input type="hidden" name="reset"
value="1" />
+ <input type="submit" value="Update" />
</td>
</tr>
</table>
@@ -326,6 +306,7 @@
}
</%perl>

+ </form>

<& /comp/footer &>


Modified: mb_server/trunk/htdocs/scripts/collapsereleases.js
===================================================================
--- mb_server/trunk/htdocs/scripts/collapsereleases.js 2007-02-25 11:09:47 UTC
(rev 8864)
+++ mb_server/trunk/htdocs/scripts/collapsereleases.js 2007-02-25 13:49:39 UTC
(rev 8865)
@@ -288,93 +288,6 @@
mb.log.exit();
};

-
- /**
- * This function replaces the non-javascript variant of the
- * batchop selection with the checkboxes for the BatchOp form.
- * The visible fields of the batchop form are added during
- * this function as well.
- */
- this.setupReleaseBatch = function() {
- mb.log.enter(this.CN, "setupReleaseBatch");
- var obj,list = mb.ui.getByTag("table");
- for (var i=0;i<list.length; i++) {
- var t = list[i];
- var id = (t.id || "");
- if (id.match(/tracks::\d+/i)) {
-
- var tagchecked = false;
- if ((obj = mb.ui.get(id.replace("tracks",
"tagchecked"))) != null) {
- tagchecked = (obj.value == 1);
- }
- if ((obj = mb.ui.get(id.replace("tracks",
"batchop"))) != null) {
- var releaseid = id.replace("tracks::",
"");
-
- var input =
document.createElement("input");
- input.id = id.replace("tracks",
"batchcheckbox");
- input.type = "checkbox";
- input.onclick = function onclick(event)
{
- var releaseid =
this.id.replace("batchcheckbox::", "");
- var fieldName =
"releaseid"+releaseid;
- var batchOpForm, obj;
- if ((batchOpForm =
mb.ui.get("BatchOp")) != null) {
- if
(batchOpForm[fieldName] != null) {
- var value =
batchOpForm[fieldName].value;
-
batchOpForm[fieldName].value = (value == "off" ? "on" : "off");
- }
- }
- };
- obj.innerHTML = "";
- obj.appendChild(input);
- input.checked = tagchecked;
- input.title = tagchecked ?
- "Deactivate this checkbox and
click Update to unselect this release from the Batch Operations," :
- "Activate this checkbox and
click Update to select this release for Batch Operations.";
- }
- }
- }
-
- // get BatchOp form, then container element (div)
- // inside it, to add user interface.
- if ((obj = mb.ui.get("BatchOp")) != null) {
- if ((obj = mb.ui.getByTag("div", obj)[0]) != null) {
-
- // used in /edit/albumbatch/done.html
- if (obj.id == "batchop::removereleases") {
- var el =
document.createElement("input");
- el.type = "submit";
- el.name = "submit";
- el.value = "Update";
- obj.appendChild(el);
-
- // used in /show/artist/ and /show/release/?
- } else if (obj.id == "batchop::selectreleases")
{
-
- var el =
document.createElement("input");
- el.type = "image";
- el.alt = "Batch Edit";
- el.title = "Edit selected release(s) in
a batch edit";
- el.src = "/images/batch.gif";
- obj.appendChild(el);
- el.style.border = "0";
- el.style.height = "13px";
- el.style.width = "13px";
-
- el = document.createElement("a");
- el.href = "#";
- el.title = "Edit selected release(s) in
a batch edit";
- el.onclick = function onclick(event) {
- document.forms.BatchOp.submit();
- return false;
- };
- obj.appendChild(el);
- el.innerText = "Batch Operation";
- el.style.marginLeft = "5px";
- }
- }
- }
- };
-
// exit constructor
mb.log.exit();
}
@@ -385,7 +298,3 @@
mb.registerDOMReadyAction(
new MbEventAction(collapsereleases.GID, "setupReleases", "Setting up
release toggle functions")
);
-mb.registerDOMReadyAction(
- new MbEventAction(collapsereleases.GID, "setupReleaseBatch", "Setup
release batch operations")
-);
-

Modified: mb_server/trunk/htdocs/show/artist/index.html
===================================================================
--- mb_server/trunk/htdocs/show/artist/index.html 2007-02-25 11:09:47 UTC
(rev 8864)
+++ mb_server/trunk/htdocs/show/artist/index.html 2007-02-25 13:49:39 UTC
(rev 8865)
@@ -332,6 +332,7 @@
<& /comp/framedboxbegin, width => "100%" &>
<& /comp/modnotice &>

+ <form method="post" action="/edit/albumbatch/done.html">
<table width="100%">
<tr>
% unless ($fCompact) {
@@ -362,22 +363,10 @@
><% $dispinfo[$dispmode]->[1] %></a>
</td>

-% if ($session{uid}) {
- <td align="center">
+% if ($session{uid}) {
+ <td align="right"><input type="submit" value="Batch
edit"/></td>
+% }

- <form method="post" action="/edit/albumbatch/done.html"
id="BatchOp">
- <div id="batchop::selectreleases">
-
-% for my $album (@albums)
-% {
- <input type="hidden"
name="releaseid<% $album->GetId() %>" value="off" />
-% }
-
- </div>
- </form>
- </td>
-% }
-
</tr></table>
<& /comp/framedboxend &>
<br />
@@ -419,9 +408,7 @@
{
my $s = 8;
++$s if $session{'uid'};
- </%perl>
- <tr><th colspan='<% $s %>'
align="left"><h2><% $desc %></h2></th></tr>
- <%perl>
+ </%perl><tr><th colspan='<% $s
%>' align="left"><h2><% $desc %></h2></th></tr><%perl>
}

$last = $album->{_section_key_};
@@ -437,70 +424,57 @@
my $nmp = $album->GetModPending;

</%perl>
- <tr class="<% ('ev', 'od')[$rownum % 2]
%>">
+<tr class="<% ('ev', 'od')[$rownum % 2] %>">
% if ($album->GetTrackCount) {
- <td class="trk" nowrap><%
$album->GetTrackCount %><img src="/images/notes.gif" hspace="3"
alt="Tracks"></td>
+<td class="trk"><% $album->GetTrackCount %><img src="/images/notes.gif"
hspace="3" alt="Tracks"></td>
% } else {
- <td></td>
+<td></td>
% }
% if ($album->GetDiscidCount) {
- <td class="did" nowrap><%
$album->GetDiscidCount %><img src="/images/cd.gif" hspace="3" alt="disc
IDs"></td>
+<td class="did"><% $album->GetDiscidCount %><img src="/images/cd.gif"
hspace="3" alt="disc IDs"></td>
% } else {
- <td></td>
+<td></td>
% }
% if ($album->GetTrmidCount) {
- <td class="trm" nowrap><%
$album->GetTrmidCount %><img src="/images/trm.gif" hspace="3" alt="TRM
IDs"></td>
+<td class="trm"><% $album->GetTrmidCount %><img src="/images/trm.gif"
hspace="3" alt="TRM IDs"></td>
% } else {
- <td></td>
+<td></td>
% }
% if ($album->GetPuidCount) {
- <td class="trm" nowrap><%
$album->GetPuidCount %><img src="/images/puid.gif" hspace="3" alt="PUIDs"></td>
+<td class="trm"><% $album->GetPuidCount %><img src="/images/puid.gif"
hspace="3" alt="PUIDs"></td>
% } else {
- <td></td>
+<td></td>
% }
- <td class="rst" nowrap><%
- $amp ? "<span
class='mp'>" : "" |n
- %><% do {
- my $s =
$album->{_actual_attr_status};
- $s ?
($album->GetAttributeName($s)||"?$s") : "None"
- } %><%
- $amp ?
"</span>" : "" |n
- %></td>
- <td class="rdate" nowrap>
-%
$m->comp('/comp/releasedate', $album->GetFirstReleaseDateYMD);
- </td>
- <td class="lang">
-%
$m->comp('/comp/language', $album->GetLanguage, $album->GetScript);
- </td>
+<td class="rst"><%perl>
+ $m->out('<span class="mp">') if $amp;
+ my $s = $album->{_actual_attr_status};
+ $m->out($s ? ($album->GetAttributeName($s) || "?$s") : "None");
+ $m->out('</span>') if $amp;
+</%perl></td>
+<td class="rdate"><& /comp/releasedate, $album->GetFirstReleaseDateYMD &></td>
+<td class="lang"><& /comp/language, $album->GetLanguage, $album->GetScript
&></td>
% if ($session{uid}) {
- <td class="rtag">
+<td class="rtag">
% if (!$album->IsNonAlbumTracks) {
- <form method="post"
action="/edit/albumbatch/done.html"
-
enctype="application/x-www-form-urlencoded">
- <script
type="text/javascript">
-
document.writeln('<\input type="checkbox" name="check"
onchange="document.forms.BatchOp.releaseid<% $album->GetId %>.value =
this.form.check.checked ? \'on\' : \'\';">');
- </script>
- <noscript>
- <input
type="hidden" name="releaseid<% $album->GetId %>" value="on">
- <input
type="submit" name="submit" value="Select">
- </noscript>
- </form>
+<input type="checkbox" name="releaseid<% $album->GetId %>"/>
% }
- </td>
+</td>
% }
- <td class="rname">
-% if ($session{tport}) {
- <a href="http://127.0.0.1:<%
$session{tport} %>/openalbum?id=<% $album->GetMBId %>&amp;t=<% time %>"
- style="margin-right:
1ex"
- target="hiddeniframe"
title="Open in Tagger" border="0"><img
-
src="/images/mblookup-tagger.png" border="0" alt="Open in tagger"></a>
-% }
- <% $nmp ? "<span class='mp'>" :
"" |n
- %><a href="/release/<%
$album->GetMBId %>.html"><% $album->GetName %></a><%
- $nmp ?
"</span>" : "" |n
- %></td>
- </tr>
- <%perl>
+<td class="rname"><%perl>
+ if ($session{tport})
+ {
+ $m->out('<a href="http://127.0.0.1:' . $session{tport} .
'/openalbum?id=' . $album->GetMBId . '&amp;t=' . time);
+ $m->out('style="margin-right: 1ex"');
+ $m->out('target="hiddeniframe" title="Open in Tagger"
border="0"><img');
+ $m->out('src="/images/mblookup-tagger.png" border="0" alt="Open
in tagger"></a>');
+ }
+ $m->out('<span class="mp">') if $nmp;
+ $m->out('<a href="/release/' . $album->GetMBId . '.html">');
+ $m->out($m->interp->apply_escapes($album->GetName, 'h'));
+ $m->out('</a>');
+ $m->out('</span>') if $nmp;
+</%perl></td>
+</tr><%perl>
}
elsif ($ex =~ /(^|\D)$id(\D|$)/)
{
@@ -524,9 +498,10 @@
}
}

- $m->out("</table><br><br>") if $fCompact;
+ $m->out("</table><br/><br/>") if $fCompact;

</%perl>
+ </form>
<%perl>
}


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
ide.eclipse.wtp...    bug-tracking.ro...    xfree86.cvs/200...    lisp.wxcl.devel...    file-systems.ar...    kde.devel.kwrit...    jakarta.jetspee...    qnx.openqnx.dev...    drivers.openib/...    ports.xbox.deve...    gis.gdal.devel/...    netbsd.ports.ma...    ubuntu.marketin...    systemtap/2005-...    web.omniweb/200...    mail.qmail.ldap...    hardware.soekri...    os.netbsd.devel...    audio.madman.ge...    tv.freeguide-tv...    cluster.openmos...    education.ezpro...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation