diff --git a/web/pgadmin/about/browser.py b/web/pgadmin/about/browser.py
index ad7a54f55..46e9b56a1 100644
--- a/web/pgadmin/about/browser.py
+++ b/web/pgadmin/about/browser.py
@@ -20,8 +20,7 @@ def get_help_menu_items():
'priority': 999,
'url': "#",
'onclick': "about_show()"}]
-
-def get_javascript_code():
- """Render from the template and return any Javascript code snippets required
- in the browser"""
- return render_template("about/browser.js")
\ No newline at end of file
+
+def get_scripts():
+ """Return a list of script URLs to include in the rendered page header"""
+ return [ url_for('about.script') ]
\ No newline at end of file
diff --git a/web/pgadmin/about/templates/about/browser.js b/web/pgadmin/about/templates/about/about.js
similarity index 75%
rename from web/pgadmin/about/templates/about/browser.js
rename to web/pgadmin/about/templates/about/about.js
index ee8311cd8..30591df30 100644
--- a/web/pgadmin/about/templates/about/browser.js
+++ b/web/pgadmin/about/templates/about/about.js
@@ -1,14 +1,3 @@
-{#
-##########################################################################
-#
-# pgAdmin 4 - PostgreSQL Tools
-#
-# Copyright (C) 2013 - 2014, The pgAdmin Development Team
-# This software is released under the PostgreSQL Licence
-#
-##########################################################################
-#}
-
function about_show() {
if (!alertify.aboutDialog) {
alertify.dialog('aboutDialog', function factory() {
diff --git a/web/pgadmin/about/views.py b/web/pgadmin/about/views.py
index 9115f50dc..44732df26 100644
--- a/web/pgadmin/about/views.py
+++ b/web/pgadmin/about/views.py
@@ -10,7 +10,7 @@
"""A blueprint module implementing the about box."""
MODULE_NAME = 'about'
-from flask import Blueprint, current_app, render_template, __version__
+from flask import Blueprint, Response, current_app, render_template, __version__
from flask.ext.security import current_user, login_required
import sys
@@ -37,3 +37,11 @@ def index():
info['current_user'] = current_user.email
return render_template(MODULE_NAME + '/index.html', info=info)
+
+@blueprint.route("/about.js")
+@login_required
+def script():
+ """Render the required Javascript"""
+ return Response(response=render_template("about/about.js"),
+ status=200,
+ mimetype="application/javascript")
\ No newline at end of file
diff --git a/web/pgadmin/browser/templates/browser/index.html b/web/pgadmin/browser/templates/browser/index.html
index 0b4f41236..4f0508bda 100644
--- a/web/pgadmin/browser/templates/browser/index.html
+++ b/web/pgadmin/browser/templates/browser/index.html
@@ -19,37 +19,29 @@
File
-
Edit
-
Tools
-
Help
-
diff --git a/web/pgadmin/redirects/views.py b/web/pgadmin/redirects/views.py
index 116d8cddf..e481237d8 100644
--- a/web/pgadmin/redirects/views.py
+++ b/web/pgadmin/redirects/views.py
@@ -22,3 +22,8 @@ blueprint = Blueprint(MODULE_NAME, __name__)
def index():
"""Redirect users hitting the root to the browser"""
return redirect(url_for('browser.index'))
+
+@blueprint.route('/favicon.ico')
+def favicon():
+ """Redirect to the favicon"""
+ return redirect(url_for('static', filename='favicon.ico'))
diff --git a/web/pgadmin/settings/browser.py b/web/pgadmin/settings/browser.py
index 0a2fd7890..f64a4f819 100644
--- a/web/pgadmin/settings/browser.py
+++ b/web/pgadmin/settings/browser.py
@@ -9,9 +9,8 @@
"""Browser integration functions for settings."""
-from flask import render_template
+from flask import url_for
-def get_javascript_code():
- """Render from the template and return any Javascript code snippets required
- in the browser"""
- return render_template("settings/browser.js")
\ No newline at end of file
+def get_scripts():
+ """Return a list of script URLs to include in the rendered page header"""
+ return [ url_for('settings.script') ]
\ No newline at end of file
diff --git a/web/pgadmin/settings/templates/settings/browser.js b/web/pgadmin/settings/templates/settings/settings.js
similarity index 100%
rename from web/pgadmin/settings/templates/settings/browser.js
rename to web/pgadmin/settings/templates/settings/settings.js
diff --git a/web/pgadmin/settings/views.py b/web/pgadmin/settings/views.py
index f0f8a9c04..db392ae73 100644
--- a/web/pgadmin/settings/views.py
+++ b/web/pgadmin/settings/views.py
@@ -11,7 +11,7 @@
MODULE_NAME = 'settings'
import config
-from flask import Blueprint, Response, abort, request
+from flask import Blueprint, Response, abort, request, render_template
from flask.ext.security import login_required
from . import get_setting, store_setting
@@ -19,6 +19,14 @@ from . import get_setting, store_setting
# Initialise the module
blueprint = Blueprint(MODULE_NAME, __name__, template_folder='templates', url_prefix='/' + MODULE_NAME)
+@blueprint.route("/settings.js")
+@login_required
+def script():
+ """Render the required Javascript"""
+ return Response(response=render_template("settings/settings.js"),
+ status=200,
+ mimetype="application/javascript")
+
@blueprint.route("/store", methods=['POST'])
@blueprint.route("/store//", methods=['GET'])
@login_required
diff --git a/web/pgadmin/templates/base.html b/web/pgadmin/templates/base.html
index e67babe1d..5bb0ee99d 100755
--- a/web/pgadmin/templates/base.html
+++ b/web/pgadmin/templates/base.html
@@ -25,8 +25,7 @@
{% if stylesheets is defined %}
{% for stylesheet in stylesheets %}
-
- {% endfor %}
+ {% endfor %}
{% endif %}
@@ -41,8 +40,7 @@
{% if scripts is defined %}
{% for script in scripts %}
-
- {% endfor %}
+ {% endfor %}
{% endif %}