mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 23:15:34 +08:00
20 lines
463 B
JavaScript
20 lines
463 B
JavaScript
|
'use strict';
|
||
|
|
||
|
(function() {
|
||
|
function initActivitiesButton() {
|
||
|
$(document).ready(function() {
|
||
|
$(document).find('.btn-more-activities')
|
||
|
.on('ajax:success', function(e, data) {
|
||
|
$(data.html).insertAfter($('#list-activities li').last());
|
||
|
if(data.more_url) {
|
||
|
$(this).attr('href', data.more_url);
|
||
|
} else {
|
||
|
$(this).remove();
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
initActivitiesButton();
|
||
|
|
||
|
})();
|