-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load file list on the background on the Show page #713
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Claudia Lee <[email protected]>
…he DataTables JavaScript to display and sort correctly. Co-authored-by: Claudia Lee <[email protected]>
Co-authored-by: Claudia Lee <[email protected]>
<% end %> | ||
<th scope="col" nowrap="nowrap"><span>Filesize</span></th> | ||
<th>Filename</th> | ||
<th>Size</th> | ||
</tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ditched the columns with the sequence number and the description for each file since we don't show those in PDC Describe. (Plus we don't have file description in PDC Describe, this was for DataSpace records but we are moving away from that)
@@ -63,8 +32,45 @@ | |||
<script type="text/javascript"> | |||
$(function() { | |||
|
|||
// Wire DataTable for the file list. | |||
$('#files-table').DataTable(); | |||
$('#files-table').DataTable({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We stole most of the DataTables configuration from PDC Describe: https://github.com/pulibrary/pdc_describe/blob/main/app/views/works/_s3_resources.html.erb#L74
Load the file list on the background via AJAX so the page with the metadata renders immediately to the user.
Co-authored-by: Claudia Lee [email protected]
Closes #709