Sha256: 2713fd60f4e6a4dda1973480c660c3db45c8de3ff57398cf5e60dc9ab6a43df9
Contents?: true
Size: 897 Bytes
Versions: 7
Compression:
Stored size: 897 Bytes
Contents
// Global JS file for Bulkrax $(document).on('turbolinks:load ready', function() { // Apply to Importer and Exporter views $('button#err_toggle').click(function() { $('#error_trace').toggle(); }); $('button#fm_toggle').click(function() { $('#field_mapping').toggle(); }); $('#bulkraxItemModal').on('show.bs.modal', function (event) { var button = $(event.relatedTarget) // Button that triggered the modal var recipient = button.data('entry-id') // Extract info from data-* attributes // If necessary, you could initiate an AJAX request here (and then do the updating in a callback). // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. var modal = $(this) modal.find('a').each(function() { this.href = this.href.replace(/\d+\?/, recipient + '?') }) return true }) });
Version data entries
7 entries across 7 versions & 1 rubygems