ref: refs/heads/master commit 9ebea32e4f73c68e208ccf1d1e6297e232ddeca5 Author: Martin Schmidkunz <mschmidkunz@suse.de> Date: Mon Oct 26 14:39:21 2009 +0100 form formatting adjustments --- .../app/views/administrator/index.html.erb | 37 +++++++-------- plugins/language/app/views/language/index.rhtml | 9 +++- .../app/views/mail_settings/index.html.erb | 47 +++++++++----------- plugins/network/app/views/network/index.html.erb | 15 +++--- webclient/app/views/layouts/main.rhtml | 2 +- webclient/public/javascripts/script.js | 18 ++++++++ 6 files changed, 71 insertions(+), 57 deletions(-) diff --git a/plugins/administrator/app/views/administrator/index.html.erb b/plugins/administrator/app/views/administrator/index.html.erb index 4403c8e..2f11688 100644 --- a/plugins/administrator/app/views/administrator/index.html.erb +++ b/plugins/administrator/app/views/administrator/index.html.erb @@ -49,27 +49,24 @@ <% disabled = ! @permissions[:write] %> -<div class="table"> <% form_for(:administrator, @administrator, :url => { :action => "update" }, :html => { :method => :put, :id => "adminForm" } ) do |f| %> - <table class="list"> <%= f.error_messages %> - <tr class="bg"> - <td class="first"><%=_("Password")%></td> - <td class="last"><%= f.password_field :password, :disabled => disabled %></td> - </tr> - <tr class="bg"> - <td class="first"><%=_("Confirm password")%></td> - <td class="last"><%= f.password_field :confirm_password, :disabled => disabled, :equalTo => "#administrator_password" %></td> - <td><%= f.submit _("Save"), :name => "save_password", :disabled => disabled, :onclick=>"return $('#adminForm').validate().element('#administrator_confirm_password');", :class=>'cancel' %></td> - </tr> - <tr class="bg"> - <td class="first"><%=_("Forward mail to")%></td> - <td class="last"><%= f.text_field :aliases, :disabled => disabled, :class => "emails" %></td> - <td><%= f.submit _("Save"), :name => "save_aliases", :disabled => disabled, :onclick=>"return $('#adminForm').validate().element('#administrator_aliases');", :class=>'cancel' %></td> - </tr> - <tr> - <td><%= form_send_buttons :onclick=>"alias_valid = $('#adminForm').validate().element('#administrator_aliases'); return $('#adminForm').validate().element('#administrator_confirm_password') && alias_valid;" %></td> - </tr> - </table> + <fieldset> + <p><label><%=_("Password")%></label> + <%= f.password_field :password, :disabled => disabled %> + </p> + <p> + <label><%=_("Confirm password")%></label> + <%= f.password_field :confirm_password, :disabled => disabled, :equalTo => "#administrator_password" %> + <%= f.submit _("Save"), :name => "save_password", :disabled => disabled, :onclick=>"return $('#adminForm').validate().element('#administrator_confirm_password');", :class=>'cancel' %> + </p> + <p> + <label><%=_("Forward mail to")%></label> + <%= f.text_field :aliases, :disabled => disabled, :class => "emails" %> + <%= f.submit _("Save"), :name => "save_aliases", :disabled => disabled, :onclick=>"return $('#adminForm').validate().element('#administrator_aliases');", :class=>'cancel' %> + </p> + </fieldset> + <p><%= form_send_buttons :onclick=>"alias_valid = $('#adminForm').validate().element('#administrator_aliases'); return $('#adminForm').validate().element('#administrator_confirm_password') && alias_valid;" %> + </p> <% end %> </div> diff --git a/plugins/language/app/views/language/index.rhtml b/plugins/language/app/views/language/index.rhtml index 8f94da4..484e89d 100644 --- a/plugins/language/app/views/language/index.rhtml +++ b/plugins/language/app/views/language/index.rhtml @@ -5,13 +5,16 @@ <% form_tag '/language/update' do -%> <fieldset id="" class=""> - <p><%=_("First language")%> + <p> +<label><%=_("First language")%></label> <%= select_tag :first_language, options_for_select(@valid||[], @current||""), :disabled=>!@permissions[:write] %> - <p> <%=_("Use UTF8 encoding")%> + <p> +<label><%=_("Use UTF8 encoding")%></label> <%= check_box_tag :utf8, "true", @utf8=="true", :disabled=>!@permissions[:write] %></p> - <p><%=_("Set root locale")%> + <p> +<label><%=_("Set root locale")%></label> <%= select_tag :rootlocale, options_for_select(["true","false","ctype"], @rootlocale), :disabled=>!@permissions[:write] %> </p> diff --git a/plugins/mail_settings/app/views/mail_settings/index.html.erb b/plugins/mail_settings/app/views/mail_settings/index.html.erb index 71f764a..8bb9793 100644 --- a/plugins/mail_settings/app/views/mail_settings/index.html.erb +++ b/plugins/mail_settings/app/views/mail_settings/index.html.erb @@ -34,33 +34,28 @@ <% disabled = ! @permissions[:write] %> -<div class="table"> +<fieldset id="" class=""> + <% form_for(:mail_settings, @mail_settings, :url => { :action => "update" }, :html => { :method => :put, :id => "mailForm" } ) do |f| %> - <table class="list"> <%= f.error_messages %> - <tr class="bg"> - <td class="first"><%=_("Outgoing mail server (SMTP)")%></strong></td> - <td class="last"><%= f.text_field :smtp_server, :disabled => disabled, :class => "smtp_server" %></td> - </tr> - <tr class="bg"> - <td class="first"><%=_("Transport Layer Security (TLS)")%></td> - <td class="last"><%= f.select :transport_layer_security, [ [_("Disabled"), "NONE" ], [_("If available"), "MAY"], [_("Always"), "MUST"]], :disabled => disabled %></td> - </tr> - <tr class="bg"> - <td class="first"><%=_("User name")%></td> - <td class="last"><%= f.text_field :user, :disabled => disabled %></td> - </tr> - <tr class="bg"> - <td class="first"><%=_("Password")%></td> - <td class="last"><%= f.password_field :password, :disabled => disabled %></td> - </tr> - <tr class="bg"> - <td class="first"><%=_("Confirm Password")%></td> - <td class="last"><%= f.password_field :confirm_password, :disabled => disabled, :equalTo => "#mail_settings_password" %></td> - </tr> - <tr> - <td><%= form_send_buttons :onclick=>"Element.show('progress')" %></td> - </tr> - </table> + <p> + <label for="<%= :smtp_server %>"><%=_("Outgoing mail server (SMTP)")%></label> + <%=f.text_field :smtp_server, :disabled => disabled, :class => "smtp_server" %></p> + <p> + <label><%=_("Transport Layer Security (TLS)")%></label> + <%= f.select :transport_layer_security, [ [_("Disabled"), "NONE" ], [_("If available"), "MAY"], [_("Always"), "MUST"]], :disabled => disabled %></p> + <p> + <label><%=_("User name")%></label> + <%= f.text_field :user, :disabled => disabled %></p> + <p> + <label><%=_("Password")%></label> + <%= f.password_field :password, :disabled => disabled %></p> + <p> + <label><%=_("Confirm Password")%></label> + <%= f.password_field :confirm_password, :disabled => disabled, :equalTo => "#mail_settings_password" %></p> + </fieldset> + <p> + <%= form_send_buttons :onclick=>"Element.show('progress')" %> + </p> <% end %> </div> diff --git a/plugins/network/app/views/network/index.html.erb b/plugins/network/app/views/network/index.html.erb index 8e20c1f..2b93849 100644 --- a/plugins/network/app/views/network/index.html.erb +++ b/plugins/network/app/views/network/index.html.erb @@ -65,8 +65,10 @@ <% form_tag("/network", :method => "get") do %> <!-- (collection, value, text, selected) --> + +<!-- temporally disabled - 2009-10-26 rlihm <fieldset id="" class=""> - <legend><%=_("Interface")%></legend> + <legend><%= _("Interface")%></legend> <p> <%= select_tag(:interface, options_from_collection_for_select(@ifcs, :id, :id, @iface)) %> </p> @@ -74,18 +76,17 @@ <%= submit_tag(_("Select"), :class => "button") %> </p> </fieldset> + --> <% end %> -<% form_for(:network, @network, :url => { :action => "update" }, :html => { :method => :put, :onsubmit => "return validateNetwork();" }) do |n| %> +<% form_for(:network, @network, :url => { :action => "update" }, :class => 'ui-tab-parent', :html => { :method => :put, :onsubmit => "return validateNetwork();" }) do |n| %> <%= n.error_messages %> <!-- ~/svn/web-client/plugins/systemtime/app/views/systemtime/index.rhtml --> <input type="hidden" id="interface" name="interface" value="<%= @iface %>"> - - - <fieldset id="" class=""> + <fieldset id="ip-address" class=""> <legend><%=_("IP address")%></legend> <p> <label for="<%= :conf_mode %>"><%=_("Configuration mode")%></label> @@ -100,7 +101,7 @@ <%=text_field_tag :netmask, @netmask, :disabled => static_disabled %> </p> </fieldset> - <fieldset id="" class=""> + <fieldset id="dns" class=""> <legend><%=_("DNS")%></legend> <p> <label for="<%= :name %>"><%=_("Hostname")%></label> @@ -120,7 +121,7 @@ </p> </fieldset> - <fieldset id="" class=""> + <fieldset id="routing" class="ui-tab"> <legend><%=_("Routing")%></legend> <p> <label for="<%= :default_route %>"><%=_("Default route")%></label> diff --git a/webclient/app/views/layouts/main.rhtml b/webclient/app/views/layouts/main.rhtml index b0db749..4959487 100644 --- a/webclient/app/views/layouts/main.rhtml +++ b/webclient/app/views/layouts/main.rhtml @@ -87,7 +87,7 @@ <% flash.delete flash_type -%> <% end %> </div> <!-- flash messages --> - +<br> <div id="progress" style="display:none;"> <%= image_tag("/images/working.gif") %><%=_("...Wait...")%> </div> diff --git a/webclient/public/javascripts/script.js b/webclient/public/javascripts/script.js index cbc241e..57566cd 100644 --- a/webclient/public/javascripts/script.js +++ b/webclient/public/javascripts/script.js @@ -10,4 +10,22 @@ $(document).ready(function() { // Alternating Lines in "Tables" $('.alternate-rows > li:even').addClass('alt-bg'); + +// Tab-UI ==================================================================== + +$('.ui-tab-parent').tabs(); + +$('.ui-tab-parent').bind('tabsselect', function(event, ui) { + + // Objects available in the function context: + // ui.tab // anchor element of the selected (clicked) tab + // ui.panel // element, that contains the selected/clicked tab contents + // ui.index // zero-based index of the selected (clicked) tab + + + +}); + + + }); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org