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


TypeScript entcore.notify類代碼示例

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


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

示例1: function

                scope.addNewSubjectTag = function(newCustomTagLabel:string) {
                    newCustomTagLabel = StringISOHelper.toISO(newCustomTagLabel);

                    if (!angular.isUndefined(newCustomTagLabel)) {

                        var isExisting = false;

                        for (let i = 0; i < scope.subjectTagList.length; ++i) {
                            if (CompareStringHelper.compare(StringISOHelper.toISO(scope.subjectTagList[i].label), newCustomTagLabel)) {
                                notify.info('exercizer.service.check.addtag');
                                i = scope.subjectTagList.length;
                                isExisting = true;
                            }
                        }

                        if (!isExisting) {

                            var newSubjectTag = new SubjectTag(undefined, newCustomTagLabel);

                            isExisting = false;

                            for (let i = 0; i < scope.selectedSubjectTagList.length; ++i) {
                                if (CompareStringHelper.compare(StringISOHelper.toISO(scope.selectedSubjectTagList[i].label), newCustomTagLabel)) {
                                    notify.info('exercizer.service.check.selectedtag');
                                    i = scope.selectedSubjectTagList.length;
                                    isExisting = true;
                                }
                            }

                            if (!isExisting) {
                                scope.selectedSubjectTagList.push(newSubjectTag);
                            }
                        }
                    }
                };
開發者ID:OPEN-ENT-NG,項目名稱:exercizer,代碼行數:35,代碼來源:teacherDashboardPublishToLibrary.ts

示例2: function

                scope.saveImportSubject = function() {
                    if (!scope.importSubject.title || scope.importSubject.title.length === 0) {
                        notify.error('exercizer.check.title');
                    } else if (!scope.fileImportName || scope.fileImportName.length === 0) {
                        notify.error('exercizer.import.check.file');
                    } else {
                        scope.importSubject.folder_id = scope.currentFolderId;

                        scope.loadingImport = true;

                        ImportService.importFile(scope.newFiles[0], scope.importSubject).then(function (objectData) {
                            SubjectService.currentSubjectId = objectData.subject.id;
                            scope.loadingImport = false;
                            scope.stateImport = 'result';
                            scope.grainImportCount = objectData.count;
                            scope.unsupported = objectData.unsupported;
                            scope.newFiles = undefined;
                            scope.$apply();
                        }, function (err) {
                            scope.loadingImport = false;
                            notify.error(err);
                            scope.$apply();
                        });
                    }
                };
開發者ID:OPEN-ENT-NG,項目名稱:exercizer,代碼行數:25,代碼來源:teacherDashboardSubjectList.ts

示例3:

			.e400(function(e){
				let errorMsg: string = JSON.parse(e.responseText).error;
				if(errorMsg.includes('already exists') || errorMsg.includes('existe dĂŠjĂ ')) {
					notify.error('directory.notify.loginUpdate.error.alreadyExists');
				} else {
					notify.error(errorMsg);
				}
			}.bind(this));
開發者ID:entcore,項目名稱:entcore,代碼行數:8,代碼來源:account.ts

示例4:

				.e400(function(e){
					this.sync();
					var error = JSON.parse(e.responseText).message;
					var errWithIdx = error.split(/\s/);
					if (errWithIdx.length === 2) {
						notify.error(lang.translate(errWithIdx[0]) + errWithIdx[1]);
					} else {
						if(error.indexOf('already exists') !== -1){
							notify.error('directory.import.already.exists');
						}
						else{
							notify.error(error);
						}
					}
				}.bind(this));
開發者ID:entcore,項目名稱:entcore,代碼行數:15,代碼來源:model.ts

示例5: function

 function (fileId) {
     scope.selectedCopy.corrected_metadata = {"filename":file.name};
     scope.selectedCopy.corrected_file_id = fileId;
     scope.selectedCopy.is_corrected = true;
     notify.info('exercizer.service.save.individual.corrected');
     scope.$apply();
 },
開發者ID:OPEN-ENT-NG,項目名稱:exercizer,代碼行數:7,代碼來源:teacherDashboardSimpleCorrectionCopyList.ts

示例6: async

 const printForAllUsers = async () => {
     try {
         if (_printingAll) return;
         _printingAll = true;
         // print all
         let type: ReportType = null;
         switch ($scope.userExport.type) {
             case ExportTypes.CSV:
                 type = "csv";
                 break;
             case ExportTypes.Detail:
                 type = "pdf";
                 break;
             case ExportTypes.Simple:
                 type = "simplePdf";
                 break;
             case ExportTypes.Mail:
             default:
                 throw "Invalid report type: " + $scope.userExport.type;
         }
         const school = getSchool();
         await directoryService.generateReport({
             ids: _usersForMailing.map(u => u.id),
             structureId: school.id,
             type
         })
     } catch (e) {
         notify.error(lang.translate("classAdmin.download.failed"))
     } finally {
         _printingAll = false;
     }
 }
開發者ID:entcore,項目名稱:entcore,代碼行數:32,代碼來源:userExport.ts

示例7: function

	$scope.resetPasswords = async function (user) {
		if (!model.me.email) {
			notify.error("classAdmin.reset.error");
			return;
		}
		try {
			if (user) {
				await directoryService.resetPassword([user])
			} else {
				await directoryService.resetPassword(_selection)
			}
			notify.success("directory.admin.reset.code.sent")
		} catch (e) {
			notify.error("directory.admin.reset.code.send.error");
		}
	}
開發者ID:entcore,項目名稱:entcore,代碼行數:16,代碼來源:controller.ts


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