Skip to content
Snippets Groups Projects
Commit 91fe1a7e authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

Rename the CfgSvc method get_form_model and get_grid_model as get_form and get_grid respectively.

parent 04bb1650
No related branches found
No related tags found
No related merge requests found
...@@ -414,8 +414,11 @@ class CfgSvc(object): ...@@ -414,8 +414,11 @@ class CfgSvc(object):
return self._set.is_set_field(tablename, fieldname) return self._set.is_set_field(tablename, fieldname)
def get_form_model(self, tablename): def get_form(self, tablename):
"""Build the configuration dictionary for an entryForm widget. """Build the configuration options for the App.form.FormPanel
associated to the database table tablename.
Return a dictionary.
""" """
model = {"title": str(self._translate(tablename.title())), model = {"title": str(self._translate(tablename.title())),
...@@ -430,10 +433,12 @@ class CfgSvc(object): ...@@ -430,10 +433,12 @@ class CfgSvc(object):
return di return di
def get_grid_model(self, tablename): def get_grid(self, tablename):
"""Build the configuration dictionary for the Ext.grid.GridPanel """Build the configuration options for the Ext.grid.GridPanel
widget associated to the database table tablename. widget associated to the database table tablename.
Return a dictionary
""" """
formModel = {'xtype': 'xform', formModel = {'xtype': 'xform',
...@@ -464,7 +469,8 @@ class CfgSvc(object): ...@@ -464,7 +469,8 @@ class CfgSvc(object):
def get_viewport(self): def get_viewport(self):
"""Build the dictionary for the configuration options of the viewport. """Build the the configuration options of the Ext.Viewport
the main widget of the user interface.
The interface is a tab widget with a tree panel encapsulated in a The interface is a tab widget with a tree panel encapsulated in a
viewport. The tree exposes two main nodes Forms and Tables. viewport. The tree exposes two main nodes Forms and Tables.
......
This diff is collapsed.
...@@ -44,8 +44,8 @@ App.cfgSvcMethods = { ...@@ -44,8 +44,8 @@ App.cfgSvcMethods = {
"url": '/' + App.name + '/plugin_dbui/configuration', "url": '/' + App.name + '/plugin_dbui/configuration',
"type": "remoting", "type": "remoting",
"actions": { "actions": {
"cfgSvc": [{'name': 'get_form_model', 'len': 1}, "cfgSvc": [{'name': 'get_form', 'len': 1},
{'name': 'get_grid_model', 'len': 1}, {'name': 'get_grid', 'len': 1},
{'name': 'get_viewport', 'len': 0}] {'name': 'get_viewport', 'len': 0}]
} }
}; };
......
...@@ -49,7 +49,7 @@ App.viewport.InTreePanelForm = Ext.extend(App.viewport.InTreePanelBase, { ...@@ -49,7 +49,7 @@ App.viewport.InTreePanelForm = Ext.extend(App.viewport.InTreePanelBase, {
table = this.getNodeNameFromId(component.id); table = this.getNodeNameFromId(component.id);
// Ask the server the widget configuration and create it // Ask the server the widget configuration and create it
cfgSvc.get_form_model(table, function (provider, response) { cfgSvc.get_form(table, function (provider, response) {
cfg = response.result; cfg = response.result;
wdg = Ext.ComponentMgr.create(cfg); wdg = Ext.ComponentMgr.create(cfg);
......
...@@ -89,7 +89,7 @@ App.viewport.InTreePanelGrid = Ext.extend(App.viewport.InTreePanelBase, { ...@@ -89,7 +89,7 @@ App.viewport.InTreePanelGrid = Ext.extend(App.viewport.InTreePanelBase, {
table = this.getNodeNameFromId(component.id); table = this.getNodeNameFromId(component.id);
// Ask the server the widget configuration and create it // Ask the server the widget configuration and create it
cfgSvc.get_grid_model(table, createGrid, this); cfgSvc.get_grid(table, createGrid, this);
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment