[ADF-754] toolbar component (#1938)

* toolbar component

- simple toolbar component (core lib)
- readme updates (core lib)
- update demo shell with toolbar component demo (document list)

* update unit tests
This commit is contained in:
Denys Vuika
2017-06-07 11:39:57 +01:00
committed by Eugenio Romano
parent bea14aa9ca
commit f1a1fc39a6
5 changed files with 61 additions and 3 deletions

View File

@@ -17,7 +17,6 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MdSlideToggleModule, MdInputModule, MdSelectModule } from '@angular/material';
import { CoreModule, AppConfigService } from 'ng2-alfresco-core';
import { SearchModule } from 'ng2-alfresco-search';

View File

@@ -24,6 +24,8 @@ import { UploadService, FileUploadCompleteEvent } from 'ng2-alfresco-upload';
import { CreateFolderDialog } from '../../dialogs/create-folder.dialog';
import { CreateFolderDialog } from '../../dialogs/create-folder.dialog';
@Component({
selector: 'files-component',
templateUrl: './files.component.html',
@@ -142,4 +144,20 @@ export class FilesComponent implements OnInit {
}
});
}
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);
}
);
}
});
}
}

View File

@@ -16,7 +16,6 @@
*/
import { NgModule, ModuleWithProviders } from '@angular/core';
import { MdSnackBarModule } from '@angular/material';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpModule, Http } from '@angular/http';
import { CommonModule } from '@angular/common';

View File

@@ -0,0 +1,42 @@
/* breadcrumb */
:host .breadcrumb {
text-align: left;
padding: 8px 15px;
list-style: none;
background-color: #fafafa;
margin: 0;
}
:host .breadcrumb > li {
display: inline-block;
box-sizing: border-box;
}
:host .breadcrumb > li+li:before {
content: ">\00a0";
padding: 0 0 0 5px;
opacity: 0.54;
color: #000000;
}
:host .breadcrumb > li > a {
text-decoration: none;
opacity: 0.54;
font-family: 'Muli', "Helvetica", "Arial", sans-serif;
font-size: 14px;
font-weight: 600;
line-height: 1.43;
letter-spacing: -0.2px;
color: #000000;
}
:host .breadcrumb > li:hover > a,
:host .breadcrumb > .active {
opacity: 0.87;
font-size: 14px;
font-weight: 600;
line-height: 1.43;
letter-spacing: -0.2px;
color: #000000;
}