mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-604] Upgrade @angular/material to latest version (#1909)
* update dependencies and module imports * fix template warnings and fix import issues * migrate Activiti Form to MdTabsModule * fix unit tests * fix tests * fix unit tests * fix unit tests * disable test that fails only on travis * upgrade activiti form component to angular/material * fix test (remove MDL class check)
This commit is contained in:
committed by
Eugenio Romano
parent
6e3e3ab5b7
commit
a2ef939860
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
import { MdSlideToggleModule, MdInputModule } from '@angular/material';
|
||||||
|
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { SearchModule } from 'ng2-alfresco-search';
|
import { SearchModule } from 'ng2-alfresco-search';
|
||||||
@@ -37,7 +38,6 @@ import { AppComponent } from './app.component';
|
|||||||
import { routing } from './app.routes';
|
import { routing } from './app.routes';
|
||||||
import { CustomEditorsModule } from './components/activiti/custom-editor/custom-editor.component';
|
import { CustomEditorsModule } from './components/activiti/custom-editor/custom-editor.component';
|
||||||
import { Editor3DModule } from 'ng2-3d-editor';
|
import { Editor3DModule } from 'ng2-3d-editor';
|
||||||
import { MaterialModule } from '@angular/material';
|
|
||||||
import { ChartsModule } from 'ng2-charts';
|
import { ChartsModule } from 'ng2-charts';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -62,7 +62,8 @@ import {
|
|||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
routing,
|
routing,
|
||||||
MaterialModule.forRoot(),
|
MdInputModule,
|
||||||
|
MdSlideToggleModule,
|
||||||
CoreModule.forRoot(),
|
CoreModule.forRoot(),
|
||||||
LoginModule.forRoot(),
|
LoginModule.forRoot(),
|
||||||
SearchModule.forRoot(),
|
SearchModule.forRoot(),
|
||||||
|
@@ -150,7 +150,7 @@
|
|||||||
<h5>Upload</h5>
|
<h5>Upload</h5>
|
||||||
<section *ngIf="acceptedFilesTypeShow">
|
<section *ngIf="acceptedFilesTypeShow">
|
||||||
<md-input-container>
|
<md-input-container>
|
||||||
<input md-input placeholder="Extension accepted" [(ngModel)]="acceptedFilesType" data-automation-id="accepted-files-type">
|
<input mdInput placeholder="Extension accepted" [(ngModel)]="acceptedFilesType" data-automation-id="accepted-files-type">
|
||||||
</md-input-container>
|
</md-input-container>
|
||||||
</section>
|
</section>
|
||||||
<div *ngIf="!acceptedFilesTypeShow">
|
<div *ngIf="!acceptedFilesTypeShow">
|
||||||
@@ -193,9 +193,9 @@
|
|||||||
[overlayMode]="true">
|
[overlayMode]="true">
|
||||||
|
|
||||||
<extension-viewer [supportedExtensions]="['obj','3DS']" #extension>
|
<extension-viewer [supportedExtensions]="['obj','3DS']" #extension>
|
||||||
<template let-urlFileContent="urlFileContent" let-extension="extension" >
|
<ng-template let-urlFileContent="urlFileContent" let-extension="extension" >
|
||||||
<threed-viewer [urlFile]="urlFileContent" [extension]="extension" ></threed-viewer>
|
<threed-viewer [urlFile]="urlFileContent" [extension]="extension" ></threed-viewer>
|
||||||
</template>
|
</ng-template>
|
||||||
</extension-viewer>
|
</extension-viewer>
|
||||||
|
|
||||||
</alfresco-viewer>
|
</alfresco-viewer>
|
||||||
|
@@ -39,7 +39,7 @@ import 'dialog-polyfill/dialog-polyfill.css';
|
|||||||
import 'flag-icon-css/css/flag-icon.min.css';
|
import 'flag-icon-css/css/flag-icon.min.css';
|
||||||
|
|
||||||
// Load the Angular Material 2 stylesheet
|
// Load the Angular Material 2 stylesheet
|
||||||
import '../public/css/angular-material.css';
|
import '@angular/material/prebuilt-themes/indigo-pink.css';
|
||||||
|
|
||||||
// Google Material Design Lite
|
// Google Material Design Lite
|
||||||
import 'material-design-lite/material.js';
|
import 'material-design-lite/material.js';
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
"@angular/compiler-cli": "~4.0.0",
|
"@angular/compiler-cli": "~4.0.0",
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"reflect-metadata": "0.1.9",
|
"reflect-metadata": "0.1.9",
|
||||||
"rxjs": "5.1.0",
|
"rxjs": "5.1.0",
|
||||||
|
@@ -59,7 +59,7 @@
|
|||||||
"no-unused-variable": true,
|
"no-unused-variable": true,
|
||||||
"no-use-before-declare": true,
|
"no-use-before-declare": true,
|
||||||
"no-var-keyword": true,
|
"no-var-keyword": true,
|
||||||
"no-var-requires": true,
|
"no-var-requires": false,
|
||||||
"object-literal-sort-keys": false,
|
"object-literal-sort-keys": false,
|
||||||
"one-line": [
|
"one-line": [
|
||||||
true,
|
true,
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdTooltipModule, MdButtonModule, MdIconModule } from '@angular/material';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
||||||
|
|
||||||
@@ -53,7 +54,10 @@ export const ANALYTICS_PROVIDERS: any[] = [
|
|||||||
imports: [
|
imports: [
|
||||||
CoreModule,
|
CoreModule,
|
||||||
ChartsModule,
|
ChartsModule,
|
||||||
DiagramsModule
|
DiagramsModule,
|
||||||
|
MdTooltipModule,
|
||||||
|
MdButtonModule,
|
||||||
|
MdIconModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...ANALYTICS_DIRECTIVES
|
...ANALYTICS_DIRECTIVES
|
||||||
@@ -62,7 +66,10 @@ export const ANALYTICS_PROVIDERS: any[] = [
|
|||||||
...ANALYTICS_PROVIDERS
|
...ANALYTICS_PROVIDERS
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
...ANALYTICS_DIRECTIVES
|
...ANALYTICS_DIRECTIVES,
|
||||||
|
MdTooltipModule,
|
||||||
|
MdButtonModule,
|
||||||
|
MdIconModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AnalyticsModule {
|
export class AnalyticsModule {
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"chart.js": "2.5.0",
|
"chart.js": "2.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
|
import { MdTooltipModule, MdButtonModule, MdIconModule } from '@angular/material';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { ChartsModule } from 'ng2-charts';
|
import { ChartsModule } from 'ng2-charts';
|
||||||
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
@@ -59,7 +60,11 @@ describe('AnalyticsGeneratorComponent', () => {
|
|||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule.forRoot(),
|
CoreModule.forRoot(),
|
||||||
|
MdTooltipModule,
|
||||||
|
MdButtonModule,
|
||||||
|
MdIconModule,
|
||||||
ChartsModule,
|
ChartsModule,
|
||||||
|
|
||||||
DiagramsModule.forRoot()
|
DiagramsModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { DebugElement, SimpleChange } from '@angular/core';
|
import { DebugElement, SimpleChange } from '@angular/core';
|
||||||
|
import { MdTooltipModule, MdButtonModule, OVERLAY_PROVIDERS } from '@angular/material';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
@@ -42,14 +43,17 @@ describe('AnalyticsReportParametersComponent', () => {
|
|||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule.forRoot()
|
CoreModule.forRoot(),
|
||||||
|
MdTooltipModule,
|
||||||
|
MdButtonModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AnalyticsReportParametersComponent,
|
AnalyticsReportParametersComponent,
|
||||||
...WIDGET_DIRECTIVES
|
...WIDGET_DIRECTIVES
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
AnalyticsService
|
AnalyticsService,
|
||||||
|
OVERLAY_PROVIDERS
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdCheckboxModule, MdTabsModule, MdCardModule, MdButtonModule, MdIconModule, MdSlideToggleModule } from '@angular/material';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { ActivitiForm } from './src/components/activiti-form.component';
|
import { ActivitiForm } from './src/components/activiti-form.component';
|
||||||
@@ -64,7 +65,13 @@ export const ACTIVITI_FORM_PROVIDERS: any[] = [
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule,
|
CoreModule,
|
||||||
HttpModule
|
HttpModule,
|
||||||
|
MdCheckboxModule,
|
||||||
|
MdTabsModule,
|
||||||
|
MdCardModule,
|
||||||
|
MdButtonModule,
|
||||||
|
MdIconModule,
|
||||||
|
MdSlideToggleModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...ACTIVITI_FORM_DIRECTIVES,
|
...ACTIVITI_FORM_DIRECTIVES,
|
||||||
@@ -77,7 +84,13 @@ export const ACTIVITI_FORM_PROVIDERS: any[] = [
|
|||||||
...ACTIVITI_FORM_PROVIDERS
|
...ACTIVITI_FORM_PROVIDERS
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
...ACTIVITI_FORM_DIRECTIVES
|
...ACTIVITI_FORM_DIRECTIVES,
|
||||||
|
MdCheckboxModule,
|
||||||
|
MdTabsModule,
|
||||||
|
MdCardModule,
|
||||||
|
MdButtonModule,
|
||||||
|
MdIconModule,
|
||||||
|
MdSlideToggleModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ActivitiFormModule {
|
export class ActivitiFormModule {
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
"@angular/platform-browser": "~4.0.0",
|
"@angular/platform-browser": "~4.0.0",
|
||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -21,12 +21,14 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activiti-form-hide-button {
|
.activiti-form-reload-button {
|
||||||
display: none;
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activiti-debug-button {
|
.activiti-form-hide-button {
|
||||||
float: right;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activiti-task-title {
|
.activiti-task-title {
|
||||||
|
@@ -2,13 +2,23 @@
|
|||||||
<div *ngIf="!hasForm()">
|
<div *ngIf="!hasForm()">
|
||||||
<h3 class="activiti-task-title">Please select a Task</h3>
|
<h3 class="activiti-task-title">Please select a Task</h3>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="hasForm()">
|
<div *ngIf="hasForm()" class="{{form.className}}">
|
||||||
<div class="mdl-card mdl-shadow--2dp activiti-form-container {{form.className}}">
|
<md-card>
|
||||||
<div class="mdl-card__title">
|
<md-card-header>
|
||||||
<i *ngIf="showValidationIcon" class="material-icons">{{ form.isValid ? 'event_available' : 'event_busy' }}</i>
|
<md-card-title>
|
||||||
<h2 *ngIf="isTitleEnabled()" class="mdl-card__title-text">{{form.taskName}}</h2>
|
<h4 *ngIf="isTitleEnabled()">
|
||||||
</div>
|
<div *ngIf="showRefreshButton" class="activiti-form-reload-button">
|
||||||
<div class="mdl-card__media">
|
<button md-icon-button (click)="onRefreshClicked()">
|
||||||
|
<md-icon>refresh</md-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<md-icon>{{ form.isValid ? 'event_available' : 'event_busy' }}</md-icon>
|
||||||
|
<span>{{form.taskName}}</span>
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
</md-card-title>
|
||||||
|
</md-card-header>
|
||||||
|
<md-card-content>
|
||||||
<div *ngIf="form.hasTabs()">
|
<div *ngIf="form.hasTabs()">
|
||||||
<tabs-widget [tabs]="form.tabs" (formTabChanged)="checkVisibility($event);"></tabs-widget>
|
<tabs-widget [tabs]="form.tabs" (formTabChanged)="checkVisibility($event);"></tabs-widget>
|
||||||
</div>
|
</div>
|
||||||
@@ -18,40 +28,26 @@
|
|||||||
<form-field [field]="field.field"></form-field>
|
<form-field [field]="field.field"></form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</md-card-content>
|
||||||
<div *ngIf="form.hasOutcomes()" class="mdl-card__actions mdl-card--border">
|
<md-card-actions *ngIf="form.hasOutcomes()">
|
||||||
|
<!--[class.mdl-button--colored]="!outcome.isSystem"-->
|
||||||
<button *ngFor="let outcome of form.outcomes"
|
<button *ngFor="let outcome of form.outcomes"
|
||||||
alfresco-mdl-button
|
md-button
|
||||||
[disabled]="!isOutcomeButtonEnabled(outcome)"
|
[disabled]="!isOutcomeButtonEnabled(outcome)"
|
||||||
[class.mdl-button--colored]="!outcome.isSystem"
|
|
||||||
[class.activiti-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
|
[class.activiti-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
|
||||||
(click)="onOutcomeClicked(outcome, $event)">
|
(click)="onOutcomeClicked(outcome, $event)">
|
||||||
{{outcome.name}}
|
{{outcome.name | uppercase}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</md-card-actions>
|
||||||
<div *ngIf="showRefreshButton" class="mdl-card__menu" >
|
</md-card>
|
||||||
<button (click)="onRefreshClicked()"
|
|
||||||
class="mdl-button mdl-button--icon mdl-js-button mdl-js-ripple-effect">
|
|
||||||
<i class="material-icons">refresh</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
For debugging and data visualisation purposes,
|
For debugging and data visualisation purposes,
|
||||||
will be removed during future revisions
|
will be removed during future revisions
|
||||||
-->
|
-->
|
||||||
<div *ngIf="showDebugButton" class="activiti-form-debug-container">
|
<div *ngIf="showDebugButton" class="activiti-form-debug-container">
|
||||||
|
<md-slide-toggle [(ngModel)]="debugMode">Debug mode</md-slide-toggle>
|
||||||
<div class="activiti-debug-button">
|
|
||||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-1" [class.is-checked]="debugMode">
|
|
||||||
<input type="checkbox" id="switch-1" class="mdl-switch__input" [(ngModel)]="debugMode">
|
|
||||||
<span class="mdl-switch__label"></span>
|
|
||||||
<span class="debug-toggle-text">Debug mode</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="debugMode && hasForm()">
|
<div *ngIf="debugMode && hasForm()">
|
||||||
<h4>Values</h4>
|
<h4>Values</h4>
|
||||||
<pre>{{form.values | json}}</pre>
|
<pre>{{form.values | json}}</pre>
|
||||||
|
@@ -1,20 +1,9 @@
|
|||||||
<div *ngIf="hasTabs()" class="alfresco-tabs-widget">
|
<div *ngIf="hasTabs()" class="alfresco-tabs-widget">
|
||||||
<div alfresco-mdl-tabs>
|
<md-tab-group>
|
||||||
<div class="mdl-tabs__tab-bar">
|
<md-tab *ngFor="let tab of visibleTabs" [label]="tab.title">
|
||||||
<a *ngFor="let tab of visibleTabs; let isFirst = first"
|
<div *ngFor="let field of tab.fields">
|
||||||
id="title-{{tab.id}}"
|
|
||||||
[href]="'#' + tab.id"
|
|
||||||
class="mdl-tabs__tab" [class.is-active]="isFirst">
|
|
||||||
{{tab.title}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div *ngFor="let tab of visibleTabs; let isFirst = first"
|
|
||||||
class="mdl-tabs__panel"
|
|
||||||
[class.is-active]="isFirst"
|
|
||||||
[attr.id]="tab.id">
|
|
||||||
<div *ngFor="let field of tab.fields">
|
|
||||||
<form-field [field]="field.field"></form-field>
|
<form-field [field]="field.field"></form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</md-tab>
|
||||||
</div>
|
</md-tab-group>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdIconModule, MdButtonModule } from '@angular/material';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
import { ActivitiPeopleService } from './src/services/activiti-people.service';
|
import { ActivitiPeopleService } from './src/services/activiti-people.service';
|
||||||
import { ActivitiTaskListService } from './src/services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './src/services/activiti-tasklist.service';
|
||||||
import { MaterialModule } from '@angular/material';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ActivitiApps,
|
ActivitiApps,
|
||||||
@@ -67,7 +67,8 @@ export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
|
|||||||
CoreModule,
|
CoreModule,
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
ActivitiFormModule,
|
ActivitiFormModule,
|
||||||
MaterialModule
|
MdIconModule,
|
||||||
|
MdButtonModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...ACTIVITI_TASKLIST_DIRECTIVES
|
...ACTIVITI_TASKLIST_DIRECTIVES
|
||||||
@@ -76,7 +77,9 @@ export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
|
|||||||
...ACTIVITI_TASKLIST_PROVIDERS
|
...ACTIVITI_TASKLIST_PROVIDERS
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
...ACTIVITI_TASKLIST_DIRECTIVES
|
...ACTIVITI_TASKLIST_DIRECTIVES,
|
||||||
|
MdIconModule,
|
||||||
|
MdButtonModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ActivitiTaskListModule {
|
export class ActivitiTaskListModule {
|
||||||
|
@@ -47,7 +47,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div *ngIf="!taskDetails">
|
<div *ngIf="!taskDetails">
|
||||||
<template *ngIf="noTaskDetailsTemplateComponent" ngFor [ngForOf]="[data]" [ngForTemplate]="noTaskDetailsTemplateComponent">
|
<ng-template *ngIf="noTaskDetailsTemplateComponent" ngFor [ngForOf]="[data]" [ngForTemplate]="noTaskDetailsTemplateComponent">
|
||||||
{{ 'TASK_DETAILS.MESSAGES.NONE' | translate }}
|
{{ 'TASK_DETAILS.MESSAGES.NONE' | translate }}
|
||||||
</template>
|
</ng-template>
|
||||||
<div *ngIf="!noTaskDetailsTemplateComponent">
|
<div *ngIf="!noTaskDetailsTemplateComponent">
|
||||||
{{ 'TASK_DETAILS.MESSAGES.NONE' | translate }}
|
{{ 'TASK_DETAILS.MESSAGES.NONE' | translate }}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -47,11 +47,6 @@ npm install --save ng2-alfresco-core
|
|||||||
|
|
||||||
- Components
|
- Components
|
||||||
- Context Menu directive
|
- Context Menu directive
|
||||||
- Material Design directives
|
|
||||||
- [mdl]
|
|
||||||
- [alfresco-mdl-button]
|
|
||||||
- [alfresco-mdl-menu]
|
|
||||||
- [alfresco-mdl-tabs]
|
|
||||||
- Directives
|
- Directives
|
||||||
- UploadDirective
|
- UploadDirective
|
||||||
- Services
|
- Services
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdSnackBarModule } from '@angular/material';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { HttpModule, Http } from '@angular/http';
|
import { HttpModule, Http } from '@angular/http';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
||||||
import { MaterialModule } from '@angular/material';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
@@ -88,12 +88,12 @@ export function createTranslateLoader(http: Http, logService: LogService) {
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
HttpModule,
|
HttpModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
MaterialModule.forRoot(),
|
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
provide: TranslateLoader,
|
provide: TranslateLoader,
|
||||||
useFactory: (createTranslateLoader),
|
useFactory: (createTranslateLoader),
|
||||||
deps: [Http, LogService]
|
deps: [Http, LogService]
|
||||||
})
|
}),
|
||||||
|
MdSnackBarModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...MATERIAL_DESIGN_DIRECTIVES,
|
...MATERIAL_DESIGN_DIRECTIVES,
|
||||||
@@ -110,7 +110,6 @@ export function createTranslateLoader(http: Http, logService: LogService) {
|
|||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
MaterialModule,
|
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
HttpModule,
|
HttpModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
@@ -119,7 +118,8 @@ export function createTranslateLoader(http: Http, logService: LogService) {
|
|||||||
...COLLAPSABLE_DIRECTIVES,
|
...COLLAPSABLE_DIRECTIVES,
|
||||||
UploadDirective,
|
UploadDirective,
|
||||||
DataColumnComponent,
|
DataColumnComponent,
|
||||||
DataColumnListComponent
|
DataColumnListComponent,
|
||||||
|
MdSnackBarModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class CoreModule {
|
export class CoreModule {
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
"@angular/compiler-cli": "~4.0.0",
|
"@angular/compiler-cli": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"dialog-polyfill": "0.4.7",
|
"dialog-polyfill": "0.4.7",
|
||||||
|
@@ -18,19 +18,16 @@
|
|||||||
import { MDL } from './mdl-upgrade-element.directive';
|
import { MDL } from './mdl-upgrade-element.directive';
|
||||||
import { AlfrescoMdlButtonDirective } from './mdl-button.directive';
|
import { AlfrescoMdlButtonDirective } from './mdl-button.directive';
|
||||||
import { AlfrescoMdlMenuDirective } from './mdl-menu.directive';
|
import { AlfrescoMdlMenuDirective } from './mdl-menu.directive';
|
||||||
import { AlfrescoMdlTabsDirective } from './mdl-tabs.directive';
|
|
||||||
import { AlfrescoMdlTextFieldDirective } from './mdl-textfield.directive';
|
import { AlfrescoMdlTextFieldDirective } from './mdl-textfield.directive';
|
||||||
|
|
||||||
export * from './mdl-upgrade-element.directive';
|
export * from './mdl-upgrade-element.directive';
|
||||||
export * from './mdl-button.directive';
|
export * from './mdl-button.directive';
|
||||||
export * from './mdl-menu.directive';
|
export * from './mdl-menu.directive';
|
||||||
export * from './mdl-tabs.directive';
|
|
||||||
export * from './mdl-textfield.directive';
|
export * from './mdl-textfield.directive';
|
||||||
|
|
||||||
export const MATERIAL_DESIGN_DIRECTIVES: [any] = [
|
export const MATERIAL_DESIGN_DIRECTIVES: [any] = [
|
||||||
MDL,
|
MDL,
|
||||||
AlfrescoMdlButtonDirective,
|
AlfrescoMdlButtonDirective,
|
||||||
AlfrescoMdlMenuDirective,
|
AlfrescoMdlMenuDirective,
|
||||||
AlfrescoMdlTabsDirective,
|
|
||||||
AlfrescoMdlTextFieldDirective
|
AlfrescoMdlTextFieldDirective
|
||||||
];
|
];
|
||||||
|
@@ -1,79 +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 {
|
|
||||||
Directive,
|
|
||||||
ElementRef,
|
|
||||||
AfterViewInit,
|
|
||||||
OnDestroy
|
|
||||||
} from '@angular/core';
|
|
||||||
|
|
||||||
declare var componentHandler;
|
|
||||||
|
|
||||||
@Directive({
|
|
||||||
selector: '[alfresco-mdl-tabs]'
|
|
||||||
})
|
|
||||||
export class AlfrescoMdlTabsDirective implements AfterViewInit, OnDestroy {
|
|
||||||
|
|
||||||
private observer: MutationObserver;
|
|
||||||
|
|
||||||
constructor(private element: ElementRef) {}
|
|
||||||
|
|
||||||
ngAfterViewInit() {
|
|
||||||
if (componentHandler) {
|
|
||||||
let el = this.element.nativeElement;
|
|
||||||
|
|
||||||
el.classList.add('mdl-tabs');
|
|
||||||
el.classList.add('mdl-js-tabs');
|
|
||||||
el.classList.add('mdl-js-ripple-effect');
|
|
||||||
componentHandler.upgradeElement(el, 'MaterialTabs');
|
|
||||||
|
|
||||||
// watch widget DOM changes and re-upgrade MDL content
|
|
||||||
let tabBar = el.querySelector('.mdl-tabs__tab-bar');
|
|
||||||
if (tabBar) {
|
|
||||||
this.observer = new MutationObserver((mutations: any[]) => {
|
|
||||||
let upgrade = false;
|
|
||||||
mutations.forEach((mutation: MutationRecord) => {
|
|
||||||
if (mutation.addedNodes && mutation.addedNodes.length > 0) {
|
|
||||||
upgrade = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mutation.removedNodes && mutation.removedNodes.length > 0) {
|
|
||||||
upgrade = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (upgrade) {
|
|
||||||
componentHandler.downgradeElements([el]);
|
|
||||||
componentHandler.upgradeElement(el);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.observer.observe(tabBar, {
|
|
||||||
childList: true,
|
|
||||||
subtree: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
if (this.observer) {
|
|
||||||
this.observer.disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -14,11 +14,12 @@
|
|||||||
* 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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { NotificationService } from './notification.service';
|
import { NotificationService } from './notification.service';
|
||||||
import { MdSnackBarModule } from '@angular/material';
|
import { MdSnackBarModule, MdSnackBar, OverlayModule, OVERLAY_PROVIDERS, LiveAnnouncer } from '@angular/material';
|
||||||
|
|
||||||
describe('NotificationService', () => {
|
describe('NotificationService', () => {
|
||||||
let fixture: ComponentFixture<ComponentThatProvidesNotificationService>;
|
let fixture: ComponentFixture<ComponentThatProvidesNotificationService>;
|
||||||
@@ -27,11 +28,15 @@ describe('NotificationService', () => {
|
|||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
MdSnackBarModule.forRoot()
|
OverlayModule,
|
||||||
|
MdSnackBarModule
|
||||||
],
|
],
|
||||||
declarations: [ComponentThatProvidesNotificationService],
|
declarations: [ComponentThatProvidesNotificationService],
|
||||||
providers: [
|
providers: [
|
||||||
NotificationService
|
NotificationService,
|
||||||
|
MdSnackBar,
|
||||||
|
OVERLAY_PROVIDERS,
|
||||||
|
LiveAnnouncer
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -43,33 +48,28 @@ describe('NotificationService', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('openSnackMessage', () => {
|
|
||||||
|
|
||||||
it('should open a message notification bar', (done) => {
|
it('should open a message notification bar', (done) => {
|
||||||
let promise = fixture.componentInstance.sendMessage();
|
let promise = fixture.componentInstance.sendMessage();
|
||||||
promise.afterDismissed().subscribe(() => {
|
promise.afterDismissed().subscribe(() => {
|
||||||
done();
|
done();
|
||||||
});
|
|
||||||
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
expect(document.querySelector('snack-bar-container')).not.toBeNull();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
expect(document.querySelector('snack-bar-container')).not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('openSnackMessageAction', () => {
|
|
||||||
|
|
||||||
it('should open a message notification bar with action', (done) => {
|
it('should open a message notification bar with action', (done) => {
|
||||||
let promise = fixture.componentInstance.sendMessageAction();
|
let promise = fixture.componentInstance.sendMessageAction();
|
||||||
promise.afterDismissed().subscribe(() => {
|
promise.afterDismissed().subscribe(() => {
|
||||||
done();
|
done();
|
||||||
});
|
|
||||||
|
|
||||||
fixture.detectChanges();
|
|
||||||
|
|
||||||
expect(document.querySelector('snack-bar-container')).not.toBeNull();
|
|
||||||
expect(document.querySelector('.md-simple-snackbar-action')).not.toBeNull();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
expect(document.querySelector('snack-bar-container')).not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdCheckboxModule, MdMenuModule, MdIconModule, MdButtonModule } from '@angular/material';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
export * from './src/data/index';
|
export * from './src/data/index';
|
||||||
@@ -38,13 +39,21 @@ export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [
|
|||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule
|
CoreModule,
|
||||||
|
MdCheckboxModule,
|
||||||
|
MdMenuModule,
|
||||||
|
MdIconModule,
|
||||||
|
MdButtonModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...ALFRESCO_DATATABLE_DIRECTIVES
|
...ALFRESCO_DATATABLE_DIRECTIVES
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
...ALFRESCO_DATATABLE_DIRECTIVES
|
...ALFRESCO_DATATABLE_DIRECTIVES,
|
||||||
|
MdCheckboxModule,
|
||||||
|
MdMenuModule,
|
||||||
|
MdIconModule,
|
||||||
|
MdButtonModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class DataTableModule {
|
export class DataTableModule {
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -114,10 +114,10 @@
|
|||||||
<tr *ngIf="data.getRows().length === 0">
|
<tr *ngIf="data.getRows().length === 0">
|
||||||
<td class="mdl-data-table__cell--non-numeric no-content-container"
|
<td class="mdl-data-table__cell--non-numeric no-content-container"
|
||||||
[attr.colspan]="1 + data.getColumns().length">
|
[attr.colspan]="1 + data.getColumns().length">
|
||||||
<template *ngIf="noContentTemplate"
|
<ng-template *ngIf="noContentTemplate"
|
||||||
ngFor [ngForOf]="[data]"
|
ngFor [ngForOf]="[data]"
|
||||||
[ngForTemplate]="noContentTemplate">
|
[ngForTemplate]="noContentTemplate">
|
||||||
</template>
|
</ng-template>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdMenuModule, MdButtonModule, MdIconModule } from '@angular/material';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
@@ -75,7 +76,10 @@ export const DOCUMENT_LIST_PROVIDERS: any[] = [
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule,
|
CoreModule,
|
||||||
DataTableModule
|
DataTableModule,
|
||||||
|
MdMenuModule,
|
||||||
|
MdButtonModule,
|
||||||
|
MdIconModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...DOCUMENT_LIST_DIRECTIVES
|
...DOCUMENT_LIST_DIRECTIVES
|
||||||
@@ -85,7 +89,10 @@ export const DOCUMENT_LIST_PROVIDERS: any[] = [
|
|||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
...DOCUMENT_LIST_DIRECTIVES
|
...DOCUMENT_LIST_DIRECTIVES,
|
||||||
|
MdMenuModule,
|
||||||
|
MdButtonModule,
|
||||||
|
MdIconModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class DocumentListModule {
|
export class DocumentListModule {
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -20,14 +20,14 @@
|
|||||||
(rowDblClick)="onRowDblClick($event)">
|
(rowDblClick)="onRowDblClick($event)">
|
||||||
<div *ngIf="!isEmptyTemplateDefined()">
|
<div *ngIf="!isEmptyTemplateDefined()">
|
||||||
<no-content-template>
|
<no-content-template>
|
||||||
<template>
|
<ng-template>
|
||||||
<div class="document-list_empty_template">
|
<div class="document-list_empty_template">
|
||||||
<div class="document-list__this-space-is-empty">This folder is empty</div>
|
<div class="document-list__this-space-is-empty">This folder is empty</div>
|
||||||
<div class="document-list__drag-drop">Drag and Drop</div>
|
<div class="document-list__drag-drop">Drag and Drop</div>
|
||||||
<div class="document-list__any-files-here-to-add">any files here to add</div>
|
<div class="document-list__any-files-here-to-add">any files here to add</div>
|
||||||
<img [src]="emptyFolderImageUrl" class="document-list__empty_doc_lib">
|
<img [src]="emptyFolderImageUrl" class="document-list__empty_doc_lib">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</ng-template>
|
||||||
</no-content-template>
|
</no-content-template>
|
||||||
</div>
|
</div>
|
||||||
</alfresco-datatable>
|
</alfresco-datatable>
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { MaterialModule } from '@angular/material';
|
import { MdInputModule, MdIconModule, MdCheckboxModule } from '@angular/material';
|
||||||
|
|
||||||
import { LoginHeaderDirective } from './src/directives/login-header.directive';
|
import { LoginHeaderDirective } from './src/directives/login-header.directive';
|
||||||
import { LoginFooterDirective } from './src/directives/login-footer.directive';
|
import { LoginFooterDirective } from './src/directives/login-footer.directive';
|
||||||
@@ -37,14 +37,19 @@ export const ALFRESCO_LOGIN_DIRECTIVES: any[] = [
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule,
|
CoreModule,
|
||||||
MaterialModule
|
MdInputModule,
|
||||||
|
MdIconModule,
|
||||||
|
MdCheckboxModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...ALFRESCO_LOGIN_DIRECTIVES
|
...ALFRESCO_LOGIN_DIRECTIVES
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
exports: [
|
exports: [
|
||||||
...ALFRESCO_LOGIN_DIRECTIVES
|
...ALFRESCO_LOGIN_DIRECTIVES,
|
||||||
|
MdInputModule,
|
||||||
|
MdIconModule,
|
||||||
|
MdCheckboxModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class LoginModule {
|
export class LoginModule {
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
"ng2-alfresco-core": "1.5.0",
|
"ng2-alfresco-core": "1.5.0",
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<form [formGroup]="form" (submit)="onSubmit(form.value, $event)">
|
<form [formGroup]="form" (submit)="onSubmit(form.value, $event)">
|
||||||
<div class="mdl-card__title alfresco-logo">
|
<div class="mdl-card__title alfresco-logo">
|
||||||
<!--HEADER TEMPLATE-->
|
<!--HEADER TEMPLATE-->
|
||||||
<template *ngIf="headerTemplate"
|
<ng-template *ngIf="headerTemplate"
|
||||||
ngFor [ngForOf]="[data]"
|
ngFor [ngForOf]="[data]"
|
||||||
[ngForTemplate]="headerTemplate">
|
[ngForTemplate]="headerTemplate">
|
||||||
</template>
|
</ng-template>
|
||||||
<img *ngIf="!headerTemplate" class="center" [src]="logoImageUrl" alt="{{'LOGIN.LOGO' | translate }}">
|
<img *ngIf="!headerTemplate" class="center" [src]="logoImageUrl" alt="{{'LOGIN.LOGO' | translate }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-card__supporting-text">
|
<div class="mdl-card__supporting-text">
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<!--USERNAME FIELD-->
|
<!--USERNAME FIELD-->
|
||||||
<div class="adf-login__field" [ngClass]="{'is-invalid': isErrorStyle(form.controls.username)}">
|
<div class="adf-login__field" [ngClass]="{'is-invalid': isErrorStyle(form.controls.username)}">
|
||||||
<md-input-container class="adf-full-width">
|
<md-input-container class="adf-full-width">
|
||||||
<input md-input placeholder="{{'LOGIN.LABEL.USERNAME' | translate }}"
|
<input mdInput placeholder="{{'LOGIN.LABEL.USERNAME' | translate }}"
|
||||||
type="text"
|
type="text"
|
||||||
class="adf-full-width"
|
class="adf-full-width"
|
||||||
[formControl]="form.controls['username']"
|
[formControl]="form.controls['username']"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<md-icon *ngIf="isPasswordShow" class="alfresco-login__password-icon" data-automation-id="hide_password" (click)="toggleShowPassword()">visibility_off</md-icon>
|
<md-icon *ngIf="isPasswordShow" class="alfresco-login__password-icon" data-automation-id="hide_password" (click)="toggleShowPassword()">visibility_off</md-icon>
|
||||||
|
|
||||||
<md-input-container class="adf-full-width">
|
<md-input-container class="adf-full-width">
|
||||||
<input md-input placeholder="{{'LOGIN.LABEL.PASSWORD' | translate }}"
|
<input mdInput placeholder="{{'LOGIN.LABEL.PASSWORD' | translate }}"
|
||||||
type="password"
|
type="password"
|
||||||
[formControl]="form.controls['password']"
|
[formControl]="form.controls['password']"
|
||||||
id="password"
|
id="password"
|
||||||
@@ -70,10 +70,10 @@
|
|||||||
<div class="mdl-card__actions mdl-card--border mdl-card__link">
|
<div class="mdl-card__actions mdl-card--border mdl-card__link">
|
||||||
|
|
||||||
<!--FOOTER TEMPLATE-->
|
<!--FOOTER TEMPLATE-->
|
||||||
<template *ngIf="footerTemplate"
|
<ng-template *ngIf="footerTemplate"
|
||||||
ngFor [ngForOf]="[data]"
|
ngFor [ngForOf]="[data]"
|
||||||
[ngForTemplate]="footerTemplate">
|
[ngForTemplate]="footerTemplate">
|
||||||
</template>
|
</ng-template>
|
||||||
<div class="login-action" *ngIf="!footerTemplate && showLoginActions">
|
<div class="login-action" *ngIf="!footerTemplate && showLoginActions">
|
||||||
<div id="login-action-help" class="login-action-left">
|
<div id="login-action-help" class="login-action-left">
|
||||||
<a href="{{needHelpLink}}">{{'LOGIN.ACTION.HELP' | translate }}</a>
|
<a href="{{needHelpLink}}">{{'LOGIN.ACTION.HELP' | translate }}</a>
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -13,14 +13,12 @@
|
|||||||
(success)="resetError()"
|
(success)="resetError()"
|
||||||
(preview)="onPreviewFile($event)">
|
(preview)="onPreviewFile($event)">
|
||||||
<empty-folder-content>
|
<empty-folder-content>
|
||||||
<template>
|
<ng-template>
|
||||||
<div class="empty_template">
|
<div class="empty_template">
|
||||||
<div class="no-result-message">{{ 'SEARCH.RESULTS.NONE' | translate:{searchTerm: searchTerm} }}</div>
|
<div class="no-result-message">{{ 'SEARCH.RESULTS.NONE' | translate:{searchTerm: searchTerm} }}</div>
|
||||||
<img [src]="emptyFolderImageUrl" class="no-result__empty_doc_lib">
|
<img [src]="emptyFolderImageUrl" class="no-result__empty_doc_lib">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</ng-template>
|
||||||
<template>
|
|
||||||
</template>
|
|
||||||
</empty-folder-content>
|
</empty-folder-content>
|
||||||
|
|
||||||
<content-columns>
|
<content-columns>
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdInputModule, MdButtonModule } from '@angular/material';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { TagActionsComponent } from './src/components/tag-actions.component';
|
import { TagActionsComponent } from './src/components/tag-actions.component';
|
||||||
@@ -40,7 +41,9 @@ export const TAG_PROVIDERS: any[] = [
|
|||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule
|
CoreModule,
|
||||||
|
MdInputModule,
|
||||||
|
MdButtonModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...TAG_DIRECTIVES
|
...TAG_DIRECTIVES
|
||||||
@@ -49,7 +52,9 @@ export const TAG_PROVIDERS: any[] = [
|
|||||||
...TAG_PROVIDERS
|
...TAG_PROVIDERS
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
...TAG_DIRECTIVES
|
...TAG_DIRECTIVES,
|
||||||
|
MdInputModule,
|
||||||
|
MdButtonModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class TagModule {
|
export class TagModule {
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<md-input-container class="adf-full-width">
|
<md-input-container class="adf-full-width">
|
||||||
<input md-input placeholder="{{'TAG.LABEL.NEWTAG' | translate }}"
|
<input mdInput placeholder="{{'TAG.LABEL.NEWTAG' | translate }}"
|
||||||
type="text"
|
type="text"
|
||||||
class="mdl-textfield__input"
|
class="mdl-textfield__input"
|
||||||
(keypress)="cleanErrorMsg()"
|
(keypress)="cleanErrorMsg()"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<md-input-container class="adf-full-width">
|
<md-input-container class="adf-full-width">
|
||||||
<input md-input placeholder="{{'TAG.LABEL.NEWTAG' | translate }}"
|
<input mdInput placeholder="{{'TAG.LABEL.NEWTAG' | translate }}"
|
||||||
type="text"
|
type="text"
|
||||||
class="mdl-textfield__input"
|
class="mdl-textfield__input"
|
||||||
(keypress)="cleanErrorMsg()"
|
(keypress)="cleanErrorMsg()"
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { MdIconModule } from '@angular/material';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { UploadDragAreaComponent } from './src/components/upload-drag-area.component';
|
import { UploadDragAreaComponent } from './src/components/upload-drag-area.component';
|
||||||
@@ -65,7 +66,8 @@ export const UPLOAD_PROVIDERS: any[] = [
|
|||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule
|
CoreModule,
|
||||||
|
MdIconModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...UPLOAD_DIRECTIVES
|
...UPLOAD_DIRECTIVES
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -46,7 +46,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -53,8 +53,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span *ngFor="let extensionTemplate of extensionTemplates">
|
<span *ngFor="let extensionTemplate of extensionTemplates">
|
||||||
<template [ngTemplateOutlet]="extensionTemplate.template" *ngIf="extensionTemplate.isVisible"
|
<ng-template
|
||||||
[ngOutletContext]="{ urlFileContent: urlFileContent, extension:extension }"></template>
|
*ngIf="extensionTemplate.isVisible"
|
||||||
|
[ngTemplateOutlet]="extensionTemplate.template"
|
||||||
|
[ngOutletContext]="{ urlFileContent: urlFileContent, extension:extension }">
|
||||||
|
</ng-template>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div *ngIf="!supportedExtension()">
|
<div *ngIf="!supportedExtension()">
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
|
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||||
"@angular/router": "~4.0.0",
|
"@angular/router": "~4.0.0",
|
||||||
"@angular/compiler-cli": "~4.0.0",
|
"@angular/compiler-cli": "~4.0.0",
|
||||||
"@angular/material": "2.0.0-beta.1",
|
"@angular/material": "2.0.0-beta.6",
|
||||||
"alfresco-js-api": "~1.5.0",
|
"alfresco-js-api": "~1.5.0",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"dialog-polyfill": "0.4.7",
|
"dialog-polyfill": "0.4.7",
|
||||||
|
Reference in New Issue
Block a user