diff --git a/productMods/js/visualization/entitycomparison/gui-event-manager.js b/productMods/js/visualization/entitycomparison/gui-event-manager.js index fea447f6..9eabaa25 100644 --- a/productMods/js/visualization/entitycomparison/gui-event-manager.js +++ b/productMods/js/visualization/entitycomparison/gui-event-manager.js @@ -169,6 +169,8 @@ $(".filter-option").live('click', function() { temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS"; } +// clearRenderedObjects(); + $(this).addClass('active-filter'); temporalGraphProcessor.dataTable.fnDraw(); @@ -532,7 +534,7 @@ var lastCachedAtDateTimeParser = { var day = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; var month = ['January','February','March','April','May','June','July','August','September','October','November']; - return day[dateObject.getDay()] + ", " + month[dateObject.getMonth()] + " " + dateObject.getDate(); + return month[dateObject.getMonth()] + " " + dateObject.getDate() + ", " + dateObject.getFullYear() + "."; }, ascendingDateSorter: function(rawDateStringA, rawDateStringB) { @@ -601,10 +603,15 @@ temporalGraphProcessor = { }); if ($("#incomplete-data-disclaimer").length > 0 && lastCachedAtDateTimes.length > 0) { + + var disclaimerText = "This information is based solely on " + + COMPARISON_PARAMETERS_INFO[currentParameter].value + + " which have been loaded into the VIVO system" + + " as of " + lastCachedAtDateTimeParser.getReadableDateString(lastCachedAtDateTimes[0]); + $("#incomplete-data-disclaimer").attr( "title", - $("#incomplete-data-disclaimer").attr("title") + " as of " - + lastCachedAtDateTimeParser.getReadableDateString(lastCachedAtDateTimes[0])); + disclaimerText); } }, diff --git a/productMods/js/visualization/entitycomparison/util.js b/productMods/js/visualization/entitycomparison/util.js index 17d102d3..905fa216 100644 --- a/productMods/js/visualization/entitycomparison/util.js +++ b/productMods/js/visualization/entitycomparison/util.js @@ -253,9 +253,9 @@ function init(graphContainer) { $("#comparisonParameter").text("Total Number of " + optionSelected); $('#yaxislabel').html("Number of " + optionSelected).mbFlipText(false); $('#comparisonHeader').html(optionSelected).css('font-weight', 'bold'); - $('#legend-unknown-bar-text').text(COMPARISON_PARAMETERS_INFO[currentParameter].name + " with unknown year"); - $('#legend-known-bar-text').text(COMPARISON_PARAMETERS_INFO[currentParameter].name + " with known year"); - $('#legend-current-year-bar-text').text(COMPARISON_PARAMETERS_INFO[currentParameter].name + " from current incomplete year"); + $('#legend-unknown-bar-text').text(toTitleCase(COMPARISON_PARAMETERS_INFO[currentParameter].name) + " with unknown year"); + $('#legend-known-bar-text').text(toTitleCase(COMPARISON_PARAMETERS_INFO[currentParameter].name) + " with known year"); + $('#legend-current-year-bar-text').text(toTitleCase(COMPARISON_PARAMETERS_INFO[currentParameter].name) + " from current incomplete year"); var defaultFlotOptions = { xaxis : { @@ -1248,7 +1248,6 @@ function reloadDataTablePagination(preselectedEntityURIs, jsonData){ * */ currentDataTable.fnPageChange('first'); - return currentDataTable; } diff --git a/productMods/js/visualization/visualization-helper-functions.js b/productMods/js/visualization/visualization-helper-functions.js index 316e8cda..d58cb497 100644 --- a/productMods/js/visualization/visualization-helper-functions.js +++ b/productMods/js/visualization/visualization-helper-functions.js @@ -103,4 +103,10 @@ if (typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } +} + +function toTitleCase(str) { + return str.replace(/\w\S*/g, function(txt) { + return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); + }); } \ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl index 58e5d163..a73eca58 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonBody.ftl @@ -8,7 +8,7 @@