{I" class:ETI"ProcessedAsset; FI"logical_path; TI"blacklight/ajax_modal.js; FI" pathname; TI"~/home/tjohnson/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/blacklight-5.8.2/app/assets/javascripts/blacklight/ajax_modal.js; FI"content_type; TI"application/javascript; TI" mtime; Tl+÷¦VI"length; Tiø"I"digest; TI"%8901ed8a152306c18b81a94794356a7e; FI"source; TI"ø" /* The ajax_modal plugin can display some interactions inside a Bootstrap modal window, including some multi-page interactions. It supports unobtrusive Javascript, where a link or form that would have caused a new page load is changed to display it's results inside a modal dialog, by this plugin. The plugin assumes there is a Bootstrap modal div on the page with id #ajax-modal to use as the modal -- the standard Blacklight layout provides this. To make a link or form have their results display inside a modal, add `data-ajax-modal="trigger"` to the link or form. (Note, form itself not submit input) With Rails link_to helper, you'd do that like: link_to something, link, :data => {:ajax_modal => "trigger"} The results of the link href or form submit will be displayed inside a modal -- they should include the proper HTML markup for a bootstrap modal's contents. Also, you ordinarily won't want the Rails template with wrapping navigational elements to be used. The Rails controller could suppress the layout when a JS AJAX request is detected, OR the response can include a `
Some message
<%= link_to "This result will still be within modal", some_link, :data => {:ajax_modal => "preserve"} %>