2018-12-27 00:36:35 +01:00
|
|
|
$(document).ready(function() {
|
2018-12-27 00:48:14 +01:00
|
|
|
var socket = io();
|
|
|
|
|
2018-12-27 00:36:35 +01:00
|
|
|
$('.modal-background, .modal-close').click(function() {
|
|
|
|
$(this).parent('.modal').removeClass('is-active');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#book').change(function() {
|
|
|
|
var fileName = $(this).val();
|
|
|
|
if (fileName) {
|
|
|
|
const lastIndexOfSlash = fileName.lastIndexOf('\\');
|
|
|
|
if (lastIndexOfSlash < 0) {
|
|
|
|
lastIndexOfSlash = fileName.lastIndexOf('/');
|
|
|
|
}
|
|
|
|
fileName = fileName.substr(lastIndexOfSlash + 1);
|
|
|
|
}
|
|
|
|
$('#bookFileName').text(fileName ? fileName : 'None Selected');
|
|
|
|
})
|
|
|
|
});
|