1. Made changes so that in temporal vis, the pagination navs for the datatable are hidden if there is only one page worth of elements or no pages at all. (see http://issues.library.cornell.edu/browse/NIHVIVO-2191)

This commit is contained in:
cdtank 2011-03-03 21:59:05 +00:00
parent 8a45a8a3a1
commit d00685eee0
3 changed files with 173 additions and 178 deletions

View file

@ -147,14 +147,14 @@ function performEntityCheckboxClickedRedrawActions() {
* values from the json file and
* dynamically generate checkboxes
*/
function loadData(jsonData) {
function loadData(jsonData, dataTableParams) {
$.each(jsonData, function (index, val) {
setOfLabels.push(val.label);
labelToEntityRecord[val.label] = val;
});
prepareTableForDataTablePagination(jsonData);
prepareTableForDataTablePagination(jsonData, dataTableParams);
setEntityLevel(getEntityVisMode(jsonData));
entityCheckboxOperatedOnEventListener();
@ -247,15 +247,21 @@ temporalGraphProcessor = {
initiateTemporalGraphRenderProcess: function(givenGraphContainer, jsonData) {
this.dataTableParams = {
searchBarParentContainerDIVClass : "searchbar",
paginationContainerDIVClass : "paginatedtabs"
};
/*
* initial display of the grid when the page loads
* */
init(givenGraphContainer);
/*
* render the temporal graph per the sent content.
* */
loadData(jsonData);
loadData(jsonData, this.dataTableParams);
/*
* This will make sure that top 3 entities are selected by default when the page loads.