summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-06-12 16:48:45 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-06-13 12:00:23 +0200
commit42bf466fa1c64fb6c37f0521fa27ec1b27943e35 (patch)
tree1c23c9513c197d5e07ed492efe82e0ce8b182d3e /apps/files_sharing/js
parent7e8784c075b5e56abf44d0eb0c2e357be8342ca5 (diff)
downloadnextcloud-server-42bf466fa1c64fb6c37f0521fa27ec1b27943e35.tar.gz
nextcloud-server-42bf466fa1c64fb6c37f0521fa27ec1b27943e35.zip
move mail template editor from core to standalone templateeditor repo
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/settings-admin.js78
1 files changed, 0 insertions, 78 deletions
diff --git a/apps/files_sharing/js/settings-admin.js b/apps/files_sharing/js/settings-admin.js
deleted file mode 100644
index e22aa4b0c36..00000000000
--- a/apps/files_sharing/js/settings-admin.js
+++ /dev/null
@@ -1,78 +0,0 @@
-$(document).ready(function() {
-
- var loadTemplate = function (theme, template) {
- $.get(
- OC.generateUrl('apps/files_sharing/settings/mailtemplate'),
- { theme: theme, template: template }
- ).done(function( result ) {
- $( '#mailTemplateSettings textarea' ).val(result);
- }).fail(function( result ) {
- OC.dialogs.alert(result.responseJSON.message, t('files_sharing', 'Could not load template'));
- });
- };
-
- // load default template
- var theme = $( '#mts-theme' ).val();
- var template = $( '#mts-template' ).val();
- loadTemplate(theme, template);
-
- $( '#mts-template' ).change(
- function() {
- var theme = $( '#mts-theme' ).val();
- var template = $( this ).val();
- loadTemplate(theme, template);
- }
- );
-
- $( '#mts-theme' ).change(
- function() {
- var theme = $( this ).val();
- var template = $( '#mts-template' ).val();
- loadTemplate(theme, template);
- }
- );
-
- $( '#mailTemplateSettings .actions' ).on('click', '.save',
- function() {
- var theme = $( '#mts-theme' ).val();
- var template = $( '#mts-template' ).val();
- var content = $( '#mailTemplateSettings textarea' ).val();
- OC.msg.startSaving('#mts-msg');
- $.post(
- OC.generateUrl('apps/files_sharing/settings/mailtemplate'),
- { theme: theme, template: template, content: content }
- ).done(function() {
- var data = { status:'success', data:{message:t('files_sharing', 'Saved')} };
- OC.msg.finishedSaving('#mts-msg', data);
- }).fail(function(result) {
- var data = { status: 'error', data:{message:result.responseJSON.message} };
- OC.msg.finishedSaving('#mts-msg', data);
- });
- }
- );
-
- $( '#mailTemplateSettings .actions' ).on('click', '.reset',
- function() {
- var theme = $( '#mts-theme' ).val();
- var template = $( '#mts-template' ).val();
- OC.msg.startSaving('#mts-msg');
- $.ajax({
- type: "DELETE",
- url: OC.generateUrl('apps/files_sharing/settings/mailtemplate'),
- data: { theme: theme, template: template }
- }).done(function() {
- var data = { status:'success', data:{message:t('files_sharing', 'Reset')} };
- OC.msg.finishedSaving('#mts-msg', data);
-
- // load default template
- var theme = $( '#mts-theme' ).val();
- var template = $( '#mts-template' ).val();
- loadTemplate(theme, template);
- }).fail(function(result) {
- var data = { status: 'error', data:{message:result.responseJSON.message} };
- OC.msg.finishedSaving('#mts-msg', data);
- });
- }
- );
-
-});