Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e17bbb42
Commit
e17bbb42
authored
Nov 23, 2006
by
Richard Mansfield
Browse files
Pass root data object to rowfunction as 3rd parameter
parent
e9259b30
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/js/tablerenderer.js
View file @
e17bbb42
...
...
@@ -13,7 +13,7 @@ function TableRenderer(target, source, columns, options) {
this
.
paginate_firstlast
=
true
;
this
.
statevars
=
[
'
offset
'
,
'
limit
'
];
this
.
emptycontent
=
false
;
// Something to display when no results are found
this
.
rowfunction
=
function
(
rowdata
,
rownumber
)
{
return
TR
();
}
this
.
rowfunction
=
function
(
rowdata
,
rownumber
,
data
)
{
return
TR
();
}
this
.
init
=
function
()
{
self
.
table
=
target
;
...
...
@@ -134,7 +134,7 @@ function TableRenderer(target, source, columns, options) {
var
rownumber
=
1
;
forEach
(
data
.
data
,
function
(
row
)
{
var
tr
=
self
.
rowfunction
(
row
,
rownumber
++
);
var
tr
=
self
.
rowfunction
(
row
,
rownumber
++
,
data
);
if
(
row
.
_class
)
{
tr
.
className
=
row
.
_class
;
}
if
(
row
.
_id
)
{
tr
.
id
=
row
.
_id
;
}
...
...
Write
Preview
Supports
Markdown
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