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