From 87cdf9222ddf349a15790708abd4f05e8802acce Mon Sep 17 00:00:00 2001 From: Ruud <ruud@crashdummy.nl> Date: Mon, 4 Feb 2013 23:05:21 +0100 Subject: [PATCH] Hide test notification button --- .../core/notifications/core/static/notification.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/notifications/core/static/notification.js b/couchpotato/core/notifications/core/static/notification.js index db9db843..52062e93 100644 --- a/couchpotato/core/notifications/core/static/notification.js +++ b/couchpotato/core/notifications/core/static/notification.js @@ -178,11 +178,14 @@ var NotificationBase = new Class({ }, addTestButton: function(fieldset, plugin_name){ - var self = this; + var self = this, + button_name = self.testButtonName(fieldset); + + if(button_name.contains('Notifications')) return; new Element('.ctrlHolder.test_button').adopt( new Element('a.button', { - 'text': self.testButtonName(fieldset), + 'text': button_name, 'events': { 'click': function(){ var button = fieldset.getElement('.test_button .button'); @@ -191,7 +194,7 @@ var NotificationBase = new Class({ Api.request('notify.'+plugin_name+'.test', { 'onComplete': function(json){ - button.set('text', self.testButtonName(fieldset)); + button.set('text', button_name); if(json.success){ var message = new Element('span.success', { -- GitLab