Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2pext
plugin_dbui
Commits
a3af450d
Commit
a3af450d
authored
13 years ago
by
Renaud Le Gac
Browse files
Options
Downloads
Patches
Plain Diff
Finalize the debug controller and remove the debug view.
parent
2b0e11e8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controllers/plugin_dbui.py
+30
-36
30 additions, 36 deletions
controllers/plugin_dbui.py
views/plugin_dbui/index.html
+1
-1
1 addition, 1 deletion
views/plugin_dbui/index.html
with
31 additions
and
37 deletions
controllers/plugin_dbui.py
+
30
−
36
View file @
a3af450d
...
...
@@ -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 languag
e
return
dict
(
p
extjs
=
pextjs
,
pmathjax
=
pmathjax
,
lg
=
lg
)
# return the
plugin configuration parameter as well as the respons
e
return
dict
(
p
lugin
=
plugin
)
def
status
():
...
...
This diff is collapsed.
Click to expand it.
views/plugin_dbui/index.html
+
1
−
1
View file @
a3af450d
...
...
@@ -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 -->
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment