Commit d2d8c4989d97743f02641200baceda625ac4c264

Authored by Joenio Costa
Committed by Antonio Terceiro
1 parent 22fce6dd

Cosmetic changes in category selection

(ActionItem1391)
app/helpers/manage_products_helper.rb
... ... @@ -55,7 +55,7 @@ module ManageProductsHelper
55 55 def options_for_select_categories(categories, selected = nil)
56 56 categories.sort_by{|cat| cat.name.transliterate}.map do |category|
57 57 selected_attribute = selected.nil? ? '' : (category == selected ? "selected='selected'" : '')
58   - "<option value='#{category.id}' title='#{category.name}' #{selected_attribute}>#{truncate(category.name, 20) + (category.leaf? ? '': ' &raquo;')}</option>"
  58 + "<option value='#{category.id}' title='#{category.name}' #{selected_attribute}>#{truncate(category.name, 33) + (category.leaf? ? '': ' &raquo;')}</option>"
59 59 end.join("\n")
60 60 end
61 61  
... ...
features/manage_products.feature
... ... @@ -449,15 +449,15 @@ Feature: manage products
449 449 Scenario: Truncate long category name in selection of category
450 450 Given the following product_category
451 451 | name |
452   - | Super Quantum Computers |
453   - | Nanonote nanotech with long name |
  452 + | Super Quantum Computers with teraflops |
  453 + | Nanonote nanotech with long long name |
454 454 And the following product_category
455 455 | name | parent |
456 456 | Netbook Quantum | Super Quantum Computers |
457 457 And I am logged in as "joaosilva"
458 458 When I go to Rede Moinho's new product page
459   - Then I should see "Nanonote nanotech..."
460   - And I should see "Super Quantum Com... »"
  459 + Then I should see "Nanonote nanotech with long lo..."
  460 + And I should see "Super Quantum Computers with t... »"
461 461  
462 462 @selenium
463 463 Scenario: Edit unit of a product together your name
... ...
public/stylesheets/application.css
... ... @@ -3364,6 +3364,7 @@ h1#agenda-title {
3364 3364 .categories_container select {
3365 3365 margin-right: 10px;
3366 3366 height: 176px;
  3367 + font-size: 11px;
3367 3368 }
3368 3369 .controller-manage_products #categories_selection_actionbar input.button {
3369 3370 height: 23px !important;
... ...