HummingBirdAnimeClient/public/js/base/events.js

23 lines
449 B
JavaScript
Raw Normal View History

2016-02-01 09:49:18 -05:00
/**
2016-02-02 11:34:03 -05:00
* Event handlers
2016-02-01 09:49:18 -05:00
*/
2016-02-08 10:57:44 -05:00
((ac) => {
2016-02-01 09:49:18 -05:00
'use strict';
// Close event for messages
2016-02-08 10:57:44 -05:00
ac.on('header', 'click', '.message', function () {
ac.hide(this);
2016-02-01 09:49:18 -05:00
});
// Confirm deleting of list or library items
ac.on('form.js-danger', 'submit', function (event) {
let proceed = confirm("Are you ABSOLUTELY SURE you want to delete this item?");
if (proceed === false) {
event.preventDefault();
event.stopPropagation();
}
});
2016-02-08 10:57:44 -05:00
})(AnimeClient);