Skip to content

Commit

Permalink
alter syp setup
Browse files Browse the repository at this point in the history
  • Loading branch information
markmacgillivray committed Nov 29, 2024
1 parent 1f893be commit b8116a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/shareyourpaper/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,10 @@ <h2>OAB Only TODO is this still needed</h2>
});

var deposits = function(e) {
var addr = api + '/' + ($(this).attr('id') === 'all_file_deposits' ? 'deposited' : 'deposits') + '.csv?uid=' + noddy.user.account._id;
if ($('#depositdate').val()) addr += '&q=deposit.createdAt:>' + new Date($('#depositdate').datepicker('getDate')).valueOf();
var addr = api + '/deposited.csv?'
if (noddy.user !== undefined && noddy.user.account !== undefined && noddy.user.account._id !== undefined) addr += 'uid=' + noddy.user.account._id + '&';
if ($(this).attr('id') === 'all_file_deposits') addr += 'submitted=true&';
if ($('#depositdate').val()) addr += 'fromdate=' + new Date($('#depositdate').datepicker('getDate')).valueOf() + '&';
$(this).attr('href',addr);
}
$('body').on('click','#all_deposits',deposits);
Expand Down

0 comments on commit b8116a9

Please sign in to comment.