- substantial bit rot accrued in 4 years of non-maintenance which made Reader unusable - Reader now works reliably on public pages - or at least it _Works For Me™_ - Refactored a substantial part of the code to comply to the "current" (ha ha) Nextcloud API - Dropped Owncloud compatibility for lack of a testing installation - Dropped IE (<11) support - Dropped compatibility with older (<20) Nextcloud versions - Dropped app-specific ajax code, now handled by SettingsController - Updated dependencies where applicable
24 lines
1,000 B
JavaScript
24 lines
1,000 B
JavaScript
$(document).ready(function(){
|
|
// save settings
|
|
var readerSettings = {
|
|
save : function() {
|
|
var data = {
|
|
epub_enable: document.getElementById('epub_enable').checked ? 'true' : 'false',
|
|
pdf_enable: document.getElementById('pdf_enable').checked ? 'true' : 'false',
|
|
cbx_enable: document.getElementById('cbx_enable').checked ? 'true' : 'false'
|
|
};
|
|
|
|
OC.msg.startSaving('#reader-personal .msg');
|
|
$.post(OC.generateUrl('/apps/files_reader/settings'), data, function(response) {
|
|
OC.msg.finishedSuccess('#reader-personal .msg', response.data.message);
|
|
});
|
|
},
|
|
afterSave : function(data){
|
|
OC.msg.finishedSaving('#reader-personal .msg', data);
|
|
}
|
|
};
|
|
$('#epub_enable').on("change", readerSettings.save);
|
|
$('#pdf_enable').on("change", readerSettings.save);
|
|
$('#cbx_enable').on("change", readerSettings.save);
|
|
});
|
|
|