mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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.
27 lines
883 B
Python
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") |