Commit 879a8420b035cee9a9fa7aac6cdda065fb069f86
1 parent
3c2a12a8
update more to open direct link
Showing
10 changed files
with
191 additions
and
57 deletions
400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs
... | ... | @@ -40,5 +40,6 @@ namespace AIAHTML5.API.Constants |
40 | 40 | public const string GET_MODESTY_FOR_THIS_LICENSE = "usp_GetModestyForThisLicense"; |
41 | 41 | public const string GET_COUNT_EXPORTED_IMAGE = "usp_GetCountExportedImage"; |
42 | 42 | public const string INSERT_EXPORTED_IMAGE = "usp_InsertExportedImage"; |
43 | + public const string GET_USER_DETAIL_BYLOGIN_AND_ACCOUNT = "usp_GetUserDetailsByLoginIdandAccount"; | |
43 | 44 | } |
44 | 45 | } |
45 | 46 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs
... | ... | @@ -471,6 +471,35 @@ namespace AIAHTML5.API.Controllers |
471 | 471 | return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); |
472 | 472 | } |
473 | 473 | } |
474 | + | |
475 | + [HttpPost] | |
476 | + [Route("api/ByPassLoginToOpenModule")] | |
477 | + public HttpResponseMessage ByPassLoginToOpenModule([FromBody]JObject sitedetail) | |
478 | + { | |
479 | + dynamic responseData; | |
480 | + | |
481 | + try | |
482 | + { | |
483 | + string loginId = sitedetail.GetValue("userId").ToString(); | |
484 | + string accountNumber = sitedetail.GetValue("accountNumber").ToString(); | |
485 | + | |
486 | + responseData = AIAHTML5.API.Models.Users.ByPassLoginDetail(loginId, accountNumber); | |
487 | + | |
488 | + if (responseData !=null) | |
489 | + { | |
490 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(responseData) }; | |
491 | + } | |
492 | + else | |
493 | + { | |
494 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.BadRequest, Content = new StringContent(AIAConstants.USER_NOT_FOUND) }; | |
495 | + } | |
496 | + } | |
497 | + catch (Exception ex) | |
498 | + { | |
499 | + // Log exception code goes here | |
500 | + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); | |
501 | + } | |
502 | + } | |
474 | 503 | // PUT api/authenticate/5 |
475 | 504 | public void Put(int id, [FromBody]string value) |
476 | 505 | { |
... | ... | @@ -481,4 +510,6 @@ namespace AIAHTML5.API.Controllers |
481 | 510 | { |
482 | 511 | } |
483 | 512 | } |
513 | + | |
514 | + | |
484 | 515 | } |
485 | 516 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... | ... | @@ -310,6 +310,44 @@ namespace AIAHTML5.API.Models |
310 | 310 | return objUser; |
311 | 311 | } |
312 | 312 | |
313 | + internal static User ByPassLoginDetail(string loginId, string accountNumber) | |
314 | + { | |
315 | + User objUser = null; | |
316 | + DBModel objModel = new DBModel(); | |
317 | + | |
318 | + SqlConnection conn = new SqlConnection(dbConnectionString); | |
319 | + SqlCommand cmd = new SqlCommand(); | |
320 | + SqlDataAdapter adapter; | |
321 | + DataSet ds = new DataSet(); | |
322 | + | |
323 | + cmd.Connection = conn; | |
324 | + cmd.CommandText = DBConstants.GET_USER_DETAIL_BYLOGIN_AND_ACCOUNT; | |
325 | + cmd.CommandType = CommandType.StoredProcedure; | |
326 | + cmd.Parameters.AddWithValue("@LoginId", loginId); | |
327 | + cmd.Parameters.AddWithValue("@AccountNumber", accountNumber); | |
328 | + | |
329 | + adapter = new SqlDataAdapter(cmd); | |
330 | + adapter.Fill(ds); | |
331 | + | |
332 | + if (ds != null && ds.Tables.Count > 0) | |
333 | + { | |
334 | + DataTable dt = ds.Tables[0]; | |
335 | + | |
336 | + if (dt.Rows.Count > 0) | |
337 | + { | |
338 | + foreach (DataRow dr in dt.Rows) | |
339 | + { | |
340 | + objUser = new User(); | |
341 | + objUser.LoginId = dr["LoginId"].ToString(); | |
342 | + objUser.Password = dr["Password"].ToString(); | |
343 | + | |
344 | + } | |
345 | + } | |
346 | + } | |
347 | + | |
348 | + return objUser; | |
349 | + } | |
350 | + | |
313 | 351 | internal User GetSelectedSettings(int userId) |
314 | 352 | { |
315 | 353 | logger.Debug(" Inside GetSelectedSettings for userId = " + userId); | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
... | ... | @@ -307,6 +307,12 @@ namespace AIAHTML5.API.Models |
307 | 307 | return result; |
308 | 308 | } |
309 | 309 | |
310 | + internal static dynamic ByPassLoginDetail(string loginId, string accountNumber) | |
311 | + { | |
312 | + dynamic objUser = DBModel.ByPassLoginDetail(loginId, accountNumber); | |
313 | + | |
314 | + return objUser; | |
315 | + } | |
310 | 316 | |
311 | 317 | internal static int SaveUserSelectedSettings(User selectedSettings) |
312 | 318 | { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -323,10 +323,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
323 | 323 | var imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; |
324 | 324 | |
325 | 325 | |
326 | - var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
327 | - + '<div class="thumbnail" >' | |
326 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "'+ value._Title + '" data-ng-click="openView($event)">' | |
327 | + + '<div class="thumbnail" ><a href="#">' | |
328 | 328 | + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + imagePath + '" alt="" title="" >' |
329 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
329 | + + '<div class="caption"><p>'+'('+ value._id+')</p><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
330 | 330 | |
331 | 331 | $compile($el)($scope); |
332 | 332 | |
... | ... | @@ -349,10 +349,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
349 | 349 | |
350 | 350 | $timeout(function () { $scope.EnableUI(); |
351 | 351 | //open default animation |
352 | - if($rootScope.siteUrlInfo.mtype!=null) | |
352 | + if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null) | |
353 | 353 | { |
354 | - if($rootScope.siteUrlInfo.mtype=='CA'&& $rootScope.siteUrlInfo.id!=null) | |
355 | - $('#'+$rootScope.siteUrlInfo.id).trigger('click'); | |
354 | + if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="") | |
355 | + { | |
356 | + $('#'+$rootScope.siteUrlInfo.id).trigger('click'); | |
357 | + //$('div[title="'+$rootScope.siteUrlInfo.title+'"]').trigger('click'); | |
358 | + } | |
359 | + | |
356 | 360 | // clear detail |
357 | 361 | $rootScope.siteUrlInfo.mtype=null; |
358 | 362 | $rootScope.siteUrlInfo.id=null; |
... | ... | @@ -548,9 +552,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
548 | 552 | $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; |
549 | 553 | |
550 | 554 | var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' |
551 | - + '<div class="thumbnail" >' | |
555 | + + '<div class="thumbnail" ><a href="#">' | |
552 | 556 | + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' |
553 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
557 | + + '<div class="caption"><p>'+'('+ value._id+')</p><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
554 | 558 | |
555 | 559 | |
556 | 560 | $compile($el)($scope); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -3062,8 +3062,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3062 | 3062 | |
3063 | 3063 | |
3064 | 3064 | //We substracted 135, as the difference between flex and html coordinates for same organ is 135 |
3065 | - var actulalX = mousePos.x + horizontlScrollPosition; | |
3066 | - var actualY = mousePos.y + verticalScrollPosition; | |
3065 | + var actulalX = mousePos.x + Math.round(horizontlScrollPosition)-1; | |
3066 | + var actualY = mousePos.y + Math.round(verticalScrollPosition)-1; | |
3067 | 3067 | var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y); |
3068 | 3068 | |
3069 | 3069 | |
... | ... | @@ -5001,7 +5001,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5001 | 5001 | for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) { |
5002 | 5002 | if ( $scope.speechbubbleList[m].ids == sub_id1) { |
5003 | 5003 | |
5004 | - $scope.angle1( $scope.speechbubbleList[m].xaxis, $scope.speechbubbleList[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id); | |
5004 | + $scope.angle1( $scope.speechbubbleList[m].xaxis-1, $scope.speechbubbleList[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id); | |
5005 | 5005 | break; |
5006 | 5006 | } |
5007 | 5007 | } |
... | ... | @@ -5090,7 +5090,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5090 | 5090 | |
5091 | 5091 | var verticalScrollPosition = canvasDiv.scrollTop; |
5092 | 5092 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
5093 | - $scope.angle(x-2, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid); | |
5093 | + $scope.angle(x-1, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid); | |
5094 | 5094 | }, |
5095 | 5095 | //Update Annotation Cordianate in case of show single Annotation |
5096 | 5096 | stop: function (evt) { |
... | ... | @@ -5173,7 +5173,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5173 | 5173 | if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) { |
5174 | 5174 | for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) { |
5175 | 5175 | if ( $scope.speechbubbleList[m].ids == sub_id1_anno) { |
5176 | - $scope.angle1( $scope.speechbubbleList[m].xaxis, $scope.speechbubbleList[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id_anno); | |
5176 | + $scope.angle1( $scope.speechbubbleList[m].xaxis-1, $scope.speechbubbleList[m].yaxis-1, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id_anno); | |
5177 | 5177 | break; |
5178 | 5178 | } |
5179 | 5179 | } |
... | ... | @@ -5270,7 +5270,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5270 | 5270 | var canvasDiv = document.getElementById('canvasDivDA_' + windid); |
5271 | 5271 | var verticalScrollPosition = canvasDiv.scrollTop; |
5272 | 5272 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
5273 | - $scope.angle(x-2, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, false,windid); | |
5273 | + $scope.angle(x-1, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, false,windid); | |
5274 | 5274 | }, |
5275 | 5275 | |
5276 | 5276 | //Update Annotation Cordianate in case of show single Annotation |
... | ... | @@ -5436,10 +5436,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5436 | 5436 | var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData'); |
5437 | 5437 | if (isHighlightBodyWithCBTermData == true) { |
5438 | 5438 | |
5439 | - var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000; left:" + (x - 6) + "px;top:" + (y + 11) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + (tipx-4) + "px;top:" + tipy + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter+"_" + windowviewid+ "'></div></div>"; | |
5439 | + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000; left:" + (x - 5) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + (tipx-4) + "px;top:" + tipy + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter+"_" + windowviewid+ "'></div></div>"; | |
5440 | 5440 | } |
5441 | 5441 | else { |
5442 | - var sppechBubbleHTML = "<div id ='" + pointClicked +"' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style=' z-index:60000; left:" + (x - 6) + "px;top:" + (y + 11) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + (x-4) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter +"_" + windowviewid+ "'></div></div>"; | |
5442 | + var sppechBubbleHTML = "<div id ='" + pointClicked +"' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style=' z-index:60000; left:" + (x - 5) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + (x-4) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter +"_" + windowviewid+ "'></div></div>"; | |
5443 | 5443 | } |
5444 | 5444 | |
5445 | 5445 | //Issue #7286 :Undefined annotation should not appear |
... | ... | @@ -5523,10 +5523,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5523 | 5523 | var Globe = []; |
5524 | 5524 | Globe.push({ currentX: x, currentY: y }); |
5525 | 5525 | document.getElementById('dot_'+windowviewid).style.display = 'block'; |
5526 | - document.getElementById('dot_'+windowviewid).style.left = ((Globe[0].currentX) - 6) + 'px'; | |
5527 | - document.getElementById('dot_'+windowviewid).style.top = ((Globe[0].currentY) + 10) + 'px'; | |
5526 | + document.getElementById('dot_'+windowviewid).style.left = ((Globe[0].currentX) - 5) + 'px'; | |
5527 | + document.getElementById('dot_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px'; | |
5528 | 5528 | document.getElementById('bord_'+windowviewid).style.display = 'block'; |
5529 | - document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px'; | |
5529 | + document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 1) + 'px'; | |
5530 | 5530 | document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 0) + 'px'; |
5531 | 5531 | |
5532 | 5532 | document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block'; |
... | ... | @@ -5639,10 +5639,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5639 | 5639 | var Globe = []; |
5640 | 5640 | Globe.push({ currentX: x, currentY: y }); |
5641 | 5641 | document.getElementById('dot_annotation_'+windowviewid).style.display = 'block'; |
5642 | - document.getElementById('dot_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 6) + 'px'; | |
5643 | - document.getElementById('dot_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 10) + 'px'; | |
5642 | + document.getElementById('dot_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 5) + 'px'; | |
5643 | + document.getElementById('dot_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px'; | |
5644 | 5644 | document.getElementById('bord_annotation_'+windowviewid).style.display = 'block'; |
5645 | - document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px'; | |
5645 | + document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 1) + 'px'; | |
5646 | 5646 | document.getElementById('bord_annotation_'+windowviewid).style.top = ((Globe[0].currentY)) + 'px'; |
5647 | 5647 | document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.display = 'block'; |
5648 | 5648 | document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX-2) + 'px'; |
... | ... | @@ -6139,11 +6139,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6139 | 6139 | |
6140 | 6140 | $scope.transparencyCanvasHeight = transparencyCanvas.height; |
6141 | 6141 | $scope.transparencyCanvasWidth = transparencyCanvas.width; |
6142 | + | |
6142 | 6143 | |
6143 | 6144 | //bind click listener |
6144 | 6145 | transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener); |
6145 | 6146 | |
6146 | 6147 | $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex')); |
6148 | + $(".ui-wrapper").css("left",TransparencyBoxStartX-2+ 'px'); | |
6147 | 6149 | |
6148 | 6150 | } |
6149 | 6151 | |
... | ... | @@ -7632,8 +7634,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7632 | 7634 | |
7633 | 7635 | |
7634 | 7636 | //We substracted 135, as the difference between flex and html coordinates for same organ is 135 |
7635 | - var actulalX = mousePos.x + horizontlScrollPosition; | |
7636 | - var actualY = mousePos.y + verticalScrollPosition; | |
7637 | + var actulalX = mousePos.x + Math.round(horizontlScrollPosition)-1; | |
7638 | + var actualY = mousePos.y + Math.round(verticalScrollPosition)-1; | |
7637 | 7639 | var clickedBodyRegion; |
7638 | 7640 | var x; |
7639 | 7641 | var y; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -639,6 +639,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
639 | 639 | $('#login').css('visibility', 'visible'); |
640 | 640 | |
641 | 641 | $rootScope.checkRefreshButtonClick = 1; |
642 | + | |
643 | + $rootScope.siteUrlInfo = { | |
644 | + siteIP: null, | |
645 | + remoteIPAddress: null, | |
646 | + status: null, | |
647 | + accountNumber: null, | |
648 | + edition: null, | |
649 | + urlReferer: null, | |
650 | + calsCreds: null, | |
651 | + userId: null, | |
652 | + password: null, | |
653 | + mtype:null, | |
654 | + id:null | |
655 | + } | |
642 | 656 | |
643 | 657 | if (params != null && params != undefined && params != "") { |
644 | 658 | |
... | ... | @@ -906,8 +920,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
906 | 920 | $timeout(function () { |
907 | 921 | if($rootScope.siteUrlInfo.mtype!=null) |
908 | 922 | { |
909 | - if($rootScope.siteUrlInfo.mtype=='CA') | |
910 | - $('#clinical-animations').trigger('click'); | |
923 | + //currently open CA | |
924 | + $scope.RedirectToModule(); | |
911 | 925 | } |
912 | 926 | }, 100); |
913 | 927 | |
... | ... | @@ -1006,11 +1020,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1006 | 1020 | else { |
1007 | 1021 | $location.path('/'); |
1008 | 1022 | $timeout(function () { |
1009 | - if($rootScope.siteUrlInfo.mtype!=null) | |
1010 | - { | |
1011 | - if($rootScope.siteUrlInfo.mtype=='CA') | |
1012 | - $('#clinical-animations').trigger('click'); | |
1013 | - } | |
1023 | + //currently open CA | |
1024 | + $scope.RedirectToModule(); | |
1025 | + | |
1014 | 1026 | }, 100); |
1015 | 1027 | } |
1016 | 1028 | } |
... | ... | @@ -1051,21 +1063,17 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1051 | 1063 | |
1052 | 1064 | } |
1053 | 1065 | |
1066 | + $scope.RedirectToModule = function () { | |
1067 | + | |
1068 | + if($rootScope.siteUrlInfo.mtype!=null) | |
1069 | + { | |
1070 | + if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca') | |
1071 | + $('#clinical-animations').trigger('click'); | |
1072 | + } | |
1073 | + } | |
1054 | 1074 | |
1055 | 1075 | $scope.ValidateClientSiteUrl = function () { |
1056 | - $rootScope.siteUrlInfo = { | |
1057 | - siteIP: null, | |
1058 | - remoteIPAddress: null, | |
1059 | - status: null, | |
1060 | - accountNumber: null, | |
1061 | - edition: null, | |
1062 | - urlReferer: null, | |
1063 | - calsCreds: null, | |
1064 | - userId: null, | |
1065 | - password: null, | |
1066 | - mtype:null, | |
1067 | - id:null | |
1068 | - } | |
1076 | + | |
1069 | 1077 | $rootScope.isCallFromSite = true; |
1070 | 1078 | |
1071 | 1079 | var siteInfo = params.split('&'); |
... | ... | @@ -1091,13 +1099,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1091 | 1099 | } |
1092 | 1100 | else if (paramInfo[0].toLowerCase() == 'username') { |
1093 | 1101 | |
1094 | - $rootScope.siteUrlInfo.username = paramInfo[1]; | |
1095 | - console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.username); | |
1102 | + $rootScope.siteUrlInfo.userId = paramInfo[1]; | |
1103 | + console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.userId); | |
1096 | 1104 | } |
1097 | - else if (paramInfo[0].toLowerCase() == 'password') { | |
1105 | + else if (paramInfo[0].toLowerCase() == 'account') { | |
1098 | 1106 | |
1099 | - $rootScope.siteUrlInfo.password = paramInfo[1]; | |
1100 | - // console.log("$rootScope.siteUrlInfo.password" + $rootScope.siteUrlInfo.password); | |
1107 | + $rootScope.siteUrlInfo.accountNumber = paramInfo[1]; | |
1108 | + console.log("$rootScope.siteUrlInfo.accountNumber" + $rootScope.siteUrlInfo.accountNumber); | |
1101 | 1109 | } |
1102 | 1110 | |
1103 | 1111 | |
... | ... | @@ -1117,8 +1125,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1117 | 1125 | // console.log("$rootScope.siteUrlInfo.password " + $rootScope.siteUrlInfo.password); |
1118 | 1126 | // } |
1119 | 1127 | |
1120 | - $rootScope.userInfo.username = $rootScope.siteUrlInfo.username; | |
1121 | - $rootScope.userInfo.password = $rootScope.siteUrlInfo.password; | |
1128 | + //$rootScope.userInfo.username = $rootScope.siteUrlInfo.userId; | |
1129 | + //$rootScope.userInfo.password = $rootScope.siteUrlInfo.password; | |
1122 | 1130 | |
1123 | 1131 | } |
1124 | 1132 | else { |
... | ... | @@ -1141,7 +1149,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1141 | 1149 | else if (paramInfo[0] == 'urlReferer') { |
1142 | 1150 | |
1143 | 1151 | $rootScope.siteUrlInfo.urlReferer = paramInfo[1]; |
1144 | - console.log("$rootScope.siteUrlInfo.siteIP" + $rootScope.siteUrlInfo.siteIP); | |
1152 | + console.log("$rootScope.siteUrlInfo.urlReferer" + $rootScope.siteUrlInfo.urlReferer); | |
1145 | 1153 | } |
1146 | 1154 | else if (paramInfo[0] == 'remoteIPAddress') { |
1147 | 1155 | |
... | ... | @@ -1153,11 +1161,36 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1153 | 1161 | } |
1154 | 1162 | } |
1155 | 1163 | if (isCalsCredantialForSIte == "True") { |
1156 | - $rootScope.AuthenticateUser($rootScope.userInfo); | |
1164 | + if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.userId!=null && $rootScope.siteUrlInfo.accountNumber!=null) | |
1165 | + { | |
1166 | + AuthenticationService.ByPassLoginToOpenModule($rootScope.siteUrlInfo) | |
1167 | + .then( | |
1168 | + function (result) { | |
1169 | + if(result!=null) | |
1170 | + { | |
1171 | + $rootScope.userInfo.username = result.userId; | |
1172 | + $rootScope.userInfo.password = result.password; | |
1173 | + $rootScope.AuthenticateUser($rootScope.userInfo); | |
1174 | + } | |
1175 | + | |
1176 | + }), | |
1177 | + function (error) { | |
1178 | + console.log(' Error in bypass login = ' + error.statusText); | |
1179 | + $rootScope.errorMessage = error; | |
1180 | + $("#messageModal").modal('show'); | |
1181 | + } | |
1182 | + | |
1183 | + } | |
1184 | + else | |
1185 | + { | |
1186 | + console.log(' invalid detail in bypass login'); | |
1187 | + $rootScope.errorMessage = "authentication is not allowed due to invalid details format .\nPlease pass the correct details again!"; | |
1188 | + $("#messageModal").modal('show'); | |
1189 | + } | |
1190 | + | |
1157 | 1191 | } |
1158 | 1192 | else { |
1159 | 1193 | |
1160 | - | |
1161 | 1194 | console.log($rootScope.siteUrlInfo); |
1162 | 1195 | |
1163 | 1196 | AuthenticationService.validateClientSite($rootScope.siteUrlInfo) | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
... | ... | @@ -42,7 +42,26 @@ |
42 | 42 | }); |
43 | 43 | return deferred.promise; |
44 | 44 | }, |
45 | + ByPassLoginToOpenModule: function (urlDetail) { | |
46 | + var deferred = $q.defer(); | |
45 | 47 | |
48 | + $http.post('/API/api/ByPassLoginToOpenModule', JSON.stringify(urlDetail), { | |
49 | + headers: { | |
50 | + 'Content-Type': 'application/json' | |
51 | + } | |
52 | + }) | |
53 | + .success(function (data, status, headers, config) { | |
54 | + console.log('success') | |
55 | + deferred.resolve(data); | |
56 | + }).error(function (data, status, headers, config) { | |
57 | + console.log('error') | |
58 | + deferred.reject(data); | |
59 | + $rootScope.errorMessage = data; | |
60 | + $("#messageModal").modal('show'); | |
61 | + | |
62 | + }); | |
63 | + return deferred.promise; | |
64 | + }, | |
46 | 65 | |
47 | 66 | saveSetings: function (settings) { |
48 | 67 | var deferred = $q.defer(); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody"> |
73 | 73 | <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData"> |
74 | 74 | <td width="25%"> |
75 | - {{item._Title}} | |
75 | + ({{item._id}}) {{item._Title}} | |
76 | 76 | </td> |
77 | 77 | <td width="25%"> |
78 | 78 | {{item._BodyRegion}} |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody"> |
89 | 89 | <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData"> |
90 | 90 | <td width="25%"> |
91 | - {{item._Title}} | |
91 | + ({{item._id}}) {{item._Title}} | |
92 | 92 | </td> |
93 | 93 | <td width="25%"> |
94 | 94 | {{item._BodyRegion}} | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -264,7 +264,7 @@ |
264 | 264 | <img src="~/../content/images/DA/navigator-view.png" style="height:30px; width:50px" /> |
265 | 265 | </button> |
266 | 266 | |
267 | - <div class="dropdown-menu" id="navigatorDiv" style="min-height: initial; min-width: initial; "> | |
267 | + <div class="dropdown-menu" id="navigatorDiv" style="min-height: initial; min-width: initial;left:-12px; "> | |
268 | 268 | <div id="navDiv" align="center" style="min-width: initial; height: 119px; "> |
269 | 269 | <img id="navimg" alt="" /> |
270 | 270 | <div id="draggable" class="draggable ui-widget-content dragdivposition draggable_navigator" ng-mouseup="ScrollCanvasDiv($event)"> | ... | ... |