Commit d14e8df1355862cb6f9ce038d41c41fb7d2f48fb
1 parent
e2929442
UI: Fix show toast in single dashboard mode
Showing
2 changed files
with
6 additions
and
6 deletions
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | limitations under the License. |
16 | 16 | |
17 | 17 | --> |
18 | -<div class="tb-dashboard-page mat-content" [ngClass]="{'mobile-app': isMobileApp && !isEdit}" style="padding-top: 150px;" | |
18 | +<div class="tb-dashboard-page mat-content" [ngClass]="{'mobile-app': isMobileApp && !isEdit}" style="padding-top: 150px;" tb-toast toastTarget="dashboardRoot" | |
19 | 19 | fxFlex tb-fullscreen [fullscreen]="widgetEditMode || iframeMode || forceFullscreen || isFullscreen"> |
20 | 20 | <tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet> |
21 | 21 | <section class="tb-dashboard-toolbar" | ... | ... |
... | ... | @@ -262,35 +262,35 @@ export class WidgetContext { |
262 | 262 | showSuccessToast(message: string, duration: number = 1000, |
263 | 263 | verticalPosition: NotificationVerticalPosition = 'bottom', |
264 | 264 | horizontalPosition: NotificationHorizontalPosition = 'left', |
265 | - target?: string) { | |
265 | + target: string = 'dashboardRoot') { | |
266 | 266 | this.showToast('success', message, duration, verticalPosition, horizontalPosition, target); |
267 | 267 | } |
268 | 268 | |
269 | 269 | showInfoToast(message: string, |
270 | 270 | verticalPosition: NotificationVerticalPosition = 'bottom', |
271 | 271 | horizontalPosition: NotificationHorizontalPosition = 'left', |
272 | - target?: string) { | |
272 | + target: string = 'dashboardRoot') { | |
273 | 273 | this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target); |
274 | 274 | } |
275 | 275 | |
276 | 276 | showWarnToast(message: string, |
277 | 277 | verticalPosition: NotificationVerticalPosition = 'bottom', |
278 | 278 | horizontalPosition: NotificationHorizontalPosition = 'left', |
279 | - target?: string) { | |
279 | + target: string = 'dashboardRoot') { | |
280 | 280 | this.showToast('warn', message, undefined, verticalPosition, horizontalPosition, target); |
281 | 281 | } |
282 | 282 | |
283 | 283 | showErrorToast(message: string, |
284 | 284 | verticalPosition: NotificationVerticalPosition = 'bottom', |
285 | 285 | horizontalPosition: NotificationHorizontalPosition = 'left', |
286 | - target?: string) { | |
286 | + target: string = 'dashboardRoot') { | |
287 | 287 | this.showToast('error', message, undefined, verticalPosition, horizontalPosition, target); |
288 | 288 | } |
289 | 289 | |
290 | 290 | showToast(type: NotificationType, message: string, duration: number, |
291 | 291 | verticalPosition: NotificationVerticalPosition = 'bottom', |
292 | 292 | horizontalPosition: NotificationHorizontalPosition = 'left', |
293 | - target?: string) { | |
293 | + target: string = 'dashboardRoot') { | |
294 | 294 | this.store.dispatch(new ActionNotificationShow( |
295 | 295 | { |
296 | 296 | message, | ... | ... |