From 44b3d7a823f0d24e20df5c2dd0701142550e2ffd Mon Sep 17 00:00:00 2001 From: chschy Date: Mon, 5 Nov 2012 02:32:15 +0000 Subject: [PATCH] Show an alert popup in admin menu when the user is not logged in as an administrator git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12113 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/xml_handler.js | 5 +++++ modules/menu/tpl/sitemap.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js index 9867f5e7d..8869a250f 100644 --- a/common/js/xml_handler.js +++ b/common/js/xml_handler.js @@ -371,6 +371,11 @@ $.exec_json = function(action,data,func){ ,success : function(data){ $(".wfsr").hide().trigger('cancel_confirm'); if(data.error > 0) alert(data.message); + if(data.error == -1 && data.message == 'msg_is_not_administrator'){ + alert('You are not logged in as an administrator'); + window.location.reload(); + return; + } if($.isFunction(func)) func(data); } }); diff --git a/modules/menu/tpl/sitemap.html b/modules/menu/tpl/sitemap.html index d4849f93f..cc343f5a1 100644 --- a/modules/menu/tpl/sitemap.html +++ b/modules/menu/tpl/sitemap.html @@ -103,7 +103,7 @@