File tree Expand file tree Collapse file tree 4 files changed +9
-35
lines changed Expand file tree Collapse file tree 4 files changed +9
-35
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,4 @@ export class WindowHrefService {
4343 // return cached value
4444 return WindowHrefService . hrefWithoutHash ;
4545 }
46-
47- appendHash ( hash : string ) {
48- window . location . href = `${ this . getHrefWithoutHash ( ) } #${ hash } ` ;
49- }
5046}
Original file line number Diff line number Diff line change 1- < div >
2- < div class ="tree-menu-container ">
3- < input class ="wide " type ="text " [(ngModel)] ="prefixOrPath " (keypress) ="onKeypress($event.key) " placeholder ="Search or go ">
4- < ul class ="menu-item-container ">
5- < li *ngFor ="let key of keys | addAlwaysShowFields:schema | filterAndSortBySchema:schema; trackBy:trackByElement " [hidden] ="!filter(key) ">
6- < tree-menu-item [label] ="key " [value] ="record.get(key) " [schema] ="schema.properties[key] " [path] ="getChildPath(key) "> </ tree-menu-item >
7- </ li >
8- </ ul >
9- </ div >
10- </ div >
1+ < div class ="tree-menu-container ">
2+ < ul class ="menu-item-container ">
3+ < li *ngFor ="let key of keys | addAlwaysShowFields:schema | filterAndSortBySchema:schema; trackBy:trackByElement ">
4+ < tree-menu-item [label] ="key " [value] ="record.get(key) " [schema] ="schema.properties[key] " [path] ="getChildPath(key) "> </ tree-menu-item >
5+ </ li >
6+ </ ul >
7+ </ div >
Original file line number Diff line number Diff line change @@ -5,12 +5,6 @@ div.tree-menu-container {
55 text-align : center ;
66}
77
8- input .wide {
9- width : 100% ;
10- padding : 2px ;
11- text-align : center ;
12- }
13-
148ul .menu-item-container {
159 list-style : none ;
1610 text-align : left ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import { Map, Set } from 'immutable';
2626
2727import { AbstractTrackerComponent } from '../abstract-tracker' ;
2828
29- import { DomUtilService , WindowHrefService , PathUtilService } from '../shared/services' ;
29+ import { DomUtilService , PathUtilService } from '../shared/services' ;
3030
3131@Component ( {
3232 selector : 'tree-menu' ,
@@ -45,8 +45,7 @@ export class TreeMenuComponent extends AbstractTrackerComponent implements OnCha
4545
4646 private prefixOrPath = '' ;
4747
48- constructor ( private windowHrefService : WindowHrefService ,
49- private domUtilService : DomUtilService ,
48+ constructor ( private domUtilService : DomUtilService ,
5049 private pathUtilService : PathUtilService ) {
5150 super ( ) ;
5251 }
@@ -59,18 +58,6 @@ export class TreeMenuComponent extends AbstractTrackerComponent implements OnCha
5958 }
6059 }
6160
62- filter ( key : string ) : boolean {
63- return key . startsWith ( this . prefixOrPath ) ;
64- }
65-
66- onKeypress ( key : string ) {
67- if ( key === 'Enter' ) {
68- this . windowHrefService . appendHash ( this . prefixOrPath ) ;
69- this . domUtilService . focusAndSelectFirstEditableChildById ( this . prefixOrPath ) ;
70- this . domUtilService . flashElementById ( this . prefixOrPath ) ;
71- }
72- }
73-
7461 getChildPath ( key : string ) {
7562 return `${ this . pathUtilService . separator } ${ key } ` ;
7663 }
You can’t perform that action at this time.
0 commit comments