File manager changes
[ccsdk/cds.git] / cds-ui / client / src / app / feature-modules / blueprint / modify-template / editor / editor.component.html
1 <!--
2 ============LICENSE_START==========================================
3 ===================================================================
4 Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
5 ===================================================================
6
7 Unless otherwise specified, all software contained herein is licensed
8 under the Apache License, Version 2.0 (the License);
9 you may not use this software except in compliance with the License.
10 You may obtain a copy of the License at
11
12     http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END============================================ -->
20
21 <div class="container">
22     <div class="fileViewContainer">
23         <!-- <div style="width:inherit; height: inherit; position: fixed;z-index: 1; background-color: rgb(0,0,0);background-color: rgba(0,0,0,0.4);"></div> -->
24         <div style="display: flex;">
25             <div>
26                 <i class="fa fa-folder" aria-hidden="true" style="color:#3f51b5; font-size: 20px;margin: 3px; cursor: pointer;" [ngClass] ="{'fa-disabled': selectedFileObj.type == 'file' || selectedFileObj.type == ''}" (click)="enableNameInputEl('createFolder')"></i>
27                 <i class="fa fa-file" aria-hidden="true" style="color:#3f51b5; font-size: 18px; margin: 3px; cursor: pointer;" [ngClass] ="{'fa-disabled' : selectedFileObj.type == 'file' ||selectedFileObj.type == ''}" (click)="enableNameInputEl('createFile')"></i>
28                 <i class="fa fa-trash" aria-hidden="true" style="color:#3f51b5; font-size: 20px; margin: 3px; cursor: pointer;" [ngClass] ="{'fa-disabled' : selectedFileObj.type == ''}"  (click)="deleteFolderOrFile('deleteFile')"></i>
29             </div>
30             <div>
31                 <input *ngIf="isNameTextboxEnablled" type="text" (focusout)="createFolderOrFile($event)"/>
32             </div>
33         </div>
34         <mat-tree [dataSource]="dataSource" [treeControl]="treeControl" style="background-color: #ebebeb">
35             <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)="selectFileToView(node);activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
36                 <button mat-icon-button disabled></button>
37                 <button mat-icon-button (click)="selectFileToView(node)">{{node.name}}</button>
38             </mat-tree-node>
39             <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
40                 <button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
41                 <mat-icon class="mat-icon-rtl-mirror">
42                   {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
43                 </mat-icon>
44               </button>
45                 <button mat-icon-button (click)="selectFolder(node)">{{node.name}}</button>
46             </mat-tree-node>
47         </mat-tree>
48     </div>
49     <div class="editorConatiner">
50         <i class="fa fa-save save-icon" style="font-size:24px" (click)="updateBlueprint()"></i>
51         <ace-editor [(text)]="text" [(mode)]="mode" #editor class="aceEditor"></ace-editor>
52     </div>
53 </div>