Commit a125dc04ad2531088947c3053f42b45f48dbbde5
1 parent
19bad6fc
Exists in
master
and in
29 other branches
Added new icons as link list block options
Showing
3 changed files
with
9 additions
and
4 deletions
Show diff stats
app/models/link_list_block.rb
... | ... | @@ -25,7 +25,12 @@ class LinkListBlock < Block |
25 | 25 | ['eyes', N_('Eyes')], |
26 | 26 | ['photos', N_('Photos')], |
27 | 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 | 36 | settings_items :links, Array, :default => [] |
... | ... | @@ -75,7 +80,7 @@ class LinkListBlock < Block |
75 | 80 | |
76 | 81 | def icons_options |
77 | 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 | 84 | end |
80 | 85 | end |
81 | 86 | ... | ... |
public/stylesheets/application.css
test/unit/link_list_block_test.rb
... | ... | @@ -43,7 +43,7 @@ class LinkListBlockTest < ActiveSupport::TestCase |
43 | 43 | should 'display options for icons' do |
44 | 44 | l = LinkListBlock.new |
45 | 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 | 47 | end |
48 | 48 | end |
49 | 49 | ... | ... |