Move more styling into CSS and make it support RTL layout

This commit is contained in:
Tom Hughes 2011-07-02 11:22:19 +01:00
parent d075fc4c1f
commit aca299ecee
8 changed files with 53 additions and 13 deletions

View file

@ -29,11 +29,11 @@
<div id="attribution"> <div id="attribution">
<table width="100%"> <table width="100%">
<tr> <tr>
<td align="left"><%= t'site.index.license.license_url' %></td> <td class="attribution_license"><%= t'site.index.license.license_url' %></td>
<td align="right"><%= t'site.index.license.project_url' %></td> <td class="attribution_project"><%= t'site.index.license.project_url' %></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" align="center"><%= <td colspan="2" class="attribution_notice"><%=
t'site.index.license.notice', t'site.index.license.notice',
:license_name => t('site.index.license.license_name'), :license_name => t('site.index.license.license_name'),
:project_name => t('site.index.license.project_name') :project_name => t('site.index.license.project_name')

View file

@ -33,7 +33,7 @@
</tr> </tr>
<tr> <tr>
<td class="fieldName" valign="top"><%= t 'user.account.public editing.heading' %></td> <td class="fieldName"><%= t 'user.account.public editing.heading' %></td>
<td> <td>
<% if @user.data_public? %> <% if @user.data_public? %>
<%= t 'user.account.public editing.enabled' %> <span class="minorNote">(<a href="<%= t 'user.account.public editing.enabled link' %>" target="_new"><%= t 'user.account.public editing.enabled link text' %></a>)</span> <%= t 'user.account.public editing.enabled' %> <span class="minorNote">(<a href="<%= t 'user.account.public editing.enabled link' %>" target="_new"><%= t 'user.account.public editing.enabled link text' %></a>)</span>
@ -44,7 +44,7 @@
</tr> </tr>
<tr> <tr>
<td class="fieldName" valign="top"><%= t 'user.account.contributor terms.heading' %></td> <td class="fieldName"><%= t 'user.account.contributor terms.heading' %></td>
<td> <td>
<% if @user.terms_agreed? %> <% if @user.terms_agreed? %>
<%= t 'user.account.contributor terms.agreed' %> <%= t 'user.account.contributor terms.agreed' %>
@ -62,22 +62,22 @@
</tr> </tr>
<tr> <tr>
<td class="fieldName" valign="top"><%= t 'user.account.profile description' %></td> <td class="fieldName"><%= t 'user.account.profile description' %></td>
<td><%= f.text_area :description, :rows => '5', :cols => '60' %></td> <td><%= f.text_area :description, :rows => '5', :cols => '60' %></td>
</tr> </tr>
<tr> <tr>
<td class="fieldName" valign="top"><%= t 'user.account.preferred languages' %></td> <td class="fieldName"><%= t 'user.account.preferred languages' %></td>
<td><%= f.text_field :languages %></td> <td><%= f.text_field :languages %></td>
</tr> </tr>
<tr> <tr>
<td class="fieldName" valign="top"><%= t 'user.account.preferred editor' %></td> <td class="fieldName"><%= t 'user.account.preferred editor' %></td>
<td><%= f.select :preferred_editor, [[t("editor.default", :name => t("editor.#{DEFAULT_EDITOR}.name")), 'default']] + Editors::ALL_EDITORS.collect { |e| [t("editor.#{e}.description"), e] } %></td> <td><%= f.select :preferred_editor, [[t("editor.default", :name => t("editor.#{DEFAULT_EDITOR}.name")), 'default']] + Editors::ALL_EDITORS.collect { |e| [t("editor.#{e}.description"), e] } %></td>
</tr> </tr>
<tr> <tr>
<td class="fieldName" valign="top"> <td class="fieldName">
<%= t 'user.account.image' %> <%= t 'user.account.image' %>
</td> </td>
<td valign="top"> <td valign="top">
@ -119,7 +119,7 @@
<tr> <tr>
<td></td> <td></td>
<td align=right><br/><%= submit_tag t('user.account.save changes button') %></td> <td class="submitButton"><%= submit_tag t('user.account.save changes button') %></td>
</tr> </tr>
</table> </table>
<% end %> <% end %>

View file

@ -8,6 +8,9 @@
<td class="fieldName"><%= t 'user.lost_password.email address' %></td> <td class="fieldName"><%= t 'user.lost_password.email address' %></td>
<td><%= text_field('user', 'email', {:size => 50, :maxlength => 255, :tabindex => 1} ) %></td> <td><%= text_field('user', 'email', {:size => 50, :maxlength => 255, :tabindex => 1} ) %></td>
</tr> </tr>
<tr><td></td><td align="right"><input type="submit" value="<%= t'user.lost_password.new password button' %>" tabindex="2"></td></tr> <tr>
<td></td>
<td class="submitButton"><input type="submit" value="<%= t'user.lost_password.new password button' %>" tabindex="2"></td>
</tr>
</table> </table>
<% end %> <% end %>

View file

@ -68,7 +68,7 @@
<tr> <tr>
<td></td> <td></td>
<td align="right"><%= submit_tag t('user.new.continue'), :tabindex => 6 %></td> <td class="submitButton"><%= submit_tag t('user.new.continue'), :tabindex => 6 %></td>
</tr> </tr>
</table> </table>
<% end %> <% end %>

View file

@ -9,6 +9,6 @@
<tr><td class="fieldName"><%= t 'user.reset_password.confirm password' %></td><td><%= password_field(:user, :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255, :tabindex => 5}) %></td></tr> <tr><td class="fieldName"><%= t 'user.reset_password.confirm password' %></td><td><%= password_field(:user, :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255, :tabindex => 5}) %></td></tr>
<tr><td colspan=2>&nbsp;<!--vertical spacer--></td></tr> <tr><td colspan=2>&nbsp;<!--vertical spacer--></td></tr>
<tr><td></td><td align=right><input type="submit" value="<%= t'user.reset_password.reset' %>" tabindex="6"></td></tr> <tr><td></td><td class="submitButton"><input type="submit" value="<%= t'user.reset_password.reset' %>" tabindex="6"></td></tr>
</table> </table>
<% end %> <% end %>

View file

@ -384,6 +384,10 @@ hr {
display: none; display: none;
} }
.attribution_notice {
text-align: center;
}
/* Rules for the popout map sidebar */ /* Rules for the popout map sidebar */
#sidebar { #sidebar {
@ -780,6 +784,10 @@ p#contributorGuidance {
display: inline !important; display: inline !important;
} }
#accountForm input[type=submit] {
margin-top: 15px;
}
/* Rules for the user view */ /* Rules for the user view */
#user_details .user_map { #user_details .user_map {
@ -893,6 +901,7 @@ p#contributorGuidance {
/* Rules for forms */ /* Rules for forms */
.fieldName { .fieldName {
vertical-align: top;
font-weight: bold; font-weight: bold;
} }

View file

@ -104,6 +104,16 @@ html body {
text-align: left; text-align: left;
} }
/* Rules for attribution text under the main map shown on printouts */
.attribution_license {
text-align: left;
}
.attribution_project {
text-align: right;
}
/* Rules for the popout map sidebar */ /* Rules for the popout map sidebar */
#sidebar { #sidebar {
@ -227,6 +237,10 @@ form#termsForm input#agree {
text-align: right; text-align: right;
} }
.submitButton {
text-align: right;
}
input.openid_url { input.openid_url {
background: url('../images/openid_input.png') repeat-y left white; background: url('../images/openid_input.png') repeat-y left white;
padding-left: 16px; padding-left: 16px;

View file

@ -111,6 +111,16 @@ html body {
text-align: right; text-align: right;
} }
/* Rules for attribution text under the main map shown on printouts */
.attribution_license {
text-align: right;
}
.attribution_project {
text-align: left;
}
/* Rules for the popout map sidebar */ /* Rules for the popout map sidebar */
#sidebar { #sidebar {
@ -234,6 +244,10 @@ form#termsForm input#agree {
text-align: left; text-align: left;
} }
.submitButton {
text-align: left;
}
input.openid_url { input.openid_url {
background: url('../images/openid_input.png') repeat-y right white; background: url('../images/openid_input.png') repeat-y right white;
padding-right: 16px; padding-right: 16px;