misc: fix portal agent title/url with data from __services.js if set (#11397)

This commit is contained in:
Frédéric Péters 2016-06-16 14:41:52 +02:00
parent 5b03b9f74b
commit ead35c7bf8
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,8 @@ $(function() {
var portal_agent_url = decodeURIComponent(readCookie('publik_portal_agent_url') || '');
var portal_agent_title = decodeURIComponent(readCookie('publik_portal_agent_title') || '');
if (portal_agent_url && portal_agent_title) {
if (PUBLIK_PORTAL_AGENT_TITLE) portal_agent_title = PUBLIK_PORTAL_AGENT_TITLE;
if (PUBLIK_PORTAL_AGENT_URL) portal_agent_url = PUBLIK_PORTAL_AGENT_URL;
$('<a id="publik-portal-agent" href="' + portal_agent_url + '">' +
portal_agent_title + '</a>').appendTo('body');
}