Skip to content

Commit 1d88e2e

Browse files
committed
deleted dead list entries code
1 parent bfc0a5d commit 1d88e2e

17 files changed

Lines changed: 44 additions & 428 deletions

vis/js/components/ListEntries.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ import { filterData } from "../utils/data";
77
import { STREAMGRAPH_MODE } from "../reducers/chartType";
88

99
import EntriesWrapper from "./EntriesWrapper";
10-
import BasicListEntry from "../templates/listentry/BasicListEntry";
11-
import ClassificationListEntry from "../templates/listentry/ClassificationListEntry";
1210
import StandardListEntry from "../templates/listentry/StandardListEntry";
1311

1412
const ListEntries = ({
1513
// data
1614
show,
17-
service,
1815
displayedData,
1916
rawData,
2017
searchSettings,
@@ -48,20 +45,17 @@ const ListEntries = ({
4845
);
4946
}
5047

51-
const ListEntryComponent = getListEntryComponent(service);
52-
5348
return (
5449
<EntriesWrapper>
5550
{displayedData.map((paper) => (
56-
<ListEntryComponent key={paper.safe_id} paper={paper} />
51+
<StandardListEntry key={paper.safe_id} paper={paper} />
5752
))}
5853
</EntriesWrapper>
5954
);
6055
};
6156

6257
const mapStateToProps = (state) => ({
6358
show: state.list.show,
64-
service: state.service,
6559
rawData: state.data.list,
6660
searchSettings: {
6761
value: state.list.searchValue,
@@ -79,15 +73,3 @@ const mapStateToProps = (state) => ({
7973
});
8074

8175
export default connect(mapStateToProps)(ListEntries);
82-
83-
const getListEntryComponent = (service) => {
84-
if (service === null || typeof service === "undefined") {
85-
return BasicListEntry;
86-
}
87-
88-
if (service.startsWith("linkedcat")) {
89-
return ClassificationListEntry;
90-
}
91-
92-
return StandardListEntry;
93-
};

vis/js/components/Modals.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { closeEmbedModal, closeViperEditModal, hidePreview } from "../actions";
66
import CitationModal from "../templates/modals/CitationModal";
77
import CitePaperModal from "../templates/modals/CitePaperModal";
88
import EmbedModal from "../templates/modals/EmbedModal";
9-
import ImageModal from "../templates/modals/ImageModal";
109
import InfoModal from "../templates/modals/InfoModal";
1110
import PdfModal from "../templates/modals/PdfModal";
1211
import ViperEditModal from "../templates/modals/ViperEditModal";
@@ -22,7 +21,6 @@ const Modals = ({
2221
viperEditTitle,
2322
viperEditObjID,
2423
onViperEditClose,
25-
showImagePreview,
2624
showPDFPreview,
2725
previewedPaper,
2826
serverUrl,
@@ -47,13 +45,6 @@ const Modals = ({
4745
/>
4846
)}
4947
<InfoModal />
50-
{showImagePreview && (
51-
<ImageModal
52-
open={!!previewedPaper}
53-
onClose={onPreviewClose}
54-
paperID={previewedPaper ? previewedPaper.id : null}
55-
/>
56-
)}
5748
{showPDFPreview && (
5849
<PdfModal
5950
open={!!previewedPaper}
@@ -78,7 +69,6 @@ const mapStateToProps = (state) => ({
7869
viperEditAcronym: state.heading.acronym,
7970
viperEditTitle: state.heading.title,
8071
viperEditObjID: state.modals.viperEditObjID,
81-
showImagePreview: state.modals.showImagePreview,
8272
showPDFPreview: state.modals.showPDFPreview,
8373
previewedPaper: state.modals.previewedPaper,
8474
serverUrl: state.modals.reloadApiProperties.headstartPath,

vis/js/datamanagers/DataManager.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ class DataManager {
119119
this.__countMetrics(paper);
120120
this.__parseTags(paper);
121121
this.__parseKeywords(paper);
122-
this.__parseClassification(paper);
123122
});
124123
}
125124

@@ -223,10 +222,6 @@ class DataManager {
223222
paper.keywords = paper.subject_orig;
224223
}
225224

226-
__parseClassification(paper) {
227-
paper.classification = paper.bkl_caption;
228-
}
229-
230225
__scalePapers(size) {
231226
const paperWidthFactor = this.config.paper_width_factor;
232227
const paperHeightFactor = this.config.paper_height_factor;

vis/js/default-config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ var config = {
106106
input_format: "csv",
107107
//base unit for metrics
108108
base_unit: "readers",
109-
//preview type
110-
preview_type: "image",
109+
//preview type (currently we support only pdf)
110+
preview_type: "pdf",
111111
//convert author names from "[last name], [first name]" to "[first name] [last name]"
112112
convert_author_names: true,
113113
//adds some (currently very limited) debug output to the browser console

vis/js/reducers/list.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const list = (
1414
showMetrics: false,
1515
isContentBased: false,
1616
baseUnit: null,
17-
showRealPreviewImage: false,
1817
showKeywords: false,
1918
hideUnselectedKeywords: true,
2019
height: null,
@@ -44,7 +43,6 @@ const list = (
4443
showMetrics: config.metric_list,
4544
isContentBased: config.content_based,
4645
baseUnit: config.base_unit,
47-
showRealPreviewImage: config.preview_type === "image",
4846
showKeywords: config.show_keywords,
4947
hideUnselectedKeywords: config.hide_keywords_overview,
5048
disableClicks: !config.render_map,

vis/js/reducers/modals.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const modals = (
3737
...action.contextObject.params,
3838
}
3939
: {},
40-
showImagePreview: action.configObject.preview_type === "image",
4140
showPDFPreview: action.configObject.preview_type === "pdf",
4241
previewedPaper: null,
4342
useViewer: action.configObject.use_hypothesis,

vis/js/templates/listentry/BasicListEntry.jsx

Lines changed: 0 additions & 83 deletions
This file was deleted.

vis/js/templates/listentry/Classification.jsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

vis/js/templates/listentry/ClassificationListEntry.jsx

Lines changed: 0 additions & 68 deletions
This file was deleted.

vis/js/templates/listentry/ListEntry.jsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)