diff --git a/controllers/plugin_dbui.py b/controllers/plugin_dbui.py index 655977fbf1c5ffc7989a4ebcf1c9182d876e891c..2a24b37997a8693db3c01de9a2c7d420bf6bc35c 100644 --- a/controllers/plugin_dbui.py +++ b/controllers/plugin_dbui.py @@ -152,8 +152,7 @@ def index(): return dict(clibs=csslibs,\ jlibs=jslibs,\ alibs= applibs,\ - appdebug=debug,\ - cfgSvcMethods=cfgSvc._getMethods()) + appdebug=debug) def database(): diff --git a/static/plugin_dbui/lib/appbase.js b/static/plugin_dbui/lib/appbase.js index 20bc8a0b8deab31b309b6c6a41cb3226a4872c59..4d7054822dd23fc4fad37ffce5cc955a3bef8777 100644 --- a/static/plugin_dbui/lib/appbase.js +++ b/static/plugin_dbui/lib/appbase.js @@ -10,26 +10,39 @@ Ext.namespace('App'); /** - * @cfg {Object} App.cfgSvcMethods - * Ext.direct.Provider exposing methods for a web service. + * @cfg {String} App.name + * Name of the web application. * This constants is defined by the server. */ /** - * @cfg {String} App.dburl - * Define the url of the database router/controller + * @cfg {Boolean} App.debug + * Activate the debug mode on the server side. * This constants is defined by the server. + * */ /** - * @cfg {Boolean} App.debug - * Activate the debug mode on the server side. + * @cfg {String} App.dburl + * Define the url of the database router/controller * This constants is defined by the server. - * */ +App.dburl = '/' + App.name + '/plugin_dbui/database'; /** - * @cfg {String} App.name - * Name of the web application. + * @cfg {Object} App.cfgSvcMethods + * Ext.direct.Provider exposing methods for a web service. * This constants is defined by the server. - */ \ No newline at end of file + */ + +App.cfgSvcMethods = { + "url": '/' + App.name + '/plugin_dbui/configuration', + "type":"remoting", + "actions": { + "cfgSvc": [{'name': 'getFormModel', 'len': 1}, + {'name': 'getGridModel', 'len': 1}, + {'name': 'getTables', 'len': 0}] + } +}; + + diff --git a/views/plugin_dbui.html b/views/plugin_dbui.html index c549076a49f9bae5ebd0ecdcae6eeeb528740262..d7d3c14edd3a660e4ef8da8cde5f4a2e67dd486d 100644 --- a/views/plugin_dbui.html +++ b/views/plugin_dbui.html @@ -17,19 +17,11 @@ {{for el in jlibs:}} <script type="text/javascript" src="{{=el}}"></script>{{pass}} - <!-- Namespace, global variables and remote methods for the application --> + <!-- Namespace, global variables for the application --> <script type="text/javascript"> Ext.namespace('App'); App.name = '{{=request.application}}'; App.debug = {{=str(appdebug).lower()}}; - App.dburl = '/{{=request.application}}/plugin_dbui/database'; - App.cfgSvcMethods = { - "url": '/{{=request.application}}/plugin_dbui/configuration', - "type":"remoting", - "actions": { - "cfgSvc": {{=XML(cfgSvcMethods)}} - } - }; </script> <!-- application librairies -->