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() {
|
2016-09-12 18:53:54 +02:00
|
|
|
$('#wopi_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){
|
2016-09-12 18:53:54 +02:00
|
|
|
$('#wopi_apply').attr('disabled', false);
|
2014-07-09 18:43:48 +03:00
|
|
|
OC.msg.finishedAction('#documents-admin-msg', response);
|
2014-03-31 20:27:07 +03:00
|
|
|
}
|
|
|
|
};
|
2016-03-05 17:40:47 -04:00
|
|
|
|
2016-09-12 18:53:54 +02:00
|
|
|
$('#wopi_apply').on('click', documentsSettings.save);
|
2014-03-31 20:27:07 +03:00
|
|
|
});
|