From ad58d186fd54d04d372f6d624df9350b0cbfbaab Mon Sep 17 00:00:00 2001 From: quenenni Date: Sat, 30 Mar 2013 15:56:10 +0100 Subject: [PATCH] Fixed when new settings not in settings.json --- static/js/ep_email.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/static/js/ep_email.js b/static/js/ep_email.js index 97c5f68..56cc5df 100644 --- a/static/js/ep_email.js +++ b/static/js/ep_email.js @@ -6,6 +6,23 @@ if(typeof exports == 'undefined'){ } exports.postAceInit = function(hook, context){ + // Test if settings are good before continuing + if (typeof clientVars.panelDisplayLocation != "object") { + $.gritter.add({ + // (string | mandatory) the heading of the notification + title: "Email subscription error", + // (string | mandatory) the text inside the notification + text: "Some settings for the 'email_Notifications' plugin are missing.
Please contact your administrator.", + // (int | optional) the time you want it to be alive for before fading out + time: 10000, + }); + + // Hide the notification menu in mysettings + $('#options-emailNotifications').parent().hide(); + + return false; + } + // If plugin settings set panel form in mysettings menu if (clientVars.panelDisplayLocation.mysettings == true) { // Uncheck the checkbox incase of reminiscence