From 47a72cc2db396e86ffa6ad216aa9cfea71fcfa8f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Feb 2016 09:27:44 +0100 Subject: [PATCH] move js for sending test mail into view --- styles/bootstrap/application.js | 19 ------------------- views/bootstrap/class.Settings.php | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 912c709ae..11dacaaff 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -233,25 +233,6 @@ $(document).ready( function() { 'json' ); }); - $('a.sendtestmail').click(function(ev){ - ev.preventDefault(); - $.ajax({url: '../op/op.Ajax.php', - type: 'GET', - dataType: "json", - data: {command: 'testmail'}, - success: function(data) { - console.log(data); - noty({ - text: data.msg, - type: (data.error) ? 'error' : 'success', - dismissQueue: true, - layout: 'topRight', - theme: 'defaultTheme', - timeout: 1500, - }); - } - }); - }); $('a.movefolder').click(function(ev){ ev.preventDefault(); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 5833ff614..95ceb02e4 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -55,6 +55,26 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style { $('#settingstab li a').click(function(event) { $('#currenttab').val($(event.currentTarget).data('target').substring(1)); }); + + $('a.sendtestmail').click(function(ev){ + ev.preventDefault(); + $.ajax({url: '../op/op.Ajax.php', + type: 'GET', + dataType: "json", + data: {command: 'testmail'}, + success: function(data) { + console.log(data); + noty({ + text: data.msg, + type: (data.error) ? 'error' : 'success', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 1500, + }); + } + }); + }); }); _configFilePath)) { - Send test mail + "> : showTextField("smtpServer", $settings->_smtpServer); ?>