diff --git a/productMods/css/visualization/entitycomparison/layout.css b/productMods/css/visualization/entitycomparison/layout.css index 4b09adfc..21d8b6cf 100644 --- a/productMods/css/visualization/entitycomparison/layout.css +++ b/productMods/css/visualization/entitycomparison/layout.css @@ -50,6 +50,12 @@ for the message is getting set to 50%, hence we need to override it here. text-decoration: none; } +.filterInfoIcon { + vertical-align:top; + width:15px; + margin-left: 9px; +} + .current-year-bar, .known-bar { display: inline-block; diff --git a/productMods/js/visualization/entitycomparison/gui-event-manager.js b/productMods/js/visualization/entitycomparison/gui-event-manager.js index 9eabaa25..137f2d56 100644 --- a/productMods/js/visualization/entitycomparison/gui-event-manager.js +++ b/productMods/js/visualization/entitycomparison/gui-event-manager.js @@ -263,7 +263,7 @@ var processJSONData = { return sum; }, - setupGlobals: function(jsonContent) { + setupGlobals: function(jsonContent, resetFilter) { var entityLevels = new Array(); var entityActivityCount = { @@ -325,23 +325,30 @@ var processJSONData = { }); - if (entityActivityCount.ORGANIZATION >= entityActivityCount.PERSON) { - - temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS"; - - $("#organizations-filter").addClass("active-filter"); - $("#people-filter").removeClass("active-filter"); - - - } else { - - temporalGraphProcessor.currentSelectedFilter = "PEOPLE"; - - $("#people-filter").addClass("active-filter"); - $("#organizations-filter").removeClass("active-filter"); - + /* + * We do not want to change the current filter setting if the user has changed the parameter + * from the dropdown box. Only when the temporal vis is loaded directly we want to make sure + * that the group of entites that has the most activity is shown. + * */ + if (resetFilter) { + if (entityActivityCount.ORGANIZATION >= entityActivityCount.PERSON) { + + temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS"; + + $("#organizations-filter").addClass("active-filter"); + $("#people-filter").removeClass("active-filter"); + + + } else { + + temporalGraphProcessor.currentSelectedFilter = "PEOPLE"; + + $("#people-filter").addClass("active-filter"); + $("#organizations-filter").removeClass("active-filter"); + + } } - + if (processJSONData.isParentEntityAvailable) { $("#subject-parent-entity").show(); } else { @@ -373,7 +380,7 @@ var processJSONData = { */ loadData: function(jsonData, dataTableParams) { - processJSONData.setupGlobals(jsonData); + processJSONData.setupGlobals(jsonData, true); temporalGraphProcessor.dataTable = prepareTableForDataTablePagination(jsonData, dataTableParams); @@ -619,11 +626,15 @@ temporalGraphProcessor = { var currentSelectedEntityURIs = []; + console.log(URIToCheckedEntities); + $.each(URIToCheckedEntities, function(index, entity){ currentSelectedEntityURIs.push(index); }); clearRenderedObjects(); + + console.log(URIToCheckedEntities); initConstants(); /* diff --git a/productMods/js/visualization/entitycomparison/util.js b/productMods/js/visualization/entitycomparison/util.js index 905fa216..2c9497af 100644 --- a/productMods/js/visualization/entitycomparison/util.js +++ b/productMods/js/visualization/entitycomparison/util.js @@ -97,12 +97,6 @@ var iStartButton, iEndButton, i, iLen; var oClasses = oSettings.oClasses; -// console.log(iPageCount, -// iPageCountHalf, -// iPages, -// iCurrentPage, -// oClasses); - /* Pages calculation */ if (iPages < iPageCount) { iStartButton = 1; diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl index a73eca58..2da6f0e9 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl @@ -8,7 +8,7 @@

${organizationLabel}  - information icon

+ information icon
@@ -65,6 +65,9 @@
Organizations | People + information icon