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
0634076a
Commit
0634076a
authored
10 years ago
by
LE GAC Renaud
Browse files
Options
Downloads
Patches
Plain Diff
The documentation view uses Ext.data.Store instead of the Ext.data.ArrayStore.
parent
b742a658
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
+62
-45
62 additions, 45 deletions
controllers/plugin_dbui.py
views/plugin_dbui/documentations.html
+20
-18
20 additions, 18 deletions
views/plugin_dbui/documentations.html
with
82 additions
and
63 deletions
controllers/plugin_dbui.py
+
62
−
45
View file @
0634076a
...
@@ -224,7 +224,7 @@ def documentations():
...
@@ -224,7 +224,7 @@ def documentations():
and for the source code.
and for the source code.
"""
"""
from
plugin_dbui
import
get_reference_paths
from
plugin_dbui
import
get_reference_paths
,
Store
# alias
# alias
a
=
'
<a href=
"
%s
"
target=
"
_blank
"
>%s</a>
'
a
=
'
<a href=
"
%s
"
target=
"
_blank
"
>%s</a>
'
...
@@ -248,60 +248,77 @@ def documentations():
...
@@ -248,60 +248,77 @@ def documentations():
if
os
.
path
.
exists
(
os
.
path
.
join
(
apath
,
'
static/docs/jsduck/index.html
'
)):
if
os
.
path
.
exists
(
os
.
path
.
join
(
apath
,
'
static/docs/jsduck/index.html
'
)):
jsdoc
=
a
%
(
URL
(
'
static
'
,
'
docs/jsduck/index.html
'
),
trJS
)
jsdoc
=
a
%
(
URL
(
'
static
'
,
'
docs/jsduck/index.html
'
),
trJS
)
# configuration of the Ext.data.
Array
for the documentation
# configuration of the Ext.data.
Store
for the documentation
cfg
=
dict
()
cfg
=
Store
()
cfg
[
'
fields
'
]
=
[{
'
name
'
:
'
code
'
,
'
type
'
:
'
string
'
},
cfg
.
fields
=
[
dict
(
name
=
'
code
'
,
type
=
'
string
'
),
{
'
name
'
:
'
developer
'
,
'
type
'
:
'
string
'
},
dict
(
name
=
'
developer
'
,
type
=
'
string
'
),
{
'
name
'
:
'
python
'
,
'
type
'
:
'
string
'
},
dict
(
name
=
'
python
'
,
type
=
'
string
'
),
{
'
name
'
:
'
javascript
'
,
'
type
'
:
'
string
'
}]
dict
(
name
=
'
javascript
'
,
type
=
'
string
'
)]
r1
=
(
request
.
application
,
userdoc
,
pydoc
,
jsdoc
)
r1
=
dict
(
code
=
request
.
application
,
developer
=
userdoc
,
r2
=
(
a
%
(
"
https://marprod.in2p3.fr/plugin_dbui_book
"
,
"
plugin_dbui
"
),
python
=
pydoc
,
a
%
(
"
https://marprod.in2p3.fr/plugin_dbui_book/default/chapter/29
"
,
trDev
),
javascript
=
jsdoc
)
a
%
(
URL
(
'
static
'
,
'
plugin_dbui/docs/epydoc/index.html
'
),
trPy
),
a
%
(
URL
(
'
static
'
,
'
plugin_dbui/docs/jsduck/index.html
'
),
trJS
))
r2
=
dict
(
code
=
a
%
(
"
https://marprod.in2p3.fr/plugin_dbui_book
"
,
"
plugin_dbui
"
),
developer
=
a
%
(
"
https://marprod.in2p3.fr/plugin_dbui_book/default/chapter/29
"
,
trDev
),
python
=
a
%
(
URL
(
'
static
'
,
'
plugin_dbui/docs/epydoc/index.html
'
),
trPy
),
javascript
=
a
%
(
URL
(
'
static
'
,
'
plugin_dbui/docs/jsduck/index.html
'
),
trJS
))
r3
=
(
a
%
(
"
http://web2py.com/
"
,
"
Web2py
"
),
r3
=
dict
(
code
=
a
%
(
"
http://web2py.com/
"
,
"
Web2py
"
),
a
%
(
"
http://web2py.com/book
"
,
trDev
),
developer
=
a
%
(
"
http://web2py.com/book
"
,
trDev
),
a
%
(
"
http://www.web2py.com/examples/static/epydoc/index.html
"
,
trPy
),
python
=
a
%
(
"
http://www.web2py.com/examples/static/epydoc/index.html
"
,
trPy
),
""
)
javascript
=
""
)
r4
=
(
a
%
(
"
http://www.sencha.com/products/extjs/
"
,
"
Ext JS
"
),
r4
=
dict
(
code
=
a
%
(
"
http://www.sencha.com/products/extjs/
"
,
"
Ext JS
"
),
""
,
developer
=
""
,
""
,
python
=
""
,
a
%
(
"
http://docs.sencha.com/extjs/4.2.1/
"
,
trJS
))
javascript
=
a
%
(
"
http://docs.sencha.com/extjs/4.2.1/
"
,
trJS
))
r5
=
(
a
%
(
"
http://www.mathjax.org/
"
,
"
MathJax
"
),
r5
=
dict
(
code
=
a
%
(
"
http://www.mathjax.org/
"
,
"
MathJax
"
),
""
,
developer
=
""
,
""
,
python
=
""
,
a
%
(
"
http://docs.mathjax.org/
"
,
trJS
))
javascript
=
a
%
(
"
http://docs.mathjax.org/
"
,
trJS
))
r6
=
(
a
%
(
"
http://ace.c9.io/#nav=about
"
,
"
Ace
"
),
r6
=
dict
(
code
=
a
%
(
"
http://ace.c9.io/#nav=about
"
,
"
Ace
"
),
""
,
developer
=
""
,
""
,
python
=
""
,
a
%
(
"
http://ace.c9.io/#nav=api
"
,
trJS
))
javascript
=
a
%
(
"
http://ace.c9.io/#nav=api
"
,
trJS
))
cfg
[
'
data
'
]
=
[
r1
,
r2
,
r3
,
r4
,
r5
,
r6
]
cfg
.
data
=
[
r1
,
r2
,
r3
,
r4
,
r5
,
r6
]
cfg_doc
=
json
.
dumps
(
cfg
)
cfg_doc
=
json
.
dumps
(
cfg
)
# configuration of the Ext.data.Array for the source code
# configuration of the Ext.data.Store for the source code
cfg
=
dict
()
cfg
=
Store
()
cfg
[
'
fields
'
]
=
[{
'
name
'
:
'
code
'
,
'
type
'
:
'
string
'
},
cfg
.
fields
=
[
dict
(
name
=
'
code
'
,
type
=
'
string
'
),
{
'
name
'
:
'
source
'
,
'
type
'
:
'
string
'
}]
dict
(
name
=
'
source
'
,
type
=
'
string
'
)]
r1
=
(
request
.
application
,
"
<em>git clone http://marwww.in2p3.fr/~legac/wap/git/%s.git</em>
"
%
request
.
application
)
r1
=
dict
(
code
=
request
.
application
,
r2
=
(
"
plugin_dbui
"
,
"
<em>git clone http://marwww.in2p3.fr/~legac/wap/git/web2py_plugin_dbui.git</em>
"
)
source
=
"
<em>git clone http://www.cppm.in2p3.fr/~legac/wap/git/
"
r3
=
(
"
Web2py
"
,
"
<em>git clone git://github.com/web2py/web2py.git</em>
"
)
"
%s.git</em>
"
%
request
.
application
)
r4
=
(
"
Ext JS
"
,
"
<em>Download from the Ext JS web site.</em><br>
"
r2
=
dict
(
code
=
"
plugin_dbui
"
,
"
<em>In the local directory: %s/static/plugin_extjs/src</em>
"
%
request
.
application
)
source
=
"
<em>git clone http://www.cppm.in2p3.fr/~legac/wap/git/
"
r5
=
(
"
MathJax
"
,
"
<em>git clone http://github.com/mathjax/MathJax</em>
"
)
"
web2py_plugin_dbui.git</em>
"
)
r6
=
(
"
Ace
"
,
"
<em>git clone git://github.com/ajaxorg/ace.git</em>
"
)
r3
=
dict
(
code
=
"
Web2py
"
,
source
=
"
<em>git clone git://github.com/web2py/web2py.git</em>
"
)
r4
=
dict
(
code
=
"
Ext JS
"
,
source
=
"
<em>Download from the Ext JS web site. </em><br>
"
"
<em>It is also available in the local directory:
"
"
%s/static/plugin_extjs/src</em>
"
%
request
.
application
)
r5
=
dict
(
code
=
"
MathJax
"
,
source
=
"
<em>git clone http://github.com/mathjax/MathJax</em>
"
)
r6
=
dict
(
code
=
"
Ace
"
,
source
=
"
<em>git clone git://github.com/ajaxorg/ace.git</em>
"
)
cfg
[
'
data
'
]
=
[
r1
,
r2
,
r3
,
r4
,
r5
,
r6
]
cfg
.
data
=
[
r1
,
r2
,
r3
,
r4
,
r5
,
r6
]
cfg_src
=
json
.
dumps
(
cfg
)
cfg_src
=
json
.
dumps
(
cfg
)
return
dict
(
cfg_doc
=
cfg_doc
,
cfg_src
=
cfg_src
)
return
dict
(
cfg_doc
=
cfg_doc
,
cfg_src
=
cfg_src
)
...
...
This diff is collapsed.
Click to expand it.
views/plugin_dbui/documentations.html
+
20
−
18
View file @
0634076a
...
@@ -6,32 +6,34 @@
...
@@ -6,32 +6,34 @@
#
#
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#
# Export python variables to the javascript
#
jsvars = ["cfgDoc = %s" % cfg_doc,
"cfgSrc = %s" % cfg_src]
jsvars = " var %s;" % ',\n'.join(jsvars)
response.write(SCRIPT(jsvars), escape=False)
#
#
# unique identifier for the DIV block associated to the grid
# unique identifier for the DIV block associated to the grid
#
#
divdoc =
id(cfg_doc)
grid_doc = "grid-%s" %
id(cfg_doc)
divsrc =
id(cfg_src)
grid_src = "grid-%s" %
id(cfg_src)
#
#
# The DIV blocks
# The DIV blocks
#
#
response.write(H2(T("Documentations"), _class="dbui-h2 dbui-small-cap"))
response.write(H2(T("Documentations"), _class="dbui-h2 dbui-small-cap"))
response.write(DIV(_id=
"
grid
-%s" % div
doc))
response.write(DIV(_id=grid
_
doc))
response.write(H2(T("Open source"), _class="dbui-h2 dbui-small-cap"))
response.write(H2(T("Open source"), _class="dbui-h2 dbui-small-cap"))
response.write(DIV(_id=
"
grid
-%s" % div
src))
response.write(DIV(_id=grid
_
src))
response.write(H2(T("Binary files"), _class="dbui-h2 dbui-small-cap"))
response.write(H2(T("Binary files"), _class="dbui-h2 dbui-small-cap"))
#
# Export python variables to the javascript
#
jsvars = ["cfgDoc = %s" % cfg_doc,
"cfgSrc = %s" % cfg_src,
"gridDoc = '%s'" % grid_doc,
"gridSrc = '%s'" % grid_src]
jsvars = " var %s;" % ',\n'.join(jsvars)
response.write(SCRIPT(jsvars), escape=False)
}}
}}
<div
style=
"width: 570px;"
>
<div
style=
"width: 570px;"
>
<p
class=
"dbui-p"
style=
"margin-left: 7%; margin-right: 7%;"
>
<p
class=
"dbui-p"
style=
"margin-left: 7%; margin-right: 7%;"
>
...
@@ -45,7 +47,7 @@
...
@@ -45,7 +47,7 @@
Des versions cohérentes sont disponible en utilisant
Des versions cohérentes sont disponible en utilisant
le gestionnaire de version
<a
href=
"http://git-scm.com/"
target=
"_blank"
>
git
</a>
:
le gestionnaire de version
<a
href=
"http://git-scm.com/"
target=
"_blank"
>
git
</a>
:
<em>
git clone http://
mar
www.in2p3.fr/~legac/wap/git/plugin_dbui_build.git
</em>
.
<em>
git clone http://www
.cppm
.in2p3.fr/~legac/wap/git/plugin_dbui_build.git
</em>
.
</p>
</p>
</div>
</div>
<script>
<script>
...
@@ -54,7 +56,7 @@
...
@@ -54,7 +56,7 @@
// instantiate the grid for the documentation
// instantiate the grid for the documentation
//
//
var
grid
=
Ext
.
create
(
'
Ext.grid.Panel
'
,
{
var
grid
=
Ext
.
create
(
'
Ext.grid.Panel
'
,
{
store
:
Ext
.
create
(
'
Ext.data.ArrayStore
'
,
cfgDoc
)
,
store
:
cfgDoc
,
columns
:
[
columns
:
[
{
text
:
"
code
"
,
dataIndex
:
'
code
'
,
width
:
80
},
{
text
:
"
code
"
,
dataIndex
:
'
code
'
,
width
:
80
},
{
text
:
"
developer
"
,
dataIndex
:
'
developer
'
,
flex
:
1.8
},
{
text
:
"
developer
"
,
dataIndex
:
'
developer
'
,
flex
:
1.8
},
...
@@ -65,14 +67,14 @@
...
@@ -65,14 +67,14 @@
hideHeaders
:
true
,
hideHeaders
:
true
,
padding
:
"
0 40 0 40
"
,
padding
:
"
0 40 0 40
"
,
width
:
570
,
width
:
570
,
renderTo
:
'
grid
-{{=divdoc}}
'
renderTo
:
grid
Doc
});
});
//
//
// instantiate the grid for source code
// instantiate the grid for source code
//
//
var
grid
=
Ext
.
create
(
'
Ext.grid.Panel
'
,
{
var
grid
=
Ext
.
create
(
'
Ext.grid.Panel
'
,
{
store
:
Ext
.
create
(
'
Ext.data.ArrayStore
'
,
cfgSrc
)
,
store
:
cfgSrc
,
columns
:
[
columns
:
[
{
text
:
"
code
"
,
dataIndex
:
'
code
'
,
width
:
80
},
{
text
:
"
code
"
,
dataIndex
:
'
code
'
,
width
:
80
},
{
text
:
"
source
"
,
dataIndex
:
'
source
'
,
flex
:
2
}
{
text
:
"
source
"
,
dataIndex
:
'
source
'
,
flex
:
2
}
...
@@ -81,7 +83,7 @@
...
@@ -81,7 +83,7 @@
hideHeaders
:
true
,
hideHeaders
:
true
,
padding
:
"
0 40 0 40
"
,
padding
:
"
0 40 0 40
"
,
width
:
570
,
width
:
570
,
renderTo
:
'
grid
-{{=divsrc}}
'
renderTo
:
grid
Src
});
});
</script>
</script>
\ No newline at end of file
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