diff --git a/productMods/WEB-INF/visualization/visualizations-beans-injection-fm.xml b/productMods/WEB-INF/visualization/visualizations-beans-injection-fm.xml index 850a1652..06a18690 100644 --- a/productMods/WEB-INF/visualization/visualizations-beans-injection-fm.xml +++ b/productMods/WEB-INF/visualization/visualizations-beans-injection-fm.xml @@ -71,7 +71,7 @@ --> - + @@ -84,7 +84,7 @@ - + diff --git a/productMods/js/visualization/entitycomparison/gui-event-manager.js b/productMods/js/visualization/entitycomparison/gui-event-manager.js index d46ef482..aa380acf 100644 --- a/productMods/js/visualization/entitycomparison/gui-event-manager.js +++ b/productMods/js/visualization/entitycomparison/gui-event-manager.js @@ -30,6 +30,8 @@ $(document).ready(function() { var selectedDataURL; + var oldParameter = currentParameter; + $.each(COMPARISON_PARAMETERS_INFO, function(index, parameter) { if (parameter.value === selectedValue) { @@ -58,12 +60,30 @@ $(document).ready(function() { success: function (data) { if (data.error) { - options.bodyContainer.remove(); + options.bodyContainer.hide(); + + /* + * When we reload data we would be reusing the already generated "error container" div. + * So below is used to replace text taht is specific to the errors that would have caused + * due to the original parameters. + * */ + var alternateVisInfo = COMPARISON_PARAMETERS_INFO[currentParameter].value + + " Temporal Graph " + + '| ' + + '' + + 'view ' + COMPARISON_PARAMETERS_INFO[oldParameter].pluralName + ' temporal graph' + + options.errorContainer.find("#alternative-vis-info").html(alternateVisInfo); + + options.errorContainer + .find("#comparison-parameter-unavailable-label") + .text(COMPARISON_PARAMETERS_INFO[currentParameter].pluralName); + options.errorContainer.show(); options.responseContainer.unblock(); } else { options.bodyContainer.show(); - options.errorContainer.remove(); + options.errorContainer.hide(); temporalGraphProcessor.redoTemporalGraphRenderProcess(graphContainer, data); options.responseContainer.unblock(); } @@ -342,12 +362,12 @@ function getTemporalGraphData(temporalGraphDataURL, success: function (data) { if (data.error) { - graphBodyDIV.remove(); + graphBodyDIV.hide(); errorBodyDIV.show(); visContainerDIV.unblock(); } else { graphBodyDIV.show(); - errorBodyDIV.remove(); + errorBodyDIV.hide(); temporalGraphProcessor.initiateTemporalGraphRenderProcess(graphContainer, data); visContainerDIV.unblock(); } diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl index c8fa5141..cccf5652 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl @@ -9,11 +9,13 @@

${organizationLabel}

-

${textForCurrentEntityComparisonType?capitalize} Temporal Graph +

${textForCurrentEntityComparisonType?capitalize} Temporal Graph view ${textForOtherEntityComparisonType} temporal graph

-

This organization has neither sub-organizations nor people with ${textForCurrentEntityComparisonType} in the system. Please visit the full ${organizationLabel} profile page for a more complete overview.

+

This organization has neither sub-organizations nor people with + ${textForCurrentEntityComparisonType} in the system. + Please visit the full ${organizationLabel} profile page for a more complete overview.

\ No newline at end of file