Sha256: 9f0de73aac9eb0b5ae9c9d40562b2e6b71684db7909ac44b69b6727ffb0fead0
Contents?: true
Size: 732 Bytes
Versions: 20
Compression:
Stored size: 732 Bytes
Contents
(function() { let edit_clone = $("<tr data-id=<%= object.id %> data-edit='true' style='display: none'></tr>") edit_clone.html("<%= j render partial: 'edit', locals: {singular.to_sym => object, url: url, colspan: controller.default_colspan} %>") let top_pos = $('.<%= singular %>-table [data-id=<%= object.id %>]').offset().top $('.<%= singular %>-table > tbody > tr[data-id=<%= object.id %>]:not([data-edit=\'true\'])').fadeOut(() => { $(edit_clone).insertAfter('.<%= singular %>-table > tbody > tr[data-id=<%= object.id %>]') $(edit_clone).fadeIn(); let fifth_window_height = Number(window.innerHeight*(1/5)); $('html, body').animate({scrollTop: top_pos - fifth_window_height},500); }); })()
Version data entries
20 entries across 20 versions & 1 rubygems