[Trunk | Library]:
1. newSearchPage.component.ts: [Bug fix] Initialize properties (Envproperties) in field definition, not in ngOnInit method (when parent called a method that needs property, may had not been initialized). 2. portal-search-result.component.html: Removed tooltip from description. 3. portal-search-result.component.ts: In method "_formatDescription()" call method "StringUtils.HTMLToString()" before cutting it. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60984 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
76a46606a6
commit
ac16d505d6
|
@ -100,7 +100,7 @@ export class NewSearchPageComponent {
|
|||
public pagingLimit: number = 0;
|
||||
public resultsPerPage: number = 0;
|
||||
isPiwikEnabled = false;
|
||||
properties: EnvProperties;
|
||||
properties: EnvProperties = properties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
|
@ -138,7 +138,7 @@ export class NewSearchPageComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.properties = properties;
|
||||
// this.properties = properties;
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this.pagingLimit = this.properties.pagingLimit;
|
||||
|
|
|
@ -105,8 +105,8 @@
|
|||
</span>
|
||||
</div>
|
||||
<div *ngIf="result.description">
|
||||
<div class="text-justify descriptionText uk-text-small uk-text-muted uk-margin-auto-right"
|
||||
[title]="result.description">
|
||||
<div class="text-justify descriptionText uk-text-small uk-text-muted uk-margin-auto-right">
|
||||
<!-- [title]="result.description">-->
|
||||
{{_formatDescription(result.description)}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,6 +6,7 @@ import {CommunityInfo} from "../../connect/community/communityInfo";
|
|||
import {Router} from "@angular/router";
|
||||
import {LocalStorageService} from "../../services/localStorage.service";
|
||||
import {Stakeholder, StakeholderInfo} from "../../monitor/entities/stakeholder";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
|
||||
@Component({
|
||||
selector: 'portal-search-result',
|
||||
|
@ -61,7 +62,8 @@ export class PortalSearchResultComponent implements OnInit{
|
|||
}
|
||||
|
||||
public _formatDescription(description) {
|
||||
return (((description).length > this.maxCharacters) ? (description.substring(0, (this.maxCharacters - ('...').length)) + "...") : description);
|
||||
let descr: string = StringUtils.HTMLToString(description);
|
||||
return (((descr).length > this.maxCharacters) ? (descr.substring(0, (this.maxCharacters - ('...').length)) + "...") : descr);
|
||||
}
|
||||
|
||||
public confirmModalOpen(result: CommunityInfo & Stakeholder) {
|
||||
|
|
Loading…
Reference in New Issue