Commit af0e4080 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Make the navigation for the file section display again. It was being

hidden by the code that hides the emptycontent message, which was
incorrectly hiding the wrong thing. Now the emptycontent is tracked
internally by the tablerenderer so this won't happen again
parent 96748c00
...@@ -13,7 +13,7 @@ function TableRenderer(target, source, columns, options) { ...@@ -13,7 +13,7 @@ function TableRenderer(target, source, columns, options) {
this.paginate_simple = true; this.paginate_simple = true;
this.paginate_firstlast = true; this.paginate_firstlast = true;
this.statevars = ['offset','limit']; this.statevars = ['offset','limit'];
this.emptycontent = false; // Something to display when no results are found this.emptycontent = undefined; // Something to display when no results are found
this.rowfunction = function(rowdata, rownumber, data) { return TR({'class': 'r' + (rownumber % 2)}); } this.rowfunction = function(rowdata, rownumber, data) { return TR({'class': 'r' + (rownumber % 2)}); }
this.updatecallback = function () {}; this.updatecallback = function () {};
...@@ -49,10 +49,10 @@ function TableRenderer(target, source, columns, options) { ...@@ -49,10 +49,10 @@ function TableRenderer(target, source, columns, options) {
self.assertPager(self.offset, self.limit, self.count); self.assertPager(self.offset, self.limit, self.count);
} }
if (self.emptycontent) { if (typeof(self.emptycontent) != 'undefined') {
var newelement = DIV(null,self.emptycontent); self.emptycontent = DIV(null,self.emptycontent);
hideElement(newelement); addElementClass(self.emptycontent, 'hidden');
insertSiblingNodesBefore(self.table, newelement); insertSiblingNodesBefore(self.table, self.emptycontent);
} }
}; };
...@@ -179,14 +179,20 @@ function TableRenderer(target, source, columns, options) { ...@@ -179,14 +179,20 @@ function TableRenderer(target, source, columns, options) {
} }
} }
if (self.emptycontent) { if (typeof(self.emptycontent) != 'undefined') {
// Make sure the emptycontent is in a div
if (self.emptycontent.nodeName != 'DIV') {
self.emptycontent = DIV(null, self.emptycontent);
insertSiblingNodesBefore(self.table, self.emptycontent);
}
if (self.count > 0) { if (self.count > 0) {
hideElement(self.table.previousSibling); addElementClass(self.emptycontent, 'hidden');
self.table.style.display = ''; self.table.style.display = '';
} }
else { else {
self.table.style.display = 'none'; self.table.style.display = 'none';
showElement(self.table.previousSibling); removeElementClass(self.emptycontent, 'hidden');
} }
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new StdClass; $config = new StdClass;
$config->version = 2007020211; $config->version = 2007020212;
$config->release = '0.6.4'; $config->release = '0.6.4';
$config->minupgradefrom = 2007011600; $config->minupgradefrom = 2007011600;
$config->minupgraderelease = '0.4.0 (build tag BUILD_20070122)'; $config->minupgraderelease = '0.4.0 (build tag BUILD_20070122)';
......
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