From 1d6f30230d6de7a29189e6f33b47c653b38c0a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 20 May 2015 11:27:26 +0200 Subject: [PATCH] distribute theme for "portail agent" (#7294) --- MANIFEST.in | 1 + data/themes/gadjo/static/css/agent-portal.css | 5 ++ data/themes/gadjo/static/js/publik.js | 86 ++++++++++++++++++++++ .../themes/gadjo/templates/combo/manager_base.html | 38 ++++++++++ data/themes/gadjo/templates/combo/menu.html | 14 ++++ .../gadjo/templates/combo/page_template.html | 38 ++++++++++ .../templates/combo/page_template_sidebar.html | 13 ++++ data/themes/gadjo/templates/combo/placeholder.html | 8 ++ setup.py | 9 +++ 9 files changed, 212 insertions(+) create mode 100644 data/themes/gadjo/static/css/agent-portal.css create mode 100644 data/themes/gadjo/static/js/publik.js create mode 100644 data/themes/gadjo/templates/combo/manager_base.html create mode 100644 data/themes/gadjo/templates/combo/menu.html create mode 100644 data/themes/gadjo/templates/combo/page_template.html create mode 100644 data/themes/gadjo/templates/combo/page_template_sidebar.html create mode 100644 data/themes/gadjo/templates/combo/placeholder.html diff --git a/MANIFEST.in b/MANIFEST.in index 7d9aa8d..f2ad17f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ recursive-include combo/locale *.po *.mo # static recursive-include combo/manager/static *.css *.js *.ico *.gif *.png *.jpg recursive-include combo/public/static *.css *.js *.ico *.gif *.png *.jpg +recursive-include data/themes *.css *.js *.gif *.png *.jpg *.jpeg *.html # templates recursive-include combo/apps/wcs/templates *.html diff --git a/data/themes/gadjo/static/css/agent-portal.css b/data/themes/gadjo/static/css/agent-portal.css new file mode 100644 index 0000000..a586495 --- /dev/null +++ b/data/themes/gadjo/static/css/agent-portal.css @@ -0,0 +1,5 @@ +div.welcome { + border: 1px solid #e4e4e4; + background: #fcfcfc; + padding: 1ex; +} diff --git a/data/themes/gadjo/static/js/publik.js b/data/themes/gadjo/static/js/publik.js new file mode 100644 index 0000000..ecb1583 --- /dev/null +++ b/data/themes/gadjo/static/js/publik.js @@ -0,0 +1,86 @@ +GADJO_DEFAULT_SIDEPAGE_STATUS = 'expanded'; + +$(function() { + var all_done = false; + + function check_all_done() { + var local_done = true; + $(HOBO_ENVIRONMENT).each(function(index, service) { + if (service.data === undefined) { + local_done = false; + } + }); + all_done = local_done; + if (all_done) { + window.sessionStorage.hobo_environment = JSON.stringify(HOBO_ENVIRONMENT); + window.sessionStorage.hobo_environment_timestamp = Date.now(); + create_menu_items(); + } + } + + function create_menu_items() { + $('#sidepage-menu').remove(); + var menu_links = $('