ref: refs/heads/use-activeresource
commit 16152090e1eb004e425414c01b67b41233c8a591
Author: Stefan Schubert
Date: Tue Sep 15 16:03:59 2009 +0200
using popup for language selection
---
.../views/controlpanel/_select_language.html.erb | 21 +++++++++++++++++++-
webclient/app/views/layouts/main.rhtml | 6 +++-
.../vendor/plugins/lang_helper/lib/lang_helper.rb | 2 +-
3 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/webclient/app/views/controlpanel/_select_language.html.erb b/webclient/app/views/controlpanel/_select_language.html.erb
index bb25355..e97ef9d 100644
--- a/webclient/app/views/controlpanel/_select_language.html.erb
+++ b/webclient/app/views/controlpanel/_select_language.html.erb
@@ -1,4 +1,23 @@
<div class="language_selection">
- <%= show_language %>
+ <div id="language_icons">
+ <div>
+ <%= show_language %>
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(document).ready(
+ function() {
+ // define a dialog with available language icons
+ $('#language_icons').dialog(
+ {
+ bgiframe: true,
+ autoOpen: false,
+ height: 300,
+ modal: true
+ });
+ $('#language_icons').dialog('open');
+ });
+ </script>
</div>
diff --git a/webclient/app/views/layouts/main.rhtml b/webclient/app/views/layouts/main.rhtml
index d0c36eb..b0db749 100644
--- a/webclient/app/views/layouts/main.rhtml
+++ b/webclient/app/views/layouts/main.rhtml
@@ -47,7 +47,7 @@
if host.blank? || user.blank? -%>
<% else -%>
<ul>
- <li><%= link_to_remote ( image_tag(current_locale_image, :size => "16x11", :alt => "#{current_locale}"),
+ <li><%= link_to_remote( image_tag(current_locale_image, :size => "16x11", :alt => "#{current_locale}"),
:update =>"language_selection", :url => { :controller => :controlpanel, :action => :select_language} ) %></li>
<li><strong><%=_("Connected Host")%></strong></li>
<li><%=_("Name:")%> <strong><%= host.name -%></strong></li>
@@ -62,9 +62,11 @@
</div>
<div id="content" class="content">
+
+
<!-- here both flash and dynamic notifications should be added -->
<div id="flash-messages">
- <div id="language_selection">
+ <div id="language_selection"/>
<!-- show the flash messages -->
<% flash.each do |flash_type, message| %>
diff --git a/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb b/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb
index be00c06..8436c91 100644
--- a/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb
+++ b/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb
@@ -22,7 +22,7 @@ module LangHelper
langs = I18n.supported_locales.sort
ret = "<h4>" + _("Select locale") + "</h4>"
langs.each_with_index do |lang, i|
- ret << link_to( image_tag("/images/flags/#{lang}.png", :size => "16x11", :alt => "[#{lang}]" ),
+ ret << link_to( image_tag("/images/flags/#{lang}.png", :size => "20x20", :alt => "[#{lang}]" ),
:action => "cookie_locale", :id => lang)
if ((i + 1) % 6 == 0)
ret << "<br/>"
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org