Commit eaf6947b authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Polish common_settings.py

parent fdc7543a
......@@ -11,8 +11,17 @@ Note:
* directSvc
"""
import plugin_dbui as dbui
import plugin_event as event
from plugin_dbui import (configure_forms,
configure_grids,
Dbui)
from plugin_event import (Core,
CoreUi,
Event,
Report,
ReportUi,
Selector,
ViewportUi)
ctrl = request.controller
......@@ -35,7 +44,7 @@ is_dbui = (ctrl == "plugin_dbui") and \
fnct in ("debug", "documentations", "dbui_conf", "index")
if is_dbui:
dbui.Dbui.define_paths(
Dbui.define_paths(
app_about="static/plugin_event/ABOUT.html",
app_css=None,
app_changelog="static/plugin_event/CHANGELOG",
......@@ -51,7 +60,7 @@ if is_dbui:
app_pdf_user="static/plugin_event/docs/pdf/event_user.pdf",
app_script="static/app.js")
event.Event.define_paths("fr")
Event.define_paths("fr")
# ............................................................................
#
......@@ -64,11 +73,11 @@ is_db = (ctrl == "plugin_dbui" and fnct in ("call", "csv", "dbui_conf")) \
if is_db:
# register source for the reporting
event.Event.register_sources()
Event.register_sources()
event.Core.define_tables(db, T)
event.Report.define_tables(db, T)
event.Selector.define_tables(virtdb, db, T)
Core.define_tables(db, T)
Report.define_tables(db, T)
Selector.define_tables(virtdb, db, T)
# ............................................................................
#
......@@ -77,8 +86,8 @@ if is_db:
if ctrl == "plugin_dbui" and fnct in ("call", "dbui_conf"):
dbui.Dbui.initialise_ui()
directSvc = dbui.Dbui.start_directSvc()
Dbui.initialise_ui()
directSvc = Dbui.start_directSvc()
# common configuration for forms and grids
tables = ["auth_group",
......@@ -96,17 +105,19 @@ if ctrl == "plugin_dbui" and fnct in ("call", "dbui_conf"):
"projects",
"teams"]
dbui.configure_forms(tables, plugins=["pFormToolTip"], width=350)
configure_forms(tables, plugins=["pFormToolTip"], width=350)
dbui.configure_grids(tables, plugins=["pGridRowEditorConfirmDelete",
"pGridRowEditorContextMenu",
"pGridRowEditorDblClick",
"pGridToolbar"])
configure_grids(
tables,
plugins=["pGridRowEditorConfirmDelete",
"pGridRowEditorContextMenu",
"pGridRowEditorDblClick",
"pGridToolbar"])
# tune the user interface
event.CoreUi.define(db, T)
event.ReportUi.define(db, T)
CoreUi.define(db, T)
ReportUi.define(db, T)
# configure the main viewport
if fnct == "dbui_conf":
event.ViewportUi.define(db, T, virtdb)
ViewportUi.define(db, T, virtdb)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment