Index: livetable.js =================================================================== --- livetable.js (revision 27358) +++ livetable.js (working copy) @@ -39,7 +39,7 @@ if (!options) { var options = {}; } - + // id of the root element that encloses this livetable this.domNodeName = domNodeName; @@ -65,7 +65,7 @@ if (typeof this.paginationNodes != "undefined") { this.paginator = new LiveTablePagination(this, this.paginationNodes, options.maxPages || 10); } - // Initialize filters + // Initialize filters if (this.filtersNode) { this.filter = new LiveTableFilter(this, this.filtersNode); } @@ -86,11 +86,53 @@ this.observeSortableColumns(); + this.currentOffset = (this.getPageFromLocationHash() - 1) * this.limit + 1; + // Show initial rows - this.showRows(1, this.limit); + this.showRows(this.currentOffset, this.limit); }, + + updateLocationHash: function() + { + var currentHash = window.location.hash.substring(1); + var shouldUpdate = !(this.lastoffset == 1 && currentHash.blank()); + + if (shouldUpdate) { + var tables = currentHash.split("|"), newHash = "", foundThisTable = false; + for (var i=0;i\n'; @@ -590,7 +635,7 @@ */ updateTagCloud: function(tags, matchingTags) { if (!this.hasTags && tags.length > 0) { - this.tags = tags; + this.tags = tags; this.map = this.buildPopularityMap(this.tags); this.hasTags = true; this.domNode.removeClassName("hidden");