本文整理汇总了TypeScript中ngx-prx-styleguide.ModalService类的典型用法代码示例。如果您正苦于以下问题:TypeScript ModalService类的具体用法?TypeScript ModalService怎么用?TypeScript ModalService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ModalService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: confirmRemoveFile
confirmRemoveFile() {
if (this.hasStories() && !this.file.isNew) {
let confirmMsg = `Are you sure you want to remove the ${this.file.label} segment?
This change could affect your already published episodes.`;
this.modal.confirm('', confirmMsg, (confirm) => {
if (confirm) {
this.removeFile();
}
});
} else {
this.removeFile();
}
}
开发者ID:PRX,项目名称:publish.prx.org,代码行数:13,代码来源:file-template.component.ts
示例2: confirmRemoveVersion
confirmRemoveVersion(version: AudioVersionTemplateModel) {
if (this.hasStories() && !version.isNew) {
let confirmMsg = `Are you sure you want to remove the ${version.label} template?
This change could affect your already published episodes.`;
this.modal.confirm('', confirmMsg, (confirm) => {
if (confirm) {
this.removeVersion(version);
}
});
} else {
this.removeVersion(version);
}
}
开发者ID:PRX,项目名称:publish.prx.org,代码行数:13,代码来源:series-templates.component.ts
示例3: handleError
handleError(err) {
this.modal.show({
title: 'Uncaught ' + (err.name || 'Error'),
body: `
<p>${err.message}</p>
<hr/>
<pre>${err.stack}</pre>
`,
secondaryButton: 'Okay',
height: 400,
width: 700
});
this.defaultHandler.handleError(err);
}
开发者ID:PRX,项目名称:publish.prx.org,代码行数:14,代码来源:error.service.ts
示例4: confirmAddFile
confirmAddFile(event: MouseEvent, version: AudioVersionTemplateModel) {
if (event.target['blur']) {
event.target['blur']();
}
if (this.hasStories() && !version.isNew) {
let confirmMsg = `Are you sure you want to add a segment to your ${version.label} template?
This change could invalidate your already published episodes.`;
this.modal.confirm('', confirmMsg, (confirm) => {
if (confirm) {
this.addFile(version);
}
});
} else {
this.addFile(version);
}
}
开发者ID:PRX,项目名称:publish.prx.org,代码行数:16,代码来源:series-templates.component.ts
示例5: showProblems
showProblems() {
let normals = this.formatInvalids(false);
let stricts = this.formatInvalids(true).filter(s => normals.indexOf(s) === -1);
let title = 'Validation errors';
let msg = '';
normals.forEach(s => msg += `<li class="error">${s}</li>`);
if (this.isPublished) {
stricts.forEach(s => msg += `<li class="error">${s}</li>`);
}
if (this.id && !this.isPublished) {
stricts.forEach(s => msg += `<li>${s}</li>`);
if (normals.length === 0) {
title = 'Not ready to publish';
}
}
this.modal.show({title: title, body: `<ul>${msg}</ul>`, secondaryButton: 'Okay'});
}
开发者ID:PRX,项目名称:publish.prx.org,代码行数:19,代码来源:status.component.ts
注:本文中的ngx-prx-styleguide.ModalService类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论