Commit 7b34f8a1edd9131b9cf0f190cb7df03d665d24dc

Authored by Joenio Costa
1 parent c3e66f14

Cosmetic changes:

- Align left the title of creation product screen
- Fixing width of categories selection for new and edit screens
- Dont cache jquery.ui stylesheet
- Ensure consistency between ui_icon and ui_button methods
- Creating more categories in sample-categories script
- Fix pt_BR translation of 'categories'

(ActionItem1391,ActionItem1392)
app/helpers/application_helper.rb
@@ -921,7 +921,6 @@ module ApplicationHelper @@ -921,7 +921,6 @@ module ApplicationHelper
921 'lightbox', 921 'lightbox',
922 'colorpicker', 922 'colorpicker',
923 pngfix_stylesheet_path, 923 pngfix_stylesheet_path,
924 - 'jquery.ui/sunny/jquery-ui-1.8.2.custom',  
925 ] 924 ]
926 end 925 end
927 926
@@ -962,7 +961,7 @@ module ApplicationHelper @@ -962,7 +961,7 @@ module ApplicationHelper
962 end 961 end
963 962
964 def ui_icon(icon_type) 963 def ui_icon(icon_type)
965 - "<span class='ui-icon ui-icon-#{icon_type}' style='float:left; margin-right:7px;'></span>" 964 + "<span class='ui-icon #{icon_type}' style='float:left; margin-right:7px;'></span>"
966 end 965 end
967 966
968 def ui_button(label, url, html_options = {}) 967 def ui_button(label, url, html_options = {})
@@ -973,4 +972,13 @@ module ApplicationHelper @@ -973,4 +972,13 @@ module ApplicationHelper
973 link_to_remote(label, options, html_options.merge(:class => 'ui_button fg-button')) 972 link_to_remote(label, options, html_options.merge(:class => 'ui_button fg-button'))
974 end 973 end
975 974
  975 + def jquery_ui_theme_stylesheet_path
  976 + 'jquery.ui/sunny/jquery-ui-1.8.2.custom'
  977 + end
  978 +
  979 + # transform all element with class ui_button in a jQuery UI button
  980 + def render_jquery_ui_buttons
  981 + javascript_tag('render_jquery_ui_buttons()')
  982 + end
  983 +
976 end 984 end
app/helpers/manage_products_helper.rb
@@ -34,7 +34,7 @@ module ManageProductsHelper @@ -34,7 +34,7 @@ module ManageProductsHelper
34 count_chars += toplevel.name.length 34 count_chars += toplevel.name.length
35 end 35 end
36 ancestors.each do |category| 36 ancestors.each do |category|
37 - if count_chars > 60 37 + if count_chars > 55
38 hierarchy << hierarchy_category_item(category, options[:make_links], '( … )') 38 hierarchy << hierarchy_category_item(category, options[:make_links], '( … )')
39 break 39 break
40 else 40 else
app/views/layouts/application-ng.rhtml
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 <%= stylesheet_link_tag template_stylesheet_path %> 12 <%= stylesheet_link_tag template_stylesheet_path %>
13 <%= stylesheet_link_tag icon_theme_stylesheet_path %> 13 <%= stylesheet_link_tag icon_theme_stylesheet_path %>
14 <%= stylesheet_link_tag theme_stylesheet_path %> 14 <%= stylesheet_link_tag theme_stylesheet_path %>
  15 + <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
15 16
16 <%# Add custom tags/styles/etc via content_for %> 17 <%# Add custom tags/styles/etc via content_for %>
17 <%= yield :head %> 18 <%= yield :head %>
@@ -91,5 +92,6 @@ @@ -91,5 +92,6 @@
91 </div><!-- end id="theme-footer" --> 92 </div><!-- end id="theme-footer" -->
92 <%= noosfero_layout_features %> 93 <%= noosfero_layout_features %>
93 <%= theme_javascript_ng %> 94 <%= theme_javascript_ng %>
  95 + <%= render_jquery_ui_buttons %>
94 </body> 96 </body>
95 </html> 97 </html>
app/views/layouts/application.rhtml
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
23 %> 23 %>
24 <%= stylesheet_link_tag template_stylesheet_path %> 24 <%= stylesheet_link_tag template_stylesheet_path %>
25 <%= stylesheet_link_tag icon_theme_stylesheet_path %> 25 <%= stylesheet_link_tag icon_theme_stylesheet_path %>
  26 + <%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
26 27
27 <%# Add custom tags/styles/etc via content_for %> 28 <%# Add custom tags/styles/etc via content_for %>
28 <%= yield :head %> 29 <%= yield :head %>
@@ -124,11 +125,6 @@ @@ -124,11 +125,6 @@
124 <%# if you need to add HTML stuff to the layout, include it in 125 <%# if you need to add HTML stuff to the layout, include it in
125 app/views/shared/noosfero_layout_features.rhtml! %> 126 app/views/shared/noosfero_layout_features.rhtml! %>
126 <%= noosfero_layout_features %> 127 <%= noosfero_layout_features %>
127 -  
128 - <script type='text/javascript'>  
129 - // transform all element with class ui_button in a jQuery UI button  
130 - render_jquery_ui_buttons()  
131 - </script>  
132 - 128 + <%= render_jquery_ui_buttons %>
133 </body> 129 </body>
134 </html> 130 </html>
app/views/manage_products/edit_category.rhtml
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <span id='save_and_continue_wrapper'> 24 <span id='save_and_continue_wrapper'>
25 <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %> 25 <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
26 <span class='tooltip' id='save_and_continue_disabled_tooltip'> 26 <span class='tooltip' id='save_and_continue_disabled_tooltip'>
27 - <%= ui_icon(:alert) %> 27 + <%= ui_icon('ui-icon-alert') %>
28 <%= _('This category does not allow registration of products, select a more specific category') %> 28 <%= _('This category does not allow registration of products, select a more specific category') %>
29 </span> 29 </span>
30 </span> 30 </span>
app/views/manage_products/new.rhtml
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <span id='save_and_continue_wrapper'> 17 <span id='save_and_continue_wrapper'>
18 <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %> 18 <%= submit_button(:save, _('Save and continue'), :id => 'save_and_continue') %>
19 <span class='tooltip' id='save_and_continue_disabled_tooltip'> 19 <span class='tooltip' id='save_and_continue_disabled_tooltip'>
20 - <%= ui_icon(:alert) %> 20 + <%= ui_icon('ui-icon-alert') %>
21 <%= _('This category does not allow registration of products, select a more specific category') %> 21 <%= _('This category does not allow registration of products, select a more specific category') %>
22 </span> 22 </span>
23 </span> 23 </span>
app/views/shared/_dialog_error_messages.rhtml
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 modal: true, 6 modal: true,
7 width: 600, 7 width: 600,
8 resizable: false, 8 resizable: false,
9 - title: "<%= ui_icon(:alert) %>Ops…", 9 + title: "<%= ui_icon('ui-icon-alert') %>Ops…",
10 }); 10 });
11 <% end %> 11 <% end %>
12 <%= error_messages_for object_name %> 12 <%= error_messages_for object_name %>
po/pt/noosfero.po
@@ -13,7 +13,7 @@ msgid &quot;&quot; @@ -13,7 +13,7 @@ msgid &quot;&quot;
13 msgstr "" 13 msgstr ""
14 "Project-Id-Version: noosfero 0.24.2\n" 14 "Project-Id-Version: noosfero 0.24.2\n"
15 "POT-Creation-Date: 2010-07-17 17:20-0300\n" 15 "POT-Creation-Date: 2010-07-17 17:20-0300\n"
16 -"PO-Revision-Date: 2010-07-17 17:29-0300\n" 16 +"PO-Revision-Date: 2010-07-18 14:30-0300\n"
17 "Last-Translator: Joenio Costa <joenio@colivre.coop.br>\n" 17 "Last-Translator: Joenio Costa <joenio@colivre.coop.br>\n"
18 "Language-Team: LANGUAGE TEAM <E-MAIL@ADDRESS or HOME PAGE>\n" 18 "Language-Team: LANGUAGE TEAM <E-MAIL@ADDRESS or HOME PAGE>\n"
19 "MIME-Version: 1.0\n" 19 "MIME-Version: 1.0\n"
@@ -4469,7 +4469,7 @@ msgid &quot;&quot; @@ -4469,7 +4469,7 @@ msgid &quot;&quot;
4469 "This category does not allow registration of products, select a more " 4469 "This category does not allow registration of products, select a more "
4470 "specific category" 4470 "specific category"
4471 msgstr "" 4471 msgstr ""
4472 -"Esta categoria não aceita registro de produtos, selecione uma catregoria " 4472 +"Esta categoria não aceita registro de produtos, selecione uma categoria "
4473 "mais específica" 4473 "mais específica"
4474 4474
4475 #: app/views/manage_products/index.rhtml:1 4475 #: app/views/manage_products/index.rhtml:1
public/stylesheets/application.css
@@ -3142,15 +3142,13 @@ h1#agenda-title { @@ -3142,15 +3142,13 @@ h1#agenda-title {
3142 3142
3143 /* ==> public/stylesheets/controller_manage_products.css <== */ 3143 /* ==> public/stylesheets/controller_manage_products.css <== */
3144 3144
3145 -#new_product_title {  
3146 - text-align: center;  
3147 -}  
3148 #product_category_form { 3145 #product_category_form {
3149 border: 1px solid #AABB88; 3146 border: 1px solid #AABB88;
3150 -moz-border-radius: 5px; 3147 -moz-border-radius: 5px;
3151 -webkit-border-radius: 5px; 3148 -webkit-border-radius: 5px;
3152 background: url(/images/ccc.gif); /* image ccc.gif from http://www.wannabegirl.org/translucent */ 3149 background: url(/images/ccc.gif); /* image ccc.gif from http://www.wannabegirl.org/translucent */
3153 padding: 10px 30px 20px 30px; 3150 padding: 10px 30px 20px 30px;
  3151 + width: 570px;
3154 } 3152 }
3155 #categories_container_wrapper { 3153 #categories_container_wrapper {
3156 overflow-x: scroll; 3154 overflow-x: scroll;
script/sample-categories
@@ -122,4 +122,7 @@ desenv = new_productcategory(software_livre, &#39;Desenvolvimento&#39;) @@ -122,4 +122,7 @@ desenv = new_productcategory(software_livre, &#39;Desenvolvimento&#39;)
122 capacitacao = new_productcategory(software_livre, 'Capacitação') 122 capacitacao = new_productcategory(software_livre, 'Capacitação')
123 admin_de_sistemas = new_productcategory(software_livre, 'Administração de sistemas') 123 admin_de_sistemas = new_productcategory(software_livre, 'Administração de sistemas')
124 arte_digital = new_productcategory(software_livre, 'Arte Digital') 124 arte_digital = new_productcategory(software_livre, 'Arte Digital')
  125 +arte_vetorial = new_productcategory(arte_digital, 'Arte Digital com Vetores')
  126 +animacao = new_productcategory(arte_digital, 'Animação Digital')
  127 +animacao_com_blender = new_productcategory(animacao, 'Animação Digital com Blender 3D')
125 done 128 done