Commit a125dc04ad2531088947c3053f42b45f48dbbde5

Authored by Daniela Feitosa
1 parent 19bad6fc

Added new icons as link list block options

app/models/link_list_block.rb
@@ -25,7 +25,12 @@ class LinkListBlock < Block @@ -25,7 +25,12 @@ class LinkListBlock < Block
25 ['eyes', N_('Eyes')], 25 ['eyes', N_('Eyes')],
26 ['photos', N_('Photos')], 26 ['photos', N_('Photos')],
27 ['menu-people', N_('Person')], 27 ['menu-people', N_('Person')],
28 - ['event', N_('Event')] 28 + ['event', N_('Event')],
  29 + ['forum', N_('Forum')],
  30 + ['home', N_('Home')],
  31 + ['product', N_('Package')],
  32 + ['todo', N_('To do list')],
  33 + ['chat', N_('Chat')]
29 ] 34 ]
30 35
31 settings_items :links, Array, :default => [] 36 settings_items :links, Array, :default => []
@@ -75,7 +80,7 @@ class LinkListBlock < Block @@ -75,7 +80,7 @@ class LinkListBlock < Block
75 80
76 def icons_options 81 def icons_options
77 ICONS.map do |i| 82 ICONS.map do |i|
78 - "<span class=\"icon-#{i[0]}\" onclick=\"changeIcon(this, '#{i[0]}')\"></span>" 83 + "<span title=\"#{i[1]}\" class=\"icon-#{i[0]}\" onclick=\"changeIcon(this, '#{i[0]}')\"></span>"
79 end 84 end
80 end 85 end
81 86
public/stylesheets/application.css
@@ -2023,7 +2023,7 @@ input.disabled { @@ -2023,7 +2023,7 @@ input.disabled {
2023 border: 1px solid #555; 2023 border: 1px solid #555;
2024 padding: 10px; 2024 padding: 10px;
2025 width: 110px; 2025 width: 110px;
2026 - height: 110px; 2026 + height: 132px;
2027 position: absolute; 2027 position: absolute;
2028 z-index: 100; 2028 z-index: 100;
2029 } 2029 }
test/unit/link_list_block_test.rb
@@ -43,7 +43,7 @@ class LinkListBlockTest &lt; ActiveSupport::TestCase @@ -43,7 +43,7 @@ class LinkListBlockTest &lt; ActiveSupport::TestCase
43 should 'display options for icons' do 43 should 'display options for icons' do
44 l = LinkListBlock.new 44 l = LinkListBlock.new
45 l.icons_options.each do |option| 45 l.icons_options.each do |option|
46 - assert_match(/<span class=\"icon-.+\" onclick=\"changeIcon\(this, '.+'\)\"><\/span>/, option) 46 + assert_match(/<span title=\".+\" class=\"icon-.+\" onclick=\"changeIcon\(this, '.+'\)\"><\/span>/, option)
47 end 47 end
48 end 48 end
49 49