Code style updates

This commit is contained in:
Denys Vuika
2016-06-16 12:20:06 +01:00
parent ab1e10e74b
commit da3ca383ca
2 changed files with 6 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ import { ContextMenuService } from './../services/context-menu.service';
], ],
host:{ host:{
'(document:click)':'clickedOutside()' '(document:click)':'clickedOutside()'
//'(click)':'clickInside()' // '(click)':'clickInside()'
}, },
template: ` template: `
<div [ngStyle]="locationCss" class="menu-container"> <div [ngStyle]="locationCss" class="menu-container">
@@ -76,16 +76,16 @@ export class ContextMenuHolderComponent {
_contextMenuService.show.subscribe(e => this.showMenu(e.event, e.obj)); _contextMenuService.show.subscribe(e => this.showMenu(e.event, e.obj));
} }
get locationCss(){ get locationCss() {
return { return {
position: 'fixed', position: 'fixed',
display: this.isShown ? 'block': 'none', display: this.isShown ? 'block' : 'none',
left: this.mouseLocation.left + 'px', left: this.mouseLocation.left + 'px',
top: this.mouseLocation.top + 'px' top: this.mouseLocation.top + 'px'
}; };
} }
clickedOutside(){ clickedOutside() {
this.isShown = false; this.isShown = false;
} }

View File

@@ -55,11 +55,11 @@ export class AlfrescoTranslationLoader implements TranslateLoader {
(translations: any[]) => { (translations: any[]) => {
let multiLanguage: any = ''; let multiLanguage: any = '';
translations.forEach((translate) => { translations.forEach((translate) => {
if(translate !== '') { if (translate !== '') {
multiLanguage += JSON.stringify(translate); multiLanguage += JSON.stringify(translate);
} }
}); });
if(multiLanguage !== '') { if (multiLanguage !== '') {
observer.next(JSON.parse(multiLanguage.replace(/}{/g, ','))); observer.next(JSON.parse(multiLanguage.replace(/}{/g, ',')));
} }
observer.complete(); observer.complete();