[prev in list] [next in list] [prev in thread] [next in thread]
List: bricolage-commits
Subject: [6140] XHTML-ify "Associations" sections of story and media profiles
From: mroch () bricolage ! cc
Date: 2005-01-12 2:03:28
Message-ID: 20050112020328.32231.qmail () x1 ! develooper ! com
[Download RAW message or body]
Revision: 6140
Author: mroch
Date: 2005-01-11 18:03:26 -0800 (Tue, 11 Jan 2005)
ViewCVS: http://viewsvn.bricolage.cc/?rev=6140&view=rev
Log Message:
-----------
XHTML-ify "Associations" sections of story and media profiles
Modified Files:
--------------
bricolage/branches/dev_cssify/comp/media/css/style.css
bricolage/branches/dev_cssify/comp/widgets/media_prof/edit_meta.html
bricolage/branches/dev_cssify/comp/widgets/profile/button.mc
bricolage/branches/dev_cssify/comp/widgets/profile/displayFormElement.mc
bricolage/branches/dev_cssify/comp/widgets/story_prof/edit_meta.html
bricolage/branches/dev_cssify/comp/workflow/profile/media/container/edit.html
Added Files:
-----------
bricolage/branches/dev_cssify/comp/media/images/pencil.gif
["r6140-mroch.diff" (r6140-mroch.diff)]
Modified: bricolage/branches/dev_cssify/comp/media/css/style.css
===================================================================
--- bricolage/branches/dev_cssify/comp/media/css/style.css 2005-01-10 23:47:56 UTC \
(rev 6139)
+++ bricolage/branches/dev_cssify/comp/media/css/style.css 2005-01-12 02:03:26 UTC \
(rev 6140) @@ -8,7 +8,7 @@
pre { font-size: 1.1em; padding: 1em; margin: 0; }
h3 { font-size: 1.1em; }
-a img { border: none; }
+a img { border: none; vertical-align: middle; }
form { margin: 0; padding: 0; }
input { vertical-align: middle; }
@@ -389,8 +389,25 @@
.paginate .pages { float: left; width: 70%; }
.paginate .all { float: right; width: 25%; text-align: right; }
+.associations { width: 100%; border-style: hidden; }
+.associations th {
+ width: 125px;
+ text-align: right;
+ font-weight: bold;
+}
+.associations th,
+.associations td {
+ padding: 5px;
+ font-size: 1em;
+ vertical-align: top;
+ border-style: solid;
+ border-color: #cccc99;
+ border-width: 1px 0;
+}
+.associations td.edit { width: 20px; vertical-align: top; }
+
dl.viewmeta dt,
-dl.viewmeta dd { border-bottom: solid white 1px; padding: 3px 0; }
+dl.viewmeta dd { border-bottom: solid white 1px; padding: 0; line-height: 1.8em }
dl.viewmeta dt {
float: left;
clear: both;
@@ -402,7 +419,6 @@
}
dl.viewmeta dd { margin-left: 140px; }
-
/******************************************************
* HACKS *
******************************************************/
Added: bricolage/branches/dev_cssify/comp/media/images/pencil.gif
===================================================================
(Binary files differ)
Property changes on: bricolage/branches/dev_cssify/comp/media/images/pencil.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: bricolage/branches/dev_cssify/comp/widgets/media_prof/edit_meta.html
===================================================================
--- bricolage/branches/dev_cssify/comp/widgets/media_prof/edit_meta.html 2005-01-10 \
23:47:56 UTC (rev 6139)
+++ bricolage/branches/dev_cssify/comp/widgets/media_prof/edit_meta.html 2005-01-12 \
02:03:26 UTC (rev 6140) @@ -139,33 +139,27 @@
number => $num++);
</%perl>
-<table border=0 width=578 cellpadding=0 cellspacing=0>
-<tr>
- <td width=120 align=right valign=top><span class=label><% \
$lang->maketext('Category') %>: </span></td>
- <td width=378 valign=top>
-<%perl>
-my $cat = $media->get_category;
-$m->out($cat->get_name);
-</%perl>
- </td>
- <td width=80 align="center" valign=top><& '/widgets/profile/imageSubmit.mc',
- formName => "theForm",
- callback => "$widget|category_cb",
- image => "edit_lgreen",
- vspace => 4
-&></td>
+% my $rowColor = "even";
+<table class="associations">
+% if (ENABLE_CATEGORY_BROWSER) {
+% $rowColor = $rowColor eq "odd" ? "even" : "odd";
+<tr class="<% $rowColor %>">
+<th><% $lang->maketext('Category') %>:</th>
+<td><% $media->get_category->get_uri %></td>
+<td class="edit"><& '/widgets/profile/button.mc',
+ disp => $lang->maketext("Edit"),
+ widget => $widget,
+ cb => 'category_cb',
+ button => 'pencil',
+ useTable => 0,
+ globalImage => 1 &></td>
</tr>
-</table>
+% } # if ENABLE_CATEGORY_BROWSER
-<table border=0 cellpadding=0 cellspacing=0 width=578>
-<tr><td class="medHeader"><img src="/media/images/spacer.gif" width="578" height="1" \
/></td></tr>
-</table>
-
-<table border=0 width=578 cellpadding=0 cellspacing=0>
-<tr>
- <td width=120 align=right valign=top><span class=label><% \
$lang->maketext('Keywords') %>: </span></td>
- <td width=378 valign=top>
-<%perl>
+% $rowColor = $rowColor eq "odd" ? "even" : "odd";
+<tr class="<% $rowColor %>">
+<th><% $lang->maketext('Keywords') %>:</th>
+<td><%perl>
my @keywords;
foreach my $kw ($media->get_keywords) {
push @keywords, $kw->get_name;
@@ -173,45 +167,36 @@
$m->out(scalar(@keywords) ? join(", ", @keywords) : $lang->maketext("No keywords \
defined."));
-</%perl>
- </td>
- <td width=80 align="center" valign=top><& '/widgets/profile/imageSubmit.mc',
- formName => "theForm",
- callback => "$widget|keywords_cb",
- image => "edit_lgreen",
- vspace => 4
-&></td>
+</%perl></td>
+<td class="edit"><& '/widgets/profile/button.mc',
+ disp => $lang->maketext("Edit"),
+ widget => $widget,
+ cb => 'keywords_cb',
+ button => 'pencil',
+ useTable => 0,
+ globalImage => 1 &></td>
</tr>
-</table>
-<table border=0 cellpadding=0 cellspacing=0 width=578>
-<tr><td class="medHeader"><img src="/media/images/spacer.gif" width="578" height="1" \
/></td></tr>
-</table>
-
-<table border=0 cellpadding=0 cellspacing=0 width=578>
-<tr>
- <td align=right width=120 valign=top><span class=label><% \
$lang->maketext('Contributors') %>: </span></td>
- <td width=378 valign=top>
-
-<%perl>
+% $rowColor = $rowColor eq "odd" ? "even" : "odd";
+<tr class="<% $rowColor %>">
+<th><% $lang->maketext('Contributors') %>:</th>
+<td><%perl>
my @contribs;
foreach my $cntr ($media->get_contributors) {
push @contribs, $cntr->get_name;
}
$m->out(scalar(@contribs) ? join(", ", @contribs) : $lang->maketext("No contributors \
defined."));
-</%perl>
- </td>
- <td width="80" align="center" valign="top">
-% if ($media->get_alias_id) {
-<img src="/media/images/spacer.gif" height="20" />
-% } else {
-<& /widgets/profile/imageSubmit.mc,
- formName => "theForm",
- callback => $widget . "|contributors_cb",
- image => "edit_lgreen",
- vspace => 3
-&>
+</%perl></td>
+<td class="edit">
+% unless ($media->get_alias_id) {
+<& '/widgets/profile/button.mc',
+ disp => $lang->maketext("Edit"),
+ widget => $widget,
+ cb => 'contributors_cb',
+ button => 'pencil',
+ useTable => 0,
+ globalImage => 1 &>
% }
</td>
</tr>
Modified: bricolage/branches/dev_cssify/comp/widgets/profile/button.mc
===================================================================
--- bricolage/branches/dev_cssify/comp/widgets/profile/button.mc 2005-01-10 23:47:56 \
UTC (rev 6139)
+++ bricolage/branches/dev_cssify/comp/widgets/profile/button.mc 2005-01-12 02:03:26 \
UTC (rev 6140) @@ -31,6 +31,7 @@
$disp => ''
$cb => 'create_cb'
$button => 'create_red'
+$globalImage => 0
$name => ''
$js => ''
$indent => ''
@@ -39,11 +40,12 @@
</%args>
<%perl>;
my $key = ($widget) ? "$widget|$cb" : $name;
+my $local = $globalImage ? '' : "$lang_key/";
my $vals = { disp => '',
value => $disp,
props => { type => 'image',
- src => "/media/images/$lang_key/$button.gif"
+ src => "/media/images/$local$button.gif"
},
js => $js,
Modified: bricolage/branches/dev_cssify/comp/widgets/profile/displayFormElement.mc
===================================================================
--- bricolage/branches/dev_cssify/comp/widgets/profile/displayFormElement.mc 2005-01-10 \
23:47:56 UTC (rev 6139)
+++ bricolage/branches/dev_cssify/comp/widgets/profile/displayFormElement.mc 2005-01-12 \
02:03:26 UTC (rev 6140) @@ -223,6 +223,8 @@
my $out;
my $disp_value = defined $value && $type ne 'password' ? ' value="'
. escape_html($value) . '"' : '';
+ $disp_value = defined $value && $type eq 'image' ? ' title="'
+ . escape_html($value) . '"' : $disp_value;
my $src = defined $vals->{props}{src} ? ' src="' . $vals->{props}{src} . '"' : \
''; $key = escape_html($key) if $key;
$js = $js ? " $js" : '';
Modified: bricolage/branches/dev_cssify/comp/widgets/story_prof/edit_meta.html
===================================================================
--- bricolage/branches/dev_cssify/comp/widgets/story_prof/edit_meta.html 2005-01-10 \
23:47:56 UTC (rev 6139)
+++ bricolage/branches/dev_cssify/comp/widgets/story_prof/edit_meta.html 2005-01-12 \
02:03:26 UTC (rev 6140) @@ -241,29 +241,18 @@
);
}
-$m->out("$ieSpacer<br />\n");
-
$m->comp("/widgets/wrappers/sharky/table_top.mc",
caption => "Associations",
number => $num++);
</%perl>
-<table border=0 width=578 cellpadding=0 cellspacing=0>
-<tr>
- <td width=20 class="medHeader"><img src="/media/images/spacer.gif" width="20" \
height="20" /></td>
- <td width=100 class="medHeader"><span class="label"><% $lang->maketext('Type') \
%></span></td>
- <td width=1><img src="/media/images/spacer.gif" width="1" height="20" /></td>
- <td width=376 class="medHeader"><span class="label"> <% \
$lang->maketext('Values') %></span></td>
- <td width=1><img src="/media/images/spacer.gif" width="1" height="20" /></td>
- <td width=80 class="medHeader" align="center"><span class="label"> <% \
$lang->maketext('Action') %></span></td>
-</tr>
-</table>
+% my $rowColor = "even";
+<table class="associations">
% if (ENABLE_CATEGORY_BROWSER) {
-<table border=0 width=578 cellpadding=0 cellspacing=0>
-<tr>
- <td width=120 align=right valign=top><span class=label><% \
$lang->maketext('Categories') %>: </span></td>
- <td width=378 valign=top>
-<%perl>
+% $rowColor = $rowColor eq "odd" ? "even" : "odd";
+<tr class="<% $rowColor %>">
+<th><% $lang->maketext('Categories') %>:</th>
+<td><%perl>
my @cats;
my $primary_cat_uri = $story->get_primary_category->get_uri;
push @cats, $primary_cat_uri;
@@ -271,28 +260,45 @@
push @cats, $cat->get_uri;
}
$m->out(scalar(@cats) ? join('<br />', @cats) : $lang->maketext("No categories \
defined."));
-</%perl>
- </td>
- <td width=80 align="center" valign=top><& '/widgets/profile/imageSubmit.mc',
- formName => "theForm",
- callback => "$widget|categories_cb",
- image => "edit_lgreen",
- vspace => 4
-&></td>
+</%perl></td>
+<td class="edit"><& '/widgets/profile/button.mc',
+ disp => $lang->maketext("Edit"),
+ widget => $widget,
+ cb => 'categories_cb',
+ button => 'pencil',
+ useTable => 0,
+ globalImage => 1 &></td>
</tr>
-</table>
+% }
-<table border="0" cellpadding="0" cellspacing="0" width="578">
-<tr><td class="medHeader"><img src="/media/images/spacer.gif" width="578" height="1" \
/></td></tr>
-</table>
+% $rowColor = $rowColor eq "odd" ? "even" : "odd";
+<tr class="<% $rowColor %>">
+<th><% $lang->maketext('Keywords') %>:</th>
+<td><%perl>
+my @contribs;
+foreach my $cntr ($story->get_contributors) {
+ push @contribs, $cntr->get_name;
+}
+$m->out(scalar(@contribs) ? join(", ", @contribs) : $lang->maketext("No contributors \
defined."));
-% } # if ENABLE_CATEGORY_BROWSER
+</%perl></td>
+<td class="edit">
+% unless ($story->get_alias_id) {
+<& '/widgets/profile/button.mc',
+ disp => $lang->maketext("Edit"),
+ widget => $widget,
+ cb => 'contributors_cb',
+ button => 'pencil',
+ useTable => 0,
+ globalImage => 1 &>
+% }
+</td>
+</tr>
-<table border=0 width=578 cellpadding=0 cellspacing=0>
-<tr>
- <td width=120 align=right valign=top><span class=label><% \
$lang->maketext('Keywords') %>: </span></td>
- <td width=378 valign=top>
-<%perl>
+% $rowColor = $rowColor eq "odd" ? "even" : "odd";
+<tr class="<% $rowColor %>">
+<th><% $lang->maketext('Contributors') %>:</th>
+<td><%perl>
my @keywords;
foreach my $kw ($story->get_keywords) {
push @keywords, $kw->get_name;
@@ -300,51 +306,18 @@
$m->out(scalar(@keywords) ? join(", ", @keywords) : $lang->maketext("No keywords \
defined."));
-</%perl>
- </td>
- <td width=80 align="center" valign=top><& '/widgets/profile/imageSubmit.mc',
- formName => "theForm",
- callback => "$widget|keywords_cb",
- image => "edit_lgreen",
- vspace => 4
-&></td>
+</%perl></td>
+<td class="edit"><& '/widgets/profile/button.mc',
+ disp => $lang->maketext("Edit"),
+ widget => $widget,
+ cb => 'keywords_cb',
+ button => 'pencil',
+ useTable => 0,
+ globalImage => 1 &></td>
</tr>
</table>
-
-<table border="0" cellpadding="0" cellspacing="0" width="578">
-<tr><td class="medHeader"><img src="/media/images/spacer.gif" width="578" height="1" \
/></td></tr>
-</table>
-
-<table border=0 cellpadding=0 cellspacing=0 width=578>
-<tr>
- <td align="right" width="120" valign="top"><span class="label"><% \
$lang->maketext('Contributors') %>: </span></td>
- <td width="378" valign="top">
-
<%perl>
-my @contribs;
-foreach my $cntr ($story->get_contributors) {
- push @contribs, $cntr->get_name;
-}
-$m->out(scalar(@contribs) ? join(", ", @contribs) : $lang->maketext("No contributors \
defined."));
-</%perl>
- </td>
- <td width="80" align="center" valign="top">
-% if ($story->get_alias_id) {
-<img src="/media/images/spacer.gif" height="20" />
-% } else {
-<& /widgets/profile/imageSubmit.mc,
- formName => "theForm",
- callback => $widget . "|contributors_cb",
- image => "edit_lgreen",
- vspace => 3
-&>
-% }
-</td>
-</tr>
-</table>
-<%perl>
-
$m->comp("/widgets/wrappers/sharky/table_bottom.mc");
$m->comp("/widgets/profile/buttonBar.mc",
Modified: bricolage/branches/dev_cssify/comp/workflow/profile/media/container/edit.html
===================================================================
--- bricolage/branches/dev_cssify/comp/workflow/profile/media/container/edit.html 2005-01-10 \
23:47:56 UTC (rev 6139)
+++ bricolage/branches/dev_cssify/comp/workflow/profile/media/container/edit.html 2005-01-12 \
02:03:26 UTC (rev 6140) @@ -41,7 +41,7 @@
title => "$disp Profile",
context => $context . get_state_data('container_prof', 'crumb')
&>
-<form method="post" action="<% $r->uri %>" name="theForm" \
enctype="multipart/form-data" onSubmit="return confirmChanges(this)"> +<form \
method="post" action="<% $r->uri %>" name="theForm" enctype="multipart/form-data" \
onsubmit="return confirmChanges(this)">
<& /widgets/container_prof/container_prof.mc,
tile_type => 'media',
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic