mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Code style updates
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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();
|
||||||
|
Reference in New Issue
Block a user