mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-09-14 13:04:59 +00:00
Actually remove widgets when requested
This commit is contained in:
parent
c95ab2bbb2
commit
290e244a4e
@ -1,7 +1,3 @@
|
|||||||
<div *ngIf="isLoading">
|
|
||||||
<my-spinner></my-spinner>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ng-template #widgetParams let-widget="widget">
|
<ng-template #widgetParams let-widget="widget">
|
||||||
<label class="label-block">
|
<label class="label-block">
|
||||||
Widget Name
|
Widget Name
|
||||||
@ -19,6 +15,10 @@
|
|||||||
</label>
|
</label>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<!-- Annoyingly, this has to be copy/pasted to all the integration configs -->
|
||||||
|
<div *ngIf="isLoading">
|
||||||
|
<my-spinner></my-spinner>
|
||||||
|
</div>
|
||||||
<div *ngIf="!isLoading">
|
<div *ngIf="!isLoading">
|
||||||
<my-ibox title="Add {{ defaultName }}" [isCollapsible]="true" [defaultCollapsed]="defaultExpandedWidgetId">
|
<my-ibox title="Add {{ defaultName }}" [isCollapsible]="true" [defaultCollapsed]="defaultExpandedWidgetId">
|
||||||
<div class="my-ibox-content">
|
<div class="my-ibox-content">
|
||||||
@ -38,14 +38,14 @@
|
|||||||
[isCollapsible]="true" [defaultCollapsed]="widget.id !== defaultExpandedWidgetId"
|
[isCollapsible]="true" [defaultCollapsed]="widget.id !== defaultExpandedWidgetId"
|
||||||
title="{{ widget.name || widget.url || defaultName }}">
|
title="{{ widget.name || widget.url || defaultName }}">
|
||||||
<div class="my-ibox-content">
|
<div class="my-ibox-content">
|
||||||
<form (submit)="saveWidget(widget)" novalidate name="addForm">
|
<form (submit)="saveWidget(widget)" novalidate name="editForm">
|
||||||
<ng-container *ngTemplateOutlet="widgetParams;context:{widget:widget}"></ng-container>
|
<ng-container *ngTemplateOutlet="widgetParams;context:{widget:widget}"></ng-container>
|
||||||
|
|
||||||
<div style="margin-top: 25px">
|
<div style="margin-top: 25px">
|
||||||
<button type="submit" class="btn btn-sm btn-primary" [disabled]="isUpdating">
|
<button type="submit" class="btn btn-sm btn-primary" [disabled]="isUpdating">
|
||||||
<i class="fa fa-save"></i> Save Widget
|
<i class="fa fa-save"></i> Save Widget
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-sm btn-danger" [disabled]="isUpdating">
|
<button type="button" class="btn btn-sm btn-danger" [disabled]="isUpdating" (click)="removeWidget(widget)">
|
||||||
<i class="fa fa-times"></i> Remove Widget
|
<i class="fa fa-times"></i> Remove Widget
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -71,7 +71,6 @@ export class NewWidgetComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// See if we should request editing a particular widget
|
// See if we should request editing a particular widget
|
||||||
console.log(SessionStorage.editIntegrationId +" " +SessionStorage.editsRequested);
|
|
||||||
if (SessionStorage.editIntegrationId && SessionStorage.editsRequested === 1) {
|
if (SessionStorage.editIntegrationId && SessionStorage.editsRequested === 1) {
|
||||||
let editWidget: EditableWidget = null;
|
let editWidget: EditableWidget = null;
|
||||||
let otherWidgets: EditableWidget[] = [];
|
let otherWidgets: EditableWidget[] = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user