Commit 1abf0b780d21b3758fce4bdea1433392a6c73819

Authored by Birendra
2 parents e14ef591 482ae5ca

mergeMerge branch 'CADirectLink' into AIA_Develop

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,37 @@ 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 + BypassLogin objUser = null;
  481 +
  482 + try
  483 + {
  484 + string loginId = sitedetail.GetValue("userId").ToString();
  485 + string accountNumber = sitedetail.GetValue("accountNumber").ToString();
  486 +
  487 + objUser = AIAHTML5.API.Models.Users.ByPassLoginDetail(loginId, accountNumber);
  488 + responseData = JsonConvert.SerializeObject(objUser);
  489 +
  490 + if (objUser != null)
  491 + {
  492 + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(responseData) };
  493 + }
  494 + else
  495 + {
  496 + return new HttpResponseMessage { StatusCode = HttpStatusCode.BadRequest, Content = new StringContent(AIAConstants.USER_NOT_FOUND) };
  497 + }
  498 + }
  499 + catch (Exception ex)
  500 + {
  501 + // Log exception code goes here
  502 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  503 + }
  504 + }
474 505 // PUT api/authenticate/5
475 506 public void Put(int id, [FromBody]string value)
476 507 {
... ... @@ -481,4 +512,6 @@ namespace AIAHTML5.API.Controllers
481 512 {
482 513 }
483 514 }
  515 +
  516 +
484 517 }
485 518 \ 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 BypassLogin ByPassLoginDetail(string loginId, string accountNumber)
  314 + {
  315 + BypassLogin 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 BypassLogin();
  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/User.cs
... ... @@ -160,4 +160,11 @@ namespace AIAHTML5.API.Models
160 160  
161 161 }
162 162  
  163 + public class BypassLogin
  164 + {
  165 + public string LoginId { get; set; }
  166 + public string Password { get; set; }
  167 +
  168 + }
  169 +
163 170 }
164 171 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
... ... @@ -307,6 +307,13 @@ namespace AIAHTML5.API.Models
307 307 return result;
308 308 }
309 309  
  310 + internal static BypassLogin ByPassLoginDetail(string loginId, string accountNumber)
  311 + {
  312 + BypassLogin objUser = null;
  313 + objUser = DBModel.ByPassLoginDetail(loginId, accountNumber);
  314 +
  315 + return objUser;
  316 + }
310 317  
311 318 internal static int SaveUserSelectedSettings(User selectedSettings)
312 319 {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -323,19 +323,20 @@ 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 +
333 333 $(".sidebar").mCustomScrollbar({
334 334 autoHideScrollbar: true,
335 335 //theme:"rounded"
336 336 });
337 337  
338   - });
  338 + });
  339 +
339 340 $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail');
340 341 $timeout(function () {
341 342 if ($rootScope.getLocalStorageValue('CAGridViewScroll') !== null && $location.url() == "/clinical-animations") {
... ... @@ -346,7 +347,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
346 347 200);
347 348  
348 349  
349   - $timeout(function () { $scope.EnableUI(); }, 400);
  350 + $timeout(function () { $scope.EnableUI();
  351 + //open default animation
  352 + if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null)
  353 + {
  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 +
  360 + // clear detail
  361 + $rootScope.siteUrlInfo.mtype=null;
  362 + $rootScope.siteUrlInfo.id=null;
  363 + }
  364 +
  365 + }, 400);
350 366  
351 367 }
352 368  
... ... @@ -536,9 +552,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
536 552 $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage;
537 553  
538 554 var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">'
539   - + '<div class="thumbnail" >'
  555 + + '<div class="thumbnail" ><a href="#">'
540 556 + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >'
541   - + '<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');
542 558  
543 559  
544 560 $compile($el)($scope);
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -455,6 +455,30 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
455 455 $('#CBDetailPageDiv').css('pointer-events', 'auto');
456 456 $('#CBDetailPageDiv').css('opacity', '1');
457 457 }
  458 + //fixing for mac os now
  459 + $scope.getOS = function () {
  460 + var userAgent = window.navigator.userAgent,
  461 + platform = window.navigator.platform,
  462 + macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'],
  463 + windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],
  464 + iosPlatforms = ['iPhone', 'iPad', 'iPod'],
  465 + os = null;
  466 +
  467 + if (macosPlatforms.indexOf(platform) !== -1) {
  468 + os = 'MacOS';
  469 + } else if (iosPlatforms.indexOf(platform) !== -1) {
  470 + os = 'iOS';
  471 + } else if (windowsPlatforms.indexOf(platform) !== -1) {
  472 + os = 'Windows';
  473 + } else if (/Android/.test(userAgent)) {
  474 + os = 'Android';
  475 + } else if (!os && /Linux/.test(platform)) {
  476 + os = 'Linux';
  477 + }
  478 +
  479 + return os;
  480 + }
  481 +
458 482  
459 483 $scope.openView = function ($event) {
460 484 // open module bu openresource
... ... @@ -993,7 +1017,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
993 1017  
994 1018 // we are loading most of alll data used in DA by this function so that at the time of any functionality delay in data laod will not happened.
995 1019 $scope.loadView = function (windowviewid) {
996   -
  1020 + $scope.DisableUI();
997 1021 var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId');
998 1022 if (document.getElementById('daViewDA_'+windowviewid) != null) {
999 1023 $scope.loadDAView(bodyViewId, windowviewid);
... ... @@ -1504,7 +1528,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1504 1528 }
1505 1529  
1506 1530 console.log('JlinqActivity , time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"));
1507   -
  1531 + $scope.EnableUI();
1508 1532  
1509 1533 }
1510 1534  
... ... @@ -2497,7 +2521,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2497 2521 $scope.isLayerChange = false;
2498 2522 }
2499 2523  
2500   - if (evt.ctrlKey) {
  2524 + //birendra
  2525 + // for mac os Command key use for multi selection
  2526 + if (evt.ctrlKey || evt.metaKey) {
2501 2527 $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',true);
2502 2528 }
2503 2529 else
... ... @@ -2530,8 +2556,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2530 2556  
2531 2557  
2532 2558 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
2533   - var verticalScrollPosition = canvasDiv.scrollTop;
2534   - var horizontlScrollPosition = canvasDiv.scrollLeft;
  2559 +
  2560 + //changing for mac os now
  2561 + var os=$scope.getOS();
  2562 + if(os=='MacOS')
  2563 + {
  2564 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  2565 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  2566 + }
  2567 + else
  2568 + {
  2569 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  2570 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  2571 + }
2535 2572  
2536 2573 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
2537 2574  
... ... @@ -3014,8 +3051,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3014 3051 if ($scope.isLayerChange == true) {
3015 3052 $scope.isLayerChange = false;
3016 3053 }
3017   -
3018   - if (evt.ctrlKey) {
  3054 + //birendra
  3055 + // for mac os Command key use for multi selection
  3056 + if (evt.ctrlKey || evt.metaKey) {
3019 3057 $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',true);
3020 3058  
3021 3059 console.log('CTRL ON')
... ... @@ -3057,14 +3095,25 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3057 3095 // alert(mousePos.x + ',' + mousePos.y);
3058 3096  
3059 3097 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
3060   - var verticalScrollPosition = canvasDiv.scrollTop;
3061   - var horizontlScrollPosition = canvasDiv.scrollLeft;
3062   -
3063   -
  3098 + //changing for mac os now
  3099 + var os=$scope.getOS();
  3100 + if(os=='MacOS')
  3101 + {
  3102 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  3103 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  3104 + }
  3105 + else
  3106 + {
  3107 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  3108 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  3109 + }
  3110 +
3064 3111 //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;
3067   - var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
  3112 +
  3113 + var actulalX = mousePos.x + horizontlScrollPosition;
  3114 + var actualY = mousePos.y + verticalScrollPosition;
  3115 +
  3116 + var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
3068 3117  
3069 3118  
3070 3119 //Modesty ON
... ... @@ -4961,7 +5010,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4961 5010 // we decide the size of speech bubble
4962 5011 //2.
4963 5012  
4964   - if (event.ctrlKey || event == "CBAnnotation") {
  5013 + if (event.ctrlKey || event.metaKey || event == "CBAnnotation") {
4965 5014 console.log('ctrl pressed');
4966 5015 $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',true);
4967 5016 //2.1 create unique speech bubbles
... ... @@ -5001,7 +5050,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5001 5050 for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) {
5002 5051 if ( $scope.speechbubbleList[m].ids == sub_id1) {
5003 5052  
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);
  5053 + $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);
5005 5054 break;
5006 5055 }
5007 5056 }
... ... @@ -5090,7 +5139,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5090 5139  
5091 5140 var verticalScrollPosition = canvasDiv.scrollTop;
5092 5141 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);
  5142 + $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid);
5094 5143 },
5095 5144 //Update Annotation Cordianate in case of show single Annotation
5096 5145 stop: function (evt) {
... ... @@ -5141,7 +5190,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5141 5190 else {
5142 5191 $scope.longest_annotationT1 = $scope.annotationTextArrayT1.reduce(function (a, b) { return a.length > b.length ? a : b; });
5143 5192 $scope.longest_annotationT2 = $scope.annotationTextArrayT2.reduce(function (a, b) { return a.length > b.length ? a : b; });
5144   - if (event.ctrlKey || event == "CBAnnotation") {
  5193 + if (event.ctrlKey || event.metaKey || event == "CBAnnotation") {
5145 5194  
5146 5195 $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true);
5147 5196  
... ... @@ -5173,7 +5222,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5173 5222 if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) {
5174 5223 for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) {
5175 5224 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);
  5225 + $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);
5177 5226 break;
5178 5227 }
5179 5228 }
... ... @@ -5270,7 +5319,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5270 5319 var canvasDiv = document.getElementById('canvasDivDA_' + windid);
5271 5320 var verticalScrollPosition = canvasDiv.scrollTop;
5272 5321 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);
  5322 + $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, false,windid);
5274 5323 },
5275 5324  
5276 5325 //Update Annotation Cordianate in case of show single Annotation
... ... @@ -5434,13 +5483,29 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5434 5483  
5435 5484 $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id, tipx, tipy,windowviewid,speechBubbleCounter) {
5436 5485 var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
5437   - if (isHighlightBodyWithCBTermData == true) {
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>";
5440   - }
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>";
5443   - }
  5486 + var os=$scope.getOS();
  5487 + if(os=='MacOS')
  5488 + {
  5489 + if (isHighlightBodyWithCBTermData == true) {
  5490 + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000; left:" + (x - 3) + "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-3) + "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>";
  5491 + }
  5492 + else
  5493 + {
  5494 + var sppechBubbleHTML = "<div id ='" + pointClicked +"' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style=' z-index:60000; left:" + (x - 3) + "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-3) + "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>";
  5495 + }
  5496 + }
  5497 + else
  5498 + {
  5499 + if (isHighlightBodyWithCBTermData == true) {
  5500 + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000; left:" + (x - 4) + "px;top:" + (y + 11.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>";
  5501 + }
  5502 + else
  5503 + {
  5504 + var sppechBubbleHTML = "<div id ='" + pointClicked +"' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style=' z-index:60000; left:" + (x - 4) + "px;top:" + (y + 11.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>";
  5505 + }
  5506 + }
  5507 +
  5508 +
5444 5509  
5445 5510 //Issue #7286 :Undefined annotation should not appear
5446 5511 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
... ... @@ -5522,22 +5587,51 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5522 5587 }
5523 5588 var Globe = [];
5524 5589 Globe.push({ currentX: x, currentY: y });
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';
  5590 +
  5591 + //changing for mac os now
  5592 + var os=$scope.getOS();
  5593 + if(os=='MacOS')
  5594 + {
  5595 + document.getElementById('dot_'+windowviewid).style.display = 'block';
  5596 + document.getElementById('dot_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
  5597 + document.getElementById('dot_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px';
5528 5598 document.getElementById('bord_'+windowviewid).style.display = 'block';
5529   - document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px';
  5599 + document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
5530 5600 document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 0) + 'px';
5531 5601  
5532 5602 document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block';
5533   - document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = ((Globe[0].currentX) - 2) + 'px';
5534   - document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px';
  5603 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = ((Globe[0].currentX) - 1) + 'px';
  5604 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY)+0) + 'px';
  5605 + }
  5606 + else
  5607 + {
  5608 + document.getElementById('dot_'+windowviewid).style.display = 'block';
  5609 + document.getElementById('dot_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
  5610 + document.getElementById('dot_'+windowviewid).style.top = ((Globe[0].currentY) + 11.5) + 'px';
  5611 + document.getElementById('bord_'+windowviewid).style.display = 'block';
  5612 + document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
  5613 + document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px';
  5614 +
  5615 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block';
  5616 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = ((Globe[0].currentX) - 1) + 'px';
  5617 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY)-1) + 'px';
  5618 +
  5619 + }
5535 5620 }
5536 5621  
5537 5622 $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation, windowviewid, TPspeechBubbleCounter) {
5538 5623  
5539   - var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 5) + "px;top:" + (y + 9) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;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=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>";
5540   - if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
  5624 + var os=$scope.getOS();
  5625 + if(os=='MacOS')
  5626 + {
  5627 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 3) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;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-3) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>";
  5628 + }
  5629 + else
  5630 + {
  5631 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 4) + "px;top:" + (y + 11.5) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;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=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>";
  5632 + }
  5633 +
  5634 + if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
5541 5635 if (Exists_annotation == 0) {
5542 5636 $('#canvasDivDA_' + windowviewid).append(sppechBubbleHTML_annotation);
5543 5637 for (var l = 0; l <= $scope.annotationTextArrayT1.length - 1; l++) {
... ... @@ -5638,15 +5732,34 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5638 5732 }
5639 5733 var Globe = [];
5640 5734 Globe.push({ currentX: x, currentY: y });
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';
5644   - document.getElementById('bord_annotation_'+windowviewid).style.display = 'block';
5645   - document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px';
5646   - document.getElementById('bord_annotation_'+windowviewid).style.top = ((Globe[0].currentY)) + 'px';
5647   - document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.display = 'block';
5648   - document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX-2) + 'px';
5649   - document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px';
  5735 + //changing for mac os now
  5736 + var os=$scope.getOS();
  5737 + if(os=='MacOS')
  5738 + {
  5739 + document.getElementById('dot_annotation_'+windowviewid).style.display = 'block';
  5740 + document.getElementById('dot_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
  5741 + document.getElementById('dot_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px';
  5742 + document.getElementById('bord_annotation_'+windowviewid).style.display = 'block';
  5743 + document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
  5744 + document.getElementById('bord_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 0) + 'px';
  5745 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.display = 'block';
  5746 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX - 1) + 'px';
  5747 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY) + 0) + 'px';
  5748 +
  5749 + }
  5750 + else
  5751 + {
  5752 + document.getElementById('dot_annotation_'+windowviewid).style.display = 'block';
  5753 + document.getElementById('dot_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
  5754 + document.getElementById('dot_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 11.5) + 'px';
  5755 + document.getElementById('bord_annotation_'+windowviewid).style.display = 'block';
  5756 + document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
  5757 + document.getElementById('bord_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px';
  5758 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.display = 'block';
  5759 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX - 1) + 'px';
  5760 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY) - 1) + 'px';
  5761 + }
  5762 +
5650 5763  
5651 5764 }
5652 5765  
... ... @@ -6139,11 +6252,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6139 6252  
6140 6253 $scope.transparencyCanvasHeight = transparencyCanvas.height;
6141 6254 $scope.transparencyCanvasWidth = transparencyCanvas.width;
  6255 +
6142 6256  
6143 6257 //bind click listener
6144 6258 transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener);
6145 6259  
6146 6260 $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex'));
  6261 + $(".ui-wrapper").css("left",TransparencyBoxStartX-2+ 'px');
  6262 +
6147 6263  
6148 6264 }
6149 6265  
... ... @@ -6434,7 +6550,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6434 6550 transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener);
6435 6551  
6436 6552 $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex'));
6437   -
  6553 + $(".ui-wrapper").css("left",$scope.startX-2+ 'px');
6438 6554 }
6439 6555  
6440 6556 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
... ... @@ -7485,7 +7601,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7485 7601 $scope.NormalTermNumber = RGBColor;
7486 7602 }
7487 7603  
7488   - if (event.ctrlKey) {
  7604 + if (event.ctrlKey || event.metaKey) {
7489 7605 $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true);
7490 7606 }
7491 7607 else {
... ... @@ -7627,8 +7743,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7627 7743 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
7628 7744  
7629 7745 var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid);
7630   - var verticalScrollPosition = canvasDiv.scrollTop;
7631   - var horizontlScrollPosition = canvasDiv.scrollLeft;
  7746 + //changing for mac os now
  7747 + var os=$scope.getOS();
  7748 + if(os=='MacOS')
  7749 + {
  7750 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  7751 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  7752 + }
  7753 + else
  7754 + {
  7755 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  7756 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  7757 + }
7632 7758  
7633 7759  
7634 7760 //We substracted 135, as the difference between flex and html coordinates for same organ is 135
... ... @@ -7809,8 +7935,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7809 7935 var tCanvasTotalHeight = parseInt(tCanvasTopAftrSplit[0]) + parseInt(tCanvasHeightAftrSplit[0]);
7810 7936 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
7811 7937 var canvasDiv = document.getElementById('canvasDivDA_'+windowviewid);
7812   - var verticalScrollPosition = canvasDiv.scrollTop;
7813   - var horizontlScrollPosition = canvasDiv.scrollLeft;
  7938 + //changing for mac os now
  7939 + var os=$scope.getOS();
  7940 + if(os=='MacOS')
  7941 + {
  7942 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  7943 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  7944 + }
  7945 + else
  7946 + {
  7947 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  7948 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  7949 + }
7814 7950  
7815 7951 var actulalX = mousePos.x + horizontlScrollPosition;
7816 7952 var actualY = mousePos.y + verticalScrollPosition;
... ... @@ -7889,8 +8025,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7889 8025 var windowviewid = (evt.target.id).split("_")[len-1];
7890 8026  
7891 8027 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
7892   - var verticalScrollPosition = canvasDiv.scrollTop;
7893   - var horizontlScrollPosition = canvasDiv.scrollLeft;
  8028 + //changing for mac os now
  8029 + var os=$scope.getOS();
  8030 + if(os=='MacOS')
  8031 + {
  8032 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  8033 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  8034 + }
  8035 + else
  8036 + {
  8037 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  8038 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  8039 + }
7894 8040  
7895 8041 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
7896 8042  
... ... @@ -7928,7 +8074,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7928 8074  
7929 8075 //Added Method to Save TransparencyBox TermNumbers for SaveCB
7930 8076 $scope.saveTBoxTermNumberForSaveCB = function (evt, windowviewid) {
7931   - if (evt.ctrlKey) {
  8077 + if (evt.ctrlKey || evt.metaKey) {
7932 8078 $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true);
7933 8079 }
7934 8080 else {
... ... @@ -7951,8 +8097,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7951 8097 $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
7952 8098 }
7953 8099 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
7954   - var verticalScrollPosition = canvasDiv.scrollTop;
7955   - var horizontlScrollPosition = canvasDiv.scrollLeft;
  8100 + //changing for mac os now
  8101 + var os=$scope.getOS();
  8102 + if(os=='MacOS')
  8103 + {
  8104 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  8105 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  8106 + }
  8107 + else
  8108 + {
  8109 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  8110 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  8111 + }
7956 8112 var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
7957 8113 CurriculumTermData.push({
7958 8114 "transparentTermNumber": parseInt($scope.TBoxTermNumber),
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -89,17 +89,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
89 89 licenseeAccountNumber: null
90 90 };
91 91  
92   - $rootScope.siteUrlInfo = {
93   - siteIP: null,
94   - remoteIPAddress: null,
95   - status: null,
96   - accountNumber: null,
97   - edition: null,
98   - urlReferer: null,
99   - calsCreds: null,
100   - userId: null,
101   - password: null
102   - }
103 92 $rootScope.userData;
104 93 $rootScope.userModules;
105 94 $rootScope.passwordMismatchMessage;
... ... @@ -650,6 +639,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
650 639 $('#login').css('visibility', 'visible');
651 640  
652 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 + }
653 656  
654 657 if (params != null && params != undefined && params != "") {
655 658  
... ... @@ -913,6 +916,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
913 916  
914 917  
915 918 $location.path('/');
  919 +
  920 + $timeout(function () {
  921 + if($rootScope.siteUrlInfo.mtype!=null)
  922 + {
  923 + //currently open CA
  924 + $scope.RedirectToModule();
  925 + }
  926 + }, 100);
916 927  
917 928 }
918 929 else
... ... @@ -1008,6 +1019,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1008 1019 }
1009 1020 else {
1010 1021 $location.path('/');
  1022 + $timeout(function () {
  1023 + //currently open CA
  1024 + $scope.RedirectToModule();
  1025 +
  1026 + }, 100);
1011 1027 }
1012 1028 }
1013 1029 else {
... ... @@ -1047,11 +1063,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1047 1063  
1048 1064 }
1049 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 + }
1050 1074  
1051 1075 $scope.ValidateClientSiteUrl = function () {
1052   -
  1076 +
1053 1077 $rootScope.isCallFromSite = true;
1054   -
  1078 +
1055 1079 var siteInfo = params.split('&');
1056 1080  
1057 1081 for (var i = 0; i < siteInfo.length; i++) {
... ... @@ -1062,27 +1086,48 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1062 1086  
1063 1087 if (isCalsCredantialForSIte == "True") {
1064 1088 var paramInfo = siteInfo[i].split('=');
1065   - if (paramInfo[0] == 'calsCredantial') {
1066   -
1067   - $rootScope.siteUrlInfo.calsCreds = paramInfo[1];
1068   - console.log("$rootScope.siteUrlInfo.calsCreds" + $rootScope.siteUrlInfo.calsCreds);
  1089 + //added by birendra direct open CA module
  1090 + if(paramInfo[0].toLowerCase() == 'mtype')
  1091 + {
  1092 + $rootScope.siteUrlInfo.mtype = paramInfo[1];
  1093 + console.log("$rootScope.siteUrlInfo.mtype" + $rootScope.siteUrlInfo.mtype);
1069 1094 }
1070   - else if (paramInfo[0] == 'username') {
1071   -
1072   - $rootScope.siteUrlInfo.username = paramInfo[1];
1073   - console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.username);
  1095 + else if (paramInfo[0].toLowerCase() == 'id') {
  1096 +
  1097 + $rootScope.siteUrlInfo.id = paramInfo[1];
  1098 + console.log("$rootScope.siteUrlInfo.id" + $rootScope.siteUrlInfo.id);
1074 1099 }
1075   - else if (paramInfo[0] == 'password') {
1076   -
1077   - $rootScope.siteUrlInfo.password = paramInfo[1];
1078   - console.log("$rootScope.siteUrlInfo.password " + $rootScope.siteUrlInfo.password);
  1100 + else if (paramInfo[0].toLowerCase() == 'username') {
  1101 +
  1102 + $rootScope.siteUrlInfo.userId = paramInfo[1];
  1103 + console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.userId);
1079 1104 }
  1105 + else if (paramInfo[0].toLowerCase() == 'account') {
  1106 +
  1107 + $rootScope.siteUrlInfo.accountNumber = paramInfo[1];
  1108 + console.log("$rootScope.siteUrlInfo.accountNumber" + $rootScope.siteUrlInfo.accountNumber);
  1109 + }
  1110 +
  1111 +
  1112 + // if (paramInfo[0] == 'calsCredantial') {
1080 1113  
1081   - $rootScope.userInfo.username = $rootScope.siteUrlInfo.username;
1082   - $rootScope.userInfo.password = $rootScope.siteUrlInfo.password;
1083   - console.log("$rootScope.userInfo.username" + $rootScope.userInfo.username + " $rootScope.userInfo.password" + $rootScope.userInfo.password);
1084   -
1085   -
  1114 + // $rootScope.siteUrlInfo.calsCreds = paramInfo[1];
  1115 + // console.log("$rootScope.siteUrlInfo.calsCreds" + $rootScope.siteUrlInfo.calsCreds);
  1116 + // }
  1117 + // else if (paramInfo[0] == 'username') {
  1118 +
  1119 + // $rootScope.siteUrlInfo.username = paramInfo[1];
  1120 + // console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.username);
  1121 + // }
  1122 + // else if (paramInfo[0] == 'password') {
  1123 +
  1124 + // $rootScope.siteUrlInfo.password = paramInfo[1];
  1125 + // console.log("$rootScope.siteUrlInfo.password " + $rootScope.siteUrlInfo.password);
  1126 + // }
  1127 +
  1128 + //$rootScope.userInfo.username = $rootScope.siteUrlInfo.userId;
  1129 + //$rootScope.userInfo.password = $rootScope.siteUrlInfo.password;
  1130 +
1086 1131 }
1087 1132 else {
1088 1133 var paramInfo = siteInfo[i].split('=');
... ... @@ -1104,7 +1149,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1104 1149 else if (paramInfo[0] == 'urlReferer') {
1105 1150  
1106 1151 $rootScope.siteUrlInfo.urlReferer = paramInfo[1];
1107   - console.log("$rootScope.siteUrlInfo.siteIP" + $rootScope.siteUrlInfo.siteIP);
  1152 + console.log("$rootScope.siteUrlInfo.urlReferer" + $rootScope.siteUrlInfo.urlReferer);
1108 1153 }
1109 1154 else if (paramInfo[0] == 'remoteIPAddress') {
1110 1155  
... ... @@ -1116,11 +1161,36 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1116 1161 }
1117 1162 }
1118 1163 if (isCalsCredantialForSIte == "True") {
1119   - $rootScope.AuthenticateUser($rootScope.userInfo);
  1164 + if($rootScope.siteUrlInfo.mtype!=null && $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.LoginId;
  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 +
1120 1191 }
1121 1192 else {
1122 1193  
1123   -
1124 1194 console.log($rootScope.siteUrlInfo);
1125 1195  
1126 1196 AuthenticationService.validateClientSite($rootScope.siteUrlInfo)
... ... @@ -1320,12 +1390,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1320 1390 )
1321 1391  
1322 1392 }
1323   - //$rootScope.siteUrlInfo.siteIP = siteInfo[0];
1324   - //$rootScope.siteUrlInfo.remoteIPAddress = siteInfo[1];
1325   - //$rootScope.siteUrlInfo.accountNumber = siteInfo[2];
1326   - //$rootScope.siteUrlInfo.edition = siteInfo[3];
1327   - //$rootScope.siteUrlInfo.urlReferer = siteInfo[4];
1328   -
  1393 +
1329 1394  
1330 1395 }
1331 1396  
... ... @@ -6424,11 +6489,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6424 6489 $("#modelsettingsbackground").css("display", "none");
6425 6490 }
6426 6491 $rootScope.CloseSetting = function () {
6427   - // $rootScope.errorMessage = LoginMessageConstants.INVALID_USER;
  6492 + if($rootScope.isApplyBtnClicked)
  6493 + {
6428 6494 $("#saveSettingsMessageModal").modal('show');
6429 6495 $("#saveSettingsMessageModal").css('zIndex', 80000000000);
6430   - //$('#modal-settings').css("display", "none");
6431   - //$("#modelsettingsbackground").css("display", "none");
  6496 + }
  6497 + else
  6498 + {
  6499 + $rootScope.CancelSetting ();
  6500 + }
6432 6501 }
6433 6502  
6434 6503 $rootScope.saveSettings = function () {
... ... @@ -6560,6 +6629,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6560 6629 $('#primarylaxican').attr("name", $rootScope.primaryLangID);
6561 6630 }
6562 6631 }
  6632 +
  6633 + $('#lexiconLangDropdown').html($('#lexiconLangDropdown').find('option').sort(function (x, y) {
  6634 +
  6635 + return $(x).text() > $(y).text() ? 1 : -1
  6636 +
  6637 + }));
6563 6638 }
6564 6639  
6565 6640  
... ...
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)">
... ...
400-SOURCECODE/AIAHTML5.Web/index.aspx.cs
... ... @@ -36,8 +36,23 @@ namespace ADAM.AIA
36 36 }
37 37 }
38 38  
39   - string c = "nm";
40   - if (Request.QueryString["account"] != null)
  39 + if (Request.QueryString["mtype"] != null)
  40 + {
  41 + //birendra
  42 + //open default CA module by query string
  43 + isCalsCredantial = true;
  44 +
  45 + string[] allQueryData = new string[Request.QueryString.AllKeys.Length];
  46 +
  47 + for(int i=0;i< Request.QueryString.AllKeys.Length; i++)
  48 + {
  49 + allQueryData[i] = Request.QueryString.AllKeys[i] + "=" + Request.QueryString[Request.QueryString.AllKeys[i]].ToString();
  50 + }
  51 + urlParams = string.Join("&", allQueryData);
  52 +
  53 + //urlParams = "mtype=" + Request.QueryString[allQueryData[].ToString() + "&id=" + Request.QueryString["id"].ToString() + "&username=" + Request.QueryString["username"].ToString() + "&password=" + Request.QueryString["password"].ToString();
  54 + }
  55 + else if (Request.QueryString["account"] != null)
41 56 {
42 57 // http://stackoverflow.com/questions/9032005/request-servervariableshttp-referer-is-not-working-in-ie
43 58 // http://stackoverflow.com/questions/5643773/http-referrer-not-always-being-passed?rq=1
... ...