scinote-web/app/assets/javascripts/activities/index.js

17 lines
385 B
JavaScript
Raw Normal View History

'use strict';
(function() {
function initActivitiesButton() {
2018-07-19 23:56:42 +08:00
$('.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();
2018-07-19 23:56:42 +08:00
}());