mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Upgrade document list to angular 2.0.0-rc.1
This commit is contained in:
@@ -11,7 +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 -->
|
||||||
|
<!-- Polyfill(s) for older browsers -->
|
||||||
|
<script src="node_modules/core-js/client/shim.min.js"></script>
|
||||||
|
|
||||||
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- IE required polyfills, in this exact order -->
|
||||||
|
<!--
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.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/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
||||||
@@ -21,6 +29,7 @@
|
|||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Additional Alfresco libraries -->
|
<!-- Additional Alfresco libraries -->
|
||||||
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
||||||
|
@@ -16,23 +16,35 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.15",
|
"@angular/common": "2.0.0-rc.1",
|
||||||
"es6-promise": "3.0.2",
|
"@angular/compiler": "2.0.0-rc.1",
|
||||||
"es6-shim": "0.35.0",
|
"@angular/core": "2.0.0-rc.1",
|
||||||
"reflect-metadata": "0.1.2",
|
"@angular/http": "2.0.0-rc.1",
|
||||||
"rxjs": "5.0.0-beta.2",
|
"@angular/platform-browser": "2.0.0-rc.1",
|
||||||
"material-design-icons": "^2.2.3",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||||
"material-design-lite": "^1.1.3",
|
"@angular/router": "2.0.0-rc.1",
|
||||||
"zone.js": "0.6.10",
|
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||||
"ng2-alfresco-documentlist": "^0.1.16"
|
"@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-lite": "^1.1.3",
|
||||||
|
"ng2-alfresco-documentlist": "^0.1.16",
|
||||||
|
"alfresco-js-api": "^0.1.0",
|
||||||
|
"ng2-translate": "2.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browser-sync": "^2.10.0",
|
"browser-sync": "^2.10.0",
|
||||||
"connect-history-api-fallback": "^1.2.0",
|
"connect-history-api-fallback": "^1.2.0",
|
||||||
"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"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"angular2",
|
"angular2",
|
||||||
|
@@ -15,9 +15,9 @@
|
|||||||
* 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,
|
||||||
|
@@ -1,48 +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 = {
|
||||||
|
'app': 'dist', // 'dist',
|
||||||
|
'@angular': 'node_modules/@angular',
|
||||||
|
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
||||||
|
'rxjs': 'node_modules/rxjs',
|
||||||
|
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
'ng2-translate': 'node_modules/ng2-translate',
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
||||||
'ng2-alfresco-documentlist': 'node_modules/ng2-alfresco-documentlist',
|
'ng2-alfresco-documentlist': 'node_modules/ng2-alfresco-documentlist'
|
||||||
'rxjs': 'node_modules/rxjs',
|
|
||||||
'angular2' : 'node_modules/angular2',
|
|
||||||
'app': 'dist/main'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 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 = {
|
||||||
'app': { format: 'register', defaultExtension: 'js' },
|
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||||
|
'rxjs': { defaultExtension: 'js' },
|
||||||
|
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
||||||
|
|
||||||
'ng2-translate': { defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-core': { defaultExtension: 'js' },
|
'ng2-alfresco-core': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-documentlist': { defaultExtension: 'js' },
|
'ng2-alfresco-documentlist': { defaultExtension: 'js' }
|
||||||
'rxjs': { defaultExtension: 'js' },
|
|
||||||
'angular2': { 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);
|
||||||
|
@@ -54,16 +54,25 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.15",
|
"@angular/common": "2.0.0-rc.1",
|
||||||
"es6-module-loader": "^0.17.8",
|
"@angular/compiler": "2.0.0-rc.1",
|
||||||
"es6-shim": "^0.35.0",
|
"@angular/core": "2.0.0-rc.1",
|
||||||
"ng2-alfresco-core": "^0.1.0",
|
"@angular/http": "2.0.0-rc.1",
|
||||||
"reflect-metadata": "0.1.2",
|
"@angular/platform-browser": "2.0.0-rc.1",
|
||||||
"rxjs": "5.0.0-beta.2",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||||
"systemjs": "0.19.26",
|
"@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",
|
"zone.js": "^0.6.12",
|
||||||
|
"angular2-in-memory-web-api": "0.0.11",
|
||||||
|
|
||||||
|
"ng2-alfresco-core": "^0.1.0",
|
||||||
"alfresco-js-api": "^0.1.0",
|
"alfresco-js-api": "^0.1.0",
|
||||||
"ng2-translate": "1.11.1"
|
"ng2-translate": "2.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^2.1.0",
|
"concurrently": "^2.1.0",
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {DocumentList} from './document-list';
|
import {DocumentList} from './document-list';
|
||||||
import {ContentActionModel} from './../models/content-action.model';
|
import {ContentActionModel} from './../models/content-action.model';
|
||||||
|
|
||||||
|
@@ -20,8 +20,8 @@ import {
|
|||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
beforeEach
|
beforeEach
|
||||||
} from 'angular2/testing';
|
} from '@angular/core/testing';
|
||||||
import {EventEmitter} from 'angular2/core';
|
import {EventEmitter} from '@angular/core';
|
||||||
|
|
||||||
import {DocumentList} from './document-list';
|
import {DocumentList} from './document-list';
|
||||||
import {AlfrescoServiceMock} from '../assets/alfresco.service.mock';
|
import {AlfrescoServiceMock} from '../assets/alfresco.service.mock';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Component, OnInit, OnChanges, Input, Output, EventEmitter} from 'angular2/core';
|
import {Component, OnInit, OnChanges, Input, Output, EventEmitter} from '@angular/core';
|
||||||
import {ContentActionModel} from './../models/content-action.model';
|
import {ContentActionModel} from './../models/content-action.model';
|
||||||
import {ContentActionList} from './content-action-list';
|
import {ContentActionList} from './content-action-list';
|
||||||
import {DocumentActionsService} from '../services/document-actions.service';
|
import {DocumentActionsService} from '../services/document-actions.service';
|
||||||
|
@@ -20,7 +20,7 @@ import {
|
|||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
beforeEach
|
beforeEach
|
||||||
} from 'angular2/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import {DocumentList} from './document-list';
|
import {DocumentList} from './document-list';
|
||||||
import {AlfrescoServiceMock} from '../assets/alfresco.service.mock';
|
import {AlfrescoServiceMock} from '../assets/alfresco.service.mock';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {DocumentList} from './document-list';
|
import {DocumentList} from './document-list';
|
||||||
import {ContentColumnModel} from './../models/content-column.model';
|
import {ContentColumnModel} from './../models/content-column.model';
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ import {
|
|||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
beforeEach
|
beforeEach
|
||||||
} from 'angular2/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import {DocumentList} from './document-list';
|
import {DocumentList} from './document-list';
|
||||||
import {ContentColumn} from './content-column';
|
import {ContentColumn} from './content-column';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, Input, OnChanges } from 'angular2/core';
|
import { Component, OnInit, Input, OnChanges } from '@angular/core';
|
||||||
import { ContentColumnList } from './content-column-list';
|
import { ContentColumnList } from './content-column-list';
|
||||||
import { ContentColumnModel } from './../models/content-column.model';
|
import { ContentColumnModel } from './../models/content-column.model';
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<ol *ngIf="breadcrumb" data-automation-id="breadcrumb" class="breadcrumb">
|
<ol *ngIf="breadcrumb" data-automation-id="breadcrumb" class="breadcrumb">
|
||||||
<li *ngFor="#r of route; #last = last" [class.active]="last" [ngSwitch]="last">
|
<li *ngFor="let r of route; let last = last" [class.active]="last" [ngSwitch]="last">
|
||||||
<span *ngSwitchWhen="true">{{r.name}}</span>
|
<span *ngSwitchWhen="true">{{r.name}}</span>
|
||||||
<a *ngSwitchDefault href="#" [attr.data-automation-id]="'breadcrumb_' + r.name" (click)="goToRoute(r, $event)">{{r.name}}</a>
|
<a *ngSwitchDefault href="#" [attr.data-automation-id]="'breadcrumb_' + r.name" (click)="goToRoute(r, $event)">{{r.name}}</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<!-- Columns -->
|
<!-- Columns -->
|
||||||
<th class="mdl-data-table__cell--non-numeric non-selectable {{col.cssClass}}"
|
<th class="mdl-data-table__cell--non-numeric non-selectable {{col.cssClass}}"
|
||||||
*ngFor="#col of columns"
|
*ngFor="let col of columns"
|
||||||
[class.column-header]="col.title"
|
[class.column-header]="col.title"
|
||||||
[attr.data-automation-id]="'auto_id_' + col.source"
|
[attr.data-automation-id]="'auto_id_' + col.source"
|
||||||
[class.mdl-data-table__header--sorted-ascending]="sorting.key === col.source && sorting.direction === 'asc'"
|
[class.mdl-data-table__header--sorted-ascending]="sorting.key === col.source && sorting.direction === 'asc'"
|
||||||
@@ -37,10 +37,10 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr *ngFor="#content of folder.list.entries; #idx = index"
|
<tr *ngFor="let content of folder.list.entries; let idx = index"
|
||||||
[attr.data-automation-id]="getObjectValue(content.entry, 'name')">
|
[attr.data-automation-id]="getObjectValue(content.entry, 'name')">
|
||||||
<!-- Columns -->
|
<!-- Columns -->
|
||||||
<td *ngFor="#col of columns" [ngSwitch]="col.type"
|
<td *ngFor="let col of columns" [ngSwitch]="col.type"
|
||||||
class="mdl-data-table__cell--non-numeric non-selectable data-cell {{col.cssClass}}"
|
class="mdl-data-table__cell--non-numeric non-selectable data-cell {{col.cssClass}}"
|
||||||
(click)="onItemClick(content, $event)"
|
(click)="onItemClick(content, $event)"
|
||||||
(dblclick)="onItemDblClick(content, $event)"
|
(dblclick)="onItemDblClick(content, $event)"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<td *ngIf="content.entry.isFolder">
|
<td *ngIf="content.entry.isFolder">
|
||||||
<!-- action buttons -->
|
<!-- action buttons -->
|
||||||
<button class="mdl-button mdl-js-button mdl-button--icon"
|
<button class="mdl-button mdl-js-button mdl-button--icon"
|
||||||
*ngFor="#action of getContentActions('folder', 'button')"
|
*ngFor="let action of getContentActions('folder', 'button')"
|
||||||
(click)="executeContentAction(content, action)">
|
(click)="executeContentAction(content, action)">
|
||||||
<i class="material-icons">{{action.icon}}</i>
|
<i class="material-icons">{{action.icon}}</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
[attr.for]="'folder_action_menu_' + idx">
|
[attr.for]="'folder_action_menu_' + idx">
|
||||||
<li class="mdl-menu__item"
|
<li class="mdl-menu__item"
|
||||||
[attr.data-automation-id]="action.title"
|
[attr.data-automation-id]="action.title"
|
||||||
*ngFor="#action of getContentActions('folder', 'menu')"
|
*ngFor="let action of getContentActions('folder', 'menu')"
|
||||||
(click)="executeContentAction(content, action)">
|
(click)="executeContentAction(content, action)">
|
||||||
{{action.title}}
|
{{action.title}}
|
||||||
</li>
|
</li>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<td *ngIf="!content.entry.isFolder">
|
<td *ngIf="!content.entry.isFolder">
|
||||||
<!-- action buttons -->
|
<!-- action buttons -->
|
||||||
<button class="mdl-button mdl-js-button mdl-button--icon"
|
<button class="mdl-button mdl-js-button mdl-button--icon"
|
||||||
*ngFor="#action of getContentActions('document', 'button')"
|
*ngFor="let action of getContentActions('document', 'button')"
|
||||||
(click)="executeContentAction(content, action)">
|
(click)="executeContentAction(content, action)">
|
||||||
<i class="material-icons">{{action.icon}}</i>
|
<i class="material-icons">{{action.icon}}</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
[attr.for]="'document_action_menu_' + idx">
|
[attr.for]="'document_action_menu_' + idx">
|
||||||
<li class="mdl-menu__item"
|
<li class="mdl-menu__item"
|
||||||
[attr.data-automation-id]="action.title"
|
[attr.data-automation-id]="action.title"
|
||||||
*ngFor="#action of getContentActions('document', 'menu')"
|
*ngFor="let action of getContentActions('document', 'menu')"
|
||||||
(click)="executeContentAction(content, action)">
|
(click)="executeContentAction(content, action)">
|
||||||
{{action.title}}
|
{{action.title}}
|
||||||
</li>
|
</li>
|
||||||
|
@@ -20,7 +20,7 @@ import {
|
|||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
beforeEach
|
beforeEach
|
||||||
} from 'angular2/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { DocumentList } from './document-list';
|
import { DocumentList } from './document-list';
|
||||||
import { ContentColumnModel } from '../models/content-column.model';
|
import { ContentColumnModel } from '../models/content-column.model';
|
||||||
|
@@ -25,8 +25,8 @@ import {
|
|||||||
AfterViewChecked,
|
AfterViewChecked,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
TemplateRef
|
TemplateRef
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
import { DatePipe } from 'angular2/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { Subject } from 'rxjs/Rx';
|
import { Subject } from 'rxjs/Rx';
|
||||||
import { CONTEXT_MENU_DIRECTIVES } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { CONTEXT_MENU_DIRECTIVES } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
import { AlfrescoService } from './../services/alfresco.service';
|
import { AlfrescoService } from './../services/alfresco.service';
|
||||||
@@ -92,7 +92,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit,
|
|||||||
|
|
||||||
actions: ContentActionModel[] = [];
|
actions: ContentActionModel[] = [];
|
||||||
columns: ContentColumnModel[] = [];
|
columns: ContentColumnModel[] = [];
|
||||||
emptyFolderTemplate: TemplateRef;
|
emptyFolderTemplate: TemplateRef<any>;
|
||||||
|
|
||||||
private _folder: NodePaging;
|
private _folder: NodePaging;
|
||||||
|
|
||||||
@@ -469,9 +469,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit,
|
|||||||
if (col.type === 'date') {
|
if (col.type === 'date') {
|
||||||
let datePipe = new DatePipe();
|
let datePipe = new DatePipe();
|
||||||
if (datePipe.supports(value)) {
|
if (datePipe.supports(value)) {
|
||||||
// TODO: to be changed to plan non-array value post angular2 beta.15
|
return datePipe.transform(value, col.format);
|
||||||
let pattern = col.format ? [col.format] : [];
|
|
||||||
return datePipe.transform(value, pattern);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ import {
|
|||||||
TemplateRef,
|
TemplateRef,
|
||||||
OnInit,
|
OnInit,
|
||||||
AfterContentInit
|
AfterContentInit
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
import { DocumentList } from './document-list';
|
import { DocumentList } from './document-list';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from 'angular2/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Response } from 'angular2/http';
|
import { Response } from '@angular/http';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { NodePaging, MinimalNodeEntity } from './../models/document-library.model';
|
import { NodePaging, MinimalNodeEntity } from './../models/document-library.model';
|
||||||
import {
|
import {
|
||||||
|
@@ -1,26 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
import {Injectable} from 'angular2/core';
|
|
||||||
import {Subject} from 'rxjs/Rx';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class ContextMenuService {
|
|
||||||
public show: Subject<{event: MouseEvent, obj: any[]}> = new Subject();
|
|
||||||
}
|
|
||||||
*/
|
|
@@ -20,7 +20,7 @@ import {
|
|||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
beforeEach
|
beforeEach
|
||||||
} from 'angular2/testing';
|
} from '@angular/core/testing';
|
||||||
import {ContentActionHandler} from '../models/content-action.model';
|
import {ContentActionHandler} from '../models/content-action.model';
|
||||||
import {DocumentActionsService} from './document-actions.service';
|
import {DocumentActionsService} from './document-actions.service';
|
||||||
import {AlfrescoServiceMock} from '../assets/alfresco.service.mock';
|
import {AlfrescoServiceMock} from '../assets/alfresco.service.mock';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ContentActionHandler} from '../models/content-action.model';
|
import {ContentActionHandler} from '../models/content-action.model';
|
||||||
import {AlfrescoService} from './alfresco.service';
|
import {AlfrescoService} from './alfresco.service';
|
||||||
import {
|
import {
|
||||||
|
@@ -20,7 +20,7 @@ import {
|
|||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
beforeEach
|
beforeEach
|
||||||
} from 'angular2/testing';
|
} from '@angular/core/testing';
|
||||||
import {FolderActionsService} from './folder-actions.service';
|
import {FolderActionsService} from './folder-actions.service';
|
||||||
import {ContentActionHandler} from '../models/content-action.model';
|
import {ContentActionHandler} from '../models/content-action.model';
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ContentActionHandler} from '../models/content-action.model';
|
import {ContentActionHandler} from '../models/content-action.model';
|
||||||
import {AlfrescoService} from './alfresco.service';
|
import {AlfrescoService} from './alfresco.service';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user