+
+ Use custom toolbar
+
+
Multiple File Upload
diff --git a/demo-shell-ng2/app/components/files/files.component.ts b/demo-shell-ng2/app/components/files/files.component.ts
index 5b6ab18b44..92535891b6 100644
--- a/demo-shell-ng2/app/components/files/files.component.ts
+++ b/demo-shell-ng2/app/components/files/files.component.ts
@@ -17,11 +17,14 @@
import { Component, Input, OnInit, AfterViewInit, Optional, ViewChild, ChangeDetectorRef } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
+import { MdDialog } from '@angular/material';
import { AlfrescoAuthenticationService, AlfrescoContentService, FolderCreatedEvent, LogService, NotificationService } from 'ng2-alfresco-core';
import { DocumentActionsService, DocumentListComponent, ContentActionHandler, DocumentActionModel, FolderActionModel } from 'ng2-alfresco-documentlist';
import { FormService } from 'ng2-activiti-form';
import { UploadService, UploadButtonComponent, UploadDragAreaComponent } from 'ng2-alfresco-upload';
+import { CreateFolderDialog } from '../../dialogs/create-folder.dialog';
+
@Component({
selector: 'files-component',
templateUrl: './files.component.html',
@@ -35,6 +38,8 @@ export class FilesComponent implements OnInit, AfterViewInit {
fileNodeId: any;
fileShowed: boolean = false;
+ useCustomToolbar = false;
+
@Input()
multipleFileUpload: boolean = false;
@@ -74,6 +79,7 @@ export class FilesComponent implements OnInit, AfterViewInit {
private notificationService: NotificationService,
private uploadService: UploadService,
private contentService: AlfrescoContentService,
+ private dialog: MdDialog,
@Optional() private route: ActivatedRoute) {
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
}
@@ -197,4 +203,20 @@ export class FilesComponent implements OnInit, AfterViewInit {
}
}
}
+
+ onCreateFolderClicked(event: Event) {
+ let dialogRef = this.dialog.open(CreateFolderDialog);
+ dialogRef.afterClosed().subscribe(folderName => {
+ if (folderName) {
+ this.contentService.createFolder('', folderName, this.documentList.currentFolderId).subscribe(
+ node => {
+ console.log(node);
+ },
+ err => {
+ console.log(err);
+ }
+ );
+ }
+ });
+ }
}
diff --git a/demo-shell-ng2/app/dialogs/create-folder.dialog.ts b/demo-shell-ng2/app/dialogs/create-folder.dialog.ts
new file mode 100644
index 0000000000..a59e86d901
--- /dev/null
+++ b/demo-shell-ng2/app/dialogs/create-folder.dialog.ts
@@ -0,0 +1,44 @@
+/*!
+ * @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 { Component } from '@angular/core';
+
+@Component({
+ selector: 'adf-create-folder-dialog',
+ template: `
+
Create a new folder
+
+
+
+
+
+
+
+
+
+ `,
+ styles: [
+ `
+ .create-folder--name {
+ width: 100%;
+ }
+ `
+ ]
+})
+export class CreateFolderDialog {
+ value: string = '';
+}
diff --git a/demo-shell-ng2/app/material.module.ts b/demo-shell-ng2/app/material.module.ts
new file mode 100644
index 0000000000..cfbbb5215c
--- /dev/null
+++ b/demo-shell-ng2/app/material.module.ts
@@ -0,0 +1,32 @@
+/*!
+ * @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 { NgModule } from '@angular/core';
+import { MdSlideToggleModule, MdInputModule, MdSelectModule, MdDialogModule } from '@angular/material';
+
+const MATERIAL_MODULES = [
+ MdSlideToggleModule,
+ MdInputModule,
+ MdSelectModule,
+ MdDialogModule
+];
+
+@NgModule({
+ imports: MATERIAL_MODULES,
+ exports: MATERIAL_MODULES
+})
+export class MaterialModule {}
diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-header.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-header.component.spec.ts
index d3a99ec9e8..2ee89d61ef 100644
--- a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-header.component.spec.ts
+++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-header.component.spec.ts
@@ -116,9 +116,11 @@ describe('ActivitiProcessInstanceHeader', () => {
it('should render the button show diagram disabled', () => {
component.processInstance = new ProcessInstance(processEnded);
fixture.detectChanges();
- let showButton: HTMLButtonElement = element.querySelector('#show-diagram-button');
- expect(showButton).toBeDefined();
- expect(showButton.disabled).toBeTruthy();
+ fixture.whenStable().then(() => {
+ let showButton: HTMLButtonElement = element.querySelector('#show-diagram-button');
+ expect(showButton).toBeDefined();
+ expect(showButton.disabled).toBeTruthy();
+ });
});
it('should NOT render the button show diagram is the property showDiagram is false', () => {
diff --git a/ng2-components/ng2-alfresco-core/README.md b/ng2-components/ng2-alfresco-core/README.md
index f992bb9665..3839b201bd 100644
--- a/ng2-components/ng2-alfresco-core/README.md
+++ b/ng2-components/ng2-alfresco-core/README.md
@@ -1,4 +1,4 @@
-# Alfresco Angular 2 Components core
+# Alfresco Angular Components Core