本文整理汇总了TypeScript中aurelia-dialog.DialogService.open方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DialogService.open方法的具体用法?TypeScript DialogService.open怎么用?TypeScript DialogService.open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aurelia-dialog.DialogService
的用法示例。
在下文中一共展示了DialogService.open方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: deleteModal
deleteModal(user) {
(this.dialogService).open({ viewModel: DeleteDialog, model: user }).then(response => {
if (!response.wasCancelled) {
this.deleteModal2(user)
}
});
}
示例2: new
new() {
this.dialogService.open({ viewModel: EditJobPhase})
.whenClosed(result => {
if(result.wasCancelled) return;
Notifications.success('Job Phase saved successfully');
this.refresh();
})
.catch(Notifications.error);
}
示例3: removeAssignie
removeAssignie(userName: any)
{
this.dlg.open({ viewModel: Confirm, model: 'Do you want to remove this user as asignee: ' + userName })
.whenClosed(response =>
{
console.log(response);
if (!response.wasCancelled) {
let index = this.assigniees.findIndex(element => element === userName);
this.assigniees.splice(index, 1);
}
});
}
示例4: removeCheck
removeCheck(checkData: any)
{
this.dlg.open({ viewModel: Confirm, model: 'Do you want to delete this check box:' + checkData.name })
.whenClosed(response =>
{
if (!response.wasCancelled) {
let index = this.checkboxes.findIndex(element => element.checkUID === checkData.checkUID);
this.checkboxes.splice(index, 1);
this.connect.deleteCheck(checkData.checkUID);
}
});
}
示例5: edit
edit(phase:JobPhase) {
this.dialogService.open({ viewModel: EditJobPhase, model: phase })
.whenClosed(result => {
if(result.wasCancelled) return;
const message = result.output ? 'Phase saved successfully' : 'Phase deleted successfully';
Notifications.success(message);
this.refresh();
})
.catch(Notifications.error);
}
示例6: judge
judge(report:Report) {
this.dialogService.open({viewModel: ReportJudge, model: report}).then(response => {
if (!response.wasCancelled) {
const data = response.output;
this.reportService.judgeReport(report.id, data.status.text, data.date)
.then(result => {
this.reports = this.reports.map(current => current.id == report.id ? result : current);
}, error => alert(error));
}
})
}
示例7: removeUser
removeUser(userName: any)
{
this.dlg.open({ viewModel: Confirm, model: 'Do you want to remove this user from the group: ' + userName.name })
.whenClosed(response =>
{
if (!response.wasCancelled) {
let index = this.groupUsers.findIndex(element => element === userName);
let key = this.groupUsers[index].UID;
if ( this.modifyUsers.get( key ) === 1 )
{
this.modifyUsers.set( key, 2 );
}
else
{
this.modifyUsers.set( key, 0 );
}
this.groupUsers.splice(index, 1);
}
});
}
示例8: alert
this.checkServer(env.fhir.server_url).then(valid => {
if (valid) {
this.fhir.init(env.fhir.server_url);
} else {
this.dialog
.open({
model: { url: env.fhir ? env.fhir.server_url || "" : "" },
viewModel: SelectServer
})
.whenClosed(async response => {
if (response.wasCancelled) {
alert("Keine Server Verbindung");
delete env.fhir.server_url;
return;
} else {
env.fhir.server_url = response.output;
this.login();
}
});
}
});
示例9: showMessage
showMessage(message: string, title : string = 'Message', options = ['Ok']) {
return this.dialogService.open({ viewModel: MessageBox, model: { message, title, options } });
}
示例10: editConnection
editConnection(connection) {
this.dialogService.open({ viewModel: EditConnection, model: connection })
.then(result => {
if(result.output) this.saveConnection(result.output)
});
}