Skip to content

Commit

Permalink
Show "add" button in grid only when schema is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
HDinger committed Dec 16, 2019
1 parent 934d1a9 commit 8dce4ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 0 additions & 5 deletions frontend/src/app/modules/grids/grid/add-widget.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ export class GridAddWidgetService {

private select(area:GridArea) {
return new Promise<GridWidgetResource>((resolve, reject) => {
if (!this.layout.schema) {
reject();
return;
}

const modal = this.opModalService.show(AddGridWidgetModal, this.injector, { schema: this.layout.schema });
modal.closingEvent.subscribe((modal:AddGridWidgetModal) => {
let registered = modal.chosenWidget;
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/app/modules/grids/grid/grid.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
[cdkDropListData]="area"
[cdkDropListConnectedTo]="layout.gridAreaIds">
<div class="grid--widget-add hidden-for-mobile"
*ngIf="layout.schema"
[title]="add.addText"
(click)="add.widget(area)">
</div>
Expand All @@ -81,6 +82,7 @@
[id]="gap.guid"
(mouseover)="layout.setMousedOverArea(gap)">
<div class="grid--widget-add -gap hidden-for-mobile"
*ngIf="layout.schema"
[title]="add.addText"
(click)="add.widget(gap)">
</div>
Expand Down

0 comments on commit 8dce4ab

Please sign in to comment.