mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Upgrade Upload to angular 2.0.0-rc.1
This commit is contained in:
@@ -1,10 +1,19 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[{src,scripts}/**.{ts,json,js}]
|
[*]
|
||||||
end_of_line = crlf
|
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[package.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
@@ -11,17 +11,15 @@
|
|||||||
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
|
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
|
||||||
|
|
||||||
<!-- 1. Load libraries -->
|
<!-- 1. Load libraries -->
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/core-js/client/shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<!-- Additional Alfresco libraries -->
|
||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
|
||||||
<script src="node_modules/alfresco-core-rest-api/bundle.js"></script>
|
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
@@ -34,4 +32,4 @@
|
|||||||
<my-app></my-app>
|
<my-app></my-app>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -44,15 +44,28 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.15",
|
"@angular/common": "2.0.0-rc.1",
|
||||||
"es6-shim": "^0.35.0",
|
"@angular/compiler": "2.0.0-rc.1",
|
||||||
|
"@angular/core": "2.0.0-rc.1",
|
||||||
|
"@angular/http": "2.0.0-rc.1",
|
||||||
|
"@angular/platform-browser": "2.0.0-rc.1",
|
||||||
|
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||||
|
"@angular/router": "2.0.0-rc.1",
|
||||||
|
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||||
|
"@angular/upgrade": "2.0.0-rc.1",
|
||||||
|
"systemjs": "0.19.27",
|
||||||
|
"core-js": "^2.4.0",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.6",
|
||||||
|
"zone.js": "^0.6.12",
|
||||||
|
"angular2-in-memory-web-api": "0.0.11",
|
||||||
|
|
||||||
"material-design-icons": "^2.2.3",
|
"material-design-icons": "^2.2.3",
|
||||||
"material-design-lite": "^1.1.3",
|
"material-design-lite": "^1.1.3",
|
||||||
"ng2-alfresco-upload": "^0.1.0",
|
"alfresco-js-api": "^0.1.0",
|
||||||
"reflect-metadata": "0.1.2",
|
"ng2-alfresco-core": "^0.1.0",
|
||||||
"rxjs": "5.0.0-beta.2",
|
"ng2-translate": "2.1.0",
|
||||||
"systemjs": "0.19.26",
|
"ng2-alfresco-upload": "^0.1.0"
|
||||||
"zone.js": "0.6.10"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browser-sync": "^2.10.0",
|
"browser-sync": "^2.10.0",
|
||||||
@@ -60,7 +73,7 @@
|
|||||||
"concurrently": "^2.0.0",
|
"concurrently": "^2.0.0",
|
||||||
"tslint": "^3.8.1",
|
"tslint": "^3.8.1",
|
||||||
"typescript": "^1.8.10",
|
"typescript": "^1.8.10",
|
||||||
"typings": "^0.7.12"
|
"typings": "^1.0.4"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "http://devproducts.alfresco.me:4873/"
|
"registry": "http://devproducts.alfresco.me:4873/"
|
||||||
|
@@ -1,117 +1,117 @@
|
|||||||
/*!
|
/*!
|
||||||
* @license
|
* @license
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
* Copyright 2016 Alfresco Software, Ltd.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit } from 'angular2/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { bootstrap } from 'angular2/platform/browser';
|
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||||
import { HTTP_PROVIDERS } from 'angular2/http';
|
import { HTTP_PROVIDERS } from '@angular/http';
|
||||||
import {
|
import {
|
||||||
ALFRESCO_CORE_PROVIDERS,
|
ALFRESCO_CORE_PROVIDERS,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService
|
AlfrescoAuthenticationService
|
||||||
} from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
} from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/dist/ng2-alfresco-upload';
|
import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/dist/ng2-alfresco-upload';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: `<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
template: `<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateToken()" [(ngModel)]="token"><br>
|
<input id="token" type="text" size="48" (change)="updateToken()" [(ngModel)]="token"><br>
|
||||||
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateHost()" [(ngModel)]="host"><br><br>
|
<input id="token" type="text" size="48" (change)="updateHost()" [(ngModel)]="host"><br><br>
|
||||||
<div *ngIf="!authenticated" style="color:#FF2323">
|
<div *ngIf="!authenticated" style="color:#FF2323">
|
||||||
Authentication failed to ip {{ host }} with user: admin, admin, you can still try to add a valid token to perform
|
Authentication failed to ip {{ host }} with user: admin, admin, you can still try to add a valid token to perform
|
||||||
operations.
|
operations.
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<alfresco-upload-button [showUdoNotificationBar]="true"
|
<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[uploadFolders]="false"
|
[uploadFolders]="false"
|
||||||
[multipleFiles]="false"
|
[multipleFiles]="false"
|
||||||
(onSuccess)="customMethod($event)">
|
(onSuccess)="customMethod($event)">
|
||||||
</alfresco-upload-button>
|
</alfresco-upload-button>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<alfresco-upload-button [showUdoNotificationBar]="true"
|
<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[uploadFolders]="true"
|
[uploadFolders]="true"
|
||||||
[multipleFiles]="false"
|
[multipleFiles]="false"
|
||||||
(onSuccess)="customMethod($event)">
|
(onSuccess)="customMethod($event)">
|
||||||
</alfresco-upload-button>
|
</alfresco-upload-button>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<alfresco-upload-button [showUdoNotificationBar]="true"
|
<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[uploadFolders]="false"
|
[uploadFolders]="false"
|
||||||
[multipleFiles]="true"
|
[multipleFiles]="true"
|
||||||
(onSuccess)="customMethod($event)">
|
(onSuccess)="customMethod($event)">
|
||||||
</alfresco-upload-button>
|
</alfresco-upload-button>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<alfresco-upload-drag-area (onSuccess)="customMethod($event)" >
|
<alfresco-upload-drag-area (onSuccess)="customMethod($event)" >
|
||||||
<div style="width: 200px; height: 100px; border: 1px solid #888888">
|
<div style="width: 200px; height: 100px; border: 1px solid #888888">
|
||||||
DRAG HERE
|
DRAG HERE
|
||||||
</div>
|
</div>
|
||||||
</alfresco-upload-drag-area>
|
</alfresco-upload-drag-area>
|
||||||
<file-uploading-dialog></file-uploading-dialog>
|
<file-uploading-dialog></file-uploading-dialog>
|
||||||
`,
|
`,
|
||||||
directives: [ALFRESCO_ULPOAD_COMPONENTS]
|
directives: [ALFRESCO_ULPOAD_COMPONENTS]
|
||||||
})
|
})
|
||||||
export class MyDemoApp implements OnInit {
|
export class MyDemoApp implements OnInit {
|
||||||
|
|
||||||
authenticated: boolean;
|
authenticated: boolean;
|
||||||
|
|
||||||
host: string = 'http://192.168.99.100:8080';
|
host: string = 'http://192.168.99.100:8080';
|
||||||
|
|
||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService, private alfrescoSettingsService: AlfrescoSettingsService) {
|
constructor(private authService: AlfrescoAuthenticationService, private alfrescoSettingsService: AlfrescoSettingsService) {
|
||||||
alfrescoSettingsService.host = this.host;
|
alfrescoSettingsService.host = this.host;
|
||||||
|
|
||||||
if (localStorage.getItem('token')) {
|
if (localStorage.getItem('token')) {
|
||||||
this.token = localStorage.getItem('token');
|
this.token = localStorage.getItem('token');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateToken(): void {
|
public updateToken(): void {
|
||||||
localStorage.setItem('token', this.token);
|
localStorage.setItem('token', this.token);
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.host = this.host;
|
this.alfrescoSettingsService.host = this.host;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
public customMethod(event: Object): void {
|
public customMethod(event: Object): void {
|
||||||
console.log('File uploaded');
|
console.log('File uploaded');
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit(): void {
|
public ngOnInit(): void {
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
public login(): void {
|
public login(): void {
|
||||||
this.authService.login('admin', 'admin').subscribe(token => {
|
this.authService.login('admin', 'admin').subscribe(token => {
|
||||||
this.authenticated = true;
|
this.authenticated = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap(MyDemoApp, [
|
bootstrap(MyDemoApp, [
|
||||||
HTTP_PROVIDERS,
|
HTTP_PROVIDERS,
|
||||||
ALFRESCO_CORE_PROVIDERS,
|
ALFRESCO_CORE_PROVIDERS,
|
||||||
UploadService
|
UploadService
|
||||||
]);
|
]);
|
||||||
|
@@ -1,57 +1,55 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* System configuration for Angular 2 samples
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
* Adjust as necessary for your application needs.
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
*/
|
||||||
|
(function(global) {
|
||||||
(function (global) {
|
|
||||||
|
|
||||||
// map tells the System loader where to look for things
|
// map tells the System loader where to look for things
|
||||||
var map = {
|
var map = {
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
'app': 'dist', // 'dist',
|
||||||
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload',
|
'@angular': 'node_modules/@angular',
|
||||||
'rxjs': 'node_modules/rxjs',
|
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
||||||
'angular2': 'node_modules/angular2',
|
'rxjs': 'node_modules/rxjs',
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
|
||||||
'app': 'dist/main'
|
|
||||||
};
|
|
||||||
|
|
||||||
|
'ng2-translate': 'node_modules/ng2-translate',
|
||||||
|
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
||||||
|
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload'
|
||||||
|
};
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
var packages = {
|
||||||
'src': {
|
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||||
defaultExtension: 'js'
|
'rxjs': { defaultExtension: 'js' },
|
||||||
},
|
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
||||||
'ng2-alfresco-core': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'ng2-alfresco-upload': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'rxjs': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'angular2': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
|
'ng2-alfresco-core': { defaultExtension: 'js' },
|
||||||
|
'ng2-alfresco-upload': { defaultExtension: 'js' }
|
||||||
|
};
|
||||||
|
var ngPackageNames = [
|
||||||
|
'common',
|
||||||
|
'compiler',
|
||||||
|
'core',
|
||||||
|
'http',
|
||||||
|
'platform-browser',
|
||||||
|
'platform-browser-dynamic',
|
||||||
|
'router',
|
||||||
|
'router-deprecated',
|
||||||
|
'upgrade'
|
||||||
|
];
|
||||||
|
// Individual files (~300 requests):
|
||||||
|
function packIndex(pkgName) {
|
||||||
|
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
||||||
|
}
|
||||||
|
// Bundled (~40 requests):
|
||||||
|
function packUmd(pkgName) {
|
||||||
|
packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' };
|
||||||
|
}
|
||||||
|
// Most environments should use UMD; some (Karma) need the individual index files
|
||||||
|
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
||||||
|
// Add package entries for angular packages
|
||||||
|
ngPackageNames.forEach(setPackageConfig);
|
||||||
var config = {
|
var config = {
|
||||||
defaultJSExtensions: true,
|
|
||||||
map: map,
|
map: map,
|
||||||
packages: packages
|
packages: packages
|
||||||
};
|
};
|
||||||
|
|
||||||
System.config(config);
|
System.config(config);
|
||||||
|
|
||||||
})(this);
|
})(this);
|
||||||
|
@@ -43,6 +43,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Eugenio Romano",
|
"name": "Eugenio Romano",
|
||||||
"email": "eugenio.romano@alfresco.com"
|
"email": "eugenio.romano@alfresco.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Denys Vuika",
|
||||||
|
"email": "denys.vuika@gmail.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -53,19 +57,25 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alfresco-core-rest-api": "^0.1.0",
|
"@angular/common": "2.0.0-rc.1",
|
||||||
"angular2": "2.0.0-beta.15",
|
"@angular/compiler": "2.0.0-rc.1",
|
||||||
"es6-module-loader": "^0.17.8",
|
"@angular/core": "2.0.0-rc.1",
|
||||||
"es6-shim": "^0.35.0",
|
"@angular/http": "2.0.0-rc.1",
|
||||||
"ng2-alfresco-core": "^0.1.0",
|
"@angular/platform-browser": "2.0.0-rc.1",
|
||||||
"reflect-metadata": "0.1.2",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||||
"rxjs": "5.0.0-beta.2",
|
"@angular/router": "2.0.0-rc.1",
|
||||||
"systemjs": "0.19.26",
|
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||||
|
"@angular/upgrade": "2.0.0-rc.1",
|
||||||
|
"systemjs": "0.19.27",
|
||||||
|
"core-js": "^2.4.0",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "^0.6.12",
|
"zone.js": "^0.6.12",
|
||||||
"ng2-translate": "1.11.1"
|
"angular2-in-memory-web-api": "0.0.11",
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"alfresco-core-rest-api": "^0.1.0",
|
||||||
"angular2": "2.0.0-beta.15"
|
"ng2-alfresco-core": "^0.1.0",
|
||||||
|
"ng2-translate": "2.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^2.1.0",
|
"concurrently": "^2.1.0",
|
||||||
@@ -86,7 +96,7 @@
|
|||||||
"traceur": "^0.0.91",
|
"traceur": "^0.0.91",
|
||||||
"tslint": "^3.8.1",
|
"tslint": "^3.8.1",
|
||||||
"typescript": "^1.8.10",
|
"typescript": "^1.8.10",
|
||||||
"typings": "^0.7.12"
|
"typings": "^1.0.4"
|
||||||
},
|
},
|
||||||
"license-check-config": {
|
"license-check-config": {
|
||||||
"src": [
|
"src": [
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { EventEmitter } from 'angular2/core';
|
import { EventEmitter } from '@angular/core';
|
||||||
|
|
||||||
export interface LangChangeEvent {
|
export interface LangChangeEvent {
|
||||||
lang: string;
|
lang: string;
|
||||||
|
@@ -15,6 +15,15 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { describe, it, expect } from '@angular/core/testing';
|
||||||
|
|
||||||
|
describe('FileUploadDialog', () => {
|
||||||
|
it ('should be migrated to angular 2 rc.1', () => {
|
||||||
|
expect(false).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
import { TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS } from 'angular2/platform/testing/browser';
|
import { TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS } from 'angular2/platform/testing/browser';
|
||||||
import { it, describe, expect, injectAsync, beforeEachProviders, TestComponentBuilder, setBaseTestProviders } from 'angular2/testing';
|
import { it, describe, expect, injectAsync, beforeEachProviders, TestComponentBuilder, setBaseTestProviders } from 'angular2/testing';
|
||||||
import { provide } from 'angular2/core';
|
import { provide } from 'angular2/core';
|
||||||
@@ -53,3 +62,4 @@ describe('FileUploadDialog', () => {
|
|||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ChangeDetectorRef, OnInit } from 'angular2/core';
|
import { Component, ChangeDetectorRef, OnInit } from '@angular/core';
|
||||||
import { FileModel } from '../models/file.model';
|
import { FileModel } from '../models/file.model';
|
||||||
import { FileUploadingListComponent } from './file-uploading-list.component';
|
import { FileUploadingListComponent } from './file-uploading-list.component';
|
||||||
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<th>{{'FILE_UPLOAD.FILE_INFO.SIZE' | translate}}</th>
|
<th>{{'FILE_UPLOAD.FILE_INFO.SIZE' | translate}}</th>
|
||||||
<th>{{'FILE_UPLOAD.FILE_INFO.ACTION' | translate}}</th>
|
<th>{{'FILE_UPLOAD.FILE_INFO.ACTION' | translate}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngFor="#file of filesUploadingList">
|
<tr *ngFor="let file of filesUploadingList">
|
||||||
<td class="mdl-data-table__cell--non-numeric"><div class="truncate">{{file.name}}</div></td>
|
<td class="mdl-data-table__cell--non-numeric"><div class="truncate">{{file.name}}</div></td>
|
||||||
<td _ngcontent-hvq-3="">
|
<td _ngcontent-hvq-3="">
|
||||||
<div _ngcontent-hvq-3="" class="mdl-progress mdl-js-progress is-upgraded" id="{{file.id}}"
|
<div _ngcontent-hvq-3="" class="mdl-progress mdl-js-progress is-upgraded" id="{{file.id}}"
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import { Component, ElementRef, Input } from 'angular2/core';
|
import { Component, ElementRef, Input } from '@angular/core';
|
||||||
import { FileModel } from '../models/file.model';
|
import { FileModel } from '../models/file.model';
|
||||||
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
|
|
||||||
|
@@ -15,6 +15,16 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import { describe, it, expect } from '@angular/core/testing';
|
||||||
|
|
||||||
|
describe('AlfrescoUploadButton', () => {
|
||||||
|
it ('should be migrated to angular 2 rc.1', () => {
|
||||||
|
expect(false).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, describe, expect, injectAsync, beforeEachProviders, TestComponentBuilder } from 'angular2/testing';
|
import { it, describe, expect, injectAsync, beforeEachProviders, TestComponentBuilder } from 'angular2/testing';
|
||||||
import { provide } from 'angular2/core';
|
import { provide } from 'angular2/core';
|
||||||
import { UploadButtonComponent } from './upload-button.component';
|
import { UploadButtonComponent } from './upload-button.component';
|
||||||
@@ -105,3 +115,4 @@ describe('AlfrescoUploadButton', () => {
|
|||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import { Component, ViewChild, ElementRef, Input, Output, EventEmitter } from 'angular2/core';
|
import { Component, ViewChild, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import { UploadService } from '../services/upload.service';
|
import { UploadService } from '../services/upload.service';
|
||||||
import { FileModel } from '../models/file.model';
|
import { FileModel } from '../models/file.model';
|
||||||
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ViewChild, Input, Output, EventEmitter } from 'angular2/core';
|
import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import { UploadService } from '../services/upload.service';
|
import { UploadService } from '../services/upload.service';
|
||||||
import { FileDraggableDirective } from '../directives/file-draggable.directive';
|
import { FileDraggableDirective } from '../directives/file-draggable.directive';
|
||||||
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Directive, ElementRef, EventEmitter, Output } from 'angular2/core';
|
import { Directive, ElementRef, EventEmitter, Output } from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [file-draggable]
|
* [file-draggable]
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, beforeEach, expect } from 'angular2/testing';
|
import { it, describe, beforeEach, expect } from '@angular/core/testing';
|
||||||
import { UploadService } from './upload.service';
|
import { UploadService } from './upload.service';
|
||||||
import { FileModel } from './../models/file.model';
|
import { FileModel } from './../models/file.model';
|
||||||
|
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import { FileModel } from '../models/file.model';
|
import { EventEmitter, Injectable } from '@angular/core';
|
||||||
import { EventEmitter, Injectable } from 'angular2/core';
|
import { Response } from '@angular/http';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import { Observer } from 'rxjs/Observer';
|
import { Observer } from 'rxjs/Observer';
|
||||||
import { Response } from 'angular2/http';
|
|
||||||
import { AlfrescoSettingsService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoSettingsService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
|
import { FileModel } from '../models/file.model';
|
||||||
|
|
||||||
declare let AlfrescoApi: any;
|
declare let AlfrescoApi: any;
|
||||||
|
|
||||||
@@ -53,8 +53,8 @@ export class UploadService {
|
|||||||
|
|
||||||
constructor(private settings: AlfrescoSettingsService) {
|
constructor(private settings: AlfrescoSettingsService) {
|
||||||
console.log('UploadService constructor');
|
console.log('UploadService constructor');
|
||||||
this.filesUpload$ = new Observable(observer => this._filesUploadObserver = observer).share();
|
this.filesUpload$ = new Observable<FileModel[]>(observer => this._filesUploadObserver = observer).share();
|
||||||
this.totalCompleted$ = new Observable(observer => this._totalCompletedObserver = observer).share();
|
this.totalCompleted$ = new Observable<number>(observer => this._totalCompletedObserver = observer).share();
|
||||||
this._alfrescoClient = this.getAlfrescoClient();
|
this._alfrescoClient = this.getAlfrescoClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user