Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tev
plugin_event
Commits
eaf6947b
Commit
eaf6947b
authored
Apr 01, 2017
by
LE GAC Renaud
Browse files
Polish common_settings.py
parent
fdc7543a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
18 deletions
+29
-18
models/common_settings.py
models/common_settings.py
+29
-18
No files found.
models/common_settings.py
View file @
eaf6947b
...
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment