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


TypeScript prompt.service.PromptService類代碼示例

本文整理匯總了TypeScript中app/core/ui-services/prompt.service.PromptService的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.PromptService類的具體用法?TypeScript service.PromptService怎麽用?TypeScript service.PromptService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了service.PromptService類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: onDeleteButton

 /**
  * is executed, when the delete button is pressed
  *
  * @param viewCategory The category to delete
  */
 public async onDeleteButton(viewCategory: ViewCategory): Promise<void> {
     const title = this.translate.instant('Are you sure you want to delete this category?');
     const content = viewCategory.getTitle();
     if (await this.promptService.open(title, content)) {
         this.repo.delete(viewCategory).then(() => this.onCancelButton(), this.raiseError);
     }
 }
開發者ID:emanuelschuetze,項目名稱:OpenSlides,代碼行數:12,代碼來源:category-list.component.ts

示例2: deleteSelected

 /**
  * Handler for deleting multiple entries. Needs items in selectedRows, which
  * is only filled with any data in multiSelect mode
  */
 public async deleteSelected(): Promise<void> {
     const title = this.translate.instant('Are you sure you want to delete all selected elections?');
     if (await this.promptService.open(title, null)) {
         for (const assignment of this.selectedRows) {
             await this.repo.delete(assignment);
         }
     }
 }
開發者ID:emanuelschuetze,項目名稱:OpenSlides,代碼行數:12,代碼來源:assignment-list.component.ts

示例3: delete

 /**
  * Deletes the given motions. Asks for confirmation.
  *
  * @param motions The motions to delete
  */
 public async delete(motions: ViewMotion[]): Promise<void> {
     const content = this.translate.instant('This will delete all selected motions.');
     if (await this.promptService.open('Are you sure?', content)) {
         for (const motion of motions) {
             await this.repo.delete(motion);
         }
     }
 }
開發者ID:jwinzer,項目名稱:OpenSlides,代碼行數:13,代碼來源:motion-multiselect.service.ts

示例4: delete

 /**
  * Deletes the given motions. Asks for confirmation.
  *
  * @param motions The motions to delete
  */
 public async delete(motions: ViewMotion[]): Promise<void> {
     const title = this.translate.instant('Are you sure you want to delete all selected motions?');
     if (await this.promptService.open(title, null)) {
         for (const motion of motions) {
             await this.repo.delete(motion);
         }
     }
 }
開發者ID:tsiegleauq,項目名稱:OpenSlides,代碼行數:13,代碼來源:motion-multiselect.service.ts

示例5: deleteSelected

 /**
  * Handler for deleting multiple entries. Needs items in selectedRows, which
  * is only filled with any data in multiSelect mode
  */
 public async deleteSelected(): Promise<void> {
     const content = this.translate.instant('This will delete all selected assignments.');
     if (await this.promptService.open('Are you sure?', content)) {
         for (const assignment of this.selectedRows) {
             await this.repo.delete(assignment);
         }
     }
 }
開發者ID:jwinzer,項目名稱:OpenSlides,代碼行數:12,代碼來源:assignment-list.component.ts

示例6: onDeletePoll

 /**
  * Handler for the 'delete poll' button
  *
  * TODO: Some confirmation (advanced logic (e.g. not deleting published?))
  */
 public async onDeletePoll(): Promise<void> {
     const title = this.translate.instant('Are you sure you want to delete this ballot?');
     if (await this.promptService.open(title, null)) {
         await this.assignmentRepo.deletePoll(this.poll).then(null, this.raiseError);
     }
 }
開發者ID:CatoTH,項目名稱:OpenSlides,代碼行數:11,代碼來源:assignment-poll.component.ts

示例7: onDeleteButton

 /**
  * is executed, when the delete button is pressed
  *
  * @param viewCategory The category to delete
  */
 public async onDeleteButton(viewCategory: ViewCategory): Promise<void> {
     const content = this.translate.instant('Delete') + ` ${viewCategory.name}?`;
     if (await this.promptService.open('Are you sure?', content)) {
         this.repo.delete(viewCategory).then(() => this.onCancelButton(), this.raiseError);
     }
 }
開發者ID:jwinzer,項目名稱:OpenSlides,代碼行數:11,代碼來源:category-list.component.ts


注:本文中的app/core/ui-services/prompt.service.PromptService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。