Commit c1006530 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't assign paginator to a variable - it breaks the artefact chooser

parent a7023d89
......@@ -2790,7 +2790,7 @@ function build_pagination($params) {
$datatable = json_encode($params['datatable']);
$jsonscript = json_encode($params['jsonscript']);
$extradata = json_encode($params['extradata']);
$js .= "var {$params['datatable']}_pager = new Paginator($id, $datatable, $jsonscript, $extradata);";
$js .= "new Paginator($id, $datatable, $jsonscript, $extradata);";
}
// Output the count of results
......
......@@ -46,7 +46,7 @@ if ($tag) {
$js = <<<EOF
addLoadEvent(function() {
{$data->pagination_js}
var p = {$data->pagination_js}
forEach(getElementsByTagAndClassName('a', 'tag', 'main-column-container'), function(elem) {
disconnectAll(elem);
connect(elem, 'onclick', function(e) {
......@@ -54,7 +54,7 @@ addLoadEvent(function() {
var href = getNodeAttribute(this, 'href');
var params = parseQueryString(href.substring(href.indexOf('?')+1, href.length));
sendjsonrequest(config.wwwroot + 'json/tagsearch.php', params, 'POST', function(data) {
results_pager.updateResults(data);
p.updateResults(data);
forEach(getElementsByTagAndClassName('a', 'selected', 'main-column-container'), function(selected) {
removeElementClass(selected, 'selected');
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment