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

Configuration of remote call and high level variables are moved to appbase.js

parent 5a5deec0
No related branches found
No related tags found
No related merge requests found
...@@ -152,8 +152,7 @@ def index(): ...@@ -152,8 +152,7 @@ def index():
return dict(clibs=csslibs,\ return dict(clibs=csslibs,\
jlibs=jslibs,\ jlibs=jslibs,\
alibs= applibs,\ alibs= applibs,\
appdebug=debug,\ appdebug=debug)
cfgSvcMethods=cfgSvc._getMethods())
def database(): def database():
......
...@@ -10,26 +10,39 @@ ...@@ -10,26 +10,39 @@
Ext.namespace('App'); Ext.namespace('App');
/** /**
* @cfg {Object} App.cfgSvcMethods * @cfg {String} App.name
* Ext.direct.Provider exposing methods for a web service. * Name of the web application.
* This constants is defined by the server. * This constants is defined by the server.
*/ */
/** /**
* @cfg {String} App.dburl * @cfg {Boolean} App.debug
* Define the url of the database router/controller * Activate the debug mode on the server side.
* This constants is defined by the server. * This constants is defined by the server.
*
*/ */
/** /**
* @cfg {Boolean} App.debug * @cfg {String} App.dburl
* Activate the debug mode on the server side. * Define the url of the database router/controller
* This constants is defined by the server. * This constants is defined by the server.
*
*/ */
App.dburl = '/' + App.name + '/plugin_dbui/database';
/** /**
* @cfg {String} App.name * @cfg {Object} App.cfgSvcMethods
* Name of the web application. * Ext.direct.Provider exposing methods for a web service.
* This constants is defined by the server. * 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}]
}
};
...@@ -17,19 +17,11 @@ ...@@ -17,19 +17,11 @@
{{for el in jlibs:}} {{for el in jlibs:}}
<script type="text/javascript" src="{{=el}}"></script>{{pass}} <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"> <script type="text/javascript">
Ext.namespace('App'); Ext.namespace('App');
App.name = '{{=request.application}}'; App.name = '{{=request.application}}';
App.debug = {{=str(appdebug).lower()}}; 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> </script>
<!-- application librairies --> <!-- application librairies -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment