[ACA-213] Edit Offline (#909)

* WRITE_LOCK evaluator

* evaluate actions for WRITE_LOCK

* edit offline action

* DL icon for WRITE_LOCK files

* edit offline directive

* custom name column

* localisation

* toggle offline edit extension

* move takeUntil operator

* add tooltip

* better selector to differentiate Edit folder from Edit Offline

* default to empty object for null properties object

* isPersonalFiles evaluator

* isLibraryFiles evaluator

* isLibraryFiles evaluator

* isPersonalFiles evaluator

* update canEditLockedFile rule
This commit is contained in:
Cilibiu Bogdan
2019-02-01 13:52:08 +02:00
committed by Denys Vuika
parent 5eaa5c1bc7
commit e004d365a9
21 changed files with 971 additions and 49 deletions

View File

@@ -0,0 +1,11 @@
.aca-locked-by {
.locked_by--icon {
font-size: 16px;
width: 16px;
height: 16px;
}
.locked_by--name {
font-size: 12px;
}
}

View File

@@ -0,0 +1,61 @@
/*!
* @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,
Input,
OnInit,
ChangeDetectionStrategy,
ViewEncapsulation
} from '@angular/core';
import { NodeEntry } from '@alfresco/js-api';
@Component({
selector: 'aca-locked-by',
template: `
<mat-icon class="locked_by--icon">lock</mat-icon>
<span class="locked_by--name">{{ writeLockedBy() }}</span>
`,
styleUrls: ['./locked-by.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
host: {
class: 'aca-locked-by'
}
})
export class LockByComponent implements OnInit {
@Input()
context: any;
node: NodeEntry;
constructor() {}
ngOnInit() {
this.node = this.context.row.node;
}
writeLockedBy() {
return (
this.node &&
this.node.entry.properties &&
this.node.entry.properties['cm:lockOwner'] &&
this.node.entry.properties['cm:lockOwner'].displayName
);
}
}