diff --git a/productMods/css/visualization/mapofscience/layout.css b/productMods/css/visualization/mapofscience/layout.css index 787468f4..7e660c5a 100644 --- a/productMods/css/visualization/mapofscience/layout.css +++ b/productMods/css/visualization/mapofscience/layout.css @@ -200,6 +200,22 @@ a.map-of-science-links { padding: 4px 5px 3px; } +#download-unlocated-journal-info { + background-color: #2485AE; + height: 20px; + margin-top: 10px; + max-width: 260px; + padding: 4px 5px 3px; + text-align: center; +} + +#download-unlocated-journal-info a { + color: white; + cursor: pointer; + font-weight: bold; + text-decoration: none; +} + #main-science-areas-table-container { margin-top: 0; } diff --git a/productMods/js/visualization/entitycomparison/gui-event-manager.js b/productMods/js/visualization/entitycomparison/gui-event-manager.js index c2f13537..b7f525bd 100644 --- a/productMods/js/visualization/entitycomparison/gui-event-manager.js +++ b/productMods/js/visualization/entitycomparison/gui-event-manager.js @@ -108,7 +108,6 @@ $("input[type=checkbox].easyDeselectCheckbox").live('click', function(){ var entityToBeRemoved = URIToEntityRecord[checkboxValue]; if(!checkbox.is(':checked')){ - //console.log("Easy deselect checkbox is unclicked!"); updateRowHighlighter(linkedCheckbox); removeUsedColor(entityToBeRemoved); removeEntityUnChecked(renderedObjects, entityToBeRemoved); @@ -169,8 +168,6 @@ $(".filter-option").live('click', function() { temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS"; } -// clearRenderedObjects(); - $(this).addClass('active-filter'); temporalGraphProcessor.dataTable.fnDraw(); @@ -379,7 +376,7 @@ var processJSONData = { * dynamically generate checkboxes */ loadData: function(jsonData, dataTableParams) { - + processJSONData.setupGlobals(jsonData, true); temporalGraphProcessor.dataTable = prepareTableForDataTablePagination(jsonData, dataTableParams); @@ -395,7 +392,7 @@ var processJSONData = { * dynamically generate checkboxes */ reloadData: function(preselectedEntityURIs, jsonData) { - + processJSONData.setupGlobals(jsonData); temporalGraphProcessor.dataTable = reloadDataTablePagination(preselectedEntityURIs, jsonData); @@ -419,6 +416,8 @@ function entityCheckboxOperatedOnEventListener() { var checkboxValue = $(this).attr("value"); var entity = URIToEntityRecord[checkboxValue]; + temporalGraphProcessor.isDefaultSelectionsMaintained = false; + if (checkbox.is(':checked')) { performEntityCheckboxSelectedActions(entity, checkboxValue, checkbox); @@ -436,8 +435,6 @@ function renderTemporalGraphVisualization(parameters) { setupLoadingScreen(parameters.responseContainer); - //return; - getTemporalGraphData(parameters.dataURL, parameters.bodyContainer, parameters.errorContainer, @@ -570,6 +567,8 @@ var entitySelector = { temporalGraphProcessor = { + isDefaultSelectionsMaintained: true, + loadingScreenTimeout: '', currentSelectedFilter: 'ORGANIZATIONS', @@ -626,9 +625,20 @@ temporalGraphProcessor = { var currentSelectedEntityURIs = []; - $.each(URIToCheckedEntities, function(index, entity){ - currentSelectedEntityURIs.push(index); - }); + /* + * We want to make sure that the currently selected entities are preserved only if they + * were somehow manipulated by the users. + * */ + if (!temporalGraphProcessor.isDefaultSelectionsMaintained) { + $.each(URIToCheckedEntities, function(index, entity){ + currentSelectedEntityURIs.push(index); + }); + } + + /* + * Reset the "is default selections maintained" value. + * */ + temporalGraphProcessor.isDefaultSelectionsMaintained = true; clearRenderedObjects(); @@ -658,6 +668,13 @@ temporalGraphProcessor = { } }); } else { + + /* + * We have to redraw the table so that top 3 entities are selected. fnDraw() triggers sorting of the + * table and other filters. + * */ + temporalGraphProcessor.dataTable.fnDraw(); + /* * This will make sure that top 3 entities are selected by default when the page loads. */ diff --git a/productMods/js/visualization/personlevel/person-level.js b/productMods/js/visualization/personlevel/person-level.js index 4b7d5289..52dd0909 100644 --- a/productMods/js/visualization/personlevel/person-level.js +++ b/productMods/js/visualization/personlevel/person-level.js @@ -209,7 +209,7 @@ function visLoaded(nodes){ var jsonedNodes = jQuery.parseJSON(nodes); $(document).ready(function() { - createTable(collaboratorTableMetadata.tableID, collaboratorTableMetadata.tableContainer, jsonedNodes.slice(1)); + createTable(collaboratorTableMetadata.tableID, collaboratorTableMetadata.tableContainer, jsonedNodes); }); } @@ -238,14 +238,20 @@ function createTable(tableID, tableContainer, tableData) { $.each(tableData, function(i, item){ - number_of_works = item[collaboratorTableMetadata.jsonNumberWorksProperty]; - - var row = $('