Commit 27d58fea989ecbe84c1592a4d9d4a054d96880f0
1 parent
46e64d51
Exists in
master
and in
27 other branches
rails3: fix link_list_block
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
app/models/link_list_block.rb
| @@ -89,7 +89,7 @@ class LinkListBlock < Block | @@ -89,7 +89,7 @@ class LinkListBlock < Block | ||
| 89 | def icons_options | 89 | def icons_options |
| 90 | ICONS.map do |i| | 90 | ICONS.map do |i| |
| 91 | "<span title=\"#{i[1]}\" class=\"icon-#{i[0]}\" onclick=\"changeIcon(this, '#{i[0]}')\"></span>".html_safe | 91 | "<span title=\"#{i[1]}\" class=\"icon-#{i[0]}\" onclick=\"changeIcon(this, '#{i[0]}')\"></span>".html_safe |
| 92 | - end | 92 | + end.join |
| 93 | end | 93 | end |
| 94 | 94 | ||
| 95 | private | 95 | private |
app/views/box_organizer/_link_list_block.html.erb
| @@ -18,12 +18,12 @@ | @@ -18,12 +18,12 @@ | ||
| 18 | </div> | 18 | </div> |
| 19 | 19 | ||
| 20 | <%= link_to_function(_('New link'), nil, :class => 'button icon-add with-text') do |page| | 20 | <%= link_to_function(_('New link'), nil, :class => 'button icon-add with-text') do |page| |
| 21 | - page.insert_html :bottom, 'links', content_tag('tr', | 21 | + page.insert_html :bottom, 'links', j(content_tag('tr', |
| 22 | content_tag('td', icon_selector('ok')) + | 22 | content_tag('td', icon_selector('ok')) + |
| 23 | content_tag('td', text_field_tag('block[links][][name]', '', :maxlength => 20)) + | 23 | content_tag('td', text_field_tag('block[links][][name]', '', :maxlength => 20)) + |
| 24 | content_tag('td', text_field_tag('block[links][][address]', nil, :class => 'link-address'), :class => 'cel-address') + | 24 | content_tag('td', text_field_tag('block[links][][address]', nil, :class => 'link-address'), :class => 'cel-address') + |
| 25 | content_tag('td', select_tag('block[links][][target]', | 25 | content_tag('td', select_tag('block[links][][target]', |
| 26 | options_for_select(LinkListBlock::TARGET_OPTIONS, link[:target]))) | 26 | options_for_select(LinkListBlock::TARGET_OPTIONS, link[:target]))) |
| 27 | ) + | 27 | ) + |
| 28 | - javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight") | 28 | + javascript_tag("$('edit-link-list-block').scrollTop = $('edit-link-list-block').scrollHeight")) |
| 29 | end %> | 29 | end %> |