Commit bfeb8a1d4762a86b2fb0544fe78d6bca4c65ef0c

Authored by AurelioAHeckert
1 parent 5c0f20df

ActionItem373: Language selector and some IE workaround bug

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1940 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/language_helper.rb
@@ -14,7 +14,7 @@ module LanguageHelper @@ -14,7 +14,7 @@ module LanguageHelper
14 if options[:element] == 'dropdown' 14 if options[:element] == 'dropdown'
15 select_tag('lang', 15 select_tag('lang',
16 options_for_select(Noosfero.locales.map{|code,name| [name, code]}, current), 16 options_for_select(Noosfero.locales.map{|code,name| [name, code]}, current),
17 - :onchange => "document.location='?' + name + '=' + value;", 17 + :onchange => "document.location.href='?' + name + '=' + value;",
18 :help => _('The language you choose here is the language used for options, buttons, etc. It does not affect the language of the content created by other users.') 18 :help => _('The language you choose here is the language used for options, buttons, etc. It does not affect the language of the content created by other users.')
19 ) 19 )
20 else 20 else
app/views/layouts/application.rhtml
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt-br">
1 <html> 2 <html>
2 <head> 3 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@@ -91,18 +92,18 @@ @@ -91,18 +92,18 @@
91 <%= _("This bar helps you find information following two paths or <strong>dimensions</strong>. First dimension is composed of <em>categories</em>, which you'll find in the colored tabs in the top. Second dimension has <em>content types</em>, and you'll find them in the animated bar on your right.") % @environment.name %> 92 <%= _("This bar helps you find information following two paths or <strong>dimensions</strong>. First dimension is composed of <em>categories</em>, which you'll find in the colored tabs in the top. Second dimension has <em>content types</em>, and you'll find them in the animated bar on your right.") % @environment.name %>
92 </div> 93 </div>
93 94
94 - <div id='navigation_bar'> 95 + <div id="navigation_bar">
95 <%= render :file => 'shared/categories_menu' %> 96 <%= render :file => 'shared/categories_menu' %>
96 </div><!-- id='navigation_bar' --> 97 </div><!-- id='navigation_bar' -->
97 <script type="text/javascript"> 98 <script type="text/javascript">
98 prepareMenu('navigation_bar', { timeout: 1000 }); 99 prepareMenu('navigation_bar', { timeout: 1000 });
99 </script> 100 </script>
100 101
101 - <div id='language-selector'> 102 + <div id="language-selector">
102 <%= language_chooser(:element => 'dropdown') %> 103 <%= language_chooser(:element => 'dropdown') %>
103 </div> 104 </div>
104 105
105 - <div id='user_box'> 106 + <div id="user_box">
106 <%= render :file => 'shared/user_menu' %> 107 <%= render :file => 'shared/user_menu' %>
107 <%= theme_opt_menu_search %> 108 <%= theme_opt_menu_search %>
108 </div><!-- id='user_box' --> 109 </div><!-- id='user_box' -->
public/designs/themes/zen3/stylesheets/menu.css
@@ -145,12 +145,12 @@ @@ -145,12 +145,12 @@
145 145
146 #assets_menu { 146 #assets_menu {
147 position: absolute; 147 position: absolute;
148 - top: 6px; 148 + top: 7px;
149 right: 160px; 149 right: 160px;
150 padding: 0px; 150 padding: 0px;
151 } 151 }
152 .msie #assets_menu { 152 .msie #assets_menu {
153 - margin-right: 90px; 153 + margin-right: 170px;
154 } 154 }
155 155
156 #assets_menu_layout_iten { 156 #assets_menu_layout_iten {
@@ -172,12 +172,18 @@ @@ -172,12 +172,18 @@
172 margin: 0px; 172 margin: 0px;
173 padding: 0px 4px; 173 padding: 0px 4px;
174 float: left; 174 float: left;
  175 + width: 22px;
  176 + height: 20px;
  177 + position: relative;
  178 + Xborder: 1px solid red;
175 } 179 }
176 180
177 #assets_menu a { 181 #assets_menu a {
178 letter-spacing: 0px; 182 letter-spacing: 0px;
179 color: #FFF; 183 color: #FFF;
180 - position: relative; 184 + position: absolute;
  185 + left: 0px;
  186 + top: 0px;
181 overflow: visible; 187 overflow: visible;
182 opacity: 0.6; 188 opacity: 0.6;
183 filter: alpha(opacity=60); 189 filter: alpha(opacity=60);
@@ -185,7 +191,7 @@ @@ -185,7 +191,7 @@
185 .msie #assets_menu a { 191 .msie #assets_menu a {
186 width: 100px; 192 width: 100px;
187 height: 20px; 193 height: 20px;
188 - margin-left: -80px; 194 + margin-left: 0px;
189 } 195 }
190 #assets_menu a:hover { 196 #assets_menu a:hover {
191 background: transparent; 197 background: transparent;
@@ -218,3 +224,9 @@ @@ -218,3 +224,9 @@
218 -moz-border-radius: 4px; 224 -moz-border-radius: 4px;
219 } 225 }
220 226
  227 +/* * * Language Selector * * * * * * * * * */
  228 +
  229 +#language-selector {
  230 + display: block;
  231 +}
  232 +
public/stylesheets/controller_search.css
@@ -31,14 +31,14 @@ @@ -31,14 +31,14 @@
31 float: left; 31 float: left;
32 width: 49%; 32 width: 49%;
33 } 33 }
34 -.msie .search-results-box { 34 +.Xmsie .search-results-box {
35 width: 47% !important; 35 width: 47% !important;
36 } 36 }
37 37
38 .only-one-result-box .search-results-box { 38 .only-one-result-box .search-results-box {
39 width: 100%; 39 width: 100%;
40 } 40 }
41 -.msie .only-one-result-box .search-results-box { 41 +.Xmsie .only-one-result-box .search-results-box {
42 width: 95% !important; 42 width: 95% !important;
43 } 43 }
44 44
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 padding: 10px 0px 0px 10px; 69 padding: 10px 0px 0px 10px;
70 height: 215px; 70 height: 215px;
71 } 71 }
72 -.msie .search-results-innerbox.common-profile-list-block.search-results-type-profile { 72 +.msie6 .search-results-innerbox.common-profile-list-block.search-results-type-profile {
73 height: 205px; 73 height: 205px;
74 } 74 }
75 75
@@ -122,14 +122,15 @@ @@ -122,14 +122,15 @@
122 list-style: none; 122 list-style: none;
123 list-style-image: none; 123 list-style-image: none;
124 font-size: 10px; 124 font-size: 10px;
  125 + text-align: left;
125 } 126 }
126 #content .search-results-type-product li strong { 127 #content .search-results-type-product li strong {
127 - display: block;  
128 - margin-left: 55px;  
129 font-size: 12px; 128 font-size: 12px;
  129 + margin-left: 5px;
130 } 130 }
131 131
132 #content .search-results-type-product li { 132 #content .search-results-type-product li {
  133 + padding: 0px;
133 padding-bottom: 10px; 134 padding-bottom: 10px;
134 } 135 }
135 #content .search-results-type-product li li { 136 #content .search-results-type-product li li {
@@ -143,11 +144,9 @@ @@ -143,11 +144,9 @@
143 display: block; 144 display: block;
144 float: left; 145 float: left;
145 width: 50px; 146 width: 50px;
146 - height: 50px; 147 + height: 100%;
147 background-repeat: no-repeat; 148 background-repeat: no-repeat;
148 background-position: 50% 50%; 149 background-position: 50% 50%;
149 - position: relative;  
150 - top: 5px;  
151 } 150 }
152 .product-pic { 151 .product-pic {
153 height: 60px; 152 height: 60px;
public/stylesheets/menu.css
@@ -285,3 +285,15 @@ @@ -285,3 +285,15 @@
285 overflow: hidden; 285 overflow: hidden;
286 } 286 }
287 287
  288 +/* * * Language Selector * * * * * * * * * */
  289 +
  290 +#language-selector {
  291 + position: absolute;
  292 + left: 90px;
  293 + top: 5px;
  294 + font-size: 10px;
  295 + opacity: 0.7;
  296 + filter: alpha(opacity=70);
  297 + display: none;
  298 +}
  299 +