Merge branch 'master' into sdirla-undo-move-unit-test

This commit is contained in:
Denys Vuika
2017-10-20 18:56:53 +01:00
committed by GitHub
11 changed files with 126 additions and 54 deletions

View File

@@ -21,7 +21,7 @@ export abstract class Page {
private static USE_HASH_STRATEGY = true; private static USE_HASH_STRATEGY = true;
private locators = { private locators = {
app: by.css('alfresco-content-app'), app: by.css('app-root'),
overlay: by.css('.cdk-overlay-container'), overlay: by.css('.cdk-overlay-container'),
snackBar: by.css('simple-snack-bar') snackBar: by.css('simple-snack-bar')
}; };

View File

@@ -1,44 +0,0 @@
/*!
* @license
* Copyright 2017 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 { CoreModule } from 'ng2-alfresco-core';
import { DataTableModule } from 'ng2-alfresco-datatable';
import { DocumentListModule } from 'ng2-alfresco-documentlist';
import { ViewerModule } from 'ng2-alfresco-viewer';
import { UploadModule } from 'ng2-alfresco-upload';
import { SearchModule } from 'ng2-alfresco-search';
import { LoginModule } from 'ng2-alfresco-login';
export function modules() {
return [
CoreModule,
DataTableModule,
DocumentListModule,
ViewerModule,
UploadModule,
SearchModule,
LoginModule
];
}
@NgModule({
imports: modules(),
exports: modules()
})
export class AdfModule {}

View File

@@ -20,7 +20,7 @@ import { DatePipe } from '@angular/common';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AdfModule } from './adf.module'; import { AdfModule } from '../adf.module';
import { MaterialModule } from './material.module'; import { MaterialModule } from './material.module';
import { FolderDialogComponent } from './dialogs/folder-dialog.component'; import { FolderDialogComponent } from './dialogs/folder-dialog.component';

View File

@@ -77,6 +77,7 @@
<div class="inner-layout__content"> <div class="inner-layout__content">
<adf-document-list #documentList <adf-document-list #documentList
[ngClass]="{ 'app-no-content': documentList.isEmpty() }"
currentFolderId="-favorites-" currentFolderId="-favorites-"
selectionMode="multiple" selectionMode="multiple"
[navigate]="false" [navigate]="false"
@@ -86,6 +87,16 @@
[contentActions]="false" [contentActions]="false"
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"> (node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)">
<empty-folder-content>
<ng-template>
<div class="app-no-content_block">
<md-icon>star_rate</md-icon>
<p class="app-no-content_title">{{ 'APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE' | translate }}</p>
<p class="app-no-content_text">{{ 'APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT' | translate }}</p>
</div>
</ng-template>
</empty-folder-content>
<data-columns> <data-columns>
<data-column <data-column

View File

@@ -85,6 +85,7 @@
[showNotificationBar]="false"> [showNotificationBar]="false">
<adf-document-list #documentList <adf-document-list #documentList
[ngClass]="{ 'app-no-content': documentList.isEmpty() }"
[loading]="isLoading" [loading]="isLoading"
[node]="paging" [node]="paging"
[sorting]="[ 'modifiedAt', 'desc' ]" [sorting]="[ 'modifiedAt', 'desc' ]"

View File

@@ -9,6 +9,7 @@
<div class="inner-layout__content"> <div class="inner-layout__content">
<adf-document-list #documentList <adf-document-list #documentList
[ngClass]="{ 'app-no-content': documentList.isEmpty() }"
currentFolderId="-sites-" currentFolderId="-sites-"
selectionMode="none" selectionMode="none"
[navigate]="false" [navigate]="false"
@@ -18,6 +19,16 @@
[contentActions]="false" [contentActions]="false"
(node-dblclick)="onNodeDoubleClick($event)"> (node-dblclick)="onNodeDoubleClick($event)">
<empty-folder-content>
<ng-template>
<div class="app-no-content_block">
<md-icon>group_work</md-icon>
<p class="app-no-content_title">{{ 'APP.BROWSE.LIBRARIES.EMPTY_STATE.TITLE' | translate }}</p>
<p class="app-no-content_text">{{ 'APP.BROWSE.LIBRARIES.EMPTY_STATE.TITLE' | translate }}</p>
</div>
</ng-template>
</empty-folder-content>
<data-columns> <data-columns>
<data-column <data-column
key="$thumbnail" key="$thumbnail"

View File

@@ -70,6 +70,7 @@
<div class="inner-layout__content"> <div class="inner-layout__content">
<adf-document-list #documentList <adf-document-list #documentList
[ngClass]="{ 'app-no-content': documentList.isEmpty() }"
currentFolderId="-recent-" currentFolderId="-recent-"
selectionMode="multiple" selectionMode="multiple"
[navigate]="false" [navigate]="false"
@@ -79,6 +80,16 @@
[contentActions]="false" [contentActions]="false"
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"> (node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)">
<empty-folder-content>
<ng-template>
<div class="app-no-content_block">
<md-icon>access_time</md-icon>
<p class="app-no-content_title">{{ 'APP.BROWSE.RECENT.EMPTY_STATE.TITLE' | translate }}</p>
<p class="app-no-content_text">{{ 'APP.BROWSE.RECENT.EMPTY_STATE.TITLE' | translate }}</p>
</div>
</ng-template>
</empty-folder-content>
<data-columns> <data-columns>
<data-column <data-column
key="$thumbnail" key="$thumbnail"

View File

@@ -69,6 +69,7 @@
<div class="inner-layout__content"> <div class="inner-layout__content">
<adf-document-list #documentList <adf-document-list #documentList
[ngClass]="{ 'app-no-content': documentList.isEmpty() }"
currentFolderId="-sharedlinks-" currentFolderId="-sharedlinks-"
selectionMode="multiple" selectionMode="multiple"
[sorting]="[ 'modifiedAt', 'desc' ]" [sorting]="[ 'modifiedAt', 'desc' ]"
@@ -77,6 +78,16 @@
[contentActions]="false" [contentActions]="false"
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"> (node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)">
<empty-folder-content>
<ng-template>
<div class="app-no-content_block">
<md-icon>people</md-icon>
<p class="app-no-content_title">{{ 'APP.BROWSE.SHARED.EMPTY_STATE.TITLE' | translate }}</p>
<p class="app-no-content_text">{{ 'APP.BROWSE.SHARED.EMPTY_STATE.TITLE' | translate }}</p>
</div>
</ng-template>
</empty-folder-content>
<data-columns> <data-columns>
<data-column <data-column
key="$thumbnail" key="$thumbnail"

View File

@@ -27,6 +27,7 @@
<div class="inner-layout__content"> <div class="inner-layout__content">
<adf-document-list #documentList <adf-document-list #documentList
[ngClass]="{ 'app-no-content': documentList.isEmpty() }"
currentFolderId="-trashcan-" currentFolderId="-trashcan-"
selectionMode="multiple" selectionMode="multiple"
[navigate]="false" [navigate]="false"
@@ -35,6 +36,17 @@
[contextMenuActions]="true" [contextMenuActions]="true"
[contentActions]="false"> [contentActions]="false">
<empty-folder-content>
<ng-template>
<div class="app-no-content_block">
<md-icon>delete</md-icon>
<p class="app-no-content_title">{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.TITLE' | translate }}</p>
<p class="app-no-content_text">{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.FIRST_TEXT' | translate }}</p>
<p class="app-no-content_text">{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.SECOND_TEXT' | translate }}</p>
</div>
</ng-template>
</empty-folder-content>
<data-columns> <data-columns>
<data-column <data-column

View File

@@ -80,4 +80,46 @@ adf-document-list .adf-data-table {
color: $alfresco-primary-text-color; color: $alfresco-primary-text-color;
} }
} }
.adf-no-content-container {
border: none !important;
}
}
.app-no-content {
.adf-data-table {
height: 100%;
tr:hover, tr:focus {
background-color: unset;
cursor: default;
}
}
&_block {
color: $alfresco-secondary-text-color;
display: flex;
flex-direction: column;
align-items: center;
p {
line-height: 0;
}
}
md-icon {
font-size: 52px;
height: 52px;
width: 52px;
}
&_title {
font-size: 18px;
font-weight: 600;
}
&_subtitle {
font-size: 14px;
font-weight: 300;
}
} }

View File

@@ -31,6 +31,10 @@
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "File Libraries", "LABEL": "File Libraries",
"TOOLTIP": "Access File Libraries" "TOOLTIP": "Access File Libraries"
},
"EMPTY_STATE": {
"TITLE": "You aren't a member of any File Libraries yet",
"TEXT": "Join sites to upload, view, and share files."
} }
}, },
"SHARED": { "SHARED": {
@@ -45,6 +49,10 @@
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Recent Files", "LABEL": "Recent Files",
"TOOLTIP": "View files you recently edited" "TOOLTIP": "View files you recently edited"
},
"EMPTY_STATE": {
"TITLE": "No recent files or folders",
"TEXT": "Items you upload or edit in the last 30 days are shown here."
} }
}, },
"FAVORITES": { "FAVORITES": {
@@ -52,6 +60,10 @@
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Favorites", "LABEL": "Favorites",
"TOOLTIP": "View your favorite files and folders" "TOOLTIP": "View your favorite files and folders"
},
"EMPTY_STATE": {
"TITLE": "No favorite files or folders",
"TEXT": "Favorite items that you want to easily find later."
} }
}, },
"TRASHCAN": { "TRASHCAN": {
@@ -59,6 +71,11 @@
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Trash", "LABEL": "Trash",
"TOOLTIP": "View deleted files in the trash" "TOOLTIP": "View deleted files in the trash"
},
"EMPTY_STATE": {
"TITLE": "Trash is empty",
"FIRST_TEXT": "Items you delete are moved to the Trash.",
"SECOND_TEXT": "Empty Trash to permanently delete items."
} }
} }
}, },