app/views/admin/menus/index.json.erb in forgeos_cms-1.9.4 vs app/views/admin/menus/index.json.erb in forgeos_cms-1.9.5.rc1
- old
+ new
@@ -2,28 +2,26 @@
output = {
:sEcho => params[:sEcho],
:iTotalRecords => @menus.total_entries || 0,
:iTotalDisplayRecords => @menus.size,
:aaData => @menus.collect do |menu|
- link_id = menu.id
klass = menu.active? ? 'see-on' : 'see-off'
[
- content_tag(:div, content_tag(:div, tag(:span, :class => "small-icons menu-ico"), :class=>"image"), :id => link_id),
+ content_tag(:div, content_tag(:div, tag(:span, :class => "small-icons menu-ico"), :class=>"image"), :id => polymorphic_html_id(menu)),
content_tag(:div, link_to(menu.name, [forgeos_cms, :edit, :admin, menu]), :class => 'menu-name'),
link_to('', [forgeos_cms, :activate, :admin, menu],
:remote => true,
- :complete => "toggleActivate('#show_#{link_id}')",
:class => "small-icons #{klass}",
- :id => "show_#{link_id}"
+ :id => polymorphic_html_id(menu, 'show')
),
link_to('', [forgeos_cms, :duplicate, :admin, menu], :class => 'small-icons duplicate-link') +
link_to('', [forgeos_cms, :edit, :admin, menu], :class => 'small-icons edit-link') +
link_to('', [forgeos_cms, :admin, menu],
:remote => true,
:method => :delete,
:confirm => t('menu.destroy.confirm').capitalize,
- :success => "removedataTablesRow('#destroy_#{link_id}')",
- :class => 'small-icons destroy-link', :id => "destroy_#{link_id}"
+ :class => 'small-icons destroy-link',
+ :id => polymorphic_html_id(menu, 'destroy')
)
]
end
}
-%>