diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2016-10-13 09:58:54 +0300 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2016-10-13 12:11:49 +0300 |
commit | 145854400e3e82c6a04d68e58e9661de7e3cace2 (patch) | |
tree | 8bd682b909aa683fee063c33fca539b7f5bc943c /js/admin.js | |
parent | f2e6c36060a2fdf2689c38cbda55c8ae99692cf0 (diff) |
New 'Use OOXML by default' option in admin settings
Diffstat (limited to 'js/admin.js')
-rw-r--r-- | js/admin.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/admin.js b/js/admin.js index 7a27eda0..223b1173 100644 --- a/js/admin.js +++ b/js/admin.js @@ -26,6 +26,13 @@ var documentsSettings = { ); }, + saveDocFormat: function(format) { + $.post( + OC.filePath('richdocuments', 'ajax', 'admin.php'), + { 'doc_format': format } + ); + }, + afterSave : function(response){ $('#wopi_apply').attr('disabled', false); OC.msg.finishedAction('#documents-admin-msg', response); @@ -45,6 +52,11 @@ var documentsSettings = { $('#wopi_apply').on('click', documentsSettings.save); documentsSettings.initEditGroups(); + $(document).on('change', '.doc-format-ooxml', function() { + var ooxml = this.checked; + documentsSettings.saveDocFormat(ooxml ? 'ooxml' : 'odf'); + }); + $(document).on('change', '#edit_group_select', function() { var element = $(this).parent().find('input.edit-groups-enable'); var groups = $(this).val(); |