mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Render settings related JS from the settings blueprint.
This commit is contained in:
parent
4c29f4385f
commit
dbd7974e2a
17
web/pgadmin/settings/browser.py
Normal file
17
web/pgadmin/settings/browser.py
Normal file
@ -0,0 +1,17 @@
|
||||
##########################################################################
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2014, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
"""Browser integration functions for settings."""
|
||||
|
||||
from flask import render_template
|
||||
|
||||
def get_javascript_code():
|
||||
"""Render from the template and return any Javascript code snippets required
|
||||
in the browser"""
|
||||
return render_template("settings/browser.js")
|
@ -17,7 +17,7 @@ from flask.ext.security import login_required
|
||||
from . import get_setting, store_setting
|
||||
|
||||
# Initialise the module
|
||||
blueprint = Blueprint(MODULE_NAME, __name__, url_prefix='/' + MODULE_NAME)
|
||||
blueprint = Blueprint(MODULE_NAME, __name__, template_folder='templates', url_prefix='/' + MODULE_NAME)
|
||||
|
||||
@blueprint.route("/store", methods=['POST'])
|
||||
@blueprint.route("/store/<setting>/<value>", methods=['GET'])
|
||||
|
@ -42,9 +42,6 @@
|
||||
{% if config.DEBUG %}<script src="{{ url_for('static', filename='js/vendor/jquery-ui/jquery-ui.js') }}">{% else %}<script src="{{ url_for('static', filename='js/vendor/jquery-ui/jquery-ui.min.js') }}">{% endif %}</script>
|
||||
{% if config.DEBUG %}<script src="{{ url_for('static', filename='js/vendor/jquery-layout/jquery.layout.js') }}">{% else %}<script src="{{ url_for('static', filename='js/vendor/jquery-layout/jquery.layout.min.js') }}">{% endif %}</script>
|
||||
<script src="{{ url_for('static', filename='js/vendor/jquery-layout/plugins/jquery.layout.state.js') }}"></script>
|
||||
<script>
|
||||
{% include "js/settings.js" %}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
alertify.defaults.transition = "zoom";
|
||||
|
Loading…
Reference in New Issue
Block a user