Sha256: 7e2495439892c08e9b4d9fe62e2b07802a5350c6fbe6ec7239058cc86fe88b07
Contents?: true
Size: 996 Bytes
Versions: 13
Compression:
Stored size: 996 Bytes
Contents
id = @file_attachment.id attachable_name = @file_attachment.attachable.present? ? @file_attachment.attachable.name : 'orphanage' if @file_attachment.valid? page << %Q{ var original_container = $('#file_attachment_#{id}_file_container').text(); $('#file_attachment_dynamic_form').hide(); $('#file_attachment_#{id}_file_container').text("#{escape_javascript(@file_attachment.file_container)}"); $('#file_attachment_#{id}_name a').text('#{escape_javascript(@file_attachment.name)}'); $('#file_attachment_#{id}_description').text('#{escape_javascript(@file_attachment.description)}'); $('#file_attachment_#{id}').effect('highlight', { color: '#C3D9FF' }, 2500); if( original_container !== $('#file_attachment_#{id}_file_container').text() ) { $('<p style="background:#C3D9FF;"><em>Moved to #{attachable_name}</em></p>').insertBefore($('#file_attachment_#{id}_name')); } } else page << %Q{ alert("The file could not be updated."); } end
Version data entries
13 entries across 13 versions & 1 rubygems