Commit 43e5a68e authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update Dbui to refactorize the method initialise in intialise_paths and initialise_ui.

parent b561d0ce
...@@ -9,7 +9,7 @@ from datetime import datetime ...@@ -9,7 +9,7 @@ from datetime import datetime
#............................................................................. #.............................................................................
# #
# LANGUAGE # Language
# #
T.set_current_languages("en", "en-gb", "en-us") # mother tongue T.set_current_languages("en", "en-gb", "en-us") # mother tongue
...@@ -18,10 +18,12 @@ T.lazy = False # immediate translation ...@@ -18,10 +18,12 @@ T.lazy = False # immediate translation
#............................................................................. #.............................................................................
# #
# PLUGIN DBUI # Configure plugin_dbui
# #
dbui.Dbui.initialise( plg_dbui = dbui.Dbui
plg_dbui.initialise_paths(
# app_css=None, # app_css=None,
# app_js=None, # app_js=None,
app_git="https://gitlab.in2p3.fr/w2pext/plugin_dbui.git", app_git="https://gitlab.in2p3.fr/w2pext/plugin_dbui.git",
...@@ -31,11 +33,13 @@ dbui.Dbui.initialise( ...@@ -31,11 +33,13 @@ dbui.Dbui.initialise(
# dbui_libmin="static/plugin_dbui/dbui-debug.js" # dbui_libmin="static/plugin_dbui/dbui-debug.js"
) )
directSvc = dbui.Dbui.start_directSvc() plg_dbui.initialise_ui()
directSvc = plg_dbui.start_directSvc()
#............................................................................. #.............................................................................
# #
# CONSTANTS # Constants
# #
undef = T(dbui.UNDEF) undef = T(dbui.UNDEF)
...@@ -44,7 +48,7 @@ year = datetime.now().year ...@@ -44,7 +48,7 @@ year = datetime.now().year
#............................................................................. #.............................................................................
# #
# COMMON CONFIGURATION FOR FORMS AND GRIDS # Common configuration for forms and grids
# #
tables = ["categories", tables = ["categories",
......
...@@ -63,7 +63,7 @@ class Dbui(object): ...@@ -63,7 +63,7 @@ class Dbui(object):
""" """
@staticmethod @staticmethod
def initialise(**kwargs): def initialise_paths(**kwargs):
"""Initialise the configuration of the the plugin dbui, namely paths """Initialise the configuration of the the plugin dbui, namely paths
and a persistent storage. and a persistent storage.
...@@ -192,15 +192,27 @@ class Dbui(object): ...@@ -192,15 +192,27 @@ class Dbui(object):
plugin.dbui_conf = plugin.dbui_conf % application plugin.dbui_conf = plugin.dbui_conf % application
plugin.dbui_conf_debug = plugin.dbui_conf_debug % application plugin.dbui_conf_debug = plugin.dbui_conf_debug % application
# persistent storage for the UI (private) @staticmethod
plugin.modifier_fields={} def initialise_ui():
plugin.modifier_forms={} """Initialise persistent storage for the plugin dbui.
plugin.modifier_grids={}
plugin.modifier_stores={}
plugin.modifier_viewports = Storage(extjs={})
plugin.static_stores={}
return plugin Attributes:
modifier_fields (dict):
modifier_forms (dict):
modifier_grids (dict):
modifier_stores (dict):
modifier_viewports (gluon.storage.Storage):
static_stores (dict):
"""
plugin = PluginManager("dbui").dbui
plugin.modifier_fields = {}
plugin.modifier_forms = {}
plugin.modifier_grids = {}
plugin.modifier_stores = {}
plugin.modifier_viewports = Storage(extjs={})
plugin.static_stores = {}
@staticmethod @staticmethod
def start_directSvc(): def start_directSvc():
......
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