]> www.vanbest.org Git - motioneye-debian/commitdiff
added support for ?title= argument; the hostname is now used as title by
authorCalin Crisan <ccrisan@gmail.com>
Tue, 31 Mar 2015 16:20:57 +0000 (19:20 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Tue, 31 Mar 2015 16:20:57 +0000 (19:20 +0300)
default

src/handlers.py
static/js/main.js
templates/main.html

index 12a302a20292524a25ec01fa9a8f914010f9513c..8f6182356a7ea33cf6a8565c9e5a93d88c4daccd 100644 (file)
@@ -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())
 
index 96731b5dc9722aa0bea9f6a8c6b71096e940a152..aeaf8a08b153d8de0a29bfee09c1fa78e11554fb 100644 (file)
@@ -3654,7 +3654,7 @@ $(document).ready(function () {
 
     }
     else {
-        baseUri = qualifyUri('');
+        baseUri = splitUrl(qualifyUri('')).baseUrl;
 
         /* restore the username from cookie */
         window.username = getCookie('username');
index 7760b2ca1ac9d43d7dfd8e7df384211342311573..1bbf8ebe723f36cb070fcbe99cf238f3e9342ef3 100644 (file)
@@ -46,7 +46,7 @@
     </tr>
 {%- endmacro %}
 
-{% block title %}{% if title %}{{title}}{% else %}motionEye{% endif %}{% endblock %}
+{% block title %}{% if title %}{{title}}{% else %}{{hostname}}{% endif %}{% endblock %}
 
 {% block style %}
     {{super()}}