Revision 46951
Added by Argiro Kokogiannaki about 7 years ago
linkingGeneric.component.ts | ||
---|---|---|
26 | 26 |
<!-- link with Projects & Contexts --> |
27 | 27 |
<div class="uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 uk-grid"> |
28 | 28 |
<div class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 "> |
29 |
<claim-selected-contexts title="link Communities" [contexts]="contexts" [show]="show" [linkType]=linkType |
|
29 |
<claim-selected-contexts title="link Communities" [contexts]="contexts" [projects]="projects" [results]="results" [inlineEntity] = "inlineResult" [show]="show" [linkType]=linkType
|
|
30 | 30 |
(showChange)="showChange($event)" > </claim-selected-contexts> |
31 | 31 |
</div> |
32 | 32 |
<div class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 "> |
... | ... | |
83 | 83 |
|
84 | 84 |
} |
85 | 85 |
ngOnInit() { |
86 |
if( typeof localStorage !== 'undefined') { |
|
87 |
if(localStorage.getItem("projects")){ |
|
88 |
this.projects = JSON.parse(localStorage.getItem("projects")); |
|
89 |
|
|
90 |
} |
|
91 |
if(localStorage.getItem("contexts")){ |
|
92 |
this.contexts = JSON.parse(localStorage.getItem("contexts")); |
|
93 |
} |
|
94 |
if(localStorage.getItem("results")){ |
|
95 |
this.results = JSON.parse(localStorage.getItem("results")); |
|
96 |
|
|
97 |
} |
|
98 |
localStorage.removeItem("projects"); |
|
99 |
localStorage.removeItem("contexts"); |
|
100 |
localStorage.removeItem("results"); |
|
101 |
} |
|
86 | 102 |
} |
87 | 103 |
|
88 | 104 |
next(){ |
... | ... | |
120 | 136 |
this.show=$event.value; |
121 | 137 |
this.showChangedType($event.value); |
122 | 138 |
} |
123 |
|
|
139 |
|
|
124 | 140 |
showChangedType(type:string) { |
125 | 141 |
this.show=type; |
126 | 142 |
if(this.show == 'project' || this.show == 'context' || this.show == 'software'){ |
Also available in: Unified diff
Adding login token parameter in claim API requests | check for user session expiration before every API call| redirect to login page if needed | keep the current state and current url if needed