Merge lp://staging/~danilo/launchpad/bug-423136 into lp://staging/launchpad

Proposed by Данило Шеган
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~danilo/launchpad/bug-423136
Merge into: lp://staging/launchpad
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~danilo/launchpad/bug-423136
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+11051@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

= Bug #423136 =

To do top alignment, I did a crappy thing by using absolute/relative
positioning. I should have just used float:left to stack span's one
next to each other so they end up top-aligned.

(Got a tip from a web coder friend sharing the office with me, and
since tested in Epiphany, Firefox 3.0, Konqueror, Opera and Chromium to
DTRT).

In appearance, nothing changes.

== Tests ==

bin/test -vvt potemplate-export -t stories.translationgroups

(55-rosetta-pofile-upload is part of translationgroups story)

== Demo and Q/A ==

https://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/+export
https://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+upload

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/icing/style-3-0.css
  lib/lp/translations/templates/pofile-upload.pt
  lib/lp/translations/templates/potemplate-export.pt

Revision history for this message
Gavin Panella (allenap) wrote :

This all looks good, with the addition of the clear:both rule you figured out to fix rendering in Chromium.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-09-01 16:19:19 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-09-02 13:06:48 +0000
@@ -717,27 +717,28 @@
717717
718/* Provide top-alignment for radio boxes and longer explanations718/* Provide top-alignment for radio boxes and longer explanations
719 * without using tables.719 * without using tables.
720 *
721 * Examples:
722 * https://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+upload
723 * https://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/+export
720 */724 */
721form.translations div.fields div.alignment {
722 position: relative;
723}
724form.translations div.alignment div.top-alignment {
725 position: absolute;
726 top: 0px;
727}
728form.translations div.alignment .spacer {
729 visibility: hidden;
730}
731form.translations div.alignment .content {725form.translations div.alignment .content {
732 display: inline-block;726 float:left;
733 margin-left: 0px;727}
734}728form.translations div.alignment .selector {
735729 margin-right: 0.5em;
730 float: left;
731 clear: both;
732}
736form.translations div.alignment .content label {733form.translations div.alignment .content label {
737 padding: 0px;734 padding: 0px;
738 margin: 0px;735 margin: 0px;
739 font-weight: bold;736 font-weight: bold;
740}737}
738form.translations div.alignment .secondary label {
739 font-weight: normal;
740 padding: 2px 1em 2px 2px;
741}
741742
742table.narrow-listing {743table.narrow-listing {
743 width: 45em;744 width: 45em;
744745
=== modified file 'lib/lp/translations/templates/pofile-upload.pt'
--- lib/lp/translations/templates/pofile-upload.pt 2009-08-31 13:10:50 +0000
+++ lib/lp/translations/templates/pofile-upload.pt 2009-09-02 11:59:45 +0000
@@ -28,32 +28,21 @@
28 <h2>What kind of upload is this?</h2>28 <h2>What kind of upload is this?</h2>
29 <div class="fields">29 <div class="fields">
30 <div class="alignment">30 <div class="alignment">
31 <div class="top-alignment">
32 <input id="user_type" name="upload_type" type="radio"
33 value="user" checked="checked" />
34 </div>
35 <!-- Preserve space for the input box -->
36 <input type="radio" class="spacer" />
3731
32 <input id="user_type" name="upload_type" type="radio"
33 value="user" checked="checked" class="selector"/>
38 <span class="content">34 <span class="content">
39 <label for="user_type">35 <label for="user_type">
40 Updated translation36 Updated translation
41 </label>37 </label>
42 <p class="discreet">38 <p class="discreet">
43 You have exported a PO file from Launchpad, worked on it off-line,39 You have exported a PO file from Launchpad, worked on it
44 and now you want to contribute your updates back.40 off-line, and now you want to contribute your updates back.
45 </p>41 </p>
46 </span>42 </span>
47 </div>43
4844 <input id="upstream_type" name="upload_type" type="radio"
49 <div class="alignment">45 value="upstream" class="selector"/>
50 <div class="top-alignment">
51 <input id="upstream_type" name="upload_type" type="radio"
52 value="upstream" />
53 </div>
54 <!-- Preserve space for the input box -->
55 <input type="radio" class="spacer" />
56
57 <span class="content">46 <span class="content">
58 <label for="upstream_type">47 <label for="upstream_type">
59 Imported translation48 Imported translation
6049
=== modified file 'lib/lp/translations/templates/potemplate-export.pt'
--- lib/lp/translations/templates/potemplate-export.pt 2009-08-31 13:06:42 +0000
+++ lib/lp/translations/templates/potemplate-export.pt 2009-09-02 13:06:48 +0000
@@ -18,26 +18,20 @@
18 <form action="" method="post" class="translations">18 <form action="" method="post" class="translations">
1919
20 <div class="fields">20 <div class="fields">
21 <div>21 <div class="alignment">
22 <label>22 <div>
23 <label>
23 <input name="what" type="radio" value="all"24 <input name="what" type="radio" value="all"
24 checked="checked" />25 checked="checked" />
25 Everything26 Everything
26 </label>
27 </div>
28
29 <div class="alignment">
30 <div class="top-alignment">
31 <label>
32 <input name="what" type="radio" value="some" />
33 Selected files:
34 </label>27 </label>
35 </div>28 </div>
36 <span class="spacer">29
37 <!-- preserve space for the actual radio button and label -->30 <label class="selector">
38 <label><input type="radio" />Selected files.</label>31 <input name="what" type="radio" value="some" />
39 </span>32 Selected files:
40 <span class="listbox" style="margin-left: 1.5em;">33 </label>
34 <div class="listbox content secondary">
41 <div>35 <div>
42 <label>36 <label>
43 <input type="checkbox" name="potemplate" />37 <input type="checkbox" name="potemplate" />
@@ -53,8 +47,9 @@
53 </label>47 </label>
54 </div>48 </div>
55 </tal:thing>49 </tal:thing>
56 </span>50 </div>
57 </div>51 </div>
52 <div style="clear:both;">&nbsp;</div>
58 </div>53 </div>
59 <h2>Choose file format for the export</h2>54 <h2>Choose file format for the export</h2>
60 <div class="fields">55 <div class="fields">
6156