This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 4b3d1fed authored by Daniel Rainer's avatar Daniel Rainer
Browse files

Comment out unused code

parent bfa4d71c
Branches
Tags
2 merge requests!17Initial Merge to Prepare Release 1.0.0,!1Resolve "Metadaten konsolideren"
Showing with 33 additions and 12 deletions
......@@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
import { SearchModule } from 'app/search/search.module';
import { MockSearchComponent } from 'app/mock-search/mock-search.component';
import { MOCK_SEARCH_ROUTE } from './mock-search.route';
import { GitSearchV2SharedModule } from 'app/shared/shared.module';
......@@ -12,7 +11,7 @@ import { SearchInputComponent } from '../search-input/search-input.component';
import { QueryParamModule } from '@ngqp/core';
@NgModule({
imports: [RouterModule.forChild([MOCK_SEARCH_ROUTE]), GitSearchV2SharedModule, SearchModule, QueryParamModule, InfiniteScrollModule],
imports: [RouterModule.forChild([MOCK_SEARCH_ROUTE]), GitSearchV2SharedModule, QueryParamModule, InfiniteScrollModule],
declarations: [MockSearchComponent, ExerciseDetailsComponent, ExerciseCardComponent, SearchInputComponent],
exports: [MockSearchComponent],
})
......
// unused
/*
// The code in this file and the files using this file is partially taken from
// https://stackoverflow.com/questions/46487255/pass-observable-data-from-parent-component-to-a-child-component-created-with-com
import { Injectable } from '@angular/core';
......@@ -17,3 +19,4 @@ export class MetadataMessageService {
this.filterSelectionSubject.next(new MetadataSelection(metadataCategory, value));
}
}
*/
// unused
/*
export interface IMetadataSelection {
category: string;
value: string;
......@@ -6,3 +8,4 @@ export interface IMetadataSelection {
export class MetadataSelection implements IMetadataSelection {
constructor(public category: string, public value: string) {}
}
*/
// unused
/*
import { Component, Input } from '@angular/core';
import { IFrequency } from 'app/shared/model/frequency.model';
import { MetadataMessageService } from 'app/search/metadata/metadata-message.service';
......@@ -36,3 +38,4 @@ export class MetadataComponent {
this.selectedItems = new Set<string>();
}
}
*/
// unused
/*
li.meta:hover {
background-color: #cacaca;
}
......@@ -44,3 +46,4 @@ li.unselected {
padding-left: 20px;
padding-right: 20px;
}
*/
// currently unused
/*
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Subject, Subscription } from 'rxjs';
......@@ -178,12 +180,13 @@ export class SearchComponent implements OnInit, OnDestroy {
// University seems to be a derived attribute.
// Currently not implemented.
alert('Filtering by university is not supported at the moment. Cause: University is not in the interface IGitFiles.');
/* if (this.selectedUniversities.has(selection.value)) {
*/
/* if (this.selectedUniversities.has(selection.value)) {
this.selectedUniversities.delete(selection.value);
} else {
this.selectedUniversities.add(selection.value);
} */
break;
/* break;
}
case 'fileFormat': {
if (this.selectedFileFormats.has(selection.value)) {
......@@ -202,9 +205,11 @@ export class SearchComponent implements OnInit, OnDestroy {
if (this.selectedRepositories.size > 0 && !this.selectedRepositories.has(file.repository)) {
return false;
}
/* if (this.selectedUniversities.size > 0 && !this.selectedUniversities.has(file.university)) {
*/
/* if (this.selectedUniversities.size > 0 && !this.selectedUniversities.has(file.university)) {
return false;
} */
/*
if (this.selectedFileFormats.size > 0 && !this.selectedFileFormats.has(file.fileFormat)) {
return false;
}
......@@ -263,3 +268,4 @@ export class SearchComponent implements OnInit, OnDestroy {
return hits ? hits : 0;
}
}
*/
// currently unused
/*
import { NgModule } from '@angular/core';
import { GitSearchV2SharedModule } from 'app/shared/shared.module';
......@@ -16,3 +18,4 @@ import { SearchDropdownComponent } from './search-dropdown.component';
providers: [MetadataMessageService],
})
export class SearchModule {}
*/
// currently unused
/*
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
......@@ -62,8 +64,8 @@ export class SearchResultService {
.get<IGitFilesAggregation>(this.resourceSearchUrlAggregation, { params: options, observe: 'response' })
.pipe();
}
/*
*/
/*
protected convertDateFromClient(searchResult: ISearchResult): ISearchResult {
const copy: ISearchResult = Object.assign({}, searchResult, {
lastModified: searchResult.lastModified && searchResult.lastModified.isValid() ? searchResult.lastModified.toJSON() : undefined,
......@@ -93,4 +95,4 @@ export class SearchResultService {
return res;
}
*/
}
// }
import {IFrequency} from "app/shared/model/frequency.model";
// currently unused
/* import {IFrequency} from "app/shared/model/frequency.model";
export class FulltextSearchSelection {
public repository: IFrequency<string>[];
......@@ -12,3 +13,4 @@ export class FulltextSearchSelection {
}
}
*/
import { MetadataSearchInput } from 'app/shared/model/search/metadata-search-input.model';
import { FulltextSearchSelection } from 'app/shared/model/fulltext-search-selection.model';
export class SearchInput {
public fulltextQuery: string;
public fulltextSelection: FulltextSearchSelection;
public metadata: MetadataSearchInput;
public page: number;
public constructor() {
this.fulltextQuery = '';
this.fulltextSelection = new FulltextSearchSelection();
this.metadata = new MetadataSearchInput();
this.page = 0;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment