Commit 234d14a01f285081a26292121afc8e625e74a97a
Merge branch 'reportSendEmail_3' of http://gitlab.ebix.com/ADAM/AIAHTML5 into emailreviewcode
Showing
10 changed files
with
408 additions
and
127 deletions
400-SOURCECODE/AIAHTML5.API/App_Start/WebApiConfig.cs
1 | -using System; | ||
2 | -using System.Collections.Generic; | ||
3 | -using System.Linq; | ||
4 | -using System.Web.Http; | ||
5 | - | ||
6 | -namespace AIAHTML5.API | ||
7 | -{ | ||
8 | - public static class WebApiConfig | ||
9 | - { | ||
10 | - public static void Register(HttpConfiguration config) | ||
11 | - { | ||
12 | - // Web API configuration and services | ||
13 | - | ||
14 | - // Web API routes | ||
15 | - config.MapHttpAttributeRoutes(); | ||
16 | - | ||
17 | - config.Routes.MapHttpRoute( | ||
18 | - name: "DefaultApi", | ||
19 | - routeTemplate: "api/{controller}/{id}", | ||
20 | - defaults: new { id = RouteParameter.Optional } | ||
21 | - ); | ||
22 | - } | ||
23 | - } | ||
24 | -} | 1 | +using System; |
2 | +using System.Collections.Generic; | ||
3 | +using System.Linq; | ||
4 | +using System.Web.Http; | ||
5 | + | ||
6 | +namespace AIAHTML5.API | ||
7 | +{ | ||
8 | + public static class WebApiConfig | ||
9 | + { | ||
10 | + public static void Register(HttpConfiguration config) | ||
11 | + { | ||
12 | + // Web API configuration and services | ||
13 | + | ||
14 | + // Web API routes | ||
15 | + config.MapHttpAttributeRoutes(); | ||
16 | + | ||
17 | + config.Routes.MapHttpRoute( | ||
18 | + name: "DefaultApi", | ||
19 | + routeTemplate: "api/{controller}/{id}", | ||
20 | + defaults: new { id = RouteParameter.Optional } | ||
21 | + ); | ||
22 | + } | ||
23 | + } | ||
24 | +} |
400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
@@ -217,7 +217,58 @@ namespace AIAHTML5.API.Controllers | @@ -217,7 +217,58 @@ namespace AIAHTML5.API.Controllers | ||
217 | 217 | ||
218 | 218 | ||
219 | 219 | ||
220 | + [HttpPost] | ||
221 | + public HttpResponseMessage Hi(int userId) | ||
222 | + { | ||
223 | + return Request.CreateResponse(HttpStatusCode.OK, userId.ToString()); | ||
224 | + } | ||
225 | + [Route("GetUserProfile/{userId}")] | ||
226 | + [HttpGet] | ||
227 | + public IHttpActionResult GetUserProfile(int userId) | ||
228 | + { | ||
229 | + //dbContext.Configuration.ProxyCreationEnabled = false; | ||
230 | + try | ||
231 | + { | ||
232 | + return Ok("Hello"); | ||
233 | + } | ||
234 | + catch (Exception ex) | ||
235 | + { | ||
236 | + throw ex; | ||
237 | + } | ||
238 | + //return ToJson(dbContext.AIAUsers.Where(u => u.Id == userId).AsEnumerable()); | ||
220 | 239 | ||
240 | + } | ||
241 | + [Route("api/LabExercise/SendEmail")] | ||
242 | + [HttpPost] | ||
243 | + public HttpResponseMessage SendEmail([FromBody]JObject User) | ||
244 | + { | ||
245 | + ArrayList aar = new ArrayList(); | ||
246 | + if (User["EmailTo"].ToString().ToLower().Contains(';')) | ||
247 | + { | ||
248 | + string[] words = User["EmailTo"].ToString().Split(';'); | ||
249 | + foreach (string word in words) | ||
250 | + { | ||
251 | + Console.WriteLine(word); | ||
252 | + aar.Add(word); | ||
253 | + } | ||
254 | + } | ||
255 | + else | ||
256 | + { | ||
257 | + aar.Add(User["EmailTo"].ToString()); | ||
258 | + } | ||
259 | + if (Convert.ToBoolean(User["ReportCheck"]) == true) | ||
260 | + { | ||
261 | + aar.Add(User["EmailAdd"].ToString()); | ||
262 | + } | ||
263 | + AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), User["reportTitle"].ToString(), User["reportImage"].ToString()); | ||
264 | + return Request.CreateResponse(HttpStatusCode.OK); | ||
265 | + } | ||
266 | + [Route("api/LabExercise/GetParameter")] | ||
267 | + [HttpGet] | ||
268 | + public IEnumerable<string> GetParameter() | ||
269 | + { | ||
270 | + return new string[] { "val1", "val2" }; | ||
271 | + } | ||
221 | 272 | ||
222 | 273 | ||
223 | 274 |
400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs
@@ -302,8 +302,8 @@ namespace AIAHTML5.API.Models | @@ -302,8 +302,8 @@ namespace AIAHTML5.API.Models | ||
302 | lstToAddress.Add(email); | 302 | lstToAddress.Add(email); |
303 | } | 303 | } |
304 | 304 | ||
305 | - emailMessage = "Unable to process request for "; | ||
306 | - | 305 | + //emailMessage = "Unable to process request for "; |
306 | + emailMessage = " "; | ||
307 | if (UserUtility.CheckIfPropertyExists(userInfo, "username") && !string.IsNullOrEmpty(userInfo["username"].ToString())) | 307 | if (UserUtility.CheckIfPropertyExists(userInfo, "username") && !string.IsNullOrEmpty(userInfo["username"].ToString())) |
308 | emailMessage += "username: <b>" + userInfo["username"].ToString() + "</b>"; | 308 | emailMessage += "username: <b>" + userInfo["username"].ToString() + "</b>"; |
309 | if (UserUtility.CheckIfPropertyExists(userInfo, "password") && !string.IsNullOrEmpty(userInfo["password"].ToString())) | 309 | if (UserUtility.CheckIfPropertyExists(userInfo, "password") && !string.IsNullOrEmpty(userInfo["password"].ToString())) |
@@ -316,24 +316,26 @@ namespace AIAHTML5.API.Models | @@ -316,24 +316,26 @@ namespace AIAHTML5.API.Models | ||
316 | if (string.IsNullOrEmpty(sender)) | 316 | if (string.IsNullOrEmpty(sender)) |
317 | senderEmailId = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]); | 317 | senderEmailId = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]); |
318 | else | 318 | else |
319 | - senderEmailId = sender; | 319 | + senderEmailId = sender; |
320 | 320 | ||
321 | emailMessage += mailBody; | 321 | emailMessage += mailBody; |
322 | 322 | ||
323 | emailMessage = emailMessage.Replace("\n", "<br/>"); | 323 | emailMessage = emailMessage.Replace("\n", "<br/>"); |
324 | 324 | ||
325 | - emailMessage += "<br/><br/>"; | ||
326 | - | 325 | + // emailMessage += "<br/><br/>"; |
326 | + emailMessage = "<html><head></head><body>" + emailMessage + "</body></html>"; | ||
327 | emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]); | 327 | emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]); |
328 | emailUtility.sFromAddress = senderEmailId; | 328 | emailUtility.sFromAddress = senderEmailId; |
329 | emailUtility.bIsBodyHtml = true; | 329 | emailUtility.bIsBodyHtml = true; |
330 | - emailUtility.bEnableSsl = false; | 330 | + // emailUtility.bEnableSsl = false; |
331 | + emailUtility.bEnableSsl = true; | ||
331 | emailUtility.sSubject = mailSubject; | 332 | emailUtility.sSubject = mailSubject; |
332 | emailUtility.sBodyText = emailMessage; | 333 | emailUtility.sBodyText = emailMessage; |
333 | - emailUtility.iPort = 25; | 334 | + //emailUtility.iPort = 25; |
335 | + emailUtility.iPort = 587; | ||
334 | emailUtility.sToAddresses = lstToAddress; | 336 | emailUtility.sToAddresses = lstToAddress; |
335 | emailUtility.sBccAddresses = lstBccAddress; | 337 | emailUtility.sBccAddresses = lstBccAddress; |
336 | - | 338 | + emailUtility.sUserName = senderEmailId; |
337 | emailUtility.SendSmtpEmail(); | 339 | emailUtility.SendSmtpEmail(); |
338 | return true; | 340 | return true; |
339 | } | 341 | } |
400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs
@@ -39,7 +39,7 @@ namespace AIAHTML5.API.Utility | @@ -39,7 +39,7 @@ namespace AIAHTML5.API.Utility | ||
39 | System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential(mm.From.ToString(), ConfigurationManager.AppSettings["SenderPassword"]); | 39 | System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential(mm.From.ToString(), ConfigurationManager.AppSettings["SenderPassword"]); |
40 | smtp.Credentials = NetworkCred; | 40 | smtp.Credentials = NetworkCred; |
41 | smtp.Port = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPPort"]); | 41 | smtp.Port = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPPort"]); |
42 | - | 42 | + smtp.EnableSsl = false; |
43 | smtp.Send(mm); | 43 | smtp.Send(mm); |
44 | } | 44 | } |
45 | catch (Exception e) | 45 | catch (Exception e) |
400-SOURCECODE/AIAHTML5.API/Web.config
@@ -32,13 +32,22 @@ | @@ -32,13 +32,22 @@ | ||
32 | 32 | ||
33 | <appSettings> | 33 | <appSettings> |
34 | <add key="Copyrightyear" value="2018" /> | 34 | <add key="Copyrightyear" value="2018" /> |
35 | - <add key="SenderEmailAddress" value="support@interactiveanatomy.com" /> | 35 | + |
36 | + <add key="SenderEmailAddress" value="ayush.jain@ebix.com" /> | ||
37 | + <add key="ErrorNotificationEmailAddress" value="ayush.jain@ebix.com" /> | ||
38 | + <add key="SenderPassword" value="Change1t" /> | ||
39 | + <add key="SMTPAddress" value="smtp.emailsrvr.com" /> | ||
40 | + <add key="SMTPPort" value="587" /> | ||
41 | + <add key="EnableSSL" value="true" /> | ||
42 | + | ||
43 | + <!--<add key="SenderEmailAddress" value="support@interactiveanatomy.com" /> | ||
36 | <add key="SenderEmailAddress" value="support@interactiveanatomy.com" /> | 44 | <add key="SenderEmailAddress" value="support@interactiveanatomy.com" /> |
37 | <add key="ErrorNotificationEmailAddress" value="support@interactiveanatomy.com" /> | 45 | <add key="ErrorNotificationEmailAddress" value="support@interactiveanatomy.com" /> |
38 | <add key="SenderPassword" value="" /> | 46 | <add key="SenderPassword" value="" /> |
39 | <add key="SMTPAddress" value="10.100.12.13" /> | 47 | <add key="SMTPAddress" value="10.100.12.13" /> |
40 | <add key="SMTPPort" value="25" /> | 48 | <add key="SMTPPort" value="25" /> |
41 | - <add key="EnableSSL" value="false" /> | 49 | + <add key="EnableSSL" value="false" />--> |
50 | + | ||
42 | <add key="Site_Url" value ="http://qa.beta.interactiveanatomy.com/"/> | 51 | <add key="Site_Url" value ="http://qa.beta.interactiveanatomy.com/"/> |
43 | <add key ="HostAddress" value="10.100.12.13" /> | 52 | <add key ="HostAddress" value="10.100.12.13" /> |
44 | <add key="AdminSupport" value="amrita.vishnoi@ebix.com,nikita.kulshreshtha@ebix.com"/> | 53 | <add key="AdminSupport" value="amrita.vishnoi@ebix.com,nikita.kulshreshtha@ebix.com"/> |
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -1288,8 +1288,55 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, | @@ -1288,8 +1288,55 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, | ||
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | } | 1290 | } |
1291 | + $scope.reportCopyStatus = false; | ||
1292 | + $scope.SendLabEXMailToUser = function (User) { | ||
1293 | + var reportHtml = ''; | ||
1294 | + reportHtml += '<table style="width:100%;"><thead><th style="padding:15px;border:1px solid #cccccc"><strong>Question</strong></th><th style="padding:15px;border:1px solid #cccccc"><strong>Activity Title</strong></th><th style="padding:15px;border:1px solid #cccccc"><strong>Status</strong></th></thead><tbody>'; | ||
1295 | + $("#resultLabData tr").each(function () { | ||
1296 | + reportHtml += '<tr>'; | ||
1297 | + $(this).children("td").each(function () { | ||
1298 | + if ($(this).text() == " Review") { | ||
1299 | + } | ||
1300 | + else{ | ||
1301 | + reportHtml += '<td style="border:1px solid #cccccc;padding:15px;">' + $(this).text() + '</td>'; | ||
1302 | + } | ||
1303 | + }); | ||
1304 | + reportHtml += '</tr>'; | ||
1291 | 1305 | ||
1306 | + }); | ||
1307 | + reportHtml += '</tbody></table>'; | ||
1308 | + $scope.reportImage = "<table style='width:100%;'><tr><td style='padding:15px;'><strong>"+$("#submitResultHtml .panel-heading .row div:nth-child(1)").text()+"</strong></td><td style='padding:15px;'>Performance Report</td><td style='padding:15px;text-align:right;'><span>" + $("#submitResultHtml .panel-heading .row div:nth-child(3)").text() + "</span></td></tr></table><table style='width:100%;'><thead><th style='text-align:center;padding:15px;border:1px solid #cccccc;'><strong>Total Question</strong></th><th style='border:1px solid #cccccc;text-align:center;padding:15px;'><strong>Correct Answers</strong></th><th style='border:1px solid #cccccc;padding:15px;text-align:center;'><strong>Incorrect Answers</strong></th></thead><tr><td style='border:1px solid #cccccc;padding:15px;text-align:center;'><span>" + $("#questionStatus tbody tr td:nth-child(1)").text() + "</span></td><td style='text-align:center;border:1px solid #cccccc;padding:15px;'><span>" + $("#questionStatus tbody tr td:nth-child(2)").text() + "</span></td><td style='text-align:center;border:1px solid #cccccc;padding:15px;'><span>" + $("#questionStatus tbody tr td:nth-child(3)").text() + "</span></td></tr></table><br/><br/>" + reportHtml + ""; | ||
1309 | + $scope.reportTitle = "Lab Exercise Report for " + $("#submitResultHtml .panel-heading .row div:nth-child(1)").text(); | ||
1310 | + $scope.senderEmails = $("#emailTo").val(); | ||
1311 | + | ||
1312 | + | ||
1313 | + LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails).then( | ||
1292 | 1314 | ||
1315 | + function (result) { | ||
1316 | + console.log(result); | ||
1317 | + }, | ||
1318 | + function (error) { | ||
1319 | + console.log(error.statusText); | ||
1320 | + } | ||
1321 | + ) | ||
1322 | + // for closing email popup | ||
1323 | + $rootScope.closeLabExEmailModel(); | ||
1324 | + } | ||
1325 | + $rootScope.closeLabExEmailModel = function () { | ||
1326 | + document.getElementById("LabExerciseForm").reset(); | ||
1327 | + $scope.LabExForm.$setPristine(); | ||
1328 | + $scope.LabExForm.$setUntouched(); | ||
1329 | + document.body.style.overflow = "scroll"; | ||
1330 | + document.getElementById('labExModalbackground').style.display = "none"; | ||
1331 | + document.getElementById('labExModalID').style.display = "none"; | ||
1332 | + $scope.reportCopyStatus = false; | ||
1333 | + } | ||
1334 | + $rootScope.sendMail = function () { | ||
1335 | + window.scrollTo(0, 0); | ||
1336 | + document.body.style.overflow = "hidden"; | ||
1337 | + document.getElementById('labExModalbackground').style.display = "block"; | ||
1338 | + document.getElementById('labExModalID').style.display = "block"; | ||
1339 | + } | ||
1293 | 1340 | ||
1294 | }] | 1341 | }] |
1295 | 1342 |
400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js
@@ -49,5 +49,34 @@ | @@ -49,5 +49,34 @@ | ||
49 | }); | 49 | }); |
50 | return deferred.promise; | 50 | return deferred.promise; |
51 | }, | 51 | }, |
52 | + | ||
53 | + // code of email report | ||
54 | + LabExerciseReport: function (User, reportImage, reportTitle, reportCopyStatus, senderEmail) { | ||
55 | + User.reportImage = reportImage; | ||
56 | + User.reportTitle = reportTitle; | ||
57 | + User.ReportCheck = reportCopyStatus; | ||
58 | + User.EmailTo = senderEmail; | ||
59 | + var deferred = $q.defer(); | ||
60 | + // var jsonData = { 'EmailTo': User.EmailTo, 'EmailAdd': User.EmailAdd }; | ||
61 | + $http.post('http://192.168.90.19:91/API/api/LabExercise/SendEmail', JSON.stringify(User), { | ||
62 | + | ||
63 | + headers: { | ||
64 | + 'Content-Type': 'application/json' | ||
65 | + }, | ||
66 | + // data: { Users: JSON.stringify(jsonData) } | ||
67 | + }) | ||
68 | + | ||
69 | + .success(function (data, status, headers, config) { | ||
70 | + | ||
71 | + console.log('success') | ||
72 | + deferred.resolve(data); | ||
73 | + }).error(function (data, status, headers, config) { | ||
74 | + | ||
75 | + console.log('error') | ||
76 | + deferred.reject(data); | ||
77 | + }); | ||
78 | + return deferred.promise; | ||
79 | + } | ||
80 | + | ||
52 | } | 81 | } |
53 | }) | 82 | }) |
54 | \ No newline at end of file | 83 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercises-detail.html
@@ -11,6 +11,111 @@ | @@ -11,6 +11,111 @@ | ||
11 | <div class="clearfix"></div> | 11 | <div class="clearfix"></div> |
12 | </div> | 12 | </div> |
13 | 13 | ||
14 | + | ||
15 | + | ||
16 | + <!--report email pop up code--> | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + <div id="labExModalbackground"></div> | ||
22 | + <!-- Lab Ex --> | ||
23 | + <div class="labExModal" id="labExModalID"> | ||
24 | + <div class="modal-content"> | ||
25 | + <div class="modal-header"> | ||
26 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="closeLabExEmailModel()"><span aria-hidden="true">×</span></button> | ||
27 | + <h4 class="modal-title" id="myModalLabel">Email your performance report</h4> | ||
28 | + </div> | ||
29 | + | ||
30 | + <div class="modal-body paddTop15"> | ||
31 | + <div class="modal-body paddTop15"> | ||
32 | + | ||
33 | + <form class="form-horizontal" name="LabExForm" id="LabExerciseForm" ng-submit="SendLabEXMailToUser(User)"> | ||
34 | + <div class="form-group"> | ||
35 | + <div class="col-sm-5 control-label"> | ||
36 | + <label>*Email To: (Email address)</label> | ||
37 | + </div> | ||
38 | + | ||
39 | + <div class="col-sm-7"> | ||
40 | + <!--<input type="email" class="form-control" name="senderEmail" ng-model="User.EmailTo" required="required" />--> | ||
41 | + <input type="email" name="usremail" class="form-control" required="required" id="emailTo" multiple /> | ||
42 | + <div class="help-block">*Use ',' to separate multiple email ids. </div> | ||
43 | + <!--<div class="help-block" style="color:red;" ng-if="LabExForm.senderEmail.$error.pattern">Please Enter valid Email Address</div>--> | ||
44 | + </div> | ||
45 | + </div> | ||
46 | + | ||
47 | + <div class="form-group"> | ||
48 | + <div class="col-sm-5 control-label"> | ||
49 | + <label>*Your name:</label> | ||
50 | + </div> | ||
51 | + <div class="col-sm-7"> | ||
52 | + <input type="text" name="name" class="form-control" ng-model="User.Name" ng-pattern="/^([a-zA-Z]+\s?)*$/" required="required" /> | ||
53 | + <div class="help-block" style="color:red;" ng-if="LabExForm.name.$error.pattern"> Please enter your Name</div> | ||
54 | + <!--<div class="help-block" style="color:red;" id="nameHelpBlock"> Please Enter your Name </div>--> | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + | ||
58 | + <div class="form-group"> | ||
59 | + <div class="col-sm-5 control-label"> | ||
60 | + <label for="">*Your Email Address:</label> | ||
61 | + </div> | ||
62 | + <div class="col-sm-7"> | ||
63 | + <!--<input type="text" class="form-control" name="receiverEmail" ng-model="User.EmailAdd" ng-pattern="/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/" required="required" />--> | ||
64 | + <input type="email" class="form-control" name="receiverEmail" ng-model="User.EmailAdd" required="required" /> | ||
65 | + | ||
66 | + <!--<div class="help-block" style="color:red;" id="emailHelpBlock"> Please Enter your Email Address </div>--> | ||
67 | + <!--<div class="help-block" style="color:red;" ng-if="LabExForm.receiverEmail.$error.pattern"> Please Enter valid Email Address</div>--> | ||
68 | + </div> | ||
69 | + </div> | ||
70 | + | ||
71 | + <div class="form-group"> | ||
72 | + <div class="col-sm-5 control-label"> | ||
73 | + <label for="">Send me a copy of the report</label> | ||
74 | + </div> | ||
75 | + <div class="col-sm-7"> | ||
76 | + <input type="checkbox" style="margin-top: 12px;" ng-model="reportCopyStatus" /> | ||
77 | + </div> | ||
78 | + </div> | ||
79 | + | ||
80 | + <div class="form-group"> | ||
81 | + <div class="col-sm-5 control-label"> | ||
82 | + <label for="">Note(optional)</label> | ||
83 | + </div> | ||
84 | + <div class="col-sm-7"> | ||
85 | + <textarea name="" id="" class="form-control" cols="30" rows="5" ng-model="User.comments"></textarea> | ||
86 | + <div class="help-block">255 character limit </div> | ||
87 | + </div> | ||
88 | + </div> | ||
89 | + | ||
90 | + | ||
91 | + <div class="form-group"> | ||
92 | + <div class="col-sm-5 control-label"> | ||
93 | + | ||
94 | + </div> | ||
95 | + <div class="col-sm-7"> | ||
96 | + <button type="submit" class="btn btn-primary btn-block">Send Mail</button> | ||
97 | + | ||
98 | + </div> | ||
99 | + </div> | ||
100 | + | ||
101 | + </form> | ||
102 | + | ||
103 | + </div> | ||
104 | + | ||
105 | + </div> | ||
106 | + | ||
107 | + </div> | ||
108 | + </div> | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | ||
14 | <div class="col-sm-12"> | 119 | <div class="col-sm-12"> |
15 | <div class="pull-left btn-group LabEx-Panel-state-minimized" id="LabExMinimizedId"> | 120 | <div class="pull-left btn-group LabEx-Panel-state-minimized" id="LabExMinimizedId"> |
16 | <p class="pull-left" style="color:#fff">LAB Ex ...</p> | 121 | <p class="pull-left" style="color:#fff">LAB Ex ...</p> |
@@ -100,7 +205,7 @@ | @@ -100,7 +205,7 @@ | ||
100 | <div class="panel-body no-padding"> | 205 | <div class="panel-body no-padding"> |
101 | <div class="row"> | 206 | <div class="row"> |
102 | <div class="col-sm-12 table-responsive "> | 207 | <div class="col-sm-12 table-responsive "> |
103 | - <table class="table table-hover table-condensed bg-white"> | 208 | + <table class="table table-hover table-condensed bg-white" id="questionStatus"> |
104 | <thead> | 209 | <thead> |
105 | <tr class="active"> | 210 | <tr class="active"> |
106 | <th class="text-center">Total Question</th> | 211 | <th class="text-center">Total Question</th> |
@@ -135,7 +240,7 @@ | @@ -135,7 +240,7 @@ | ||
135 | </div> | 240 | </div> |
136 | <div class="panel-footer"> | 241 | <div class="panel-footer"> |
137 | <div class="text-center"> | 242 | <div class="text-center"> |
138 | - <button class="btn btn-sm btn-primary"> | 243 | + <button class="btn btn-sm btn-primary" ng-click="sendMail()"> |
139 | 244 | ||
140 | </button> | 245 | </button> |
141 | 246 |
400-SOURCECODE/AIAHTML5.Web/term-number-wp1.js
1 | -var UpdatedGrayImageDataList = []; | ||
2 | -var doneBRID = []; | ||
3 | -var abc = 'hello'; | ||
4 | - | ||
5 | -getLocationForMatchedTermsInWholeBody = function (termList, maskCanvasData, coloredImageCanvasList, coloredImageMRCanvasList, grayImageDataList, grayImageMRDataList) { | ||
6 | - var matchedRGBLocationInBodyRegion = []; | ||
7 | - var matched; | ||
8 | - | ||
9 | - for (var x = 0; x < maskCanvasData.length; x++) | ||
10 | - { | ||
11 | - | ||
12 | - matched = false; | ||
13 | - var bodyRegionId = maskCanvasData[x].bodyRegionId; | ||
14 | - var canvasId = maskCanvasData[x].canvasId; | ||
15 | - var maskData = maskCanvasData[x].maskData; | ||
16 | - | ||
17 | - var coloredImageDataVar//= coloredImageCanvasList[bodyRegionId - 1]; | ||
18 | - var grayImageDataVar// = grayImageDataList[bodyRegionId - 1]; | ||
19 | - | ||
20 | - console.log('canvasId =' + canvasId) | ||
21 | - //if (canvasId.match('_MR')) { | ||
22 | - // coloredImageDataVar = coloredImageMRCanvasList[bodyRegionId]; | ||
23 | - // grayImageDataVar = grayImageMRDataList[bodyRegionId]; | ||
24 | - //} | ||
25 | - //else { | ||
26 | - coloredImageDataVar = coloredImageCanvasList[bodyRegionId - 1]; | ||
27 | - grayImageDataVar = grayImageDataList[bodyRegionId-1]; | ||
28 | - //} | ||
29 | - console.log('grayImageDataVar= ' + grayImageDataVar) | ||
30 | - | ||
31 | - var counter = 0; | ||
32 | - | ||
33 | - var imageDataVar = maskData.data; | ||
34 | - | ||
35 | - var machLocationWP = new Worker('match-pixel-wp.js'); | ||
36 | - | ||
37 | - | ||
38 | - machLocationWP.postMessage({ | ||
39 | - | ||
40 | - 'termList': termList, | ||
41 | - 'maskCanvasData': maskData, | ||
42 | - 'coloreImageData': coloredImageDataVar, | ||
43 | - 'grayImageData': grayImageDataVar, | ||
44 | - 'grayImageMRDataList': grayImageMRDataList, | ||
45 | - 'bodyRegionId': bodyRegionId, | ||
46 | - 'canvasId': canvasId | ||
47 | - | ||
48 | - }); | ||
49 | - | ||
50 | - machLocationWP.onmessage = function (e) { | ||
51 | - | ||
52 | - | ||
53 | - | ||
54 | - doneBRID.push(e.data.bodyRegionId); | ||
55 | - var canvasID = (e.data.canvasId).replace('_mci', ''); | ||
56 | - | ||
57 | - UpdatedGrayImageDataList.push({ 'canvasID': canvasID, 'imageData': e.data.value }); | ||
58 | - | ||
59 | - //UpdatedGrayImageDataList[e.data.bodyRegionId] = e.data.value | ||
60 | - | ||
61 | - | ||
62 | - if (doneBRID.length==9) { | ||
63 | - | ||
64 | - self.postMessage({ | ||
65 | - 'value': UpdatedGrayImageDataList, | ||
66 | - | ||
67 | - }) | ||
68 | - } | ||
69 | - | ||
70 | - }; | ||
71 | - machLocationWP.onerror = function (e) { | ||
72 | - console.log('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message); | ||
73 | - }; | ||
74 | - | ||
75 | - | ||
76 | - } | ||
77 | - | ||
78 | - | ||
79 | - | ||
80 | - | ||
81 | -} | ||
82 | - | ||
83 | -self.onmessage = function (e) { | ||
84 | - getLocationForMatchedTermsInWholeBody(e.data.termList, e.data.maskCanvasData, e.data.coloredImageCanvasList, | ||
85 | - e.data.coloredImageMRCanvasList, e.data.grayImageDataList, e.data.grayImageMRDataList); | ||
86 | - | ||
87 | -} | ||
88 | - | ||
89 | - | 1 | +var UpdatedGrayImageDataList = []; |
2 | +var doneBRID = []; | ||
3 | +var abc = 'hello'; | ||
4 | + | ||
5 | +getLocationForMatchedTermsInWholeBody = function (termList, maskCanvasData, coloredImageCanvasList, coloredImageMRCanvasList, grayImageDataList, grayImageMRDataList) { | ||
6 | + var matchedRGBLocationInBodyRegion = []; | ||
7 | + var matched; | ||
8 | + | ||
9 | + for (var x = 0; x < maskCanvasData.length; x++) | ||
10 | + { | ||
11 | + | ||
12 | + matched = false; | ||
13 | + var bodyRegionId = maskCanvasData[x].bodyRegionId; | ||
14 | + var canvasId = maskCanvasData[x].canvasId; | ||
15 | + var maskData = maskCanvasData[x].maskData; | ||
16 | + | ||
17 | + var coloredImageDataVar//= coloredImageCanvasList[bodyRegionId - 1]; | ||
18 | + var grayImageDataVar// = grayImageDataList[bodyRegionId - 1]; | ||
19 | + | ||
20 | + console.log('canvasId =' + canvasId) | ||
21 | + //if (canvasId.match('_MR')) { | ||
22 | + // coloredImageDataVar = coloredImageMRCanvasList[bodyRegionId]; | ||
23 | + // grayImageDataVar = grayImageMRDataList[bodyRegionId]; | ||
24 | + //} | ||
25 | + //else { | ||
26 | + coloredImageDataVar = coloredImageCanvasList[bodyRegionId - 1]; | ||
27 | + grayImageDataVar = grayImageDataList[bodyRegionId-1]; | ||
28 | + //} | ||
29 | + console.log('grayImageDataVar= ' + grayImageDataVar) | ||
30 | + | ||
31 | + var counter = 0; | ||
32 | + | ||
33 | + var imageDataVar = maskData.data; | ||
34 | + | ||
35 | + var machLocationWP = new Worker('match-pixel-wp.js'); | ||
36 | + | ||
37 | + | ||
38 | + machLocationWP.postMessage({ | ||
39 | + | ||
40 | + 'termList': termList, | ||
41 | + 'maskCanvasData': maskData, | ||
42 | + 'coloreImageData': coloredImageDataVar, | ||
43 | + 'grayImageData': grayImageDataVar, | ||
44 | + 'grayImageMRDataList': grayImageMRDataList, | ||
45 | + 'bodyRegionId': bodyRegionId, | ||
46 | + 'canvasId': canvasId | ||
47 | + | ||
48 | + }); | ||
49 | + | ||
50 | + machLocationWP.onmessage = function (e) { | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + doneBRID.push(e.data.bodyRegionId); | ||
55 | + var canvasID = (e.data.canvasId).replace('_mci', ''); | ||
56 | + | ||
57 | + UpdatedGrayImageDataList.push({ 'canvasID': canvasID, 'imageData': e.data.value }); | ||
58 | + | ||
59 | + //UpdatedGrayImageDataList[e.data.bodyRegionId] = e.data.value | ||
60 | + | ||
61 | + | ||
62 | + if (doneBRID.length==9) { | ||
63 | + | ||
64 | + self.postMessage({ | ||
65 | + 'value': UpdatedGrayImageDataList, | ||
66 | + | ||
67 | + }) | ||
68 | + } | ||
69 | + | ||
70 | + }; | ||
71 | + machLocationWP.onerror = function (e) { | ||
72 | + console.log('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message); | ||
73 | + }; | ||
74 | + | ||
75 | + | ||
76 | + } | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | +} | ||
82 | + | ||
83 | +self.onmessage = function (e) { | ||
84 | + getLocationForMatchedTermsInWholeBody(e.data.termList, e.data.maskCanvasData, e.data.coloredImageCanvasList, | ||
85 | + e.data.coloredImageMRCanvasList, e.data.grayImageDataList, e.data.grayImageMRDataList); | ||
86 | + | ||
87 | +} | ||
88 | + | ||
89 | + |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
@@ -1281,4 +1281,42 @@ footer .browserIcons | @@ -1281,4 +1281,42 @@ footer .browserIcons | ||
1281 | #UserPassword | 1281 | #UserPassword |
1282 | { | 1282 | { |
1283 | -webkit-text-security: disc; | 1283 | -webkit-text-security: disc; |
1284 | - } | ||
1285 | \ No newline at end of file | 1284 | \ No newline at end of file |
1285 | + } | ||
1286 | + | ||
1287 | +/*email pop up css*/ | ||
1288 | + | ||
1289 | +#labExModalID { | ||
1290 | + display: none; | ||
1291 | + position: absolute; | ||
1292 | + z-index: 12000001; | ||
1293 | + margin: auto; | ||
1294 | + top: 50px; | ||
1295 | + left: 0; | ||
1296 | + right: 0; | ||
1297 | + bottom: 0; | ||
1298 | + width: 50%; | ||
1299 | +} | ||
1300 | +#labExModalbackground | ||
1301 | +{ | ||
1302 | + background-color: black; | ||
1303 | + bottom: 0px; | ||
1304 | + display: none; | ||
1305 | + height: 100%; left: 0px; | ||
1306 | + opacity: 0.5; | ||
1307 | + position: fixed; | ||
1308 | + right: 0px; top: 0px; | ||
1309 | + width: 100%; | ||
1310 | + z-index: 12000000; | ||
1311 | +} | ||
1312 | +#nameHelpBlock | ||
1313 | + { | ||
1314 | + display:none; | ||
1315 | +} | ||
1316 | +#emailHelpBlock | ||
1317 | +{ | ||
1318 | + display:none; | ||
1319 | +} | ||
1320 | +#emailToHelpBlock | ||
1321 | +{ | ||
1322 | + display:none; | ||
1323 | +} | ||
1286 | \ No newline at end of file | 1324 | \ No newline at end of file |