Sha256: 972e85aaaf0955144f2b3c4c469ab80752561ec2b827a1eb71bebd642aa250fb

Contents?: true

Size: 577 Bytes

Versions: 4

Compression:

Stored size: 577 Bytes

Contents

$url = $('#navigation_navigation_items_attributes_<%= params[:position] %>_url')
$linkable_id = $('#navigation_navigation_items_attributes_<%= params[:position] %>_linkable_id')

$linkable_id.html('<%= options_for_select(@linkable_id_options) %>')

if <%= params[:linkable_type].blank? %>
  # アドレスを入力する場合
  $linkable_id.closest('.linkable_id').addClass('hidden')
  $linkable_id.val('')
  $url.closest('.url').removeClass('hidden')

else
  $url.closest('.url').addClass('hidden')
  $url.val('')
  $linkable_id.closest('.linkable_id').removeClass('hidden')

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
comable-backend-0.7.1 app/views/comable/admin/navigations/search_linkable_ids.coffee
comable-backend-0.7.0 app/views/comable/admin/navigations/search_linkable_ids.coffee
comable-backend-0.7.0.beta2 app/views/comable/admin/navigations/search_linkable_ids.coffee
comable-backend-0.7.0.beta1 app/views/comable/admin/navigations/search_linkable_ids.coffee