This repository has been archived on 2024-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
epubreader/js/personal.js

23 lines
903 B
JavaScript
Raw Normal View History

2020-04-21 20:37:42 +00:00
$(document).ready(function(){
// save settings
var readerSettings = {
save : function() {
var data = {
EpubEnable: document.getElementById('EpubEnable').checked ? 'true' : 'false',
PdfEnable: document.getElementById('PdfEnable').checked ? 'true' : 'false',
CbxEnable: document.getElementById('CbxEnable').checked ? 'true' : 'false'
};
OC.msg.startSaving('#reader-personal .msg');
$.post(OC.filePath('files_reader', 'lib', 'personal-back.php'), data, readerSettings.afterSave);
},
afterSave : function(data){
OC.msg.finishedSaving('#reader-personal .msg', data);
}
};
$('#EpubEnable').on("change", readerSettings.save);
$('#PdfEnable').on("change", readerSettings.save);
$('#CbxEnable').on("change", readerSettings.save);
});