summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2015-06-06 11:44:34 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2015-06-06 11:44:57 (GMT)
commit81f8a9a089e54e65321c46a702025e81ffbf67f2 (patch)
tree041b5e1cce52c3c67d9d6d3c96180bcacfed0926
parent7997a2fab9d642e5f21fcd5b2213f64d14b7e61e (diff)
downloadcombo-81f8a9a089e54e65321c46a702025e81ffbf67f2.zip
combo-81f8a9a089e54e65321c46a702025e81ffbf67f2.tar.gz
combo-81f8a9a089e54e65321c46a702025e81ffbf67f2.tar.bz2
front of portal agent
-rw-r--r--data/themes/gadjo/static/js/agent-portal.js7
-rw-r--r--data/themes/gadjo/static/js/publik.js2
-rw-r--r--data/themes/gadjo/templates/combo/page_template.html3
-rw-r--r--data/themes/gadjo/templates/gadjo/base.html7
4 files changed, 19 insertions, 0 deletions
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 0000000..2e67df8
--- /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 474d1ce..96afb56 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 d8ebaa5..12485f0 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 %}
<script src="/__services.js"></script>
+<script src="{% static "js/agent-portal.js" %}"></script>
<script src="{% static "js/publik.js" %}"></script>
{% endblock %}
@@ -16,9 +17,11 @@
{% block logout-url %}{% url 'auth_logout' %}{% endblock %}
{% block content %}
+<div id="portal-agent-content">
{% block combo-content %}
{% placeholder "content" %}
{% endblock %}
+</div>
{% 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 0000000..abfe5a6
--- /dev/null
+++ b/data/themes/gadjo/templates/gadjo/base.html
@@ -0,0 +1,7 @@
+{% extends "gadjo/root.html" %}
+{% load static %}
+
+{% block extrascripts %}
+<script src="/__services.js"></script>
+<script src="{% static "js/publik.js" %}"></script>
+{% endblock %}