本文整理汇总了TypeScript中common/core/services/util-ui-service.showNotification函数的典型用法代码示例。如果您正苦于以下问题:TypeScript showNotification函数的具体用法?TypeScript showNotification怎么用?TypeScript showNotification使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showNotification函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
this._loadCategories().then(() => {
if (newLocation.isNew) {
this._newDashboard();
return;
}
// validate report full name:
const wantedFullName = this._getWantedReportFullName(newLocation);
if (!wantedFullName) {
this.navigateNewDashboard(); // change url to "?isNew=1"
return;
}
if (newLocation.fullName === wantedFullName) {
// wanted report and report from the location are the same - open dashboard.
this.loadDashboardInternal(wantedFullName, !!updateFromSource);
} else {
if (newLocation.fullName) {
// show notification to a user if we change the location from wrong report to default.
let message = this.$izendaLocaleService.localeText('js_FailedToLoadDashboard',
'Failed to load dashboard "{0}". Opening default dashboard "{1}".');
message = message.replace('{0}', newLocation.fullName);
message = message.replace('{1}', wantedFullName);
this.$izendaUtilUiService.showNotification(message);
}
this.navigateToDashboard(wantedFullName); // change url to "?rn=default_dashboard"
}
});
开发者ID:izenda,项目名称:resources,代码行数:26,代码来源:dashboard-storage-service.ts
示例2:
this.$izendaDashboardStorageService.sendEmail(this.sendEmailState.sendType, this.sendEmailState.email).then(result => {
this.sendEmailState.opened = false;
if (result === 'OK') {
this.$izendaUtilUiService.showNotification(
this.$izendaLocaleService.localeText('js_EmailWasSent', 'Email was sent'));
} else {
const errorText = this.$izendaLocaleService.localeText('js_FailedToSendEmail', 'Failed to send email');
this.$izendaUtilUiService.showErrorDialog(errorText);
}
},
开发者ID:izenda,项目名称:resources,代码行数:10,代码来源:toolbar-component.ts
示例3: sendEmail
/**
* Send dashboard via email
*/
sendEmail(type) {
if (type === 'Link') {
if (!this.model.reportFullName) {
const errorText =
this.$izendaLocaleService.localeText('js_CantSendUnsavedLink', 'Cannot email link to unsaved dashboard');
this.$izendaUtilUiService.showNotification(errorText);
return;
}
let redirectUrl =
`?subject=${encodeURIComponent(this.model.reportFullName)}&body=${encodeURIComponent(location.href)}`;
redirectUrl = `mailto:${redirectUrl.replace(/ /g, '%20')}`;
window.top.location.href = redirectUrl;
} else
this.showEmailModal(type);
}
开发者ID:izenda,项目名称:resources,代码行数:18,代码来源:toolbar-component.ts
注:本文中的common/core/services/util-ui-service.showNotification函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论