Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tev
plugin_event
Commits
72ae3edc
Commit
72ae3edc
authored
Oct 10, 2016
by
LE GAC Renaud
Browse files
Update view/grid modifying the mechanism which transfers data from python to JavaScript.
parent
c1189a12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
views/report/grid.html
views/report/grid.html
+6
-13
No files found.
views/report/grid.html
View file @
72ae3edc
...
...
@@ -22,21 +22,14 @@
response.write(H2(title, _class="dbui-h2 dbui-small-cap"))
response.write(DIV(_id=divgrid))
#
# Export python variables to the javascript
#
jsvars = ["cfgStore = %s" % cfg_store,
"columns = %s" % grid.columns,
"divgrid = '%s'" % divgrid,
"features = %s" % grid.features]
jsvars = " var %s;" % ',\n'.join(jsvars)
response.write(SCRIPT(jsvars), escape=False)
}}
<script
type=
"text/javascript"
>
<script>
var
grid
;
var
cfgStore
=
{{
=
XML
(
cfg_store
)}},
columns
=
{{
=
XML
(
grid
.
columns
)}},
divgrid
=
'
{{=divgrid}}
'
,
features
=
{{
=
XML
(
grid
.
features
)}},
grid
;
//
// instantiate the grid
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment