From 81f8a9a089e54e65321c46a702025e81ffbf67f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 6 Jun 2015 13:44:34 +0200 Subject: [PATCH] front of portal agent --- data/themes/gadjo/static/js/agent-portal.js | 7 +++++++ data/themes/gadjo/static/js/publik.js | 2 ++ data/themes/gadjo/templates/combo/page_template.html | 3 +++ data/themes/gadjo/templates/gadjo/base.html | 7 +++++++ 4 files changed, 19 insertions(+) create mode 100644 data/themes/gadjo/static/js/agent-portal.js create mode 100644 data/themes/gadjo/templates/gadjo/base.html diff --git a/data/themes/gadjo/static/js/agent-portal.js b/data/themes/gadjo/static/js/agent-portal.js new file mode 100644 index 00000000..2e67df8a --- /dev/null +++ b/data/themes/gadjo/static/js/agent-portal.js @@ -0,0 +1,7 @@ +$(function() { + $(document).on('publik:environment-loaded', function() { + var $content = $('#portal-agent-content'); + if ($content.length == 0) return false; + console.log('hello2'); + }); +}); diff --git a/data/themes/gadjo/static/js/publik.js b/data/themes/gadjo/static/js/publik.js index 474d1cee..96afb561 100644 --- a/data/themes/gadjo/static/js/publik.js +++ b/data/themes/gadjo/static/js/publik.js @@ -15,6 +15,7 @@ $(function() { window.sessionStorage.hobo_environment = JSON.stringify(COMBO_KNOWN_SERVICES); window.sessionStorage.hobo_environment_timestamp = Date.now(); create_menu_items(); + $(document).trigger('publik:environment-loaded'); } } @@ -49,6 +50,7 @@ $(function() { if (window.sessionStorage.hobo_environment && parseInt(window.sessionStorage.hobo_environment_timestamp) > Date.now()-600000) { COMBO_KNOWN_SERVICES = JSON.parse(window.sessionStorage.hobo_environment); + $(document).trigger('publik:environment-loaded'); create_menu_items(); } else { var this_hostname = window.location.hostname; diff --git a/data/themes/gadjo/templates/combo/page_template.html b/data/themes/gadjo/templates/combo/page_template.html index d8ebaa5b..12485f0f 100644 --- a/data/themes/gadjo/templates/combo/page_template.html +++ b/data/themes/gadjo/templates/combo/page_template.html @@ -7,6 +7,7 @@ {% block extrascripts %} + {% endblock %} @@ -16,9 +17,11 @@ {% block logout-url %}{% url 'auth_logout' %}{% endblock %} {% block content %} +
{% block combo-content %} {% placeholder "content" %} {% endblock %} +
{% endblock %} {% block more-user-links %} diff --git a/data/themes/gadjo/templates/gadjo/base.html b/data/themes/gadjo/templates/gadjo/base.html new file mode 100644 index 00000000..abfe5a62 --- /dev/null +++ b/data/themes/gadjo/templates/gadjo/base.html @@ -0,0 +1,7 @@ +{% extends "gadjo/root.html" %} +{% load static %} + +{% block extrascripts %} + + +{% endblock %}