Files
pgadmin4/web/pgadmin/about/browser.py
Dave Page 53d649de70 Add support for creating dialogs, and add an About dialog.
This adds bootstrap-dialog to help with creation of nice dialogs,
and adds the ability for modules to render Javascript into the
browser, and specify onclick handlers in the menu system.

Also add a basic About dialog, using the new infrastructure and
showing some useful info about the application.
2015-01-27 16:54:39 +00:00

27 lines
883 B
Python

##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2014, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
"""Browser integration functions for the About module."""
from flask import render_template, url_for
import config
def get_help_menu_items():
"""Return a (set) of dicts of help menu items, with name, priority, URL and
onclick code."""
return [{'name': 'About %s' % (config.APP_NAME),
'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")