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
36e94485
Commit
36e94485
authored
Jan 31, 2007
by
Richard Mansfield
Browse files
Fix tablerenderer pagination for user search table
parent
4a2c3305
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/js/tablerenderer.js
View file @
36e94485
...
...
@@ -177,6 +177,7 @@ function TableRenderer(target, source, columns, options) {
self
.
offset
=
data
.
offset
;
self
.
count
=
data
.
count
;
self
.
updatecallback
(
data
);
if
(
self
.
paginate
)
{
if
(
typeof
(
self
.
assertPager
)
==
'
function
'
)
{
self
.
assertPager
(
self
.
offset
,
self
.
limit
,
self
.
count
);
...
...
@@ -193,7 +194,6 @@ function TableRenderer(target, source, columns, options) {
showElement
(
self
.
table
.
previousSibling
);
}
}
self
.
updatecallback
(
data
);
self
.
renderdata
(
data
);
},
function
(
error
)
{
...
...
htdocs/search.php
View file @
36e94485
...
...
@@ -42,6 +42,7 @@ foreach ($userfields as $k => $v) {
$userfieldstrings
[]
=
get_string
(
$k
,
'artefact.internal'
);
}
$userfields
=
json_encode
(
array_keys
(
$userfields
));
$ncols
=
count
(
$userfieldstrings
);
$userfieldstrings
=
json_encode
(
$userfieldstrings
);
$javascript
=
<<<EOF
...
...
@@ -58,12 +59,14 @@ results.statevars.push('type');
results.emptycontent = '{$noresults}';
results.updatecallback = function (d) {
if (d.type == 'user') {
results.linkspan = {$ncols};
if (!$('userfields')) {
appendChildNodes(results.thead, TR({'id':'userfields'},
map(partial(TD, null), userfieldstrings)));
}
}
else {
results.linkspan = 1;
removeElement('userfields');
}
}
...
...
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