layout changes in filters/ search form
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44648 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
d3e70bbec1
commit
1fb51c87d1
|
@ -84,14 +84,13 @@ export class OrganizationComponent {
|
|||
}
|
||||
|
||||
private getOrganizationInfo () {
|
||||
console.info("inside getOrganizationInfo of component");
|
||||
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
console.info("do request");
|
||||
|
||||
this._organizationService.getOrganizationInfo(this.organizationId).subscribe(
|
||||
data => {
|
||||
|
||||
this.organizationInfo = data;
|
||||
|
||||
let projectsNum = 0;
|
||||
|
@ -102,12 +101,10 @@ export class OrganizationComponent {
|
|||
this.fundersSet.add(key);
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
this.projectsNum = projectsNum;
|
||||
},
|
||||
err => {
|
||||
console.error(err)
|
||||
console.info("error");
|
||||
|
||||
this.errorMessage = 'No organization found';
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ export class SearchFilterComponent {
|
|||
|
||||
}
|
||||
private _formatTitle(title,length){
|
||||
return (((title+" ("+length+")").length >this._maxCharacters)?(title.substring(0,(this._maxCharacters - (" ("+length+")").length - ('...').length))+"..."):title)
|
||||
return (((title+" ("+length+")").length >this._maxCharacters)?(title.substring(0,(this._maxCharacters - (" ("+length+")").length - ('...').length))+"..."):title+" ("+length+")")
|
||||
}
|
||||
private _formatName(value){
|
||||
return (((value.name+" ("+value.number+")").length >this._maxCharacters)?(value.name.substring(0,(this._maxCharacters - (" ("+value.number+")").length - ('...').length))+"..."):value.name)
|
||||
|
|
|
@ -4,7 +4,7 @@ import {Observable} from 'rxjs/Observable';
|
|||
@Component({
|
||||
selector: 'search-form',
|
||||
template: `
|
||||
<form>
|
||||
<form class = "search-form">
|
||||
<div class="input-group">
|
||||
<!--span class="input-group-addon" id="sizing-addon2">Filter</span-->
|
||||
<input type="text" class="form-control" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
|
||||
|
|
|
@ -20,7 +20,7 @@ import {SearchUtilsClass} from './searchUtils.class';
|
|||
<div class="col-xs-12 col-sm-10 text-center col-md-offset-1 ">
|
||||
|
||||
<search-form [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)"></search-form>
|
||||
<div>
|
||||
<div *ngIf="isFiltered()" class = "selected-filters-box">
|
||||
<span *ngIf = "searchUtils.keyword.length > 0">Keywords:
|
||||
<span>{{searchUtils.keyword}}<a (click) = "clearKeywords() "> <span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></span>
|
||||
</span>
|
||||
|
@ -31,7 +31,7 @@ import {SearchUtilsClass} from './searchUtils.class';
|
|||
<span *ngIf="!end">,</span>
|
||||
</span>
|
||||
</span>
|
||||
<a *ngIf="isFiltered()" (click)="clearFilters()" class = "btn text-right"> Clear Filters</a>
|
||||
<a (click)="clearFilters()" class = "btn text-right"> Clear Filters</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -31,8 +31,6 @@ export class PersonService {
|
|||
|
||||
getPersonInfo (id: string):any {
|
||||
|
||||
console.info("Cache: NOT in cache ");
|
||||
|
||||
console.info("getPersonInfo in service");
|
||||
|
||||
let url = OpenaireProperties.getSearchAPIURL()+'people/'+id;
|
||||
|
|
|
@ -88,7 +88,6 @@ export class SearchOrganizationsService {
|
|||
url += "&page="+page+"&size="+size;
|
||||
|
||||
let key = url;
|
||||
console.log("Org: "+key);
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key));
|
||||
}
|
||||
|
@ -107,7 +106,6 @@ export class SearchOrganizationsService {
|
|||
let length = Array.isArray(data) ? data.length : 1;
|
||||
|
||||
for(let i=0; i<length; i++) {
|
||||
console.log("Organizations size::: "+length+ " is array::"+Array.isArray(data) );
|
||||
let resData = Array.isArray(data) ? data[i]['result']['metadata']['oaf:entity']['oaf:organization'] : data['result']['metadata']['oaf:entity']['oaf:organization'];
|
||||
|
||||
var result: SearchResult = new SearchResult();
|
||||
|
|
|
@ -28,7 +28,7 @@ export class CacheService {
|
|||
* get our cached value
|
||||
*/
|
||||
get(key: string | number): any {
|
||||
console.debug("Cache get :"+key);
|
||||
console.log("Cache get :"+key);
|
||||
let _key = this.normalizeKey(key);
|
||||
return this._cache.get(_key);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
<style>
|
||||
.custom-hidden-dropdown-menu {position:static !important;}
|
||||
.searchFilterBox .values {overflow:auto; max-height:200px; }
|
||||
.selected-filters-box {margin:5px; background-color:#F8F8F8; }
|
||||
.search-form {margin:5px; }
|
||||
|
||||
</style>
|
||||
|
||||
<base href="/">
|
||||
|
|
Loading…
Reference in New Issue