[ADF-2645] move the service use in the upload in the right place (#3189)

[ADF-2645] move the service use in the upload in the right place 
[ADF-2687] No message is displayed when deleting a file/folder from content action
[ADF-2714] [demo shell] Not able to download a version of a file

* add spaces tslint fix
This commit is contained in:
Eugenio Romano
2018-04-14 10:39:24 +01:00
committed by GitHub
parent 66d8935624
commit 6cd0e9f5bb
23 changed files with 122 additions and 282 deletions

View File

@@ -22,6 +22,8 @@ import { MaterialModule } from '../material.module';
import { AccordionGroupComponent } from './accordion-group.component';
import { AccordionComponent } from './accordion.component';
// @deprecated 2.3.0 use the material accodrdion
@NgModule({
imports: [
MaterialModule,

View File

@@ -25,17 +25,31 @@ export interface LangChangeEvent {
export class TranslationMock {
defaultLang: string = 'en';
userLang: string;
customLoader: any;
translate: any;
onLangChange: EventEmitter<LangChangeEvent> = new EventEmitter<LangChangeEvent>();
addTranslationFolder() {
}
get(key: string|Array<string>, interpolateParams?: Object): Observable<string|any> {
onTranslationChanged() {
}
use(): any {
}
get(key: string | Array<string>, interpolateParams?: Object): Observable<string | any> {
return Observable.of(key);
}
instant(key: string | Array<string>, interpolateParams?: Object): string | any {
return key;
}
}

View File

@@ -17,7 +17,7 @@
import { Injectable } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { ContentApi, MinimalNodeEntryEntity, Node } from 'alfresco-js-api';
import { ContentApi, MinimalNodeEntryEntity, Node, NodeEntry } from 'alfresco-js-api';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { FolderCreatedEvent } from '../events/folder-created.event';
@@ -191,6 +191,16 @@ export class ContentService {
.catch(err => this.handleError(err));
}
/**
* Gets a Node via its node ID.
* @param nodeId
* @param opts
* @returns Details of the folder
*/
getNode(nodeId: string, opts?: any): Observable<NodeEntry> {
return Observable.fromPromise(this.apiService.getInstance().nodes.getNode(nodeId, opts));
}
/**
* Check if the user has permissions on that node
* @param node Node to check allowableOperations

View File

@@ -43,7 +43,7 @@ export class TranslationService {
customLoader: TranslateLoaderService;
constructor(public translate: TranslateService,
private userPreference: UserPreferencesService,
userPreference: UserPreferencesService,
@Optional() @Inject(TRANSLATION_PROVIDER) providers: TranslationProvider[]) {
this.customLoader = <TranslateLoaderService> this.translate.currentLoader;
@@ -56,7 +56,7 @@ export class TranslationService {
}
}
this.userPreference.locale$.subscribe( (locale) => {
userPreference.locale$.subscribe( (locale) => {
this.userLang = locale;
this.use(this.userLang);
});
@@ -90,7 +90,7 @@ export class TranslationService {
}
}
private onTranslationChanged(lang: string): void {
onTranslationChanged(lang: string): void {
this.translate.onTranslationChange.next({
lang: lang,
translations: this.customLoader.getFullTranslationJSON(lang)

View File

@@ -22,7 +22,6 @@
"paths": {
"@alfresco/adf-process-services": ["../process-services"],
"@alfresco/adf-content-services": ["../content-services"],
"@alfresco/adf-core": ["../core"],
"@angular/*": ["../node_modules/@angular/*"]
},
"lib": [