ref: refs/heads/master
commit e1142320a11687029b4c7db197c2a32d30b4831c
Author: Robert Lihm
Date: Wed Jul 22 13:34:59 2009 +0200
Added style for "New WebYasST Host" Form
---
webclient/app/views/controlpanel/index.rhtml | 1 -
webclient/app/views/hosts/new.html.erb | 101 ++++++++++++++------------
webclient/public/stylesheets/style.css | 42 ++++++++---
3 files changed, 85 insertions(+), 59 deletions(-)
diff --git a/webclient/app/views/controlpanel/index.rhtml b/webclient/app/views/controlpanel/index.rhtml
index 014247c..e2543f2 100644
--- a/webclient/app/views/controlpanel/index.rhtml
+++ b/webclient/app/views/controlpanel/index.rhtml
@@ -43,7 +43,6 @@
<div class="list-row overview">
<% @shortcuts.each do |name, data| %>
- <% logger.debug data.inspect %>
<% if line_counter*5 == shortcuts_counter %>
<% if line_counter > 0 %>
</div>
diff --git a/webclient/app/views/hosts/new.html.erb b/webclient/app/views/hosts/new.html.erb
index e358ee2..62557a4 100644
--- a/webclient/app/views/hosts/new.html.erb
+++ b/webclient/app/views/hosts/new.html.erb
@@ -1,49 +1,54 @@
-<h1><%=_("New WebYaST Host")%></h1>
-
-<script type="text/javascript">
-$(document).ready(function() {
- $("#new_host").validate({
- rules: {
- "host[name]" : { required : true },
- "host[url]": {
- required: true,
- remote: "/validate_uri"
- }
- },
- // set this class to error-labels to indicate valid fields
- success: function(label) {
- // set as text for IE
- label.html(" ").addClass("checked");
- }
- });
-});
-</script>
-
-<% form_for(@host) do |f| %>
- <%= f.error_messages %>
-
- <div class="table">
- <img src="/images/bg-th-left.gif" width="8" height="7" class="left" />
- <img src="/images/bg-th-right.gif" width="7" height="7" class="right" />
- <table class="listing form" cellpadding="0" cellspacing="0">
- <tr>
- <th class="full" colspan="2"><%=_("WebYaST-Host")%></th>
- </tr>
- <!-- FIXME: move to a partial and share with 'edit' -->
- <tr>
- <td class="first" width="20"><strong><%=_("Name")%></strong></td>
- <td class="last"><%= f.text_field :name, :class => "required" %></td>
- </tr>
- <tr>
- <td class="first" width="30"><strong><%=_("Url")%></strong></td>
- <td class="last"><%= f.text_field :url %></td>
- </tr>
- <tr class="bg">
- <td class="first"><strong><%=_("Description")%></strong></td>
- <td class="last"><%= f.text_field :description %></td>
- </tr>
- </table>
- <p><%= f.submit _("Create") %></p>
+<div class="dialoge-wrapper">
+ <div class="dialoge-sub-wrapper">
+
+ <h2><%=_("New WebYaST Host")%></h2>
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#new_host").validate({
+ rules: {
+ "host[name]" : { required : true },
+ "host[url]": {
+ required: true,
+ remote: "/validate_uri"
+ }
+ },
+ // set this class to error-labels to indicate valid fields
+ success: function(label) {
+ // set as text for IE
+ label.html(" ").addClass("checked");
+ }
+ });
+ });
+ </script>
+
+ <% form_for(@host) do |f| %>
+ <%= f.error_messages %>
+
+ <div class="table">
+
+ <p>
+ <label for="host_name"><%=_("Name")%></label>
+ <%= f.text_field :name, :class => "required" %>
+ </p>
+
+ <p>
+ <label for="host_url"><%=_("Url")%></label>
+ <%= f.text_field :url %>
+ </p>
+
+ <p>
+ <label for="host_description"><%=_("Description")%></label>
+ <%= f.text_field :description %>
+ </p>
+
+ <p class="dialogue-footer">
+ <%= link_to _('Cancel'), hosts_path, :class => "button" %>
+ <%= f.submit _("Create"), :class => "button" %>
+ </p>
+ </div>
+ <% end %>
+
</div>
-<% end %>
-<%= link_to _('Cancel'), hosts_path, :class => "button" %>
+</div>
+
diff --git a/webclient/public/stylesheets/style.css b/webclient/public/stylesheets/style.css
index a10ca37..b7bcb3a 100644
--- a/webclient/public/stylesheets/style.css
+++ b/webclient/public/stylesheets/style.css
@@ -138,7 +138,8 @@ input:focus {
color: #06c;
}
-#login-dialogue {
+#login-dialogue,
+.dialoge-wrapper {
width: 23em;
min-height: 17em; /* FIXME not working in IE6 */
background: #999;
@@ -153,7 +154,11 @@ input:focus {
-webkit-box-shadow: 0 1px 7px #999;
box-shadow: 0 1px 7px #999;
}
- #login-dialogue form {
+ .dialoge-wrapper {
+ width: 500px;
+ }
+ #login-dialogue form,
+ .dialoge-sub-wrapper {
display: block;
background: #fefefe;
padding: 15px;
@@ -163,8 +168,9 @@ input:focus {
#login-dialogue input {
width: 97%;
}
- #login-dialogue h2 {
- margin: 0;
+ #login-dialogue h2,
+ .dialoge-wrapper h2 {
+ margin: 0 !important;
color: #69c;
}
#login-dialogue label {
@@ -253,10 +259,24 @@ ul.list-2level-inline ul {
/* == Form Styles ======================================================= */
+label {
+ display: block;
+ margin: 0.2em 0;
+}
+
#login_button {
float: right;
}
+.dialoge-wrapper input[type="text"] {
+ width: 99%;
+}
+.dialogue-footer {
+ margin: 0;
+ padding-top: 15px;
+ text-align: center;
+}
+
/* == Helper Styles ======================================================= */
.grey-bg {
background-color: #f6f6f6;
@@ -276,12 +296,14 @@ input.button {
-webkit-border-radius: 3px;
width: auto !important;
}
-a.button:hover,
-input.button:hover {
- background-color: #ccc;
- text-shadow: 0 -1px 0 #666;
-}
-
+ a.button:hover,
+ input.button:hover {
+ background-color: #ccc;
+ text-shadow: 0 -1px 0 #666;
+ }
+ input.button {
+ padding: 2px 9px;
+ }
/* ==Status Icons ==*/
/* -- HTML Example --
<div class="status-icon ok"></div>
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org