richdocuments/js/admin.js

28 lines
613 B
JavaScript
Raw Normal View History

2014-03-31 20:27:07 +03:00
/*global OC, $ */
$(document).ready(function(){
2016-03-05 17:40:47 -04:00
2014-03-31 20:27:07 +03:00
var documentsSettings = {
save : function() {
$('#docs_apply').attr('disabled', true);
2015-06-16 20:02:05 +03:00
var data = {
2016-03-05 17:40:47 -04:00
wopi_url : $('#wopi_url').val()
};
2015-12-16 17:57:44 +03:00
OC.msg.startAction('#documents-admin-msg', t('richdocuments', 'Saving...'));
2014-03-31 20:27:07 +03:00
$.post(
2016-03-05 17:40:47 -04:00
OC.filePath('richdocuments', 'ajax', 'admin.php'),
2014-03-31 20:27:07 +03:00
data,
documentsSettings.afterSave
);
},
2016-03-05 17:40:47 -04:00
2014-03-31 20:27:07 +03:00
afterSave : function(response){
$('#docs_apply').attr('disabled', false);
OC.msg.finishedAction('#documents-admin-msg', response);
2014-03-31 20:27:07 +03:00
}
};
2016-03-05 17:40:47 -04:00
2014-03-31 20:27:07 +03:00
$('#docs_apply').on('click', documentsSettings.save);
});