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
b462294a
Commit
b462294a
authored
14 years ago
by
Renaud Le Gac
Browse files
Options
Downloads
Patches
Plain Diff
add the plugin parameter user_src_path and user_libmin to handle additional user javascript code.
parent
0f7f31b3
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
+33
-1
33 additions, 1 deletion
controllers/plugin_dbui.py
models/plugin_dbui.py
+3
-1
3 additions, 1 deletion
models/plugin_dbui.py
with
36 additions
and
2 deletions
controllers/plugin_dbui.py
+
33
−
1
View file @
b462294a
...
...
@@ -45,6 +45,20 @@ def index():
script_path
The relative path where scripts are located.
By default static/plugin_dbui/scripts
user_src_path
the relative path to a directory containing additional
javascript source code for user application classes and plugins.
By default static/src
user_libmin
The relative path to the file containing the additional
javascript library for user application classes and plugins.
It is the minified version of the source code.
If the library exits it is loaded otherwise the source
code is loaded. When the debug flag is activate the source
code is always loaded.
PRIVATE PARAMETERS
...
...
@@ -128,7 +142,25 @@ def index():
li
.
sort
()
response
.
files
.
extend
(
li
)
# minified version of the user library
if
not
debug
and
plugins
.
dbui
.
user_libmin
:
if
os
.
path
.
exists
(
os
.
path
.
join
(
server_path
,
plugins
.
dbui
.
user_libmin
)):
response
.
files
.
append
(
os
.
path
.
join
(
base
,
plugins
.
dbui
.
user_libmin
))
# user source code -- respect alphabetic order
else
:
li
=
[]
appdir
=
os
.
path
.
join
(
base
,
plugins
.
dbui
.
user_src_path
)
svcdir
=
os
.
path
.
join
(
server_path
,
plugins
.
dbui
.
user_src_path
)
if
os
.
path
.
exists
(
svcdir
):
for
file
in
os
.
listdir
(
svcdir
):
if
file
.
endswith
(
"
.js
"
):
li
.
append
(
os
.
path
.
join
(
appdir
,
file
))
li
.
sort
()
response
.
files
.
extend
(
li
)
# main application script
response
.
files
.
append
(
os
.
path
.
join
(
base
,
plugins
.
dbui
.
script_path
,
script
))
...
...
This diff is collapsed.
Click to expand it.
models/plugin_dbui.py
+
3
−
1
View file @
b462294a
...
...
@@ -12,7 +12,9 @@ plugins = PluginManager('dbui',
grid_modifiers
=
{},
viewport_modifiers
=
Storage
(
hidden_tables
=
[]),
page_view
=
'
plugin_dbui.html
'
,
script_path
=
'
static/plugin_dbui/scripts
'
)
script_path
=
'
static/plugin_dbui/scripts
'
,
user_src_path
=
'
static/src
'
,
user_libmin
=
None
)
# Start common services
dbSvc
=
dbui
.
DbSvc
(
db
)
...
...
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