From 22321835db6de949474ca9520684c9bc07fbbf65 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Oct 2018 19:03:47 +0530 Subject: [PATCH] added variable --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js | 7 ++++++- 400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js index 558a673..dabee0c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js @@ -1328,6 +1328,11 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, } $scope.reportCopyStatus = false; + $scope.reportEmailTitle = "Email Your Performance Report"; + $scope.notificationMsgWithCopy = "Your report has been sent. A copy has been emailed to you for your records."; + $scope.sentReportMsg = "Your report has been sent."; + $scope.invalidEmailId = "Invalid email Id"; + $scope.invalidEmailTitle = "Alert"; $scope.SendLabEXMailToUser = function (User) { var reportHtml = ''; @@ -1360,7 +1365,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $scope.senderEmails = $("#emailTo").val(); - LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails).then( + LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails, $scope.reportEmailTitle, $scope.notificationMsgWithCopy, $scope.sentReportMsg, $scope.invalidEmailId, $scope.invalidEmailTitle).then( function (result) { console.log(result); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js index 135ae07..b228718 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js @@ -51,7 +51,7 @@ }, // code of email report - LabExerciseReport: function (User, reportImage, reportTitle, reportCopyStatus, senderEmail) { + LabExerciseReport: function (User, reportImage, reportTitle, reportCopyStatus, senderEmail, emailReportTitle, notiMsgWithCopy, sendMessage, invalidId, invalidIdTitle) { User.reportImage = reportImage; User.reportTitle = reportTitle; User.ReportCheck = reportCopyStatus; @@ -70,19 +70,19 @@ console.log('success'); - document.getElementById('notificationTitle').innerText = "Email Your Performance Report"; + document.getElementById('notificationTitle').innerText = emailReportTitle; if (reportCopyStatus == true) { - document.getElementById('notificationMessage').innerText = "Your report has been sent. A copy has been emailed to you for your records."; + document.getElementById('notificationMessage').innerText = notiMsgWithCopy; } else { - document.getElementById('notificationMessage').innerText = "Your report has been sent."; + document.getElementById('notificationMessage').innerText = sendMessage; } document.getElementById('labExEmailSentModalID').style.display = "block"; deferred.resolve(data); }).error(function (data, status, headers, config) { console.log('error'); - document.getElementById('notificationTitle').innerText = "Alert"; - document.getElementById('notificationMessage').innerText = "Invalid email Id"; + document.getElementById('notificationTitle').innerText = invalidIdTitle; + document.getElementById('notificationMessage').innerText = invalidId; document.getElementById('labExEmailSentModalID').style.display = "block"; deferred.reject(data); }); -- libgit2 0.21.4