From 914619bc3d646df8c86340deb4e0ddeeaf1938a6 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Tue, 31 Mar 2015 19:20:57 +0300 Subject: [PATCH] added support for ?title= argument; the hostname is now used as title by default --- src/handlers.py | 1 + static/js/main.js | 2 +- templates/main.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/handlers.py b/src/handlers.py index 12a302a..8f61823 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -154,6 +154,7 @@ class MainHandler(BaseHandler): main_sections=main_sections, camera_sections=camera_sections, hostname=socket.gethostname(), + title=self.get_argument('title', None), admin_username=config.get_main().get('@admin_username'), old_motion=config.is_old_motion()) diff --git a/static/js/main.js b/static/js/main.js index 96731b5..aeaf8a0 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -3654,7 +3654,7 @@ $(document).ready(function () { } else { - baseUri = qualifyUri(''); + baseUri = splitUrl(qualifyUri('')).baseUrl; /* restore the username from cookie */ window.username = getCookie('username'); diff --git a/templates/main.html b/templates/main.html index 7760b2c..1bbf8eb 100644 --- a/templates/main.html +++ b/templates/main.html @@ -46,7 +46,7 @@ {%- endmacro %} -{% block title %}{% if title %}{{title}}{% else %}motionEye{% endif %}{% endblock %} +{% block title %}{% if title %}{{title}}{% else %}{{hostname}}{% endif %}{% endblock %} {% block style %} {{super()}} -- 2.39.5