當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ngx-prx-styleguide.ModalService類代碼示例

本文整理匯總了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;未經允許,請勿轉載。