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

Finalize the debug controller and remove the debug view.

parent 2b0e11e8
No related branches found
No related tags found
No related merge requests found
......@@ -108,34 +108,28 @@ def debug():
"""
# check the presence of the ExtJS and MathJax plugins
dbui = local_import('plugin_dbui')
pextjs = dbui.get_plugin_path('plugin_extjs')
pmathjax = dbui.get_plugin_path('plugin_mathjax')
# internationalization (fr, fr-fr, fr-ca, ...)
lg = dbui.get_language()
# dbui javascript source code -- respect the alphabetic order
response.files.extend(dbui.get_files('static/plugin_dbui/src',
ext='.js',
alpha=True))
# user javascript source code -- respect the alphabetic order
response.files.extend(dbui.get_files(plugins.dbui.user_src_path,
ext='.js',
alpha=True))
# main script
# keep in mind that the script can be selected from the url
# using the argument script=foo
pscript = dbui.get_script_path(plugins.dbui.script_path)
plugin = plugins.dbui
# plugin and application css files
response.files.extend(dbui.get_file_paths(plugin.base_css, ext='.css'))
response.files.extend(dbui.get_file_paths(plugin.app_css, ext='.css'))
# plugin and application javascript source code
response.files.extend(dbui.get_file_paths(plugin.base_js_dir, ext='.js'))
response.files.extend(dbui.get_file_paths(plugin.app_js_dir, ext='.js'))
# main script which can be defined in many different ways
pscript = dbui.get_script_path(plugin)
response.files.append(pscript)
# switch ON the debug mode on the server side
session.debug = True
# select the view
response.view = 'plugin_dbui/index.html'
# return the ExtJS path, the language
# and a list of files in response.files
return dict(pextjs=pextjs, pmathjax=pmathjax, lg=lg)
# return the plugin configuration parameter as well as the response
return dict(plugin=plugin)
......@@ -212,28 +206,28 @@ def index():
is launched.
"""
# check the presence of the ExtJS and MathJax plugins
dbui = local_import('plugin_dbui')
pextjs = dbui.get_plugin_path('plugin_extjs')
pmathjax = dbui.get_plugin_path('plugin_mathjax')
plugin = plugins.dbui
# internationalization (fr, fr-fr, fr-ca, ...)
lg = dbui.get_language()
# plugin and application css files
response.files.extend(dbui.get_file_paths(plugin.base_css, ext='.css'))
response.files.extend(dbui.get_file_paths(plugin.app_css, ext='.css'))
# compressed version of the user library
response.files.extend(dbui.get_files(plugins.dbui.user_libmin))
# compressed version of the plugin javascript libraries
response.files.extend(dbui.get_file_paths(plugin.base_libmin, ext='.js'))
# compressed version of the application javascript library
response.files.extend(dbui.get_file_paths(plugin.app_libmin, ext='.js'))
# main script
# keep in mind that the script can be selected from the url
# using the argument script=foo
pscript = dbui.get_script_path(plugins.dbui.script_path)
# main script which can be defined in many different ways
pscript = dbui.get_script_path(plugin)
response.files.append(pscript)
# switch off the debug mode on the server side
session.debug = False
# return the ExtJS, MathJax paths and the language
return dict(pextjs=pextjs, pmathjax=pmathjax, lg=lg)
# return the plugin configuration parameter as well as the response
return dict(plugin=plugin)
def status():
......
......@@ -27,7 +27,7 @@
<!-- extjs + dbui + application css -->
<link rel="stylesheet" type="text/css" href="{{=plugin.base_pextjs}}/resources/css/ext-all.css"/>
{{for el in response.files:}}{{if el.endswith('.css'):}}<link rel="stylesheet" type="text/css" href="{{=el}}"/>{{pass}}
{{for el in response.files:}}{{if el.endswith('.css'):}}<link rel="stylesheet" type="text/css" href="{{=el}}"/>{{else: continue}}{{pass}}
{{pass}}
<!-- extjs javascript library -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment