Commit 701eb4ab27f09628add30ade9aa9e375de85d376

Authored by Birendra
2 parents 7bc12776 716861f2

merge code Merge branch 'AdminReportBug' into AIA_Develop

Showing 71 changed files with 2829 additions and 2738 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
... ... @@ -43,6 +43,7 @@ namespace AIAHTML5.ADMIN.API.Models
43 43 public DateTime RenewDate { get; set; }
44 44 public DateTime ModifyDate { get; set; }
45 45 public bool IsActive { get; set; }
  46 + public string LicStatus { get; set; }
46 47 public int? TotalLogins { get; set; }
47 48 public string EditionLogins { get; set; }
48 49 public decimal Price { get; set; }
... ... @@ -99,6 +100,7 @@ namespace AIAHTML5.ADMIN.API.Models
99 100 LicenseObj.RenewDate = DateTime.ParseExact((item.RenewDate == "" ? "01/01/0001" : item.RenewDate), "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
100 101 LicenseObj.ModifyDate = DateTime.ParseExact((item.ModifyDate == "" ? "01/01/0001" : item.ModifyDate), "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
101 102 LicenseObj.IsActive = (item.LicenseStatus == "Active" ? true : false);
  103 + LicenseObj.LicStatus = item.LicenseStatus;
102 104 LicenseList.Add(LicenseObj);
103 105 }
104 106 recordCount = (int)spRecordCount.Value;
... ...
400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs
... ... @@ -71,6 +71,8 @@ namespace AIAHTML5.API.Constants
71 71 public const int EDITION_NOT_EXIST = 3;
72 72 public const int MASTER_SITEIP_NOT_EXIST = 2;
73 73 public const int LICENSE_INACTIVE = 6;
  74 + public const int LICENSE_EXPIRED = 7;
  75 + public const int LICENSE_NOTSTARTED = 8;
74 76  
75 77  
76 78 /// <summary>
... ...
400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs
... ... @@ -307,15 +307,26 @@ namespace AIAHTML5.API.Controllers
307 307 string expirationDate = null;
308 308 bool isLicenseExpired = false;
309 309  
  310 + // validate license start date
  311 + string startDate = null;
  312 + bool isSubscriptionNotStart = false;
  313 +
310 314 if (userInfo.LicenseSubscriptions != null)
311 315 {
  316 + isSubscriptionNotStart = AIAHTML5.API.Models.Users.checkIfLicenseNotStarted(userInfo.LicenseSubscriptions, out startDate);
  317 +
312 318 isLicenseExpired = AIAHTML5.API.Models.Users.checkIfLicenseExpired(userInfo.LicenseSubscriptions, out expirationDate);
313 319 }
314 320  
315 321 if (isLicenseExpired)
316 322 {
317 323 userInfo.IsSubscriptionExpired = isLicenseExpired;
318   - userInfo.SubscriptionExpirationDate = expirationDate;
  324 + userInfo.SubscriptionExpirationDate = expirationDate;
  325 + }
  326 + else if (isSubscriptionNotStart)
  327 + {
  328 + userInfo.IsSubscriptionNotStart = isSubscriptionNotStart;
  329 + userInfo.SubscriptionStartDate = startDate;
319 330 }
320 331 else
321 332 {
... ... @@ -323,7 +334,6 @@ namespace AIAHTML5.API.Controllers
323 334  
324 335 userInfo.IsModestyOn = AIAHTML5.API.Models.Users.IsModestyActiveForThisLicense(userInfo.LicenseId, Convert.ToInt16(userInfo.EditionId));
325 336  
326   -
327 337 }
328 338 }
329 339  
... ...
400-SOURCECODE/AIAHTML5.API/Models/User.cs
... ... @@ -47,7 +47,9 @@ namespace AIAHTML5.API.Models
47 47 public License LicenseInfo { get; set; }
48 48 public LicenseSubscriptionDetails LicenseSubscriptions { get; set; }
49 49 public LicenseUserExportedImageDetail UserExportImageDetail { get; set; }
50   -
  50 +
  51 + public bool IsSubscriptionNotStart { get; set; }
  52 + public string SubscriptionStartDate { get; set; }
51 53 public bool IsSubscriptionExpired { get; set; }
52 54 public string SubscriptionExpirationDate { get; set; }
53 55 public string TermsAndConditionsTitle { get; set; }
... ...
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
... ... @@ -159,6 +159,27 @@ namespace AIAHTML5.API.Models
159 159 return false;
160 160 }
161 161  
  162 + internal static bool checkIfLicenseNotStarted(LicenseSubscriptionDetails subscriptionDetail, out string startDate)
  163 + {
  164 + startDate = string.Empty;
  165 + bool IsSubscriptionNotStart = false;
  166 +
  167 + // validate stat date for new license
  168 + if (subscriptionDetail != null && subscriptionDetail.RenewalDate==null)
  169 + {
  170 + DateTime? SubscriptionValidFrom = subscriptionDetail.SubscriptionValidFrom;
  171 + if (SubscriptionValidFrom != null && SubscriptionValidFrom.Value.Date <= DateTime.Now.Date)
  172 + {
  173 + IsSubscriptionNotStart = false;
  174 + }
  175 + else
  176 + {
  177 + IsSubscriptionNotStart = true;
  178 + startDate = subscriptionDetail.SubscriptionValidFrom.Value.Date.ToString("MM/dd/yyyy").ToString();
  179 + }
  180 + }
  181 + return IsSubscriptionNotStart;
  182 + }
162 183 internal static bool checkIfLicenseExpired(LicenseSubscriptionDetails subscriptionDetail, out string expirationDate)
163 184 {
164 185 expirationDate = string.Empty;
... ... @@ -507,9 +528,15 @@ namespace AIAHTML5.API.Models
507 528  
508 529 public static User ValidateSiteLogin(String strSiteIP, String strAcccountNumber, String strUrlReferer, string strEdition, int intSiteId)
509 530 {
510   - bool isExpired = false;
511 531 User userInfo = null;
512   -
  532 +
  533 + string expirationDate = null;
  534 + bool isLicenseExpired = false;
  535 +
  536 + // validate license start date
  537 + string startDate = null;
  538 + bool isSubscriptionNotStart = false;
  539 +
513 540 int intLicenseId = 0;
514 541 int intEditionId = Convert.ToInt16(strEdition);
515 542  
... ... @@ -541,26 +568,32 @@ namespace AIAHTML5.API.Models
541 568 //05.3 get licenseSubscription details
542 569 userInfo.LicenseSubscriptions = AIAHTML5.API.Models.Users.getLicenseSubscriptionDetails( userInfo.LicenseInfo.Id);
543 570  
544   - //05.4 check the License expiration irespective of either user is active or not because on AIA
545   - //we shows the License expiration message for inactive users too
546   -
  571 + //05.4 check the License expiration irespective of either user is active or not because on AIA
  572 + //we shows the License expiration message for inactive users too
547 573  
548 574 if (userInfo.LicenseSubscriptions != null)
549 575 {
550   - DateTime? subscriptionValidThrough = userInfo.LicenseSubscriptions.SubscriptionValidThrough;
551   - if (subscriptionValidThrough != null && subscriptionValidThrough.Value.Date >= DateTime.Now.Date)
552   - {
553   - isExpired = false;
554   - }
555   - else
556   - {
557   - isExpired = true;
558   - }
559   - }
  576 + isSubscriptionNotStart = AIAHTML5.API.Models.Users.checkIfLicenseNotStarted(userInfo.LicenseSubscriptions, out startDate);
560 577  
  578 + isLicenseExpired = AIAHTML5.API.Models.Users.checkIfLicenseExpired(userInfo.LicenseSubscriptions, out expirationDate);
  579 + }
561 580  
  581 + if (Convert.ToBoolean(licRow["IsActive"]) != true)
  582 + {
  583 + userInfo.LoginFailureCauseId = ErrorHelper.LICENSE_INACTIVE;
  584 + }
  585 + else if(isLicenseExpired)
  586 + {
  587 + userInfo.LoginFailureCauseId = ErrorHelper.LICENSE_EXPIRED;
  588 + userInfo.SubscriptionExpirationDate = expirationDate;
  589 + }
  590 + else if (isSubscriptionNotStart)
  591 + {
  592 + userInfo.LoginFailureCauseId = ErrorHelper.LICENSE_NOTSTARTED;
  593 + userInfo.SubscriptionStartDate = startDate;
562 594  
563   - if (!isExpired && Convert.ToBoolean(licRow["IsActive"]) == true)
  595 + }
  596 + else
564 597 {
565 598 //User objUserContext = new User();
566 599 userInfo.Id = 0;
... ... @@ -601,25 +634,19 @@ namespace AIAHTML5.API.Models
601 634 // get edition features details
602 635 userInfo.objEditionFeatures = objDBModel.GetEditionFeatures((Byte)intEditionId);
603 636  
604   -
605   -
606 637 if (intLicenseId > 0)
607 638 userInfo.Modules = getModuleListByLicenseId(intLicenseId);
608 639 else
609 640 userInfo.Modules = getAllModulesList();
610 641  
611   -
612 642 // get exported image detail
613 643 userInfo.UserExportImageDetail = getExportedImageDetail(userInfo.LicenseId);
614 644  
615   - // insert login details
616   - objDBModel.InsertSiteLoginDetails(strAcccountNumber, strSiteIP, strEdition);
617   -
618   - }
619   - else
620   - {
621   - userInfo.LoginFailureCauseId = ErrorHelper.LICENSE_INACTIVE;
  645 + // insert login details
  646 + objDBModel.InsertSiteLoginDetails(strAcccountNumber, strSiteIP, strEdition);
622 647 }
  648 +
  649 +
623 650 }
624 651 else
625 652 {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
... ... @@ -17,7 +17,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
17 17 'width': 0,
18 18 'height': 0,
19 19 'minimised': false,
20   - 'maximised': false,
  20 + 'maximised': true,
21 21 'minmaxAutoEvent':true,
22 22  
23 23 };
... ... @@ -356,9 +356,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
356 356 $scope.Set3DwindowStoreData(windowviewid, 'currentViewTitle', ThreeDTitle);
357 357 localStorage.setItem("currentViewTitle", ThreeDTitle);
358 358  
359   - var isMaximize = $scope.ThreeDOpenInOtherModules.maximised;
360   - var isMinimize = $scope.ThreeDOpenInOtherModules.minimised;
361   -
  359 + var isMaximize = $scope.ThreeDOpenInOtherModules.maximised!=undefined?$scope.ThreeDOpenInOtherModules.maximised:false;
  360 + var isMinimize = $scope.ThreeDOpenInOtherModules.minimised!=undefined?$scope.ThreeDOpenInOtherModules.minimised:false;
  361 +
362 362 $scope.Set3DwindowStoreData(windowviewid, 'maximised', isMaximize);
363 363 $scope.Set3DwindowStoreData(windowviewid, 'minimised', isMinimize);
364 364 if($location.url()== "/curriculum-builder-detail") {
... ... @@ -421,7 +421,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
421 421 }
422 422 else {
423 423 $scope.jsPanelWidth = $(window).outerWidth() - 20;
424   - $scope.jsPanelHeight = $(window).outerHeight() - 105;
  424 + $scope.jsPanelHeight = $(window).outerHeight() - 90;
425 425 $scope.jsPanelLeft = 1;
426 426 $scope.jsPanelTop = 70;
427 427 }
... ... @@ -435,7 +435,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
435 435 theme: 'success',
436 436 currentController: '3dAController',
437 437 parentSlug: $scope.Get3DwindowStoreData(windowviewid, 'parentSlugName'),
438   - content: '<div class="col-sm-12" style="height: 100%;overflow: scroll;" >' +
  438 + content: '<div style="height: 100%;overflow: scroll;" >' +
439 439 '<object data="' + Selected3DImagePath + '" width="100%" height="100%" type="image/svg+xml" id="threedImage_' + windowviewid + '" onload="AnimationOnLoad(event)"></object>' +
440 440 '</div><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {var threeDivWidth = $("#ThreeDView").css("width");$("#ThreeDView").css({"left":"0px","width":"100%","min-idth": threeDivWidth}); var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#ThreeDImagePanel_' + windowviewid + '").css("width", "100%"); }});</script>',
441 441 title: tittle,
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... ... @@ -16,8 +16,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
16 16 };
17 17  
18 18  
19   - $scope.numPerImage = 100;
20   - $scope.maxSize = 5;
  19 + $scope.numPerImage = 108;
  20 + $scope.maxSize = 10;
21 21 $scope.totalimage =0;
22 22  
23 23 $scope.numPages = function () {
... ... @@ -77,7 +77,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
77 77 'width': 0,
78 78 'height': 0,
79 79 'minimised': false,
80   - 'maximised': false,
  80 + 'maximised': true,
81 81 'minmaxAutoEvent':true,
82 82 'annotationData':{shapeStates:[],paintCanvasState:[]},
83 83 };
... ... @@ -223,11 +223,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
223 223 if (windowviewid == undefined)
224 224 windowviewid = $rootScope.MULTI_VIEW_ID;
225 225 $scope.DisableUI();
226   - $scope.activeTab = tabToSet;
  226 +
  227 + if(tabToSet=="" ||tabToSet==undefined)
  228 + {
  229 + $scope.activeTab=1;
  230 + }
  231 + else
  232 + {
  233 + $scope.activeTab = tabToSet;
  234 + }
227 235  
228 236 var pretab = $rootScope.getLocalStorageValue("currentAITabView");
229 237  
230   - if (pretab != tabToSet) {
  238 + if (pretab != $scope.activeTab) {
231 239 $scope.currentPage = 1;
232 240 localStorage.setItem("currentpage", $scope.currentPage);
233 241 }
... ... @@ -240,7 +248,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
240 248 var searchText = $rootScope.getLocalStorageValue("SearchText");
241 249 var SearchByAlphabet = $rootScope.getLocalStorageValue("SearchByAlphabet");
242 250 $scope.hiderow = false;
243   - if (tabToSet == 2) {
  251 + if ($scope.activeTab == 2) {
244 252 var curSelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId");
245 253 $('#' + $rootScope.getLocalStorageValue("currentAIImageId")).addClass("selected");
246 254  
... ... @@ -494,9 +502,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
494 502 .select().slice(0, $scope.numPerImage);
495 503  
496 504 $('#grid-view').empty();
497   - var $e1 = $('<ul><li ng-repeat="value in selectedAIListViewData" class="col-sm-3 col-lg-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">'
  505 + var $e1 = $('<ul style="padding-left:0px"><li ng-repeat="value in selectedAIListViewData" class="col-sm-3 col-lg-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">'
498 506 + '<div class="thumbnail" ><a href="#">'
499   - + '<img class="tinyImg" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >'
  507 + + '<img class="tinyImg" style="height:100px !important" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >'
500 508 + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view');
501 509 $compile($e1)($scope);
502 510  
... ... @@ -508,10 +516,42 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
508 516  
509 517 }, 100);
510 518  
511   - $timeout(function () { $scope.EnableUI(); }, 500);
  519 + $timeout(function () {
  520 + $scope.EnableUI();
  521 + $scope.ResetGridListLength();
  522 + }, 500);
512 523  
513 524 }
514 525  
  526 +
  527 + $scope.ResetGridListLength=function()
  528 + {
  529 + var $ua = navigator.userAgent;
  530 +
  531 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  532 +
  533 + if(screen.height<=768)
  534 + {
  535 + $('#grid-view').css({"height":"505","overflow":"scroll"});
  536 + $('#ListViewDiv').css({"height":"260","overflow":"scroll"});
  537 + }
  538 + else if(screen.height<=1024)
  539 + {
  540 + $('#grid-view').css({"height":"720","overflow":"scroll"});
  541 + $('#ListViewDiv').css({"height":"480","overflow":"scroll"});
  542 + }
  543 + else
  544 + {
  545 + $('#grid-view').css({"height":"950","overflow":"scroll"});
  546 + $('#ListViewDiv').css({"height":"850","overflow":"scroll"});
  547 + }
  548 + }
  549 + else
  550 + {
  551 + $('#grid-view').css({"height":"690","overflow":"scroll"});
  552 + $('#ListViewDiv').css({"height":"450","overflow":"scroll"});
  553 + }
  554 + }
515 555 $scope.IsVisible = function () {
516 556 $scope.scroll();
517 557  
... ... @@ -720,9 +760,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
720 760 .select().slice(0, $scope.numPerImage);
721 761  
722 762  
723   - var $e1 = $('<ul><li ng-repeat="value in searchAIImageViewData" class="col-sm-3 col-lg-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">'
  763 + var $e1 = $('<ul style="padding-left:0px"><li ng-repeat="value in searchAIImageViewData" class="col-sm-3 col-lg-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">'
724 764 + '<div class="thumbnail" ><a href="#">'
725   - + '<img class="tinyImg" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >'
  765 + + '<img class="tinyImg" style="height:100px !important" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >'
726 766 + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view');
727 767 $compile($e1)($scope);
728 768  
... ... @@ -747,7 +787,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
747 787 localStorage.setItem("SearchText", '');
748 788 }
749 789  
750   - $timeout(function () { $scope.EnableUI(); }, 500);
  790 + $timeout(function () {
  791 + $scope.EnableUI();
  792 + $scope.ResetGridListLength();
  793 + }, 500);
751 794  
752 795 }
753 796  
... ... @@ -862,11 +905,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
862 905 .orderBy([{ field: '_Title', sort: 'asc' }])
863 906 .select().slice(0, $scope.numPerImage);
864 907  
865   - var $e1 = $('<ul><li ng-repeat="value in searchAIImageViewData" class="col-sm-3 col-lg-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">'
  908 + var $e1 = $('<ul style="padding-left:0px"><li ng-repeat="value in searchAIImageViewData" class="col-sm-3 col-lg-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">'
866 909 + '<div class="thumbnail" ><a href="#">'
867   - + '<img class="tinyImg" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >'
  910 + + '<img class="tinyImg" style="height:100px !important" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >'
868 911 + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view');
869 912 $compile($e1)($scope);
  913 +
870 914 }
871 915 else
872 916 {
... ... @@ -887,9 +931,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
887 931 $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>');
888 932 }
889 933  
890   - $timeout(function () { $scope.EnableUI(); }, 500);
  934 + $timeout(function () {
  935 + $scope.EnableUI();
  936 + $scope.ResetGridListLength();
  937 + }, 500);
891 938 }
892 939  
  940 +
893 941 $scope.scroll = function () {
894 942 //$("html,body").scrollTop(0);
895 943 }
... ... @@ -1057,8 +1105,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1057 1105 $scope.SetAIwindowStoreData(windowviewid, 'currentViewTitle', aiTitle);
1058 1106 localStorage.setItem("currentViewTitle", aiTitle);
1059 1107  
1060   - var isMaximize = $scope.aiOpenInOtherModules.maximised;
1061   - var isMinimize = $scope.aiOpenInOtherModules.minimised;
  1108 + var isMaximize = $scope.aiOpenInOtherModules.maximised!=undefined?$scope.aiOpenInOtherModules.maximised:false;
  1109 + var isMinimize = $scope.aiOpenInOtherModules.minimised!=undefined?$scope.aiOpenInOtherModules.minimised:false;
  1110 +
1062 1111 $scope.SetAIwindowStoreData(windowviewid, 'maximised', isMaximize);
1063 1112 $scope.SetAIwindowStoreData(windowviewid, 'minimised', isMinimize);
1064 1113  
... ... @@ -1120,9 +1169,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1120 1169 }
1121 1170 else {
1122 1171 $scope.jsPanelWidth = $(window).innerWidth() - 30;
1123   - $scope.jsPanelHeight = $(window).innerHeight() - 150;
  1172 + $scope.jsPanelHeight =$(window).innerHeight() - 150;
1124 1173 $scope.jsPanelLeft = 15;
1125 1174 $scope.jsPanelTop = 70;
  1175 +
1126 1176 }
1127 1177  
1128 1178 if (selectedAIImage.length > 0) {
... ... @@ -1169,6 +1219,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1169 1219 $scope.SetAIwindowStoreData(windowviewid, 'minimised',false);
1170 1220 var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height();
1171 1221 $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5);
  1222 +
1172 1223 },
1173 1224 onnormalized:function (panel) {
1174 1225 var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent');
... ... @@ -1180,7 +1231,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1180 1231 $scope.SetAIwindowStoreData(windowviewid, 'maximised',false);
1181 1232 var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height();
1182 1233 $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5);
1183   - },
  1234 + },
1184 1235 resizable: {
1185 1236 stop: function (event, ui) {
1186 1237 var len = (event.currentTarget.id).split("_").length;
... ... @@ -1228,10 +1279,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1228 1279 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
1229 1280 var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height();
1230 1281 // console.log($rootScope.OpenAdamImages);
1231   - $('#AIView').css("height", $(window).innerHeight()-100);
1232   -
1233   - $('#AIView').css("width",$(window).innerWidth()-100);
1234   -
  1282 + if (!$rootScope.isCallFromOtherModule) {
  1283 + $('#AIView').css("height", $(window).innerHeight()-100);
  1284 + $('#AIView').css("width",$(window).innerWidth()-100);
  1285 + }
  1286 +
1235 1287 $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5);
1236 1288  
1237 1289 if (!$rootScope.isCallFromOtherModule) {
... ... @@ -1328,8 +1380,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1328 1380 $rootScope.resetMenuOption();
1329 1381  
1330 1382 //remove pre event
1331   - $("#aiImagePanel_" + windowviewid).off("click");
1332   -
  1383 + // $("#aiImagePanel_" + windowviewid).off("click");
  1384 +
1333 1385 $("#aiImagePanel_" + windowviewid).on('click', function (event) {
1334 1386 //after drawing annotation click not work on iPad/Android device
1335 1387 var pnlName = event.currentTarget.id;
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -21,8 +21,24 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
21 21 };
22 22  
23 23 $scope.setActiveTab = function (tabToSet) {
24   - $scope.activeTab = tabToSet;
  24 + if(tabToSet=="" ||tabToSet==undefined)
  25 + {
  26 + $scope.activeTab=1;
  27 + }
  28 + else
  29 + {
  30 + $scope.activeTab = tabToSet;
  31 + }
25 32 localStorage.setItem("currentCATabView", $scope.activeTab);
  33 + if ($scope.activeTab == 1) {
  34 + $('#grid-view').css("display", "block");
  35 + $('#list-view').css("display", "none");
  36 + }
  37 + else {
  38 +
  39 + $('#grid-view').css("display", "none");
  40 + $('#list-view').css("display", "block");
  41 + }
26 42 };
27 43  
28 44 $scope.ObjectAttribute=function(windowviewid)
... ... @@ -47,7 +63,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
47 63 'width': 0,
48 64 'height': 0,
49 65 'minimised': false,
50   - 'maximised': false,
  66 + 'maximised': true,
51 67 'minmaxAutoEvent':true,
52 68 };
53 69 return windata;
... ... @@ -143,6 +159,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
143 159 $scope.loadAIModuleById = function (moduleId) {
144 160 //added by birendra
145 161 //direct open CA module
  162 + var curtab = $rootScope.getLocalStorageValue("currentCATabView");
  163 + $scope.setActiveTab(curtab)
146 164 if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null)
147 165 {
148 166 if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="")
... ... @@ -281,7 +299,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
281 299 if (AnimationData.length>0) {
282 300 $scope.stopIntervalCA();
283 301 if (curtab == 2) {
284   - $scope.setActiveTab(2);
285 302 var curSelectedRowId = $rootScope.getLocalStorageValue("CASelectedRowId");
286 303 if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') {
287 304 $scope.reRunSearchOnLoad($rootScope.MULTI_VIEW_ID);
... ... @@ -294,7 +311,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
294 311 }
295 312 }
296 313 else {
297   - $scope.setActiveTab(1);
298 314 $scope.reRunSearchOnLoad($rootScope.MULTI_VIEW_ID);
299 315 }
300 316 }
... ... @@ -385,10 +401,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
385 401 angular.forEach($scope.selectedCAListViewData, function (value, key) {
386 402 var imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage;
387 403  
388   -
389 404 var $el = $('<div id="' + value._id + '" class="col-sm-3 col-lg-2" title = "'+ value._Title + '" data-ng-click="openView($event)">'
390 405 + '<div class="thumbnail" ><a href="#">'
391   - + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + imagePath + '" alt="" title="" >'
  406 + + '<img class="tinyImg" style="height:160px !important; width:100%!important" id="' + value._Title + '" ng-src="' + imagePath + '" alt="" title="" >'
392 407 + '<div class="caption" style="padding:0px"><p>'+'('+ value._id+') ' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view');
393 408  
394 409 $compile($el)($scope);
... ... @@ -404,14 +419,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
404 419 $timeout(function () {
405 420 if ($rootScope.getLocalStorageValue('CAGridViewScroll') !== null && $location.url() == "/clinical-animations") {
406 421  
407   - $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CAGridViewScroll') }, 'slow');
  422 + $("#grid-view").animate({ scrollTop: $rootScope.getLocalStorageValue('CAGridViewScroll') }, 'slow');
408 423 }
409 424 },
410 425 200);
411 426  
412 427  
413 428 $timeout(function () {
414   - $scope.EnableUI();
  429 + $scope.EnableUI();
  430 + $scope.ResetGridListLength();
415 431 }, 400);
416 432  
417 433 }
... ... @@ -497,28 +513,31 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
497 513  
498 514 $scope.SetCAwindowStoreData(windowviewid, 'searchCAListViewData', []);
499 515  
500   - //while ($scope.searchCAListViewData.length) {
501   - // $scope.searchCAListViewData.pop();
502   - //}
503   -
504 516 if ($rootScope.getLocalStorageValue("currentCATabView") == 2) {
505 517 localStorage.setItem("CASelectedRowId", "");
506 518 $scope.hiderow = false;
507 519 }
508   -
509   - $scope.loadAllCA(windowviewid);
  520 + setTimeout(function(){
  521 + $scope.loadAllCA(windowviewid);
  522 + },200)
  523 +
510 524  
511 525 }
512 526  
513   - // for "Intracytoplasmic sperm injection (ICSI)" case, the Body region is not required so we have added "_BodyRegion": "None" which was actually not available in origincal flex file.
514   - $scope.ApplySearch = function (query, windowviewid) {
515   -
  527 + $scope.ApplySearch = function (query, windowviewid) {
  528 + $scope.DisableUI();
516 529 if (windowviewid == undefined) {
517 530 windowviewid = $rootScope.MULTI_VIEW_ID;
518 531 }
519 532  
520   - $scope.DisableUI();
  533 + setTimeout(function(){
  534 + $scope.FilterSearch(query, windowviewid)
  535 + },200)
  536 +
  537 + }
521 538  
  539 + // for "Intracytoplasmic sperm injection (ICSI)" case, the Body region is not required so we have added "_BodyRegion": "None" which was actually not available in origincal flex file.
  540 + $scope.FilterSearch = function (query, windowviewid) {
522 541 $scope.filterstring = true;
523 542  
524 543 $scope.SetCAwindowStoreData(windowviewid, 'searchCAListViewData', []);
... ... @@ -603,7 +622,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
603 622  
604 623 var $el = $('<div id="' + value._id + '" class="col-sm-3 col-lg-2" title = "' + value._Title + '" data-ng-click="openView($event)">'
605 624 + '<div class="thumbnail" ><a href="#">'
606   - + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >'
  625 + + '<img class="tinyImg" style="height:160px !important;width:100%!important" id="' + value._Title + '" ng-src="' + $scope.imagePath + '" alt="" title="" >'
607 626 + '<div class="caption"><p>'+'('+ value._id+')</p><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view');
608 627  
609 628  
... ... @@ -646,9 +665,40 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
646 665 $('#ListViewDiv').append('<tr id="searchAnimation"><td colspan="3"><strong style="color:black;">No animation found for the selected search criteria!</strong></td></tr>');
647 666 }
648 667  
649   - $timeout(function () { $scope.EnableUI(); }, 500);
  668 + $timeout(function () {
  669 + $scope.EnableUI();
  670 + $scope.ResetGridListLength();
  671 + }, 500);
650 672 }
651 673  
  674 + $scope.ResetGridListLength=function()
  675 + {
  676 + var $ua = navigator.userAgent;
  677 +
  678 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  679 +
  680 + if(screen.height<=768)
  681 + {
  682 + $('#grid-view').css({"height":"535","overflow":"scroll"});
  683 + $('#ListViewDiv').css({"height":"290","overflow":"scroll"});
  684 + }
  685 + else if(screen.height<=1024)
  686 + {
  687 + $('#grid-view').css({"height":"780","overflow":"scroll"});
  688 + $('#ListViewDiv').css({"height":"530","overflow":"scroll"});
  689 + }
  690 + else
  691 + {
  692 + $('#grid-view').css({"height":"950","overflow":"scroll"});
  693 + $('#ListViewDiv').css({"height":"880","overflow":"scroll"});
  694 + }
  695 + }
  696 + else
  697 + {
  698 + $('#grid-view').css({"height":"720","overflow":"scroll"});
  699 + $('#ListViewDiv').css({"height":"480","overflow":"scroll"});
  700 + }
  701 + }
652 702 $scope.scroll = function () {
653 703 $("html,body").scrollTop(0);
654 704 }
... ... @@ -715,7 +765,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
715 765 $scope.SetCAwindowStoreData(windowviewid, 'clickedCASummary', clickedCASummary);
716 766 $scope.SetCAwindowStoreData(windowviewid, 'hostedFolderId', hostedFolderId);
717 767  
718   - var CAGridViewScrollPosition = $($window).scrollTop();
  768 + var CAGridViewScrollPosition = $("#grid-view").scrollTop();
719 769 localStorage.setItem('CAGridViewScroll', CAGridViewScrollPosition);
720 770 var u = $location.url();
721 771 $location.url('/clinical-animations-detail');
... ... @@ -828,8 +878,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
828 878 $scope.SetCAwindowStoreData(windowviewid, 'currentViewTitle', ciTitle);
829 879 localStorage.setItem("currentViewTitle", ciTitle);
830 880  
831   - var isMaximize = $scope.caOpenInOtherModules.maximised;
832   - var isMinimize = $scope.caOpenInOtherModules.minimised;
  881 + var isMaximize = $scope.caOpenInOtherModules.maximised!=undefined?$scope.caOpenInOtherModules.maximised:false;
  882 + var isMinimize = $scope.caOpenInOtherModules.minimised!=undefined?$scope.caOpenInOtherModules.minimised:false;
  883 +
833 884 $scope.SetCAwindowStoreData(windowviewid, 'maximised', isMaximize);
834 885 $scope.SetCAwindowStoreData(windowviewid, 'minimised', isMinimize);
835 886  
... ... @@ -890,7 +941,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
890 941 if ($rootScope.isCallFromOtherModule) {
891 942 if($rootScope.linkToOpenCa==true)
892 943 {
893   - $scope.jsPanelWidth = $(window).outerWidth() - 20;
  944 + $scope.jsPanelWidth = $(window).outerWidth() - 10;
894 945 $scope.jsPanelHeight = $(window).outerHeight() - 105;
895 946 $scope.jsPanelLeft = 1;
896 947 $scope.jsPanelTop = 70;
... ... @@ -922,7 +973,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
922 973  
923 974 }
924 975 else {
925   - $scope.jsPanelWidth = $(window).outerWidth() - 20;
  976 + $scope.jsPanelWidth = $(window).outerWidth()-30;
926 977 $scope.jsPanelHeight = $(window).outerHeight() - 105;
927 978 $scope.jsPanelLeft = 1;
928 979 $scope.jsPanelTop = 70;
... ... @@ -1113,7 +1164,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1113 1164 $rootScope.resetMenuOption();
1114 1165 // call from while open module in CB
1115 1166 //remove pre event
1116   - $("#caImagePanel_" + windowviewid).off("click");
  1167 + // $("#caImagePanel_" + windowviewid).off("click");
1117 1168  
1118 1169 $("#caImagePanel_" + windowviewid).on('click', function (event) {
1119 1170 //after drawing annotation click not work on iPad/Android device
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... ... @@ -32,8 +32,25 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
32 32 //************************************
33 33  
34 34 $scope.setActiveTab = function (tabToSet) {
35   - $scope.activeTab = tabToSet;
  35 + if(tabToSet=="" ||tabToSet==undefined)
  36 + {
  37 + $scope.activeTab=1;
  38 + }
  39 + else
  40 + {
  41 + $scope.activeTab = tabToSet;
  42 + }
36 43 localStorage.setItem("currentCITabView", $scope.activeTab);
  44 +
  45 + if ($scope.activeTab == 1) {
  46 + $('#grid-view').css("display", "block");
  47 + $('#list-view').css("display", "none");
  48 + }
  49 + else {
  50 +
  51 + $('#grid-view').css("display", "none");
  52 + $('#list-view').css("display", "block");
  53 + }
37 54 };
38 55  
39 56 $scope.ObjectAttribute=function(windowviewid)
... ... @@ -56,7 +73,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
56 73 'width': 0,
57 74 'height': 0,
58 75 'minimised': false,
59   - 'maximised': false,
  76 + 'maximised': true,
60 77 'minmaxAutoEvent':true,
61 78 'annotationData':{shapeStates:[],paintCanvasState:[]},
62 79  
... ... @@ -216,6 +233,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
216 233 $rootScope.currentActiveModuleTitle = selectedModuleName;
217 234 })
218 235  
  236 + var curtab = $rootScope.getLocalStorageValue("currentCITabView");
  237 + $scope.setActiveTab(curtab)
  238 +
219 239 $scope.SetCIwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "Clinical Illustrations");
220 240  
221 241 $scope.LoadCIJsonData($rootScope.MULTI_VIEW_ID);
... ... @@ -240,7 +260,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
240 260 if (IllustrationData.length>0) {
241 261 $scope.stopIntervalCI();
242 262 if (curtab == 2) {
243   - $scope.setActiveTab(2);
244 263 var curSelectedRowId = $rootScope.getLocalStorageValue("CISelectedRowId");
245 264 if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') {
246 265 $scope.reRunSearchOnLoad($rootScope.MULTI_VIEW_ID);
... ... @@ -253,7 +272,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
253 272 }
254 273 }
255 274 else {
256   - $scope.setActiveTab(1);
257 275 $scope.reRunSearchOnLoad($rootScope.MULTI_VIEW_ID);
258 276 }
259 277 }
... ... @@ -317,12 +335,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
317 335  
318 336  
319 337 if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedorientation == "" && $scope.query.selectedimagetype == "" && $scope.query.selectedspecialty == "") {
320   - $scope.loadAllCI(windowviewid);
  338 + $scope.loadAllCI(windowviewid);
321 339 }
322 340 else {
323 341 $scope.ApplySearch($scope.query, windowviewid);
324 342 }
325   -
326 343 }
327 344  
328 345 $scope.LoadCIJsonData = function (windowviewid) {
... ... @@ -352,26 +369,35 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
352 369 };
353 370  
354 371 $scope.loadAllCI = function (windowviewid) {
355   -
  372 +
356 373 $scope.selectedCIListViewData = $scope.GetCIwindowStoreData(windowviewid, 'IllustrationData');
357 374  
358 375 $('#grid-view').empty();
359   - var $e1 = $('<ul><li ng-repeat="value in selectedCIListViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" data-ng-click="openView($event)">'
360   - + '<div class="thumbnail" ><a href="#">'
361   - + '<img id="{{value._Title}}" ng-src="~/../content/images/ci/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >'
362   - + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view');
363   - $compile($e1)($scope);
  376 + angular.forEach($scope.selectedCIListViewData, function (value, key) {
  377 +
  378 + $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage;
  379 + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-lg-2" title = "' + value._Title + '" data-ng-click="openView($event)">'
  380 + + '<div class="thumbnail" ><a href="#">'
  381 + + '<img class="tinyImg" style="height:100px !important" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >'
  382 + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view');
364 383  
  384 +
  385 + $compile($el)($scope);
  386 + });
  387 +
365 388 $timeout(function ()
366 389 {
367 390 $('#' + $rootScope.getLocalStorageValue("currentImageId")).find('.thumbnail').addClass('HightLightThumbnail');
368 391 if ($rootScope.getLocalStorageValue('CIGridViewScroll') !== null && $location.url() == "/clinical-illustrations") {
369   - $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CIGridViewScroll') });
  392 + $("#grid-view").animate({ scrollTop: $rootScope.getLocalStorageValue('CIGridViewScroll') });
370 393 }
371 394 }, 100);
372 395  
373 396  
374   - $timeout(function () { $scope.EnableUI(); }, 400);
  397 + $timeout(function () {
  398 + $scope.EnableUI();
  399 + $scope.ResetGridListLength();
  400 + }, 400);
375 401  
376 402 }
377 403  
... ... @@ -460,19 +486,25 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
460 486 $scope.filterstring = false;
461 487  
462 488 $scope.SetCIwindowStoreData(windowviewid, 'searchCIListViewData', []);
463   - $scope.DisableUI();
464   - $scope.loadAllCI(windowviewid);
465   -
466   - }
467 489  
468   - $scope.ApplySearch = function (query, windowviewid) {
  490 + setTimeout(function(){
  491 + $scope.loadAllCI(windowviewid);
  492 + },200)
469 493  
  494 + }
  495 + $scope.ApplySearch = function (query, windowviewid) {
  496 + $scope.DisableUI();
470 497 if (windowviewid == undefined) {
471 498 windowviewid = $rootScope.MULTI_VIEW_ID;
472 499 }
473 500  
474   - $scope.DisableUI();
475   -
  501 + setTimeout(function(){
  502 + $scope.FilterSearch(query, windowviewid)
  503 + },200)
  504 +
  505 + }
  506 + $scope.FilterSearch = function (query, windowviewid) {
  507 +
476 508 $scope.filterstring = true;
477 509  
478 510 $scope.SetCIwindowStoreData(windowviewid, 'searchCIListViewData', []);
... ... @@ -607,9 +639,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
607 639  
608 640 $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage;
609 641  
610   - var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">'
  642 + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-lg-2" title = "' + value._Title + '" data-ng-click="openView($event)">'
611 643 + '<div class="thumbnail" ><a href="#">'
612   - + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >'
  644 + + '<img class="tinyImg" style="height:100px !important" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >'
613 645 + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view');
614 646  
615 647  
... ... @@ -639,6 +671,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
639 671  
640 672 }
641 673 });
  674 +
642 675 $('table > #ListViewDiv > #searchItem').remove();
643 676 $scope.SetCIwindowStoreData(windowviewid, 'searchCIListViewData', cilistviewdata);
644 677  
... ... @@ -652,9 +685,40 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
652 685 $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>');
653 686 }
654 687  
655   - $timeout(function () { $scope.EnableUI(); }, 400);
  688 + $timeout(function () {
  689 + $scope.EnableUI();
  690 + $scope.ResetGridListLength();
  691 + }, 400);
656 692 }
657 693  
  694 + $scope.ResetGridListLength=function()
  695 + {
  696 + var $ua = navigator.userAgent;
  697 +
  698 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  699 +
  700 + if(screen.height<=768)
  701 + {
  702 + $('#grid-view').css({"height":"535","overflow":"scroll"});
  703 + $('#ListViewDiv').css({"height":"290","overflow":"scroll"});
  704 + }
  705 + else if(screen.height<=1024)
  706 + {
  707 + $('#grid-view').css({"height":"720","overflow":"scroll"});
  708 + $('#ListViewDiv').css({"height":"480","overflow":"scroll"});
  709 + }
  710 + else
  711 + {
  712 + $('#grid-view').css({"height":"950","overflow":"scroll"});
  713 + $('#ListViewDiv').css({"height":"880","overflow":"scroll"});
  714 + }
  715 + }
  716 + else
  717 + {
  718 + $('#grid-view').css({"height":"720","overflow":"scroll"});
  719 + $('#ListViewDiv').css({"height":"480","overflow":"scroll"});
  720 + }
  721 + }
658 722  
659 723 $scope.scroll = function () {
660 724 $("html,body").scrollTop(0);
... ... @@ -722,7 +786,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
722 786 $rootScope.StoreOrgImageName(imageName);
723 787  
724 788 //Set the vertical scroll value of the Grid-View.
725   - var y = $($window).scrollTop();
  789 + var y = $("#grid-view").scrollTop();
726 790 localStorage.setItem("CIGridViewScroll", y);
727 791 var u = $location.url();
728 792 $location.url('/clinical-illustrations-detail');
... ... @@ -827,9 +891,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
827 891 var ciTitle = $scope.ciOpenInOtherModules.anatomyTitle;
828 892 $scope.SetCIwindowStoreData(windowviewid, 'currentViewTitle', ciTitle);
829 893 localStorage.setItem("currentViewTitle", ciTitle);
  894 + var isMaximize = $scope.ciOpenInOtherModules.maximised!=undefined?$scope.ciOpenInOtherModules.maximised:false;
  895 + var isMinimize = $scope.ciOpenInOtherModules.minimised!=undefined?$scope.ciOpenInOtherModules.minimised:false;
830 896  
831   - var isMaximize = $scope.ciOpenInOtherModules.maximised;
832   - var isMinimize = $scope.ciOpenInOtherModules.minimised;
833 897 $scope.SetCIwindowStoreData(windowviewid, 'maximised', isMaximize);
834 898 $scope.SetCIwindowStoreData(windowviewid, 'minimised', isMinimize);
835 899  
... ... @@ -892,8 +956,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
892 956  
893 957 }
894 958 else {
895   - $scope.jsPanelWidth = $(window).outerWidth() - 5;
896   - $scope.jsPanelHeight = $(window).outerHeight() - 140;
  959 + $scope.jsPanelWidth = $(window).outerWidth() - 30;
  960 + $scope.jsPanelHeight = $(window).outerHeight() - 150;
897 961 $scope.jsPanelLeft = 15;
898 962 $scope.jsPanelTop = 70;
899 963 }
... ... @@ -907,12 +971,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
907 971 content:'<div>'+
908 972 ' <div class="container-fluid">'+
909 973 ' <div class="row">'+
910   - '<div class="img-thumbnail" style="overflow: hidden;width:100%;position:relative" id="canvasDivCI_' + windowviewid + '"> <canvas id="canvasPaintCI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2270" height="700" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasCI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2270" height="700" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' +
  974 + '<div class="img-thumbnail" style="overflow: scroll;width:100%;position:relative" id="canvasDivCI_' + windowviewid + '"> <canvas id="canvasPaintCI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2270" height="700" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasCI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2270" height="700" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' +
911 975 //'<div class="col-sm-12 img-thumbnail" align="center">' +
912 976 '<img id="ciimage_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden">' +
913 977 '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;bottom:0px;margin-bottom:0px;padding:5px;width:100%">' +
914 978 '<div id="sid_' + windowviewid + '" align="left" style="height:100px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' +
915   - '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCI(event);});});</script></div>' +
  979 + '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { $(".jsPanel-content").css({ "width": "100%"});$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCI(event);});});</script></div>' +
916 980 '</div>'+
917 981 '</div></div></div>',
918 982 title: tittle,
... ... @@ -1011,12 +1075,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1011 1075  
1012 1076  
1013 1077 $scope.SetCIwindowStoreData(windowviewid, 'currentSlug', 'clinical-illustrations-detail');
1014   - $timeout(function () {
1015   -
  1078 + $timeout(function () {
1016 1079 var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height();
1017   -
  1080 +
1018 1081 $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight);
1019   -
  1082 +
1020 1083 if (!$rootScope.isCallFromOtherModule) {
1021 1084 $('#CIView').css("height", $(window).outerHeight() - 65);
1022 1085 $('#CIView').css("width", $(window).outerWidth() - 15);
... ... @@ -1148,7 +1211,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1148 1211 //call when module loaded
1149 1212 $rootScope.resetMenuOption();
1150 1213 //remove pre event
1151   - $("#ciImagePanel_" + windowviewid).off("click");
  1214 + //$("#ciImagePanel_" + windowviewid).off("click");
1152 1215  
1153 1216 $("#ciImagePanel_" + windowviewid).on('click', function (event) {
1154 1217 //after drawing annotation click not work on iPad/Android device
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -37,8 +37,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
37 37 }
38 38 else
39 39 {
40   - $("#treecontent").css('height',screen.height-250);
41   - $("#cbdivarea").css('height',screen.height-180);
  40 + $("#treecontent").css('height',screen.height-280);
  41 + $("#cbdivarea").css('height',screen.height-210);
42 42 }
43 43  
44 44 $('#sidebar-wrapper').unbind('click');
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -7,7 +7,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7 7  
8 8 // common field data
9 9 $rootScope.path = "~/../content/images/speeachBubbleClose.png";
10   - $rootScope.modestyCanvasZindex = 12100;
11 10 $scope.IsSearchVisible;
12 11 $scope.bodyViews = {
13 12 'Anterior': '1',
... ... @@ -133,7 +132,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
133 132 'width': 0,
134 133 'height': 0,
135 134 'minimised': false,
136   - 'maximised': false,
  135 + 'maximised': true,
137 136 'minmaxAutoEvent':true,
138 137 'id': 0,
139 138 'moduleName': 'DISSECTIBLE_ANATOMY',
... ... @@ -755,8 +754,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
755 754 //// one layer down as compare to current running on production
756 755 $scope.SetwindowStoreData(windowviewid, 'layerNumber', $scope.daOpenInOtherModules.layerNumber - 1);
757 756  
758   - var isMaximize = $scope.daOpenInOtherModules.maximised;
759   - var isMinimize = $scope.daOpenInOtherModules.minimised;
  757 + var isMaximize = $scope.daOpenInOtherModules.maximised!=undefined?$scope.daOpenInOtherModules.maximised:false;
  758 + var isMinimize = $scope.daOpenInOtherModules.minimised!=undefined?$scope.daOpenInOtherModules.minimised:false;
  759 +
760 760 $scope.SetwindowStoreData(windowviewid, 'maximised', isMaximize);
761 761 $scope.SetwindowStoreData(windowviewid, 'minimised', isMinimize);
762 762 $scope.SetwindowStoreData(windowviewid, 'moduleName', "DISSECTIBLE_ANATOMY");
... ... @@ -943,7 +943,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
943 943 }
944 944 else {
945 945 $scope.jsPanelWidth = $(window).outerWidth() - 20;
946   - $scope.jsPanelHeight = $(window).outerHeight() - 140;
  946 + $scope.jsPanelHeight = $(window).outerHeight() - 143;
947 947 $scope.jsPanelLeft = 1;
948 948 $scope.jsPanelTop = 70;
949 949 }
... ... @@ -985,13 +985,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
985 985 }
986 986 $scope.SetwindowStoreData(windowviewid, 'maximised',true);
987 987 $scope.SetwindowStoreData(windowviewid, 'minimised',false);
988   - if ($rootScope.isCallFromOtherModule) {
989   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-95;
990   - }
991   - else
992   - {
993   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-70;
994   - }
  988 + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
  989 +
995 990 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
996 991 },
997 992 onnormalized:function (panel) {
... ... @@ -1002,13 +997,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1002 997 }
1003 998 $scope.SetwindowStoreData(windowviewid, 'minimised',false);
1004 999 $scope.SetwindowStoreData(windowviewid, 'maximised',false);
1005   - if ($rootScope.isCallFromOtherModule) {
1006   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-95;
1007   - }
1008   - else
1009   - {
1010   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-70;
1011   - }
  1000 + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
  1001 +
1012 1002 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
1013 1003 },
1014 1004 resizable: {
... ... @@ -1017,14 +1007,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1017 1007 var windowviewid = (event.currentTarget.id).split("_")[len - 1];
1018 1008 $scope.SetwindowStoreData(windowviewid, 'width', ui.size.width);
1019 1009 $scope.SetwindowStoreData(windowviewid, 'height', ui.size.height);
1020   - $rootScope.UnsaveCurriculum = true;
1021   - if ($rootScope.isCallFromOtherModule) {
1022   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-95;
1023   - }
1024   - else
1025   - {
1026   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-70;
1027   - }
  1010 + $rootScope.UnsaveCurriculum = true;
  1011 + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
  1012 +
1028 1013 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
1029 1014 }
1030 1015  
... ... @@ -1173,7 +1158,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1173 1158 $scope.setActiveview(windowviewid,viewtitlename);
1174 1159  
1175 1160 $scope.loadView(windowviewid);
1176   -
  1161 +
1177 1162 }
1178 1163 // 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.
1179 1164 $scope.loadView = function (windowviewid) {
... ... @@ -1197,10 +1182,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1197 1182 $scope.loadDAView = function (currentBodyViewId, windowviewid) {
1198 1183  
1199 1184 //0.4 added some stylesheets
1200   - $('#daBodyview').css("height", (parseInt($(window).outerHeight()) - 62 - 20));
1201   -
1202   - $('#daBodyview').css("width", $(window).outerWidth());
1203   -
  1185 + if (!$rootScope.isCallFromOtherModule) {
  1186 + $('#daBodyview').css("height", (parseInt($(window).outerHeight()) - 82));
  1187 + $('#daBodyview').css("width", $(window).outerWidth());
  1188 + }
  1189 +
1204 1190 $scope.SetwindowStoreData(windowviewid,'voId',currentBodyViewId);
1205 1191 //1. load navigator man first
1206 1192 console.log('before LoadBodyViewNavigatorImage call')
... ... @@ -1254,10 +1240,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1254 1240 $rootScope.resetMenuOption();
1255 1241  
1256 1242 //remove pre event
1257   - $("#daImagePanel_" + windowviewid).off("click");
  1243 + // $("#daImagePanel_" + windowviewid).off("click");
1258 1244  
1259 1245 $("#daImagePanel_" + windowviewid).on('click', function (event) {
1260   -
  1246 +
  1247 + $timeout(function () {
  1248 + $scope.IsSearchVisible=false;
  1249 +
  1250 + }, 200);
  1251 +
1261 1252 var pnlName=event.currentTarget.id;
1262 1253 $rootScope.resetMenuOptionOnClick(pnlName);
1263 1254  
... ... @@ -1267,13 +1258,54 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1267 1258  
1268 1259 $rootScope.StoreTitleName(currentViewTitle);
1269 1260 $scope.LoadImageToExport(windowviewid);
1270   -
  1261 +
  1262 + });
  1263 +
  1264 +
  1265 + $("#termlistfilter_"+windowviewid).scroll(function (event) {
  1266 +
  1267 + $("#termlistfilter_"+windowviewid).focus();
  1268 + $scope.IsSearchVisible=true;
1271 1269 });
  1270 + // register event for search list manager
  1271 + $(document).on("mouseover", "#termlistfilter_"+windowviewid+ " option", function (e) {
  1272 + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').removeAttr("style");
  1273 + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("selected", false);
  1274 + $(this).css("background-color", "#3399FF");
  1275 +
  1276 + $(this).attr("selected", true);
  1277 + $scope.IsSearchVisible=true;
1272 1278  
  1279 + });
  1280 +
  1281 + $('#termlistfilter_'+windowviewid).unbind('keyup');
  1282 + $('#termlistfilter_'+windowviewid).on('keyup', function (event) {
  1283 + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').removeAttr("style");
  1284 + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("selected", false);
  1285 + $(this.selectedOptions[0]).attr("selected", true);
  1286 + $scope.IsSearchVisible=true;
  1287 + });
  1288 +
  1289 + $('#termlistfilter_'+windowviewid).unbind('keypress');
  1290 + $('#termlistfilter_'+windowviewid).on('keypress', function (e) {
  1291 + if ($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id") == "undefined") {
  1292 + return false;
  1293 + }
  1294 + else {
  1295 + if ($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id")) {
  1296 + if (e.keyCode == 13) {
  1297 + onListManagerTermSelection($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id"),false);
  1298 + $scope.IsSearchVisible=false;
  1299 + }
  1300 + }
  1301 + }
  1302 + });
  1303 +
1273 1304 }
1274 1305  
1275 1306 $scope.CanvasDivScroll = function (windowviewid) {
1276 1307 // #7972 Mozilla Firefox> Incorrect navigation
  1308 +
1277 1309 $("#canvasDivDA_"+windowviewid).scroll(function (event) {
1278 1310 var len= (event.currentTarget.id).split("_").length;
1279 1311 var windowviewid = (event.currentTarget.id).split("_")[len-1];
... ... @@ -1285,7 +1317,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1285 1317 var can = $("#canvasDivDA_" + windowviewid);
1286 1318 var canheight = can[0].scrollHeight;
1287 1319 var canwidth = can[0].scrollWidth;
1288   -
  1320 +
1289 1321 var dragDivTop= (candivScrollTop/canheight)*($('#navigatorDiv_' + windowviewid).height());
1290 1322 var dragDivLeft= (candivScrollleft/canwidth)*($('#navigatorDiv_' + windowviewid).width());
1291 1323  
... ... @@ -1486,6 +1518,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1486 1518 $("#searchListDiv").attr("id", "searchListDiv_" + windowviewid);
1487 1519 $scope.searchListDivID = "searchListDiv_" + windowviewid;
1488 1520  
  1521 + $("#termlistfilter").attr("id", "termlistfilter_" + windowviewid);
  1522 +
1489 1523 $("#btnDATermSearch").attr("id", "btnDATermSearch_" + windowviewid);
1490 1524 $("#navigatorBtn").attr("id", "navigatorBtn_" + windowviewid);
1491 1525 $scope.navigatorBtnID = "navigatorBtn_" + windowviewid;
... ... @@ -1549,7 +1583,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1549 1583 $("#Skeletal").attr("id", "Skeletal_" + windowviewid);
1550 1584 $("#Urinary").attr("id", "Urinary_" + windowviewid);
1551 1585  
1552   - var $all = $("#da-input_" +windowviewid).prepend('<input type="text" class="form-control input-sm pull-left da-search" id="typedTermName_' + windowviewid + '" onclick="OnSearch(event)" ondblclick="OnSearch(event)" ng-model="searchFilter" ng-keyup="resetSearchListView($event)" ng-blur="HideSearch()" placeholder=" search..." />')
  1586 + var $all = $("#da-input_" +windowviewid).prepend('<input type="text" class="form-control input-sm pull-left da-search" id="typedTermName_' + windowviewid + '" onclick="OnSearch(event)" ondblclick="OnSearch(event)" ng-model="searchFilter" ng-keyup="resetSearchListView($event)" ng-blur="HideSearch()" placeholder=" search..." autocomplete="off" />')
1553 1587 $compile($all)($scope);
1554 1588  
1555 1589 }
... ... @@ -1618,7 +1652,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1618 1652 $scope.loadListManger(windowviewid);
1619 1653 }
1620 1654 else if ($scope.GetwindowStoreData(windowviewid,'isSearchClicked')) {
1621   - $scope.ShowSearch(windowviewid);
  1655 + $scope.ShowSearch(windowviewid,false);
1622 1656 }
1623 1657  
1624 1658 // terminate search worker instances
... ... @@ -2065,13 +2099,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2065 2099 $scope.SetwindowStoreData(windowviewid,'BodyRegionCordinatesData',[]);
2066 2100 $('#daBodyview').css('width', '100%');
2067 2101  
2068   - if ($rootScope.isCallFromOtherModule) {
2069   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-95;
2070   - }
2071   - else
2072   - {
2073   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-70;
2074   - }
  2102 + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
2075 2103  
2076 2104 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
2077 2105 $('#leftToolBarDA_' + windowviewid).css('height', $('#daImagePanel_' + windowviewid).outerHeight())
... ... @@ -2139,7 +2167,21 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2139 2167 if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0)
2140 2168 {
2141 2169 //first draw shape and then store in object
2142   - $rootScope.LoadCBSavedAnnotation("canvasDA_"+windowviewid,"canvasPaintDA_"+windowviewid,annotationData);
  2170 + //delay 3 second if annotation draw with TBox
  2171 + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) {
  2172 + setTimeout(function(){
  2173 + $rootScope.LoadCBSavedAnnotation("canvasDA_"+windowviewid,"canvasPaintDA_"+windowviewid,annotationData);
  2174 + },3000)
  2175 + }
  2176 + else
  2177 + {
  2178 + setTimeout(function(){
  2179 + $rootScope.LoadCBSavedAnnotation("canvasDA_"+windowviewid,"canvasPaintDA_"+windowviewid,annotationData);
  2180 + },1000)
  2181 +
  2182 + }
  2183 +
  2184 +
2143 2185 }
2144 2186 }
2145 2187 $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false);
... ... @@ -2358,6 +2400,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2358 2400 if (canvasDiv != null || canvasDiv != undefined) {
2359 2401 canvasDiv.scrollTop = 0;
2360 2402  
  2403 + // show view in center of screen
  2404 + var canwidth = canvasDiv.scrollWidth;
  2405 + $(canvasDiv).scrollLeft((canwidth-screen.width)/2+90);
2361 2406  
2362 2407 //Navigator Code for dynamically calculating the height and width of Dragable Div on Navigator Image
2363 2408  
... ... @@ -2671,7 +2716,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2671 2716  
2672 2717 }
2673 2718 else if ((viewOrientationId == '5')) {
2674   - totalCanvas = 4;
  2719 + totalCanvas = 1;//used canvas only one for annotation text and clicked.
2675 2720  
2676 2721 }
2677 2722 else if ((viewOrientationId == '6')) {
... ... @@ -2681,15 +2726,35 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2681 2726  
2682 2727 if ($scope.ColoredImageSRC.length < totalCanvas) {
2683 2728  
  2729 + if (viewOrientationId == '5')
  2730 + {
  2731 + if(bodyRegionId==6)//used for arms only
  2732 + {
  2733 + $scope.ColoredImageSRC.push(
  2734 + {
  2735 + "bodyRegionId": bodyRegionId, "SRC": src,
  2736 + "Height": h,
  2737 + "Width": w,
  2738 + "x": x,
  2739 + "y": y,
  2740 + "haveMirror": 'true'
  2741 + } );
  2742 + }
  2743 +
  2744 + }
  2745 + else
  2746 + {
2684 2747 $scope.ColoredImageSRC.push(
2685   - {
2686   - "bodyRegionId": bodyRegionId, "SRC": src,
2687   - "Height": h,
2688   - "Width": w,
2689   - "x": x,
2690   - "y": y,
2691   - "haveMirror": 'true'
2692   - } );
  2748 + {
  2749 + "bodyRegionId": bodyRegionId, "SRC": src,
  2750 + "Height": h,
  2751 + "Width": w,
  2752 + "x": x,
  2753 + "y": y,
  2754 + "haveMirror": 'true'
  2755 + } );
  2756 + }
  2757 +
2693 2758  
2694 2759 }
2695 2760  
... ... @@ -2716,7 +2781,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2716 2781 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
2717 2782 isEligibleForHighlight = true;
2718 2783 }
2719   - else if ((viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
  2784 + else if ((viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 1)) {
2720 2785 isEligibleForHighlight = true;
2721 2786 }
2722 2787 else if ((viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
... ... @@ -3012,10 +3077,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3012 3077 }
3013 3078 var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText');
3014 3079  
  3080 + var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30;
  3081 + var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10;
  3082 + var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left;
  3083 + var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top;
  3084 +
  3085 +
3015 3086 if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
3016 3087  
3017 3088 $scope.MultiLanguageAnnationArray = [];
3018   -
  3089 +
  3090 + $scope.saveTermNumberForSaveCB(windowviewid,true,RGBColor,tips_x,tips_y,posx,posy);
  3091 +
3019 3092 if (TermAnnotationText.length>0) {
3020 3093 for (var i = 0; i <= TermAnnotationText.length - 1; i++) {
3021 3094  
... ... @@ -3027,9 +3100,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3027 3100 }
3028 3101 else
3029 3102 {
3030   - $scope.saveTermNumberForSaveCB(windowviewid,RGBColor);
3031   -
3032 3103 $scope.MultiLanguageAnnationArray = [];
  3104 + $scope.saveTermNumberForSaveCB(windowviewid,false,RGBColor,tips_x,tips_y,posx,posy);
  3105 +
3033 3106 if (TermAnnotationText.length > 0) {
3034 3107  
3035 3108 for (var i = 0; i <= TermAnnotationText.length - 1; i++) {
... ... @@ -3042,18 +3115,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3042 3115  
3043 3116 }
3044 3117  
3045   - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
3046   - CurriculumTermData.push({
3047   - "transparentTermNumber": 0,
3048   - "termNumber": parseInt(RGBColor),
3049   - "istpboxTerm":0,
3050   - "tips_x": parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30,
3051   - "tips_y": parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10,
3052   - "x": MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left,
3053   - "y": MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top
3054   - });
3055   -
3056   -
  3118 +
3057 3119 }
3058 3120  
3059 3121 $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage, windowviewid) {
... ... @@ -3077,19 +3139,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3077 3139  
3078 3140 if (bodyRegionId == 3) {
3079 3141 //set z index of hip canavs to fix the issue caused by overlapping of arm canavs on hip canavs.
3080   - imgCanvas.style.zIndex = "100";
  3142 + imgCanvas.style.zIndex = "11000";
3081 3143 }
3082 3144 if (bodyRegionId.match('modestyImg')) {
3083 3145 //added class to further access this canavs to show and hide leaf as per modesty seting
3084 3146 imgCanvas.className = 'modestyImg_'+windowviewid;
3085 3147 imgCanvas.style.visibility = 'hidden'
3086 3148 //set z index to make leaf canvas on top of hip canavs
3087   - imgCanvas.style.zIndex = "200";
  3149 + imgCanvas.style.zIndex = "11000";
3088 3150 }
3089 3151 var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
3090 3152  
3091 3153 if ((bodyVid == 11 || bodyVid == 9) && bodyRegionId == 6) {
3092   - imgCanvas.style.zIndex = "500";
  3154 + imgCanvas.style.zIndex = "11000";
3093 3155 }
3094 3156  
3095 3157 if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) {
... ... @@ -3131,6 +3193,21 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3131 3193 img.onload = start;
3132 3194  
3133 3195 img.src = src;
  3196 + if (isMaskImage == 'N') {
  3197 + if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') {
  3198 + var modestyImageInfo=$scope.GetwindowStoreData(windowviewid,'modestyImageInfo');
  3199 + modestyImageInfo.push(
  3200 + {
  3201 + "bodyRegionId": bodyRegionId, "SRC": src,
  3202 + "Height": h,
  3203 + "Width": w,
  3204 + "x": x,
  3205 + "y": y,
  3206 + "haveMirror": 'false'
  3207 + });
  3208 + }
  3209 + }
  3210 +
3134 3211  
3135 3212 function start() {
3136 3213  
... ... @@ -3138,18 +3215,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3138 3215 var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId');
3139 3216 if (isMaskImage == 'N') {
3140 3217 if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') {
3141   - var modestyImageInfo=$scope.GetwindowStoreData(windowviewid,'modestyImageInfo');
3142   - modestyImageInfo.push(
3143   - {
3144   - "bodyRegionId": bodyRegionId, "SRC": src,
3145   - "Height": h,
3146   - "Width": w,
3147   - "x": x,
3148   - "y": y,
3149   - "haveMirror": 'false'
3150   - });
  3218 + //delay loading in CB .put code above
3151 3219 }
3152   - else {
  3220 + else
  3221 + {
3153 3222  
3154 3223 var totalCanvas;
3155 3224 if ((viewOrientationId == '1') || (viewOrientationId == '4')) {
... ... @@ -3161,7 +3230,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3161 3230  
3162 3231 }
3163 3232 else if ((viewOrientationId == '5')) {
3164   - totalCanvas = 4;
  3233 + totalCanvas = 1;
3165 3234  
3166 3235 }
3167 3236 else if ((viewOrientationId == '6')) {
... ... @@ -3170,15 +3239,34 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3170 3239  
3171 3240 if ($scope.ColoredImageSRC.length < totalCanvas) {
3172 3241  
  3242 + if (viewOrientationId == '5')
  3243 + {
  3244 + if(bodyRegionId==6)//used for arms only
  3245 + {
  3246 + $scope.ColoredImageSRC.push(
  3247 + {
  3248 + "bodyRegionId": bodyRegionId, "SRC": src,
  3249 + "Height": h,
  3250 + "Width": w,
  3251 + "x": x,
  3252 + "y": y,
  3253 + "haveMirror": 'false'
  3254 + } );
  3255 + }
  3256 +
  3257 + }
  3258 + else
  3259 + {
3173 3260 $scope.ColoredImageSRC.push(
3174   - {
3175   - "bodyRegionId": bodyRegionId, "SRC": src,
3176   - "Height": h,
3177   - "Width": w,
3178   - "x": x,
3179   - "y": y,
3180   - "haveMirror": 'false'
3181   - } );
  3261 + {
  3262 + "bodyRegionId": bodyRegionId, "SRC": src,
  3263 + "Height": h,
  3264 + "Width": w,
  3265 + "x": x,
  3266 + "y": y,
  3267 + "haveMirror": 'false'
  3268 + } );
  3269 + }
3182 3270  
3183 3271 }
3184 3272  
... ... @@ -3205,7 +3293,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3205 3293 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
3206 3294 isEligibleForHighlight = true;
3207 3295 }
3208   - else if ((viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
  3296 + else if ((viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 1)) {
3209 3297 isEligibleForHighlight = true;
3210 3298 }
3211 3299 else if ((viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
... ... @@ -3503,10 +3591,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3503 3591 }
3504 3592  
3505 3593 var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText');
  3594 +
  3595 + var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30;
  3596 + var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10;
  3597 + var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left;
  3598 + var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top;
  3599 +
3506 3600 if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
  3601 + $scope.MultiLanguageAnnationArray = [];
  3602 + $scope.saveTermNumberForSaveCB(windowviewid,true,RGBColor,tips_x,tips_y,posx,posy);
3507 3603  
3508   - if (TermAnnotationText.length > 0) {
3509   - $scope.MultiLanguageAnnationArray = [];
  3604 + if (TermAnnotationText.length > 0) {
3510 3605 for (var i = 0; i <= TermAnnotationText.length - 1; i++) {
3511 3606  
3512 3607 $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]);
... ... @@ -3518,9 +3613,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3518 3613 }
3519 3614 else
3520 3615 {
3521   - $scope.saveTermNumberForSaveCB(windowviewid,RGBColor);
3522   - $scope.MultiLanguageAnnationArray = [];
  3616 + $scope.MultiLanguageAnnationArray = [];
3523 3617  
  3618 + $scope.saveTermNumberForSaveCB(windowviewid,false,RGBColor,tips_x,tips_y,posx,posy);
  3619 +
3524 3620 if (TermAnnotationText.length > 0) {
3525 3621 for (var i = 0; i <= TermAnnotationText.length - 1; i++) {
3526 3622  
... ... @@ -3534,18 +3630,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3534 3630  
3535 3631 }
3536 3632  
3537   - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
3538   - CurriculumTermData.push({
3539   - "transparentTermNumber": 0,
3540   - "termNumber": parseInt(RGBColor),
3541   - "istpboxTerm":0,
3542   - "tips_x": parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30,
3543   - "tips_y": parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10,
3544   - "x": MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left,
3545   - "y": MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top
3546   - });
3547   -
3548   -
  3633 +
3549 3634 }
3550 3635  
3551 3636 $scope.ShowCBDataBodyView = function(windowviewid)
... ... @@ -3731,8 +3816,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3731 3816 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && (ColoredImageSRC.length == 5)) {
3732 3817 loopLength = 5;
3733 3818 }
3734   - else if ((viewOrientationId == '5') && (ColoredImageSRC.length == 4)) {
3735   - loopLength = 4;
  3819 + else if ((viewOrientationId == '5') && (ColoredImageSRC.length == 1)) {
  3820 + loopLength = 1;
3736 3821 }
3737 3822 else if ((viewOrientationId == '6') && (ColoredImageSRC.length == 1)) {
3738 3823 loopLength = 1;
... ... @@ -3912,7 +3997,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3912 3997 $scope.SetwindowStoreData(windowviewid,'currentLayerNumber',nlayer);
3913 3998  
3914 3999 $scope.SetwindowStoreData(windowviewid,'layerNumber',$("#txtLayerNumberDA_" + windowviewid).val());
3915   - $scope.DisableUI();
  4000 + //$scope.DisableUI();
3916 4001 console.log('HighlightBodyByTermList is called');
3917 4002  
3918 4003 $scope.highlightedBR = [];
... ... @@ -3929,8 +4014,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3929 4014 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && (ColoredImageSRC.length == 5)) {
3930 4015 loopLength = 5;
3931 4016 }
3932   - else if ((viewOrientationId == '5') && (ColoredImageSRC.length == 4)) {
3933   - loopLength = 4;
  4017 + else if ((viewOrientationId == '5') && (ColoredImageSRC.length == 1)) {
  4018 + loopLength = 1;
3934 4019 }
3935 4020 else if ((viewOrientationId == '6') && (ColoredImageSRC.length == 1)) {
3936 4021 loopLength = 1;
... ... @@ -3977,12 +4062,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3977 4062 else {
3978 4063 if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined) {
3979 4064  
3980   - if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) {
  4065 + if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined){
3981 4066 grayImageDataVar = grayImageMRDataList[bodyRegionId];
3982 4067 }
3983 4068 }
3984 4069 else {
3985   - if (updatedGrayMRDataList[bodyRegionId] != null || updatedGrayMRDataList[bodyRegionId] != undefined) {
  4070 + if (updatedGrayMRDataList[bodyRegionId] != null || updatedGrayMRDataList[bodyRegionId] != undefined) {
3986 4071 grayImageDataVar = updatedGrayMRDataList[bodyRegionId]
3987 4072 }
3988 4073 }
... ... @@ -4002,12 +4087,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4002 4087  
4003 4088 //on layer change we need the fresh data not the updated one
4004 4089 if ($scope.isLayerChange == true) {
4005   - if ($rootScope.isAnnotatiomToolBarPopupActive == true && (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined)) {
  4090 + if ($rootScope.isAnnotatiomToolBarPopupActive == true && (updatedGrayDataList[bodyRegionId - 1] !=null || updatedGrayDataList[bodyRegionId - 1] != undefined)) {
4006 4091  
4007 4092 grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
4008 4093 }
4009 4094  
4010   - else if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
  4095 + else if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] !=undefined) {
4011 4096 grayImageDataVar = grayImageDataList[bodyRegionId - 1];
4012 4097  
4013 4098 }
... ... @@ -4015,15 +4100,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4015 4100 } else {
4016 4101 // this code is for the case where user first click on normal mode then extract then again highlight then we need to call highlight body in gray mode
4017 4102 //and then highlight the previously selected body regions at the time of normal mode.
4018   - if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined)
  4103 + if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] ==undefined)
4019 4104 {
4020   - if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
  4105 + if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
4021 4106 grayImageDataVar = grayImageDataList[bodyRegionId - 1];
4022 4107 }
4023 4108  
4024 4109 }
4025 4110 else {
4026   - if (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined) {
  4111 + if (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] !=undefined) {
4027 4112 // for normal case means without interdepency button case.
4028 4113 grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
4029 4114 }
... ... @@ -4530,7 +4615,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4530 4615 $timeout(function () { $scope.HighlightBodyByTermList(multiTermList,windowviewid); }, 50);
4531 4616 }
4532 4617 else {
4533   - $scope.DisableUI();
  4618 + $scope.EnableUI();
4534 4619 }
4535 4620 }
4536 4621  
... ... @@ -5020,23 +5105,20 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5020 5105 var windowviewid = (bubbleId).split("_")[len - 1];
5021 5106 var sppechBubbleId = $(this).attr("id").substring(12);
5022 5107 var termNumber = (clickedSpeechBubbleId).split("-")[1];
5023   -
5024   - if ($rootScope.isCallFromOtherModule) {
5025   - $rootScope.UnsaveCurriculum = true;
5026   - $timeout(function () {
5027   - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5028   - var BubleObj = document.getElementById(clickedSpeechBubbleId);
5029   - var CurriculumTermData = new jinqJs()
5030   - .from(CurriculumTermData)
5031   - .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
5032   - .at("termNumber == " + termNumber);
5033 5108  
5034   - }, 100);
  5109 + $rootScope.UnsaveCurriculum = true;
  5110 + $timeout(function () {
  5111 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5112 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  5113 + var CurriculumTermData = new jinqJs()
  5114 + .from(CurriculumTermData)
  5115 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  5116 + .at("termNumber == " + termNumber);
5035 5117  
5036   - }
  5118 + }, 100);
  5119 +
5037 5120 }
5038 5121  
5039   -
5040 5122 });
5041 5123 $('.dynCross_'+windowviewid).on('click', function (evt) {
5042 5124 if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) {
... ... @@ -5051,16 +5133,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5051 5133  
5052 5134 //Delete Annotation in case of show multipule annotation
5053 5135 var termNumber = removeid.split("-")[1];
5054   - if ($rootScope.isCallFromOtherModule) {
5055   - var CurriculumTermData = [];
5056   - CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5057   - CurriculumTermData = new jinqJs()
5058   - .from(CurriculumTermData)
5059   - .delete().at("termNumber == " + termNumber).select();
  5136 + var CurriculumTermData = [];
  5137 + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5138 + CurriculumTermData = new jinqJs()
  5139 + .from(CurriculumTermData)
  5140 + .delete().at("termNumber == " + termNumber).select();
5060 5141  
5061   - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
5062   - $rootScope.UnsaveCurriculum = true;
5063   - }
  5142 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
  5143 + $rootScope.UnsaveCurriculum = true;
  5144 +
5064 5145 $(this).parent().parent().parent().remove();
5065 5146 });
5066 5147 }
... ... @@ -5114,20 +5195,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5114 5195 var windowviewid = (bubbleId).split("_")[len - 1];
5115 5196 var sppechBubbleId = $(this).attr("id").substring(12);
5116 5197 var termNumber = (clickedSpeechBubbleId).split("-")[1];
5117   -
5118   - if ($rootScope.isCallFromOtherModule) {
5119   - $rootScope.UnsaveCurriculum = true;
5120   - $timeout(function () {
5121   - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5122   - var BubleObj = document.getElementById(clickedSpeechBubbleId);
5123   - var CurriculumTermData = new jinqJs()
5124   - .from(CurriculumTermData)
5125   - .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
5126   - .at("termNumber == " + termNumber);
5127   -
5128   - }, 100);
  5198 + $rootScope.UnsaveCurriculum = true;
  5199 + $timeout(function () {
  5200 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5201 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  5202 + var CurriculumTermData = new jinqJs()
  5203 + .from(CurriculumTermData)
  5204 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  5205 + .at("termNumber == " + termNumber);
5129 5206  
5130   - }
  5207 + }, 100);
  5208 +
5131 5209 }
5132 5210 });
5133 5211 $('#crossDiv_'+windowviewid).on('click', function (evt) {
... ... @@ -5140,16 +5218,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5140 5218 //Delete Annotation in case of show multipule annotation
5141 5219 var removeid = $(this).parent().parent().attr('id');
5142 5220 var termNumber = removeid.split("-")[1];
5143   - if ($rootScope.isCallFromOtherModule) {
5144   - var CurriculumTermData = [];
5145   - CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5146   - CurriculumTermData = new jinqJs()
5147   - .from(CurriculumTermData)
5148   - .delete().at("termNumber == " + termNumber).select();
  5221 + $rootScope.UnsaveCurriculum = true;
  5222 + var CurriculumTermData = [];
  5223 + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5224 + CurriculumTermData = new jinqJs()
  5225 + .from(CurriculumTermData)
  5226 + .delete().at("termNumber == " + termNumber).select();
5149 5227  
5150   - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
5151   - $rootScope.UnsaveCurriculum = true;
5152   - }
  5228 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
  5229 +
5153 5230 $('#' + removeid).remove();
5154 5231 });
5155 5232 }
... ... @@ -5216,20 +5293,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5216 5293 var windowviewid = (bubbleId).split("_")[len - 1];
5217 5294 var sppechBubbleId = $(this).attr("id").substring(12);
5218 5295 var termNumber = (clickedSpeechBubbleId).split("-")[1];
5219   -
5220   - if ($rootScope.isCallFromOtherModule) {
5221   - $rootScope.UnsaveCurriculum = true;
5222   - $timeout(function () {
5223   - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5224   - var BubleObj = document.getElementById(clickedSpeechBubbleId);
5225   - var CurriculumTermData = new jinqJs()
5226   - .from(CurriculumTermData)
5227   - .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
5228   - .at("transparentTermNumber == " + termNumber);
5229   -
5230   - }, 100);
5231   -
5232   - }
  5296 + $rootScope.UnsaveCurriculum = true;
  5297 + $timeout(function () {
  5298 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5299 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  5300 + var CurriculumTermData = new jinqJs()
  5301 + .from(CurriculumTermData)
  5302 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  5303 + .at("transparentTermNumber == " + termNumber);
  5304 +
  5305 + }, 100);
  5306 +
5233 5307 }
5234 5308  
5235 5309 });
... ... @@ -5245,17 +5319,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5245 5319 }
5246 5320 //Delete Annotation in case of show multipule annotation
5247 5321 var termNumber = removeid.split("-")[1];
5248   - if ($rootScope.isCallFromOtherModule) {
5249   - var CurriculumTermData = [];
5250   - CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5251   - CurriculumTermData = new jinqJs()
5252   - .from(CurriculumTermData)
5253   - .delete().at("transparentTermNumber == " + termNumber).select();
  5322 + $rootScope.UnsaveCurriculum = true;
  5323 + var CurriculumTermData = [];
  5324 + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5325 + CurriculumTermData = new jinqJs()
  5326 + .from(CurriculumTermData)
  5327 + .delete().at("transparentTermNumber == " + termNumber).select();
  5328 +
  5329 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
5254 5330  
5255   - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
5256   - $rootScope.UnsaveCurriculum = true;
5257   - }
5258   -
5259 5331 $(this).parent().parent().parent().remove();
5260 5332 });
5261 5333 }
... ... @@ -5297,20 +5369,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5297 5369 var windowviewid = (bubbleId).split("_")[len - 1];
5298 5370 var sppechBubbleId = $(this).attr("id").substring(12);
5299 5371 var termNumber = (clickedSpeechBubbleId).split("-")[1];
5300   -
5301   - if ($rootScope.isCallFromOtherModule) {
5302   - $rootScope.UnsaveCurriculum = true;
5303   - $timeout(function () {
5304   - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5305   - var BubleObj = document.getElementById(clickedSpeechBubbleId);
5306   - var CurriculumTermData = new jinqJs()
5307   - .from(CurriculumTermData)
5308   - .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
5309   - .at("transparentTermNumber == " + termNumber);
5310   -
5311   - }, 100);
  5372 + $rootScope.UnsaveCurriculum = true;
  5373 + $timeout(function () {
  5374 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5375 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  5376 + var CurriculumTermData = new jinqJs()
  5377 + .from(CurriculumTermData)
  5378 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  5379 + .at("transparentTermNumber == " + termNumber);
5312 5380  
5313   - }
  5381 + }, 100);
  5382 +
5314 5383 }
5315 5384  
5316 5385 });
... ... @@ -5321,16 +5390,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5321 5390 //Delete Annotation in case of show multipule annotation
5322 5391 var removeid = $(this).parent().parent().attr('id');
5323 5392 var termNumber = removeid.split("-")[1];
5324   - if ($rootScope.isCallFromOtherModule) {
5325   - var CurriculumTermData = [];
  5393 + $rootScope.UnsaveCurriculum = true;
  5394 + var CurriculumTermData = [];
5326 5395 CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
5327 5396 CurriculumTermData = new jinqJs()
5328 5397 .from(CurriculumTermData)
5329 5398 .delete().at("transparentTermNumber == " + termNumber).select();
5330 5399  
5331 5400 $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
5332   - $rootScope.UnsaveCurriculum = true;
5333   - }
  5401 +
5334 5402 $('#' + removeid).remove();
5335 5403 $('#bord_annotation_'+windid).remove();
5336 5404 $('#dot_annotation_' + windid).remove();
... ... @@ -5456,21 +5524,21 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5456 5524 if(os=='MacOS')
5457 5525 {
5458 5526 if (isHighlightBodyWithCBTermData == true) {
5459   - 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>";
  5527 + 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:59000;' id='bord" + speechBubbleCounter+"_" + windowviewid+ "'></div></div>";
5460 5528 }
5461 5529 else
5462 5530 {
5463   - 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>";
  5531 + 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:59000;' id='bord" + speechBubbleCounter +"_" + windowviewid+ "'></div></div>";
5464 5532 }
5465 5533 }
5466 5534 else
5467 5535 {
5468 5536 if (isHighlightBodyWithCBTermData == true) {
5469   - 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>";
  5537 + 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:59000;' id='bord" + speechBubbleCounter+"_" + windowviewid+ "'></div></div>";
5470 5538 }
5471 5539 else
5472 5540 {
5473   - 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>";
  5541 + 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:59000;' id='bord" + speechBubbleCounter +"_" + windowviewid+ "'></div></div>";
5474 5542 }
5475 5543 }
5476 5544  
... ... @@ -5520,12 +5588,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5520 5588 $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y, windowviewid, termNumber) {
5521 5589  
5522 5590  
5523   - var sppechBubbleDotHTML = '<div id="dot_'+windowviewid +'" class="singleLineAnnotation" style="z-index:10000"></div>'
5524   - + '<div id="sppeachBubble_' + windowviewid + '-' + termNumber +'" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;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;">'
  5591 + var sppechBubbleDotHTML = '<div id="dot_'+windowviewid +'" class="singleLineAnnotation" style="z-index:59000"></div>'
  5592 + + '<div id="sppeachBubble_' + windowviewid + '-' + termNumber +'" style="height:auto!important;z-index:60000;margin-left:25px;border:1px solid #000;display:none;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;">'
5525 5593 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">'
5526 5594 + '<img id="crossDiv_'+windowviewid +'" style="width:18px" src=' + $rootScope.path + '></span></div>'
5527 5595  
5528   - + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord_'+windowviewid +'">'
  5596 + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:59000;" id="bord_'+windowviewid +'">'
5529 5597 + '</div>';
5530 5598  
5531 5599 //Issue #7286 :Undefined annotation should not appear
... ... @@ -5593,11 +5661,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5593 5661 var os=$scope.getOS();
5594 5662 if(os=='MacOS')
5595 5663 {
5596   - 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>";
  5664 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:59000;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>";
5597 5665 }
5598 5666 else
5599 5667 {
5600   - 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>";
  5668 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:59000;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>";
5601 5669 }
5602 5670  
5603 5671 if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
... ... @@ -6047,6 +6115,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6047 6115 $('#btnTranparency_' + windowviewid).removeClass('tButtonActive');
6048 6116 $('#btnTranparency_' + windowviewid).removeClass(' btn-primary');
6049 6117 $('#btnTranparency_' + windowviewid).addClass('btn-black');
  6118 + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mousedown", mouseDownListener);
  6119 + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mousemove", mouseMoveListener);
  6120 + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mouseup", mouseUpListener);
  6121 +
  6122 + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchstart", mouseDownListener);
  6123 +
  6124 + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchmove", mouseMoveListener);
  6125 +
  6126 + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchend", mouseUpListener);
6050 6127  
6051 6128 }
6052 6129 else
... ... @@ -6099,6 +6176,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6099 6176 $scope.TBHeight = height;
6100 6177 $scope.TBWidth = width;
6101 6178  
  6179 + //get problem on resize box on touch device
  6180 + //also touch problem on Tbox area
  6181 + $scope.touchResizeEnable=false;
  6182 +
6102 6183 $scope.DrawTransparencyBox(windowviewid);
6103 6184 }
6104 6185  
... ... @@ -6122,12 +6203,20 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6122 6203  
6123 6204 // clear canvas before drawing transparency box
6124 6205 if ($rootScope.isAnnotationWindowOpen == true) {
6125   - $('#canvasDA_' + windowviewid).removeLayers();
  6206 + // $('#canvasDA_' + windowviewid).removeLayers();
6126 6207 var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid);
6127 6208 if (paintCanvasObj != null) {
6128 6209 var ctx = paintCanvasObj.getContext("2d");
6129 6210 ctx.clearRect(0, 0, 2277, 3248);
6130 6211 }
  6212 + var CanvasObj = document.getElementById("canvasDA_" + windowviewid);
  6213 + if (CanvasObj != null) {
  6214 + var ctx1 = CanvasObj.getContext("2d");
  6215 + ctx1.clearRect(0, 0, 2277, 3248);
  6216 + }
  6217 + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false);
  6218 + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]});
  6219 +
6131 6220 var sktch = $("#canvasPaintDA_" + windowviewid).sketch();
6132 6221 $("#canvasPaintDA_" + windowviewid).sketch().actions = [];
6133 6222 $("#annotationpaintbrushsize").removeClass("activebtncolor");
... ... @@ -6143,35 +6232,82 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6143 6232 else {
6144 6233 var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index");
6145 6234 var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index");
6146   - drawCanvasZindex = parseInt(drawCanvasZindex) - 1;
6147   - paintCanvasZindex = parseInt(paintCanvasZindex) - 1;
  6235 + drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
  6236 + paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
6148 6237 if (drawCanvasZindex > paintCanvasZindex) {
6149 6238 $(".ui-wrapper").css("z-index", drawCanvasZindex);
6150 6239 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex);
  6240 + $('#canvasPaintDA_' + windowviewid).css("z-index", drawCanvasZindex+2);
6151 6241 }
6152 6242 else {
6153 6243 $(".ui-wrapper").css("z-index", paintCanvasZindex);
6154 6244 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
  6245 + $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);
6155 6246 }
6156 6247 }
6157 6248  
6158 6249 }
6159   - else {
6160   - $rootScope.switchToTransparencycanvas("daImagePanel_"+windowviewid);
  6250 + else
  6251 + {
6161 6252 //for touch device
6162 6253 $rootScope.SetPaintZindexforDA(windowviewid);
6163   - }
6164   - }
6165   - else {
6166   -
6167   - $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', 12000);
6168   -
6169   - $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex'));
6170   -
6171   - }
6172   - //hide the speechbubble
  6254 + var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index");
  6255 + var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index");
  6256 + drawCanvasZindex = parseInt(drawCanvasZindex) +1;
  6257 + paintCanvasZindex = parseInt(paintCanvasZindex) +1;
  6258 + if (drawCanvasZindex > paintCanvasZindex) {
  6259 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  6260 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex);
  6261 + $('#canvasPaintDA_' + windowviewid).css("z-index", drawCanvasZindex+2);
  6262 + }
  6263 + else
  6264 + {
  6265 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  6266 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
  6267 + $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);
  6268 + }
  6269 +
  6270 + }
  6271 + }
  6272 + else
  6273 + {
  6274 + var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index");
  6275 + var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index");
  6276 + drawCanvasZindex = parseInt(drawCanvasZindex) +1;
  6277 + paintCanvasZindex = parseInt(paintCanvasZindex) +1;
  6278 + if (drawCanvasZindex > paintCanvasZindex) {
  6279 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  6280 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex);
  6281 + $('#canvasPaintDA_' + windowviewid).css("z-index", drawCanvasZindex+2);
  6282 + }
  6283 + else {
  6284 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  6285 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
  6286 + $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);
  6287 +
  6288 + }
6173 6289  
  6290 + }
  6291 + //hide the speechbubble
6174 6292  
  6293 + //enable touch on modesty part
  6294 + if ($scope.touchResizeEnable) {
  6295 + var $ua = navigator.userAgent;
  6296 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  6297 + $('#canvasDA_'+windowviewid).css("display", "block");
  6298 + $('#canvasPaintDA_'+windowviewid).css("display", "block");
  6299 + }
  6300 +
  6301 + }
  6302 + else
  6303 + {
  6304 + var $ua = navigator.userAgent;
  6305 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  6306 + $('#canvasDA_'+windowviewid).css("display", "none");
  6307 + $('#canvasPaintDA_'+windowviewid).css("display", "none");
  6308 + }
  6309 + }
  6310 +
6175 6311 if ($rootScope.isAnnotationWindowOpen == true)
6176 6312 $rootScope.isTBCompleted = true;
6177 6313 }
... ... @@ -6248,7 +6384,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6248 6384 $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex'));
6249 6385 $(".ui-wrapper").css("left",TransparencyBoxStartX-2+ 'px');
6250 6386  
6251   -
6252 6387 }
6253 6388  
6254 6389 var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData');
... ... @@ -6277,7 +6412,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6277 6412  
6278 6413 }
6279 6414  
6280   -
6281 6415 }
6282 6416 var bodyVid = $scope.GetwindowStoreData(windowviewid, 'voId');
6283 6417 if (bodyVid == "9" || bodyVid == "11" || bodyVid == "2" || bodyVid == "3" || bodyVid == "6" || bodyVid == "7") {
... ... @@ -6363,6 +6497,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6363 6497  
6364 6498 if (TransparencyBoxStartX <= bodyRegionRight && value.x <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.y <= transparencyBoxBottom) {
6365 6499  
  6500 + $scope.touchResizeEnable=true;
6366 6501 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.x, value.y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid);
6367 6502  
6368 6503 }
... ... @@ -6372,17 +6507,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6372 6507 if ($('#transparencyScale_' + windowviewid).css("visibility") != 'visible') {
6373 6508 $('#transparencyScale_' + windowviewid).css('position', 'absolute');
6374 6509 $('#transparencyScale_' + windowviewid).draggable({ containment: '#daViewDA_' + windowviewid, scroll: false });
6375   - if ($rootScope.isCallFromOtherModule) {
  6510 + // if ($rootScope.isCallFromOtherModule) {
6376 6511  
6377 6512 $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', []);
6378 6513 var transparencyBounds = $scope.GetwindowStoreData(windowviewid, 'transparencyBounds');
6379 6514 transparencyBounds.push({
6380   - 'h': $scope.TBoxEndX, 'x': $scope.TransparencyBoxStartX,
6381   - 'w': $scope.TBoxEndY, 'y': $scope.TransparencyBoxStartY
  6515 + 'w': $scope.TBoxEndX, 'x': $scope.TransparencyBoxStartX,
  6516 + 'h': $scope.TBoxEndY, 'y': $scope.TransparencyBoxStartY
6382 6517 });
6383 6518 $scope.SetwindowStoreData(windowviewid, 'transparencyX', $scope.TBDrawStartX);
6384 6519 $scope.SetwindowStoreData(windowviewid, 'transparencyY', $scope.TBDrawStartY );
6385   - }
  6520 + // }
6386 6521 $('#transparencyScale_' + windowviewid).css('top', $scope.TBDrawStartY - 90);
6387 6522 $('#transparencyScale_' + windowviewid).css('left', $scope.TBDrawStartX + 130)
6388 6523 $('#transparencyScale_' + windowviewid).css('visibility', 'visible')
... ... @@ -6449,11 +6584,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6449 6584 $scope.startY = value.y
6450 6585 $scope.TransparencyBoxStartX = value.x;
6451 6586 $scope.TransparencyBoxStartY = value.y;
6452   - $scope.TransparencyEndX = value.h;
6453   - $scope.TransparencyBoxEndY = value.w;
  6587 + $scope.TransparencyEndX = value.w;
  6588 + $scope.TransparencyBoxEndY = value.h;
6454 6589  
6455   - $scope.TBoxEndX = value.h;
6456   - $scope.TBoxEndY = value.w;
  6590 + $scope.TBoxEndX = value.w;
  6591 + $scope.TBoxEndY = value.h;
6457 6592  
6458 6593 })
6459 6594  
... ... @@ -6671,8 +6806,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6671 6806  
6672 6807 $('#btnTranparency_' + windowviewid).removeClass('btn-black');
6673 6808  
6674   - $('#btnTranparency_' + windowviewid).addClass('tButtonActive');
6675   -
6676 6809 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
6677 6810 $('#btnTranparency_' + windowviewid).removeClass('tButtonActive');
6678 6811 $('#btnTranparency_' + windowviewid).addClass('btn-black');
... ... @@ -6681,14 +6814,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6681 6814  
6682 6815 // clear canvas before drawing transparency box
6683 6816 if ($rootScope.isAnnotationWindowOpen == true) {
6684   - $('#canvasDA_' + windowviewid).removeLayers();
  6817 + //$('#canvasDA_' + windowviewid).removeLayers();
6685 6818 var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid);
6686 6819 if (paintCanvasObj != null) {
6687 6820 var ctx = paintCanvasObj.getContext("2d");
6688 6821 ctx.clearRect(0, 0, 2277, 3248);
6689 6822 }
6690   - var sktch = $("#canvasPaintDA_" + windowviewid).sketch();
6691   - $("#canvasPaintDA_" + windowviewid).sketch().actions = [];
  6823 + var CanvasObj = document.getElementById("canvasDA_" + windowviewid);
  6824 + if (CanvasObj != null) {
  6825 + var ctx1 = CanvasObj.getContext("2d");
  6826 + ctx1.clearRect(0, 0, 2277, 3248);
  6827 + }
6692 6828 $("#annotationpaintbrushsize").removeClass("activebtncolor");
6693 6829 $("#annotationpainteraser").removeClass("activebtncolor");
6694 6830 if ($("#DrawMode").hasClass("annotationtoolbartab")) {
... ... @@ -6700,28 +6836,57 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6700 6836 else {
6701 6837 var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index");
6702 6838 var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index");
6703   - drawCanvasZindex = parseInt(drawCanvasZindex) - 1;
6704   - paintCanvasZindex = parseInt(paintCanvasZindex) - 1;
  6839 + drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
  6840 + paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
6705 6841 if (drawCanvasZindex > paintCanvasZindex) {
6706 6842 $(".ui-wrapper").css("z-index", drawCanvasZindex);
6707 6843 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex);
  6844 + $('#canvasPaintDA_' + windowviewid).css("z-index", drawCanvasZindex+2);
6708 6845 }
6709 6846 else {
6710 6847 $(".ui-wrapper").css("z-index", paintCanvasZindex);
6711 6848 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
  6849 + $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);
6712 6850 }
6713 6851 }
6714 6852 }
6715   - else {
6716   - $rootScope.switchToTransparencycanvas("daImagePanel_"+windowviewid);
  6853 + else
  6854 + {
6717 6855 //for touch device
6718 6856 $rootScope.SetPaintZindexforDA(windowviewid);
  6857 + var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index");
  6858 + var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index");
  6859 + drawCanvasZindex = parseInt(drawCanvasZindex) +1;
  6860 + paintCanvasZindex = parseInt(paintCanvasZindex) +1;
  6861 + if (drawCanvasZindex > paintCanvasZindex) {
  6862 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  6863 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex);
  6864 + $('#canvasPaintDA_' + windowviewid).css("z-index", drawCanvasZindex+2);
  6865 + }
  6866 + else {
  6867 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  6868 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
  6869 + $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);
  6870 + }
  6871 + //$rootScope.switchToTransparencycanvas("daImagePanel_"+windowviewid);
6719 6872 }
6720 6873 }
6721   - else {
6722   -
6723   - $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', 12000);
6724   - $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex'));
  6874 + else
  6875 + {
  6876 + var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index");
  6877 + var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index");
  6878 + drawCanvasZindex = parseInt(drawCanvasZindex) +1;
  6879 + paintCanvasZindex = parseInt(paintCanvasZindex) +1;
  6880 + if (drawCanvasZindex > paintCanvasZindex) {
  6881 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  6882 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex);
  6883 + $('#canvasPaintDA_' + windowviewid).css("z-index", drawCanvasZindex+2);
  6884 + }
  6885 + else {
  6886 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  6887 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
  6888 + $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);
  6889 + }
6725 6890  
6726 6891 }
6727 6892  
... ... @@ -6947,13 +7112,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6947 7112 }
6948 7113 else
6949 7114 canvasModesty.style.visibility = 'hidden';
6950   -
6951   - if ($scope.GetwindowStoreData(windowviewid,'voId') == "11") {
6952   -
6953   - canvasModesty.style.zIndex = 11000;
6954   - }
6955   - else
6956   - canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex;
  7115 +
  7116 + var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index");
  7117 + var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index");
  7118 + drawCanvasZindex = parseInt(drawCanvasZindex) +1;
  7119 + paintCanvasZindex = parseInt(paintCanvasZindex) +1;
  7120 + if (drawCanvasZindex > paintCanvasZindex) {
  7121 + canvasModesty.style.zIndex = drawCanvasZindex+1;
  7122 + }
  7123 + else
  7124 + {
  7125 + canvasModesty.style.zIndex = paintCanvasZindex+1;
  7126 + }
6957 7127  
6958 7128 canvasModesty.addEventListener('click', OnClickModestyTransCanvas);
6959 7129 canvasModesty.addEventListener('touchstart', OnClickModestyTransCanvas);
... ... @@ -7551,6 +7721,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7551 7721 var windowviewid = (event.target.id).split("_")[len-1];
7552 7722  
7553 7723 $rootScope.isMirrorBodyRegion=undefined;
  7724 + $rootScope.isclickOnTBox=false;
7554 7725 var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid);
7555 7726 var verticalScrollPosition = canvasDiv.scrollTop;
7556 7727 var horizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -7577,46 +7748,61 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7577 7748 $rootScope.Yaxis = event.pageY - $('#canvasDivDA_' + windowviewid).offset().top + verticalScrollPosition;
7578 7749 }
7579 7750  
7580   - $rootScope.setSelectedBodyRegionData(windowviewid);
7581   -
7582   - var gender= $scope.GetwindowStoreData(windowviewid,'genderId');
7583   - var currentBodyViewId =$scope.GetwindowStoreData(windowviewid,'voId');
7584   -
7585   -
7586   - if($rootScope.isMirrorBodyRegion==undefined) return;
7587   -
7588   - if ($rootScope.isMirrorBodyRegion == "No") {
  7751 + var tpBoxDimesion= $scope.GetwindowStoreData(windowviewid, 'transparencyBounds');
  7752 + if(tpBoxDimesion.length>0 && $scope.GetwindowStoreData(windowviewid,'isTransparencyActivated'))
  7753 + {
  7754 + if ($rootScope.Xaxis >= tpBoxDimesion[0].x && $rootScope.Xaxis <=tpBoxDimesion[0].w && $rootScope.Yaxis >= tpBoxDimesion[0].y && $rootScope.Yaxis <= tpBoxDimesion[0].h) {
7589 7755  
7590   - var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "_" + windowviewid;
  7756 + $rootScope.isclickOnTBox=true;
  7757 + }
  7758 + }
7591 7759  
7592   - if($rootScope.BRId=="2" || $rootScope.BRId=="3")
  7760 + if($rootScope.isclickOnTBox)
7593 7761 {
7594   - if(gender=="Female" && (currentBodyViewId=="5"))
7595   - {
7596   - var maskCanvasId = "imageCanvasmodestyImg" + $rootScope.BRId + "_" + windowviewid;
7597   - }
7598   - else if(gender=="Female" && $rootScope.BRId=="2" && (currentBodyViewId=="6"|| currentBodyViewId=="7"|| currentBodyViewId=="11"))
7599   - {
7600   - var maskCanvasId = "imageCanvasmodestyImg" + $rootScope.BRId + "_" + windowviewid;
  7762 + TransparencyCanvasClickListener(event);
  7763 + }
  7764 + else
  7765 + {
  7766 + $rootScope.setSelectedBodyRegionData(windowviewid);
  7767 +
  7768 + var gender= $scope.GetwindowStoreData(windowviewid,'genderId');
  7769 + var currentBodyViewId =$scope.GetwindowStoreData(windowviewid,'voId');
  7770 +
  7771 + if($rootScope.isMirrorBodyRegion==undefined) return;
  7772 + if ($rootScope.isMirrorBodyRegion == "No") {
  7773 +
  7774 + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "_" + windowviewid;
  7775 +
  7776 + if($rootScope.BRId=="2" || $rootScope.BRId=="3")
  7777 + {
  7778 + if(gender=="Female" && (currentBodyViewId=="5"))
  7779 + {
  7780 + var maskCanvasId = "imageCanvasmodestyImg" + $rootScope.BRId + "_" + windowviewid;
  7781 + }
  7782 + else if(gender=="Female" && $rootScope.BRId=="2" && (currentBodyViewId=="6"|| currentBodyViewId=="7"|| currentBodyViewId=="11"))
  7783 + {
  7784 + var maskCanvasId = "imageCanvasmodestyImg" + $rootScope.BRId + "_" + windowviewid;
  7785 + }
  7786 + else if(gender=="Male" && $rootScope.BRId=="3" && currentBodyViewId=="1")
  7787 + {
  7788 + var maskCanvasId = "imageCanvasmodestyImg" + $rootScope.BRId + "_" + windowviewid;
  7789 + }
  7790 +
  7791 + }
  7792 +
  7793 + var maskCanvas = document.getElementById(maskCanvasId);
  7794 +
  7795 + $scope.imageCanvasClickAnnotation(maskCanvas,$rootScope.BodyRegionXAxis,$rootScope.BodyRegionYAxis,event);
  7796 +
7601 7797 }
7602   - else if(gender=="Male" && $rootScope.BRId=="3" && currentBodyViewId=="1")
  7798 + else
7603 7799 {
7604   - var maskCanvasId = "imageCanvasmodestyImg" + $rootScope.BRId + "_" + windowviewid;
  7800 + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR"+ "_" + windowviewid;
  7801 + var mirrorImageCanvas = document.getElementById(maskCanvasId);
  7802 + $scope.FlipedImgCanvasClickAnnotation(mirrorImageCanvas,$rootScope.BodyRegionXAxis,$rootScope.BodyRegionYAxis,event);
7605 7803 }
7606   -
7607   - }
7608 7804  
7609   - var maskCanvas = document.getElementById(maskCanvasId);
7610   -
7611   - $scope.imageCanvasClickAnnotation(maskCanvas,$rootScope.BodyRegionXAxis,$rootScope.BodyRegionYAxis,event);
7612   -
7613   - }
7614   - else
7615   - {
7616   - var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR"+ "_" + windowviewid;
7617   - var mirrorImageCanvas = document.getElementById(maskCanvasId);
7618   - $scope.FlipedImgCanvasClickAnnotation(mirrorImageCanvas,$rootScope.BodyRegionXAxis,$rootScope.BodyRegionYAxis,event);
7619   - }
  7805 + }
7620 7806  
7621 7807 }
7622 7808  
... ... @@ -7627,6 +7813,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7627 7813 $.each(BodyRegionDictionary, function (index, value) {
7628 7814 var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
7629 7815 var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
  7816 +
7630 7817 if ($rootScope.Xaxis <= bodyRegionRight && $rootScope.Yaxis <= bodyRegionBottom && value.X <= $rootScope.Xaxis && value.Y <= $rootScope.Yaxis) {
7631 7818 if (bodyVid == "11" || bodyVid == "9") {
7632 7819 if (value.bodyRegionId == "6") {
... ... @@ -7646,6 +7833,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7646 7833 }
7647 7834  
7648 7835 }
  7836 +
7649 7837 });
7650 7838 }
7651 7839  
... ... @@ -7711,6 +7899,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7711 7899 var windowviewid = (evt.currentTarget.id).split("_")[len-1];
7712 7900 var pixelData;
7713 7901 var pixelDataTrans;
  7902 +
  7903 + if (evt.ctrlKey || evt.metaKey) {
  7904 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true);
  7905 + }
  7906 + else
  7907 + {
  7908 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
  7909 + }
7714 7910  
7715 7911 var MousePositionX=0;
7716 7912 var MousePositionY=0;
... ... @@ -7903,7 +8099,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7903 8099 var TBoxTermNumber=annotations.TBoxTermNumber;
7904 8100 var NormalTermNumber=annotations.NormalTermNumber;
7905 8101  
7906   - $scope.saveTBoxTermNumberForSaveCB(evt, windowviewid,TBoxTermNumber,NormalTermNumber,MousePositionX,MousePositionY);//Calling Method for Tbox termnumber SaveCB
  8102 + var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30;
  8103 + var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10;
  8104 + var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left;
  8105 + var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top;
  8106 +
  8107 + if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
  8108 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8109 + }
  8110 + else
  8111 + {
  8112 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8113 + }
7907 8114  
7908 8115 var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText');
7909 8116 if (TermAnnotationText.length > 0) {
... ... @@ -7918,6 +8125,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7918 8125 $rootScope.UnsaveCurriculum = true;
7919 8126 var len= (evt.target.id).split("_").length;
7920 8127 var windowviewid = (evt.target.id).split("_")[len-1];
  8128 + if (evt.ctrlKey || evt.metaKey) {
  8129 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true);
  8130 + }
  8131 + else
  8132 + {
  8133 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
  8134 + }
7921 8135  
7922 8136 var tCanvasLeft = $(".ui-wrapper").css("left");
7923 8137 var tCanvasLeftAftrSplit = tCanvasLeft.split("p");
... ... @@ -7969,6 +8183,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7969 8183 var canavsX = evt.currentTarget.offsetLeft;
7970 8184 var canvasY = evt.currentTarget.offsetTop;
7971 8185  
  8186 + var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30;
  8187 + var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10;
  8188 + var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left;
  8189 + var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top;
  8190 +
  8191 +
7972 8192 if ((tCanvasLeftAftrSplit[0] <= actulalX && (actulalX <= tCanvasTotalWidth)) && (tCanvasTopAftrSplit[0] <= actualY && actualY <= tCanvasTotalHeight)) {
7973 8193 var canvasId = evt.currentTarget.id;
7974 8194 var canavsContext = document.getElementById(canvasId).getContext('2d');
... ... @@ -7984,13 +8204,20 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7984 8204 $scope.annotationTextArrayT2 = [];
7985 8205 $scope.annotationTextArrayT1.push(annotationText);
7986 8206 $scope.annotationTextArrayT2.push(annotationText);
7987   - $scope.saveTBoxTermNumberForSaveCB(evt, windowviewid,0,RGBColor,MousePositionX,MousePositionY)//Calling Method for Tbox termnumber SaveCB
7988   - }
  8207 +
  8208 + if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
  8209 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,0,RGBColor,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8210 + }
  8211 + else
  8212 + {
  8213 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,0,RGBColor,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8214 + }
  8215 + }
  8216 + else if (canvasId.match('modestyImg') && RGBColor == '000000')
  8217 + {
7989 8218 //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to
7990 8219 //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er
7991 8220 //
7992   - else if (canvasId.match('modestyImg') && RGBColor == '000000') {
7993   -
7994 8221 var bodyRegionId = canvasId.split("_")[1].slice(-1);
7995 8222  
7996 8223 var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
... ... @@ -8020,9 +8247,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8020 8247  
8021 8248 var TBoxTermNumber=annotations.TBoxTermNumber;
8022 8249 var NormalTermNumber=annotations.NormalTermNumber;
8023   -
8024   - $scope.saveTBoxTermNumberForSaveCB(evt, windowviewid,TBoxTermNumber,NormalTermNumber,MousePositionX,MousePositionY);//Calling Method for Tbox termnumber SaveCB
8025   -
  8250 +
  8251 + if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
  8252 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8253 + }
  8254 + else
  8255 + {
  8256 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8257 + }
  8258 +
8026 8259 }
8027 8260  
8028 8261 var tCanvasTopPos = $(".ui-wrapper").css("top");
... ... @@ -8044,6 +8277,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8044 8277 var len= (evt.target.id).split("_").length;
8045 8278 var windowviewid = (evt.target.id).split("_")[len-1];
8046 8279  
  8280 +
8047 8281 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
8048 8282 //changing for mac os now
8049 8283 var os=$scope.getOS();
... ... @@ -8089,7 +8323,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8089 8323 var TBoxTermNumber=annotations.TBoxTermNumber;
8090 8324 var NormalTermNumber=annotations.NormalTermNumber;
8091 8325  
8092   - $scope.saveTBoxTermNumberForSaveCB(evt, windowviewid,TBoxTermNumber,NormalTermNumber,MousePositionX,MousePositionY);//Calling Method for Tbox termnumber SaveCB
  8326 + var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30;
  8327 + var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10;
  8328 + var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left;
  8329 + var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top;
  8330 +
  8331 + if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
  8332 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8333 + }
  8334 + else
  8335 + {
  8336 + $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB
  8337 + }
8093 8338  
8094 8339 var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText');
8095 8340 if (TermAnnotationText.length > 0) {
... ... @@ -8098,64 +8343,37 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8098 8343 }
8099 8344  
8100 8345 //Added Method to Save TransparencyBox TermNumbers for SaveCB
8101   - $scope.saveTBoxTermNumberForSaveCB = function (evt, windowviewid,TBoxTermNumber,NormalTermNumber,MousePositionX,MousePositionY) {
8102   - if (evt.ctrlKey || evt.metaKey) {
8103   - $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true);
8104   - }
8105   - else {
8106   - //Remove previous SpeechBubble with termnumber
8107   -
8108   - var preTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
8109   - if (preTermData != undefined && preTermData.length > 0) {
8110   - for (var i = 0; i < preTermData.length; i++) {
8111   - if (preTermData[i].transparentTermNumber != parseInt(TBoxTermNumber)) {
8112   -
8113   - var CurriculumTermData = [];
8114   - CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
8115   - CurriculumTermData = new jinqJs()
8116   - .from(CurriculumTermData)
8117   - .delete().at("transparentTermNumber == " + preTermData[i].transparentTermNumber,'istpboxTerm == ' + 1).select();
8118   -
8119   - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
8120   - }
8121   -
8122   - }
8123   - }
8124   -
8125   - // remove all in multi annotation
8126   - $('.com_anno_' + windowviewid).remove();
  8346 + $scope.saveTBoxTermNumberForSaveCB = function (windowviewid,isMultiAnnotation,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy) {
  8347 +
  8348 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  8349 +
  8350 + if(!isMultiAnnotation)
  8351 + {
  8352 + // remove all in multi annotation
  8353 + $('.com_anno_' + windowviewid).remove();
8127 8354 // $('.dynCross_anno_' + windowviewid).parent().parent().parent().remove();
8128 8355  
8129 8356 // remove all in single annotation
8130 8357 $('.crossDiv_annotation_' + windowviewid).parent().parent().remove();
8131 8358 $('#bord_annotation_' + windowviewid).remove();
8132 8359 $('#dot_annotation_' + windowviewid).remove();
8133   -
8134   - $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
  8360 +
  8361 + CurriculumTermData = new jinqJs()
  8362 + .from(CurriculumTermData)
  8363 + .delete().at('istpboxTerm == ' + 1).select();
8135 8364 }
8136   - var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
8137   - //changing for mac os now
8138   - var os=$scope.getOS();
8139   - if(os=='MacOS')
8140   - {
8141   - var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
8142   - var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
8143   - }
8144   - else
8145   - {
8146   - var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
8147   - var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
8148   - }
8149   - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  8365 +
8150 8366 CurriculumTermData.push({
8151   - "transparentTermNumber": parseInt(TBoxTermNumber),
8152   - "termNumber": parseInt(NormalTermNumber),
8153   - "istpboxTerm":1,
8154   - "tips_x": parseInt(MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30,
8155   - "tips_y": parseInt(MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10,
8156   - "x": MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left,
8157   - "y": MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top
8158   - });
  8367 + "transparentTermNumber": parseInt(TBoxTermNumber),
  8368 + "termNumber": parseInt(NormalTermNumber),
  8369 + "istpboxTerm":1,
  8370 + "tips_x": tips_x,
  8371 + "tips_y": tips_y,
  8372 + "x": posx,
  8373 + "y": posy
  8374 + });
  8375 +
  8376 +
8159 8377 $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
8160 8378  
8161 8379 }
... ... @@ -8215,33 +8433,36 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8215 8433 }
8216 8434  
8217 8435 //Added Method to Save TransparencyBox TermNumbers for SaveCB
8218   - $scope.saveTermNumberForSaveCB = function (windowviewid,NormalTermNumber) {
8219   - //Remove previous SpeechBubble with termnumber
  8436 + $scope.saveTermNumberForSaveCB = function (windowviewid,isMultiAnnotation,NormalTermNumber,tips_x,tips_y,posx,posy) {
8220 8437  
8221   - var preTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
8222   - if (preTermData != undefined && preTermData.length > 0) {
8223   - for (var i = 0; i < preTermData.length; i++) {
8224   - if (preTermData[i].termNumber != parseInt(NormalTermNumber)) {
8225   -
8226   - var CurriculumTermData = [];
8227   - CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
8228   - CurriculumTermData = new jinqJs()
8229   - .from(CurriculumTermData)
8230   - .delete().at("termNumber == " + preTermData[i].termNumber,'istpboxTerm == ' + 0).select();
8231   -
8232   - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
8233   - }
8234   -
8235   - }
8236   - }
  8438 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  8439 +
  8440 + if(!isMultiAnnotation)
  8441 + {
  8442 + // remove all in multi annotation
  8443 + $('.com_' + windowviewid).remove();
8237 8444  
8238   - // remove all in multi annotation
8239   - $('.com_' + windowviewid).remove();
8240   -
8241   - // remove all in single annotation
8242   - $('#dot_' + windowviewid).remove();
8243   - $('#bord_' + windowviewid).remove();
8244   - $('#crossDiv_' + windowviewid).parent().parent().remove();
  8445 + // remove all in single annotation
  8446 + $('#dot_' + windowviewid).remove();
  8447 + $('#bord_' + windowviewid).remove();
  8448 + $('#crossDiv_' + windowviewid).parent().parent().remove();
  8449 +
  8450 + CurriculumTermData = new jinqJs()
  8451 + .from(CurriculumTermData)
  8452 + .delete().at('istpboxTerm == ' + 0).select();
  8453 + }
  8454 +
  8455 + CurriculumTermData.push({
  8456 + "transparentTermNumber": 0,
  8457 + "termNumber": parseInt(NormalTermNumber),
  8458 + "istpboxTerm":0,
  8459 + "tips_x": tips_x,
  8460 + "tips_y": tips_y,
  8461 + "x": posx,
  8462 + "y": posy
  8463 + });
  8464 +
  8465 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
8245 8466  
8246 8467 }
8247 8468  
... ... @@ -8509,6 +8730,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8509 8730 //To enable extract button
8510 8731 $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', 0);
8511 8732 $scope.SetwindowStoreData(windowviewid,'isTransparencyActivated',false);
  8733 + $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', []);
8512 8734 $("#btnExtract_" + windowviewid).removeClass("disabled");
8513 8735 $("#btnExtract_" + windowviewid).css("pointer-events", "auto");
8514 8736  
... ... @@ -8522,6 +8744,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8522 8744 var ctx = paintCanvasObj.getContext("2d");
8523 8745 ctx.clearRect(0, 0, 2277, 3248);
8524 8746  
  8747 + var CanvasObj = document.getElementById("canvasDA_" + windowviewid);
  8748 + if (CanvasObj != null) {
  8749 + var ctx1 = CanvasObj.getContext("2d");
  8750 + ctx1.clearRect(0, 0, 2277, 3248);
  8751 + }
  8752 + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false);
  8753 + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]});
  8754 +
8525 8755 var sktch = $('#canvasPaintDA_'+windowviewid).sketch();
8526 8756 $('#canvasPaintDA_'+windowviewid).sketch().actions = [];
8527 8757 }
... ... @@ -9138,7 +9368,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9138 9368 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && (ColoredImageSRC.length == 5)) {
9139 9369 doHighlightOrExtract = true;
9140 9370 }
9141   - else if (((viewOrientationId == '5')) && (ColoredImageSRC.length == 4)) {
  9371 + else if (((viewOrientationId == '5')) && (ColoredImageSRC.length == 1)) {
9142 9372 doHighlightOrExtract = true;
9143 9373 }
9144 9374 else if (((viewOrientationId == '6')) && (ColoredImageSRC.length == 1)) {
... ... @@ -9274,7 +9504,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9274 9504  
9275 9505 }
9276 9506 else if ((viewOrientationId == '5')) {
9277   - totalCanvas = 4;
  9507 + totalCanvas = 1;
9278 9508  
9279 9509 }
9280 9510 else if ((viewOrientationId == '6')) {
... ... @@ -9320,7 +9550,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9320 9550 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
9321 9551 isEligibleForHighlightBodyByTermList = true;
9322 9552 }
9323   - else if (((viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
  9553 + else if (((viewOrientationId == '5')) && ($scope.grayedBR.length == 1)) {
9324 9554 isEligibleForHighlightBodyByTermList = true;
9325 9555 }
9326 9556 else if (((viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
... ... @@ -9733,9 +9963,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9733 9963  
9734 9964 $rootScope.CloseListManager();
9735 9965  
9736   - //Remove the Search list and then Repopulate it on change of Gender
9737   - $('#searchListDiv_' + windowviewid).empty();
9738   -
9739 9966 var canDiv = document.getElementById('canvasDivDA_' + windowviewid);
9740 9967 var canDivChildCount = canDiv.childElementCount;
9741 9968 if (canDivChildCount > 0) {
... ... @@ -10024,8 +10251,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10024 10251 //to get the body system highlighted on view change. commented the below line
10025 10252 // $rootScope.isHighlightBodyByBodySystem = false;
10026 10253  
10027   - //Remove the search list and then Repopulate it on change of View
10028   - $('#searchListDiv_' + windowviewid).empty()
10029 10254 if ($rootScope.openViews.length > 0) {
10030 10255 $rootScope.openViews.splice($rootScope.openViews.length - 1);
10031 10256 }
... ... @@ -10330,7 +10555,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10330 10555 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && (grayedBR.length == 5)) {
10331 10556 $scope.isAlreadyHighlighted = true;
10332 10557 }
10333   - else if (((viewOrientationId == '5')) && (grayedBR.length == 4)) {
  10558 + else if (((viewOrientationId == '5')) && (grayedBR.length == 1)) {
10334 10559 $scope.isAlreadyHighlighted = true;
10335 10560 }
10336 10561 else if (((viewOrientationId == '6')) && (grayedBR.length == 1)) {
... ... @@ -10480,7 +10705,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10480 10705 }
10481 10706 }
10482 10707  
10483   - $scope.ShowSearch = function (windowviewid) {
  10708 + $scope.ShowSearch = function (windowviewid, isbuttionclick) {
10484 10709  
10485 10710 $scope.SetwindowStoreData(windowviewid,'isSearchClicked',true);
10486 10711 console.log('ShowSearch is called');
... ... @@ -10500,7 +10725,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10500 10725 //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed
10501 10726 //Remove the list and then Repopulate
10502 10727 if ($('#searchListDiv_' + windowviewid).html() != "")
10503   - $('#searchListDiv_' + windowviewid).empty();
  10728 + $('#termlistfilter_'+windowviewid).empty();
10504 10729 //Delay compile of ul li so that the remove of li is completed.
10505 10730 $timeout(function () {
10506 10731  
... ... @@ -10514,7 +10739,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10514 10739 else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && (ColoredImageSRC.length == 5)) {
10515 10740 $scope.EnableUI();
10516 10741 }
10517   - else if ((viewOrientationId == '5') && (ColoredImageSRC.length == 4)) {
  10742 + else if ((viewOrientationId == '5') && (ColoredImageSRC.length == 1)) {
10518 10743 $scope.EnableUI();
10519 10744 }
10520 10745 else if ((viewOrientationId == '6') && (ColoredImageSRC.length == 1)) {
... ... @@ -10523,40 +10748,39 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10523 10748 }
10524 10749 }, 500);
10525 10750  
10526   - console.log("primary language: " + vocabTermDataArray[primaryLexiconIndx].language);
  10751 + var vocabTermDataArray =vocabTermDataArray[primaryLexiconIndx].vocabTermTxt;
10527 10752  
10528   - $rootScope.a = primaryLexiconIndx;
10529   -
10530   - $scope.vocabArray = vocabTermDataArray;
10531   -
10532   - $scope.sFilter = $("#typedTermName_" + windowviewid).val();
10533   - var $e2 = $('<ul id="termlistfilter_' + windowviewid + '" class="form-control dropdown-menu daSearch" style="height:130px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabArray[a].vocabTermTxt| filter:{ _TermText: sFilter}">' +
10534   - '<a id="{{item._ActualTermNumber}}_'+windowviewid+'" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
10535   - ' </li></ul>').appendTo('#searchListDiv_' + windowviewid);
10536   - $compile($e2)($scope);
10537   -
10538   - console.log('termlistfilter is created and complied');
10539   - $(".daSearch").css("display", "none");
10540   -
10541   - $("#termlistfilter_" + windowviewid).css("display", "block");
10542   -
10543   - $timeout(function () {
10544   -
10545   - $("#termlistfilter_" + windowviewid + " > li").each(function (key, value) {
10546   -
10547   - if ($(this).find("a").html() == document.getElementById('typedTermName_'+windowviewid).value) {
10548   - $("#termlistfilter_" + windowviewid + " li a").css({ "background-color": "#ffffff", "color": "#000000" });
10549   - $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" });
10550   - }
10551   - });
  10753 + var searchvalue = $("#typedTermName_" + windowviewid).val();
  10754 +
  10755 + var searchfilterdata = $filter('filter')(vocabTermDataArray, searchvalue);
  10756 + if(searchvalue.trim()!="")
  10757 + {
  10758 + $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText.length');
  10759 + }
  10760 + else
  10761 + {
  10762 + $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText');
  10763 + }
10552 10764  
10553   - $rootScope.searchListArray = [];
  10765 + $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 500);
10554 10766  
10555   - $("#termlistfilter_" + windowviewid + " > li").each(function (key, value) {
10556   - $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") });
10557   - });
10558   - }, 100);
  10767 + $('#termlistfilter_'+windowviewid).css("display", "block");
10559 10768  
  10769 + angular.forEach($scope.limitTofilterdata, function (value2, key2) {
  10770 + var $el = $('<option id=' + value2._ActualTermNumber +'_' +windowviewid+ '>' + value2._TermText + '</option>').appendTo('#termlistfilter_' + windowviewid);
  10771 + $compile($el)($scope);
  10772 + })
  10773 +
  10774 + var $all = $('#termlistfilter_'+windowviewid).appendTo('#searchListDiv_' + windowviewid);
  10775 + $compile($all)($scope);
  10776 +
  10777 + if(isbuttionclick)
  10778 + {
  10779 + $timeout(function () {
  10780 + $('#termlistfilter_'+windowviewid).focus();
  10781 + }, 200);
  10782 + }
  10783 +
10560 10784 }
10561 10785 else {
10562 10786 $rootScope.daloadSearchData(windowviewid);
... ... @@ -10567,67 +10791,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10567 10791 $scope.HideSearch = function () {
10568 10792 var len= (event.currentTarget.id).split("_").length;
10569 10793 var windowviewid = (event.currentTarget.id).split("_")[len-1];
10570   -
  10794 +
10571 10795 $timeout(function () {
10572   - $("#termlistfilter_" + windowviewid).css("display", "none");
10573   - if ($('#searchListDiv_' + windowviewid).html() != "") {
10574   - $('#searchListDiv_' + windowviewid).empty();
10575   - }
10576   - }, 500);
10577   -
10578   - }
10579   -
10580   - $scope.jumpToTerm = function (event) {
10581   - var serachedTermId=event.target.id;
10582   - var len= (serachedTermId).split("_").length;
10583   - var windowviewid = (serachedTermId).split("_")[len-1];
10584   - $rootScope.UnsaveCurriculum = true;
10585   - $rootScope.isTermClicked = true;
10586   - var currenttermidTxt=$('#' + serachedTermId).text();
10587   -
10588   - $scope.SetwindowStoreData(windowviewid,'searchSelectedText',currenttermidTxt);
10589   - $('#termList option[selected="selected"]').attr("selected", false);
10590   - $('#termList option[value="' + currenttermidTxt + '"]').attr("selected", true);
10591   - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
10592   - $('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
10593   -
10594   - $scope.DisableUI();
10595   -
10596   - // clear previousHighlightList and Terms and false multiAnnotation
10597   - $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
10598   - $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
10599   - $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);
10600   - $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',false);
10601   -
10602   - $("#typedTermName_" + windowviewid).val(event.target.innerHTML);
10603   -
10604   - $scope.HighlightBodyOnListManagerSelection(serachedTermId, false, windowviewid);
10605   -
10606   - // $scope.SetwindowStoreData(windowviewid,'IsSearchVisible',false);
10607   - $scope.IsSearchVisible = false;
10608   - console.log("$scope.IsSearchVisible = false INSIDE $scope.jumpToTerm ")
10609   - $scope.SetwindowStoreData(windowviewid,'isNormalMode',false);
10610   -
10611   - //Highlight only Highlight button
10612   -
10613   - $("#btnHighLight_" + windowviewid).addClass("btn-primary");
10614   - $("#btnHighLight_" + windowviewid).removeClass("btn-black");
10615   -
10616   - if (!$("#btnNormalMode_" + windowviewid).hasClass("btn-black")) {
10617   - $("#btnNormalMode_" + windowviewid).addClass("btn-black");
10618   - }
10619   -
10620   - if (!$("#btnExtract_" + windowviewid).hasClass("btn-black")) {
10621   - $("#btnExtract_" + windowviewid).addClass("btn-black");
10622   - }
10623   -
10624   - if ($("#btnExtract_" + windowviewid).hasClass("btn-primary")) {
10625   - $("#btnExtract_" + windowviewid).removeClass("btn-primary");
10626   - }
10627   -
10628   - if ($("#btnNormalMode_" + windowviewid).hasClass("btn-primary")) {
10629   - $("#btnNormalMode_" + windowviewid).removeClass("btn-primary");
10630   - }
  10796 + if(!$scope.IsSearchVisible)
  10797 + {
  10798 + $("#termlistfilter_" + windowviewid).empty();
  10799 + $("#termlistfilter_" + windowviewid).css("display", "none");
  10800 + }
  10801 +
  10802 + }, 600);
10631 10803  
10632 10804 }
10633 10805  
... ... @@ -10731,7 +10903,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10731 10903  
10732 10904 if (VocabTermTxtfilter != null || VocabTermTxtfilter != undefined) {
10733 10905 for (var j = 0; j < VocabTermTxtfilter.length; j++) {
10734   - var $el = $('<option title ="' + VocabTermTxtfilter[j]._TermText + '" id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ '>' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList')
  10906 + var $el = $('<option title ="' + VocabTermTxtfilter[j]._TermText + '" id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ ' style="margin-right:-12px">' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList')
10735 10907 $compile($el)($scope);
10736 10908  
10737 10909 }
... ... @@ -10764,11 +10936,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10764 10936 if (isTermListOptionClicked == true) {
10765 10937 $('#typedTermName_' + windowviewid).val('');
10766 10938 }
10767   -
  10939 + else
  10940 + {
  10941 + $('#typedTermName_' + windowviewid).val(currenttermidTxt);
  10942 + }
10768 10943 if ($scope.GetwindowStoreData(windowviewid,'isTransparencyActivated')) {
10769 10944 $scope.CloseTransparencyBox(false,windowviewid);
10770 10945 }
10771   - console.log('inside HighlightBodyOnListManagerSelection actualTermNumber= ' + actualTermNumber)
10772 10946 // Terms search in the Search list should be disable in the List Manager and Vice-Versa.
10773 10947 var prevId=$scope.GetwindowStoreData(windowviewid,'prevId');
10774 10948 if (prevId == actualTermNumber) {
... ... @@ -10777,13 +10951,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10777 10951 else {
10778 10952 $scope.DisableUI();
10779 10953  
  10954 + // clear previousHighlightList and Terms and false multiAnnotation
  10955 + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
  10956 + $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
  10957 + $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);
  10958 + $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',false);
  10959 + $scope.SetwindowStoreData(windowviewid,'isNormalMode',false);
10780 10960 $scope.SetwindowStoreData(windowviewid,'prevId',actualTermNumber);
10781 10961  
10782 10962 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
10783 10963 $("#termList").find("option[id=" + selectedtermid + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
10784   - $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
10785   - $("div#backdrop #termlistfilter li").find("a[id=" + selectedtermid + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
10786   -
  10964 +
10787 10965 var isListManagerSelected=true;
10788 10966 $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',isListManagerSelected);
10789 10967 //---
... ... @@ -10805,7 +10983,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10805 10983 $scope.removeBodySyetemSelectionClass(windowviewid,"");
10806 10984 //1.
10807 10985 $scope.SetwindowStoreData(windowviewid,'actualTermNumber',actualTermNumber);
10808   - console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + actualTermNumber)
10809 10986 $scope.setLayerNumberAndHighlightByTermList(windowviewid);
10810 10987 }
10811 10988 }
... ... @@ -11183,7 +11360,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
11183 11360  
11184 11361  
11185 11362 for (var j = 0; j < VocabTermTxtfilter.length; j++) {
11186   - var $el = $('<option id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ '>' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList')
  11363 + var $el = $('<option id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ 'style="margin-right:-12px">' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList')
11187 11364 $compile($el)($scope);
11188 11365 }
11189 11366  
... ... @@ -11303,7 +11480,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
11303 11480  
11304 11481 var len = (event.target.id).split("_").length;
11305 11482 var windowviewid = (event.target.id).split("_")[len - 1];
11306   -
11307 11483 var date = new Date();
11308 11484 var newtimestamp = date.getTime();
11309 11485  
... ... @@ -11319,27 +11495,38 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
11319 11495  
11320 11496 $scope.showFilteredTerms = function (windowviewid) {
11321 11497  
11322   - // console.log('showFilteredTerms is called' );
11323   -
11324   - $('#searchListDiv_' + windowviewid).empty();
11325   -
11326 11498 var lexiconInd = $scope.GetwindowStoreData(windowviewid, 'primaryLexiconInd');
11327 11499  
11328 11500 var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray')[lexiconInd].vocabTermTxt;
11329 11501  
11330 11502 var searchvalue = $("#typedTermName_" + windowviewid).val();
  11503 +
11331 11504 var searchfilterdata = $filter('filter')(vocabTermDataArray, searchvalue);
11332   - $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 10);
11333   -
11334   - var $e2 = $('<ul id="termlistfilter_' + windowviewid + '" class="form-control dropdown-menu ng-scope" style="height:132px;width:100%;overflow-y:scroll;position:absolute;display:block;z-index:60001;"><li class="ng-scope" ng-repeat="item in limitTofilterdata">' +
11335   - '<a id="{{item._ActualTermNumber}}_'+windowviewid+'" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
11336   - ' </li></ul>').appendTo('#searchListDiv_' + windowviewid);
11337   - $compile($e2)($scope);
11338 11505  
  11506 + if(searchvalue.trim()!="")
  11507 + {
  11508 + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText.length');
  11509 + }
  11510 + else
  11511 + {
  11512 + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText');
  11513 + }
  11514 +
  11515 + $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 20);
11339 11516  
11340   - $("#termlistfilter_" + windowviewid).css("display", "block");
11341   -
  11517 + $('#termlistfilter_'+windowviewid).css("display", "block");
  11518 + $('#termlistfilter_'+windowviewid).empty();
  11519 +
  11520 + angular.forEach($scope.limitTofilterdata, function (value2, key2) {
  11521 + var $el = $('<option id=' + value2._ActualTermNumber +'_' +windowviewid+ '>' + value2._TermText + '</option>').appendTo('#termlistfilter_' + windowviewid);
  11522 + $compile($el)($scope);
  11523 + })
  11524 +
  11525 + var $all = $('#termlistfilter_'+windowviewid).appendTo('#searchListDiv_' + windowviewid);
  11526 + $compile($all)($scope);
  11527 +
11342 11528 };
  11529 +
11343 11530 $scope.ApplySearch = function (event) {
11344 11531 var len= (event.currentTarget.id).split("_").length;
11345 11532 var windowviewid = (event.currentTarget.id).split("_")[len-1];
... ... @@ -11410,7 +11597,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
11410 11597 var totalstructures=0;
11411 11598 angular.forEach(searchfilterdata[primaryLexiconIndex].VocabTermData.VocabTerms.Term, function (value2, key2) {
11412 11599 totalstructures=totalstructures+1;
11413   - var $el = $('<option id=' + value2._ActualTermNumber +'_' +windowviewid+ '>' + value2._TermText + '</option>').appendTo('#searchTermListUl_' + windowviewid);
  11600 + var $el = $('<option id=' + value2._ActualTermNumber +'_' +windowviewid+ ' style="margin-right:-12px">' + value2._TermText + '</option>').appendTo('#searchTermListUl_' + windowviewid);
11414 11601 $compile($el)($scope);
11415 11602 })
11416 11603 var termsTotal = '<span class="pull-left marginTop5">' + totalstructures + ' Structures</span>';
... ... @@ -11529,19 +11716,16 @@ function OnSearch(event) {
11529 11716 scope.$apply(function () {
11530 11717 var len= (event.currentTarget.id).split("_").length;
11531 11718 var windowviewid = (event.currentTarget.id).split("_")[len-1];
11532   - scope.ShowSearch(windowviewid);
11533   - });
11534   -}
11535 11719  
11536   -function selectTerm(event) {
11537   - console.log('selectTerm is called outside ');
11538   - var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
11539   - scope.$apply(function () {
11540   - scope.jumpToTerm(event);
  11720 + if((event.currentTarget.id).match('btnDATermSearch'))
  11721 + scope.ShowSearch(windowviewid,true);
  11722 + else
  11723 + {
  11724 + scope.ShowSearch(windowviewid,false);
  11725 + }
11541 11726 });
11542 11727 }
11543 11728  
11544   -
11545 11729 function refreshTermListOnSystem(bodysystemId) {
11546 11730 console.log('refreshTermListOnSystem is called outside ');
11547 11731 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
... ... @@ -11697,6 +11881,7 @@ function viewChange(event) {
11697 11881  
11698 11882 }
11699 11883  
  11884 +
11700 11885 //sidebar toggle
11701 11886 function SideBarToggleDA(event) {
11702 11887 var len = (event.currentTarget.id).split("_").length;
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -995,6 +995,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
995 995 $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
996 996 $("#messageModal").modal('show');
997 997 }
  998 + else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && (result.IsSubscriptionNotStart)) {
  999 + // validation for new license which license start date is future date .
  1000 + $rootScope.isVisibleLogin = true;
  1001 + $rootScope.LoginEnableUI();
  1002 + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_NOT_START_MESSAGE + result.SubscriptionStartDate + '.';
  1003 + $("#messageModal").modal('show');
  1004 + }
998 1005 else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) {
999 1006 $rootScope.isVisibleLogin = true;
1000 1007 $rootScope.LoginEnableUI();
... ... @@ -1376,7 +1383,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1376 1383 .then(
1377 1384 function (result) {
1378 1385 console.log(result);
1379   - if (result != null) {
  1386 + if (result != null)
  1387 + {
1380 1388 console.log(result);
1381 1389 if (result == LoginConstants.INVALID_CLIENT) {
1382 1390 $rootScope.isVisibleLogin = true;
... ... @@ -1390,7 +1398,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1390 1398 $rootScope.errorMessage = LoginConstants.MSG_NOT_AUTHORIZE_SITE_USER;
1391 1399 $("#messageModal").modal('show');
1392 1400 }
1393   -
1394 1401 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_ACCOUNT_NUMBER_NOT_NULL) {
1395 1402 $rootScope.isVisibleLogin = true;
1396 1403 $rootScope.LoginEnableUI();
... ... @@ -1415,159 +1422,169 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1415 1422 $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE;
1416 1423 $("#messageModal").modal('show');
1417 1424 }
  1425 + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.SITELICENSE_EXPIRED) {
  1426 + $rootScope.isVisibleLogin = true;
  1427 + $rootScope.LoginEnableUI();
  1428 + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
  1429 + $("#messageModal").modal('show');
  1430 + }
  1431 + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.SITELICENSE_NOTSTARTED) {
  1432 + $rootScope.isVisibleLogin = true;
  1433 + $rootScope.LoginEnableUI();
  1434 + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_NOT_START_MESSAGE + result.SubscriptionStartDate + '.';
  1435 + $("#messageModal").modal('show');
  1436 + }
  1437 + else
  1438 + {
  1439 + // update result with session detail
  1440 + result.aiaIdleTime=$rootScope.aiaIdleTime;
  1441 + result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut;
  1442 + result.aiaPingInterval=$rootScope.aiaPingInterval;
  1443 + result.SessionId=siteInfo.SessionId;
  1444 + //display user name
  1445 + $rootScope.userName=result.FirstName+" "+result.LastName;
  1446 + if (typeof result.FirstName != undefined || result.FirstName != "" || result.FirstName != null) {
  1447 + //code for modesty setting
  1448 + if (result.LicenseInfo != null) {
  1449 + if (result.Modesty) {
  1450 + $rootScope.isModestyOn = true;
  1451 + $rootScope.isModestyOff = false;
  1452 + localStorage.setItem("globalModesty", "Y");
  1453 + $rootScope.formsetting = {
  1454 + ethnicity: null,
  1455 + modesty: "Y"
  1456 + }
  1457 + $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
  1458 + }
  1459 + else {
  1460 + $rootScope.isModestyOn = false;
  1461 + $rootScope.isModestyOff = true;
  1462 + localStorage.setItem("globalModesty", "N");
  1463 + $rootScope.formsetting = {
  1464 + ethnicity: null,
  1465 + modesty: "N"
  1466 + }
  1467 + $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
  1468 + }
  1469 + }
  1470 + else {
  1471 + $rootScope.isModestyOn = true;
  1472 + $rootScope.isModestyOff = false;
  1473 + localStorage.setItem("globalModesty", "Y");
  1474 + $rootScope.formsetting = {
  1475 + ethnicity: null,
  1476 + modesty: "Y"
  1477 + }
  1478 + $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
  1479 + }
  1480 + //code for modesty setting
  1481 + $rootScope.aiaModesty = $rootScope.formsetting.modesty;
1418 1482  
  1483 + $rootScope.siteId = result.siteId;
1419 1484  
1420   - else {
1421   - // update result with session detail
1422   - result.aiaIdleTime=$rootScope.aiaIdleTime;
1423   - result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut;
1424   - result.aiaPingInterval=$rootScope.aiaPingInterval;
1425   - result.SessionId=siteInfo.SessionId;
1426   - //display user name
1427   - $rootScope.userName=result.FirstName+" "+result.LastName;
1428   - if (typeof result.FirstName != undefined || result.FirstName != "" || result.FirstName != null) {
1429   - //code for modesty setting
1430   - if (result.LicenseInfo != null) {
1431   - if (result.Modesty) {
1432   - $rootScope.isModestyOn = true;
1433   - $rootScope.isModestyOff = false;
1434   - localStorage.setItem("globalModesty", "Y");
1435   - $rootScope.formsetting = {
1436   - ethnicity: null,
1437   - modesty: "Y"
1438   - }
1439   - $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
1440   - }
1441   - else {
1442   - $rootScope.isModestyOn = false;
1443   - $rootScope.isModestyOff = true;
1444   - localStorage.setItem("globalModesty", "N");
1445   - $rootScope.formsetting = {
1446   - ethnicity: null,
1447   - modesty: "N"
1448   - }
1449   - $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
1450   - }
1451   - }
1452   - else {
1453   - $rootScope.isModestyOn = true;
1454   - $rootScope.isModestyOff = false;
1455   - localStorage.setItem("globalModesty", "Y");
1456   - $rootScope.formsetting = {
1457   - ethnicity: null,
1458   - modesty: "Y"
1459   - }
1460   - $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
1461   - }
1462   - //code for modesty setting
1463   - $rootScope.aiaModesty = $rootScope.formsetting.modesty;
  1485 + // birendra// initialize exp img detail object
  1486 + $rootScope.initializeUserForExportImage(result.Id);
1464 1487  
1465   - $rootScope.siteId = result.siteId;
  1488 + //LicenseId would be zero for admin that is why we set the haveRoleAdmin = true
  1489 + if (result.LicenseId == 0) {
  1490 + $rootScope.haveRoleAdmin = true;
1466 1491  
1467   - // birendra// initialize exp img detail object
1468   - $rootScope.initializeUserForExportImage(result.Id);
  1492 + // set license id -1 for admin
  1493 + $scope.UpdateUserExportImageData(result.Id,'LicenseId',-1)
1469 1494  
1470   - //LicenseId would be zero for admin that is why we set the haveRoleAdmin = true
1471   - if (result.LicenseId == 0) {
1472   - $rootScope.haveRoleAdmin = true;
  1495 + // set enable export image for admin
  1496 + $scope.UpdateUserExportImageData(result.Id,'isExportImage',true);
1473 1497  
1474   - // set license id -1 for admin
1475   - $scope.UpdateUserExportImageData(result.Id,'LicenseId',-1)
  1498 + $rootScope.userData = result;
  1499 + $rootScope.userModules = result.Modules;
1476 1500  
1477   - // set enable export image for admin
1478   - $scope.UpdateUserExportImageData(result.Id,'isExportImage',true);
1479   -
1480   - $rootScope.userData = result;
1481   - $rootScope.userModules = result.Modules;
1482   -
1483   - localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
1484   -
1485   - if (isCommingSoonModel == true) {
1486   -
1487   - ShowAssignedModulesPopup(result.Modules);
  1501 + localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
  1502 +
  1503 + if (isCommingSoonModel == true) {
1488 1504  
  1505 + ShowAssignedModulesPopup(result.Modules);
1489 1506  
1490   - sessionStorage.setItem("loginSession", "true");
1491   - localStorage.setItem('isCommingSoonModel', false);
1492 1507  
1493   - $rootScope.isVisibleLogin = false;
1494   - }
  1508 + sessionStorage.setItem("loginSession", "true");
  1509 + localStorage.setItem('isCommingSoonModel', false);
1495 1510  
  1511 + $rootScope.isVisibleLogin = false;
  1512 + }
1496 1513  
1497   - $location.path('/');
1498 1514  
1499   - }
1500   - else {
1501   - if (result.LicenseInfo != null ) {
  1515 + $location.path('/');
1502 1516  
1503   - //only site instructor allowed to change modesty
1504   - if(result.EditionId!=1 && result.EditionId!=2)
1505   - {
1506   - $("#modestyDiv").css("pointer-events", "none");
1507   - $("#modestyDiv").css("opacity", 0.5);
1508   - $("#modestyDiv").find("*").prop('disabled', true);
1509   - }
  1517 + }
  1518 + else {
  1519 + if (result.LicenseInfo != null ) {
1510 1520  
1511   - // set license id
1512   - $scope.UpdateUserExportImageData(result.Id, 'LicenseId', result.LicenseId)
  1521 + //only site instructor allowed to change modesty
  1522 + if(result.EditionId!=1 && result.EditionId!=2)
  1523 + {
  1524 + $("#modestyDiv").css("pointer-events", "none");
  1525 + $("#modestyDiv").css("opacity", 0.5);
  1526 + $("#modestyDiv").find("*").prop('disabled', true);
  1527 + }
1513 1528  
1514   - // set license type :note 5 for demo/test license
1515   - $scope.UpdateUserExportImageData(result.Id, 'LicenseTypeId', result.LicenseInfo.LicenseTypeId);
  1529 + // set license id
  1530 + $scope.UpdateUserExportImageData(result.Id, 'LicenseId', result.LicenseId)
1516 1531  
1517   - if(result.UserExportImageDetail!=null)
1518   - {
1519   - // set already export image count
1520   - $scope.UpdateUserExportImageData(result.Id,'CountExportImage',result.UserExportImageDetail.CountExportedImage);
  1532 + // set license type :note 5 for demo/test license
  1533 + $scope.UpdateUserExportImageData(result.Id, 'LicenseTypeId', result.LicenseInfo.LicenseTypeId);
1521 1534  
1522   - // set Image limit
1523   - $scope.UpdateUserExportImageData(result.Id,'ExptImageLimit',result.UserExportImageDetail.ExptImageLimit);
  1535 + if(result.UserExportImageDetail!=null)
  1536 + {
  1537 + // set already export image count
  1538 + $scope.UpdateUserExportImageData(result.Id,'CountExportImage',result.UserExportImageDetail.CountExportedImage);
1524 1539  
1525   - // set is enable for export image
1526   - $scope.UpdateUserExportImageData(result.Id,'isExportImage',result.UserExportImageDetail.isExportImage);
1527   - }
  1540 + // set Image limit
  1541 + $scope.UpdateUserExportImageData(result.Id,'ExptImageLimit',result.UserExportImageDetail.ExptImageLimit);
1528 1542  
  1543 + // set is enable for export image
  1544 + $scope.UpdateUserExportImageData(result.Id,'isExportImage',result.UserExportImageDetail.isExportImage);
  1545 + }
1529 1546  
1530   - $rootScope.userData = result;
1531   - $rootScope.userModules = result.Modules;
1532 1547  
1533   - //1. set haveRoleAdmin = false because LicenseInfo is not null
1534   - $rootScope.haveRoleAdmin = false;
  1548 + $rootScope.userData = result;
  1549 + $rootScope.userModules = result.Modules;
1535 1550  
1536   - //2.
1537   - localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
  1551 + //1. set haveRoleAdmin = false because LicenseInfo is not null
  1552 + $rootScope.haveRoleAdmin = false;
1538 1553  
1539   - //5.
1540   - sessionStorage.setItem("loginSession", "true");
1541   - $rootScope.isVisibleLogin = false;
  1554 + //2.
  1555 + localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
1542 1556  
1543   - //6. reset the isCommingSoonModel to false in local storage so that upcomming module pop up would not show again to the user after firts time
1544   - // localStorage.setItem('isCommingSoonModel', false);
  1557 + //5.
  1558 + sessionStorage.setItem("loginSession", "true");
  1559 + $rootScope.isVisibleLogin = false;
1545 1560  
1546   - $location.path('/');
  1561 + //6. reset the isCommingSoonModel to false in local storage so that upcomming module pop up would not show again to the user after firts time
  1562 + // localStorage.setItem('isCommingSoonModel', false);
1547 1563  
1548   - }
1549   - else {
1550   - if ($('#dvTerms').length > 0) {
1551   - $('#dvTerms').html(result.TermsAndConditionsText);
1552   - }
1553   - $rootScope.isVisibleLogin = true;
1554   - $rootScope.LoginEnableUI();
1555   - $('#dvTermCondition').fadeIn();
1556   - $rootScope.userData = result;
1557   - $rootScope.haveRoleAdmin = false;
1558   - localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
1559   - $location.path('/');
1560   - }
1561   - }
1562   - $rootScope.LoginEnableUI();
1563   - // set user session time
1564   - $rootScope.loadUserSession();
  1564 + $location.path('/');
1565 1565  
1566   - }
  1566 + }
  1567 + else {
  1568 + if ($('#dvTerms').length > 0) {
  1569 + $('#dvTerms').html(result.TermsAndConditionsText);
  1570 + }
  1571 + $rootScope.isVisibleLogin = true;
  1572 + $rootScope.LoginEnableUI();
  1573 + $('#dvTermCondition').fadeIn();
  1574 + $rootScope.userData = result;
  1575 + $rootScope.haveRoleAdmin = false;
  1576 + localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
  1577 + $location.path('/');
  1578 + }
  1579 + }
  1580 + $rootScope.LoginEnableUI();
  1581 + // set user session time
  1582 + $rootScope.loadUserSession();
1567 1583  
  1584 + }
1568 1585  
1569   - }
1570 1586 }
  1587 + }
1571 1588  
1572 1589 },
1573 1590  
... ... @@ -2427,7 +2444,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2427 2444 $("#Menuoptionid").addClass("disableMenuoption");
2428 2445 $("#optionsListManagerTab").addClass("disableSubMenu");
2429 2446 $("#annotationToolBarOptions").addClass("disableSubMenu");
2430   - $("#optionsCurriculum").addClass("disableSubMenu");
  2447 + // $("#optionsCurriculum").addClass("disableSubMenu");
2431 2448 $("#optiontSetting").addClass("disableSubMenu");
2432 2449 $("#labExPdfOption").addClass("disableSubMenu");
2433 2450  
... ... @@ -2877,7 +2894,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2877 2894 $("#canvasPaintDA_" + MultiWinId).css("z-index", paintCanvasZindex);
2878 2895  
2879 2896 if ($("#transparencyScale_" + MultiWinId).css("display") == "block") {
2880   - $(".ui-wrapper").css("z-index", paintCanvasZindex);
  2897 + //$(".ui-wrapper").css("z-index", paintCanvasZindex);
2881 2898 }
2882 2899  
2883 2900 }
... ... @@ -3110,7 +3127,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3110 3127 }
3111 3128  
3112 3129 $rootScope.switchToTransparencycanvas = function (paneld) {
3113   -
3114 3130 var PanelElement= $scope.GetPanelElement(paneld);
3115 3131  
3116 3132 var canvasElement = PanelElement.canvasElement;
... ... @@ -3120,84 +3136,22 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3120 3136 var canvasId = canvasElement.id;
3121 3137 var canvasPaintId = canvasPaintElement.id;
3122 3138  
3123   - if ($rootScope.isTBoxModestyVisible == true) {
3124   - var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
3125   - if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
3126   - for (var j = 0; j < modestyTransCanvases.length; j++) {
3127   - var ctx = document.getElementById(modestyTransCanvases[j].id);
3128   -
3129   - if (ctx.style.visibility == "visible") {
3130   -
3131   - if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
3132   -
3133   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
3134   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
3135   - var TransCanvasZindex = ctx.style.zIndex;
3136   - var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
3137   - MaxZindexVal = MaxZindexVal + 1;
3138   - $("#" + canvasId).css("z-index", MaxZindexVal);
3139   - $(".ui-wrapper").css("z-index", MaxZindexVal + 1);
3140   - $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
3141   -
3142   - }
3143   - else {
3144   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
3145   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
3146   - var TransCanvasZindex = ctx.style.zIndex;
3147   - var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
3148   - MaxZindexVal = parseInt(MaxZindexVal + 1);
3149   -
3150   - if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
3151   - $("#" + canvasPaintId).css("z-index", MaxZindexVal);
3152   - }
3153   - else {
3154   -
3155   - $("#" + canvasId).css("z-index", MaxZindexVal);
3156   - $(".ui-wrapper").css("z-index", MaxZindexVal);
3157   - $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
3158   -
3159   -
3160   - }
3161   -
3162   - }
3163   - }
3164   - else {
3165   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
3166   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
3167   - drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
3168   - paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
3169   - if (drawCanvasZindex > paintCanvasZindex) {
3170   - $(".ui-wrapper").css("z-index", drawCanvasZindex);
3171   - $("#" + canvasId).css("z-index", drawCanvasZindex);
3172   - $rootScope.UIWrapperZIndex = drawCanvasZindex;
3173   - }
3174   - else {
3175   - $(".ui-wrapper").css("z-index", paintCanvasZindex);
3176   - $("#" + canvasId).css("z-index", paintCanvasZindex);
3177   - $rootScope.UIWrapperZIndex = paintCanvasZindex;
3178   - }
3179   -
3180   - }
3181   - }
3182   - }
3183   -
  3139 + var drawCanvasZindex = $("#" + canvasId).css("z-index");
  3140 + var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
  3141 + drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
  3142 + paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
  3143 + if (drawCanvasZindex > paintCanvasZindex) {
  3144 + //$(".ui-wrapper").css("z-index", drawCanvasZindex);
  3145 + $("#" + canvasId).css("z-index", drawCanvasZindex);
  3146 + $rootScope.UIWrapperZIndex = drawCanvasZindex;
3184 3147 }
3185   - else {
3186   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
3187   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
3188   - drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
3189   - paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
3190   - if (drawCanvasZindex > paintCanvasZindex) {
3191   - $(".ui-wrapper").css("z-index", drawCanvasZindex);
3192   - $("#" + canvasId).css("z-index", drawCanvasZindex);
3193   - $rootScope.UIWrapperZIndex = drawCanvasZindex;
3194   - }
3195   - else {
3196   - $(".ui-wrapper").css("z-index", paintCanvasZindex);
3197   - $("#" + canvasId).css("z-index", paintCanvasZindex);
3198   - $rootScope.UIWrapperZIndex = paintCanvasZindex;
3199   - }
  3148 + else
  3149 + {
  3150 + //$(".ui-wrapper").css("z-index", paintCanvasZindex);
  3151 + $("#" + canvasId).css("z-index", paintCanvasZindex);
  3152 + $rootScope.UIWrapperZIndex = paintCanvasZindex;
3200 3153 }
  3154 +
3201 3155 }
3202 3156  
3203 3157 $rootScope.DrawingMode = function () {
... ... @@ -3814,65 +3768,17 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3814 3768 var canvasId = canvasElement.id;
3815 3769 var canvasPaintId = canvasPaintElement.id;
3816 3770  
3817   - if ($rootScope.isTBoxModestyVisible == true) {
3818   - var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
3819   - if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
3820   - for (var j = 0; j < modestyTransCanvases.length; j++) {
3821   - var ctx = document.getElementById(modestyTransCanvases[j].id);
3822   - if (ctx.style.visibility == "visible") {
3823   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
3824   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
3825   - var TransCanvasZindex = ctx.style.zIndex;
3826   - var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
3827   - MaxZindexVal = MaxZindexVal + 1;
3828   - if (($("#" + canvasPaintId).css("display") == "block") && ($("#" + canvasId).css("display") == "block")) {
3829   - if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
3830   - $("#" + canvasId).css("z-index", MaxZindexVal);
3831   - $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
3832   - }
3833   - else {
3834   -
3835   - if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
3836   - $("#" + canvasPaintId).css("z-index", MaxZindexVal);
3837   - }
3838   - else {
3839   - $("#" + canvasId).css("z-index", MaxZindexVal);
3840   - }
3841   - }
3842   - }
3843   - }
3844   - else {
3845   -
3846   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
3847   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
3848   - var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex);
3849   - MaxZindexVal = parseInt(MaxZindexVal + 1);
3850   -
3851   - if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
3852   - $("#" + canvasPaintId).css("z-index", MaxZindexVal);
3853   - }
3854   -
3855   - else {
3856   - $("#" + canvasId).css("z-index", MaxZindexVal);
3857   - }
3858   -
3859   - }
3860   - }
3861   - }
  3771 + var canvasPaint_zIndex = $("#" + canvasPaintId).css("z-index");
  3772 + var canvas_zIndex = $("#" + canvasId).css("z-index");
  3773 + if (canvas_zIndex > canvasPaint_zIndex) {
  3774 + canvasPaint_zIndex = parseInt(canvas_zIndex) + 2;
3862 3775  
3863 3776 }
3864 3777 else {
3865   - var canvasPaint_zIndex = $("#" + canvasPaintId).css("z-index");
3866   - var canvas_zIndex = $("#" + canvasId).css("z-index");
3867   - if (canvas_zIndex > canvasPaint_zIndex) {
3868   - canvasPaint_zIndex = parseInt(canvas_zIndex) + 2;
3869   -
3870   - }
3871   - else {
3872   - canvasPaint_zIndex = parseInt(canvasPaint_zIndex) + 2;
3873   - }
3874   - $("#" + canvasPaintId).css("z-index", canvasPaint_zIndex);
  3778 + canvasPaint_zIndex = parseInt(canvasPaint_zIndex) + 2;
3875 3779 }
  3780 + $("#" + canvasPaintId).css("z-index", canvasPaint_zIndex);
  3781 +
3876 3782 }
3877 3783  
3878 3784 $rootScope.DrawCircle = function (e) {
... ... @@ -4131,72 +4037,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4131 4037 var canvasId = canvasElement.id;
4132 4038 var canvasPaintId = canvasPaintElement.id;
4133 4039  
4134   - if ($rootScope.isTBoxModestyVisible == true) {
4135   - var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
4136   - if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
4137   - for (var j = 0; j < modestyTransCanvases.length; j++) {
4138   - var ctx = document.getElementById(modestyTransCanvases[j].id);
4139   -
4140   - if (ctx.style.visibility == "visible") {
4141   -
4142   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
4143   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
4144   - var TransCanvasZindex = ctx.style.zIndex;
4145   - var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
4146   - MaxZindexVal = MaxZindexVal + 1;
4147   -
4148   -
4149   - if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
  4040 + var drawCanvasZindex = $("#" + canvasId).css("z-index");
  4041 + var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
4150 4042  
4151   - $("#" + canvasId).css("z-index", MaxZindexVal);
4152   - $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
4153   -
4154   - }
4155   - else {
4156   -
4157   - if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
4158   - $("#" + canvasPaintId).css("z-index", MaxZindexVal + 1);
4159   - }
4160   - else
4161   - {
4162   - $("#" + canvasId).css("z-index", MaxZindexVal + 1);
4163   - }
4164 4043  
4165   - }
4166   - }
4167   - else {
4168   -
4169   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
4170   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
4171   -
4172   - var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex);
4173   - MaxZindexVal = parseInt(MaxZindexVal + 1);
4174   -
4175   - if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
4176   -
4177   - $("#" + canvasPaintId).css("z-index", MaxZindexVal);
4178   - }
4179   -
4180   - else {
4181   - $("#" + canvasId).css("z-index", MaxZindexVal);
4182   - }
4183   - }
4184   - }
4185   - }
  4044 + if (drawCanvasZindex > paintCanvasZindex) {
  4045 + paintCanvasZindex = parseInt(drawCanvasZindex) + 1;
  4046 + }
  4047 + else
  4048 + {
  4049 + paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
4186 4050 }
4187   - else {
4188   -
4189   - var drawCanvasZindex = $("#" + canvasId).css("z-index");
4190   - var paintCanvasZindex = $("#" + canvasPaintId).css("z-index");
4191   -
4192 4051  
4193   - if (drawCanvasZindex > paintCanvasZindex) {
4194   - paintCanvasZindex = parseInt(drawCanvasZindex) + 1;
4195   - } else {
4196   - paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
4197   - }
4198   - $("#" + canvasId).css("z-index", paintCanvasZindex);
4199   - }
  4052 + $("#" + canvasId).css("z-index", paintCanvasZindex);
4200 4053  
4201 4054 }
4202 4055 //birendra
... ... @@ -4509,9 +4362,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4509 4362 {
4510 4363 $rootScope.picAnnotationToolEvent(MultiWinId);
4511 4364 }
4512   - //for paint brush
4513   - $rootScope.switchCanvasToPaintCanvas(paneld);
4514   -
  4365 +
4515 4366 }
4516 4367 }
4517 4368 }
... ... @@ -4524,9 +4375,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4524 4375 var shapeData=shapeStates[shapeindx];
4525 4376 $rootScope.AutoDrawShapeByData(canvasId,shapeData);
4526 4377 }
4527   -
  4378 +
4528 4379 if(paintCanvasState!=undefined && paintCanvasState.length>0)
4529 4380 {
  4381 + if (modulePanel != undefined && modulePanel.length>0) {
  4382 + for (var index = 0 ; index < modulePanel.length; index++) {
  4383 + var paneld = modulePanel[index].id;
  4384 + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel"))
  4385 + {
  4386 + //for paint brush
  4387 + $rootScope.switchCanvasToPaintCanvas(paneld);
  4388 +
  4389 + }
  4390 + }
  4391 + }
4530 4392 var drawingPoints=paintCanvasState
4531 4393 //auto save last cb paint
4532 4394 $scope.PaintEraseEvent();
... ... @@ -7516,7 +7378,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
7516 7378 isDrawing = true;
7517 7379 currentCanvasId=canvasId;
7518 7380 var verticalScrollPosition = canvasDiv.scrollTop;
7519   - var horizontlScrollPosition = canvasDiv.scrollLeft;
  7381 + var horizontlScrollPosition = canvasDiv.scrollLeft;
  7382 + var MaxZindexVal=12001;
  7383 + if(canvasId.match("canvasDA"))
  7384 + {
  7385 + var drawCanvasZindex = $("#" + canvasId).css("z-index");
  7386 + var dpaintCanvasZindex = $("#" + canvasId).css("z-index");
  7387 + var tpboxZindex = $(".ui-wrapper").css("z-index");
  7388 + MaxZindexVal = Math.max(drawCanvasZindex, dpaintCanvasZindex);
  7389 + if(tpboxZindex!=undefined)
  7390 + MaxZindexVal = Math.max(MaxZindexVal, tpboxZindex);
  7391 +
  7392 + MaxZindexVal = parseInt(MaxZindexVal + 1);
  7393 +
  7394 + }
  7395 +
7520 7396 var $ua = navigator.userAgent;
7521 7397 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
7522 7398 if(event.type == 'touchstart' || event.type == 'touchmove' || event.type == 'touchend' || event.type == 'touchcancel'){
... ... @@ -7542,39 +7418,39 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
7542 7418 case "Line":
7543 7419 $(".line").remove();
7544 7420 $rootScope.isLinePreviewCompleted = true;
7545   - $("#" + canvasDivId).append("<div class='line' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;'></div>");
  7421 + $("#" + canvasDivId).append("<div class='line' style='z-index:"+MaxZindexVal+";border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;'></div>");
7546 7422 $rootScope.Annotationangle();
7547 7423 break;
7548 7424 case "Arrow":
7549 7425 $(".arrow").remove();
7550 7426 $rootScope.isArrowPreviewCompleted = true;
7551   - $("#" + canvasDivId).append("<div class='arrow' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div class='arrowPoint' style='border-bottom: 9px solid transparent;border-left: 12px dashed #ccc;border-top: 7px solid transparent;height: 0;left:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;position: absolute;top: -8px;width: 0;'></div></div>");
  7427 + $("#" + canvasDivId).append("<div class='arrow' style='z-index:"+MaxZindexVal+";border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div class='arrowPoint' style='border-bottom: 9px solid transparent;border-left: 12px dashed #ccc;border-top: 7px solid transparent;height: 0;left:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;position: absolute;top: -8px;width: 0;'></div></div>");
7552 7428 $rootScope.Annotationangle();
7553 7429 break;
7554 7430 case "Pin":
7555 7431 $(".pin").remove();
7556 7432 $rootScope.isPinPreviewCompleted = true;
7557   - $("#" + canvasDivId).append("<div class='pin' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div class='pinPoint' style='background-color:#fff;left:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;position: absolute;top: -6px;height:12px;width:12px;border:2px dashed #808080;border-radius:50%;'></div></div>");
  7433 + $("#" + canvasDivId).append("<div class='pin' style='z-index:"+MaxZindexVal+";border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div class='pinPoint' style='background-color:#fff;left:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;position: absolute;top: -6px;height:12px;width:12px;border:2px dashed #808080;border-radius:50%;'></div></div>");
7558 7434 $rootScope.Annotationangle();
7559 7435 break;
7560 7436 case "Circle":
7561 7437 $(".circle").remove();
7562 7438 $rootScope.isCirclePreviewCompleted = true;
7563   - $("#" + canvasDivId).append("<div class='circle' style='z-index:12001;border-radius:50%;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
  7439 + $("#" + canvasDivId).append("<div class='circle' style='z-index:"+MaxZindexVal+";border-radius:50%;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
7564 7440 //updated in reverse direction
7565 7441 $rootScope.Annotationangle();
7566 7442 break;
7567 7443 case "Rectangle":
7568 7444 $(".rectangle").remove();
7569 7445 $rootScope.isRectanglePreviewCompleted = true;
7570   - $("#" + canvasDivId).append("<div class='rectangle' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
  7446 + $("#" + canvasDivId).append("<div class='rectangle' style='z-index:"+MaxZindexVal+";border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
7571 7447 //updated in reverse direction
7572 7448 $rootScope.Annotationangle();
7573 7449 break;
7574 7450 case "TextArea":
7575 7451 $(".textarea").remove();
7576 7452 $rootScope.isTextAreaPreviewCompleted = true;
7577   - $("#" + canvasDivId).append("<div class='textarea' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
  7453 + $("#" + canvasDivId).append("<div class='textarea' style='z-index:"+MaxZindexVal+";border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
7578 7454 //updated in reverse direction
7579 7455 $rootScope.Annotationangle();
7580 7456 break;
... ... @@ -9174,18 +9050,26 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9174 9050  
9175 9051 }
9176 9052  
  9053 + $rootScope.CloseExportModal = function () {
  9054 +
  9055 + $(".modal-backdrop").css("opacity", "0");
  9056 + $(".modal-backdrop").css("z-index", "0");
  9057 + $("#exportfilename").val("");
  9058 + $("#filename_open").val("");
  9059 + $(".export-image").modal("hide");
  9060 + $(".export-image-ipad").modal("hide");
  9061 + }
9177 9062  
9178 9063 $rootScope.SaveImagefile = function () {
9179 9064 // select one module from multiple
9180 9065 var PanelElement= $scope.GetPanelElement($rootScope.panelNameWithCb);
9181   -
9182 9066 var canvasDiv = PanelElement.canvasDivElement;
9183 9067 if (canvasDiv == null || canvasDiv == undefined) return;
9184 9068 var canvasDivId = canvasDiv.id;
  9069 + var fileName = $("#exportfilename").val() + '.jpg';
9185 9070 $("#" + canvasDivId).append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
9186 9071 html2canvas($("#" + canvasDivId), {
9187   - onrendered: function (canvas) {
9188   - var fileName = document.getElementById("filename").value + '.jpg';
  9072 + onrendered: function (canvas) {
9189 9073 if (typeof (fileName) == "undefined" || fileName == ".jpg")
9190 9074 fileName = "Untitled.jpg"
9191 9075  
... ... @@ -9199,7 +9083,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9199 9083 console.log(blob);
9200 9084 saveAs(blob, fileName);
9201 9085 $("#exportlogo").remove();
9202   - $("#filename").val("");
  9086 + $("#exportfilename").val("");
9203 9087  
9204 9088 var imageInfo=$rootScope.UserImageExportData[0];
9205 9089  
... ... @@ -9207,70 +9091,70 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9207 9091 .then(
9208 9092 function (result) {
9209 9093  
9210   - if ($rootScope.DaWindowData != undefined && $rootScope.DaWindowData.length > 0) {
9211   - for (var i = 0; i < $rootScope.DaWindowData.length; i++) {
9212   - $scope.updatedWindowListForSaveCB={
  9094 + // if ($rootScope.DaWindowData != undefined && $rootScope.DaWindowData.length > 0) {
  9095 + // for (var i = 0; i < $rootScope.DaWindowData.length; i++) {
  9096 + // $scope.updatedWindowListForSaveCB={
9213 9097  
9214   - // bodySystemTermList: $rootScope.DaWindowData[i].BodySystemData,
9215   - isTitleBarVisible: false,
9216   - highlightOptionsSelectedId: 0,
9217   - selectedStructureID: 0,//N
9218   - contentDescriptorId: 0,
9219   - callOuts: $rootScope.DaWindowData[i].CurriculumTermData,
9220   -
9221   - layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1,
9222   - isModestyOn: $rootScope.DaWindowData[i].ModestyValue,
  9098 + // // bodySystemTermList: $rootScope.DaWindowData[i].BodySystemData,
  9099 + // isTitleBarVisible: false,
  9100 + // highlightOptionsSelectedId: 0,
  9101 + // selectedStructureID: 0,//N
  9102 + // contentDescriptorId: 0,
  9103 + // callOuts: $rootScope.DaWindowData[i].CurriculumTermData,
  9104 +
  9105 + // layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1,
  9106 + // isModestyOn: $rootScope.DaWindowData[i].ModestyValue,
9223 9107  
9224   - isTopToolBarVisible: false,
9225   - clickedTermList: $rootScope.DaWindowData[i].fullTermlist,
9226   - minimised: $rootScope.DaWindowData[i].minimised,
9227   - windowTitle: $rootScope.DaWindowData[i].currentViewTitle,
  9108 + // isTopToolBarVisible: false,
  9109 + // clickedTermList: $rootScope.DaWindowData[i].fullTermlist,
  9110 + // minimised: $rootScope.DaWindowData[i].minimised,
  9111 + // windowTitle: $rootScope.DaWindowData[i].currentViewTitle,
9228 9112  
9229   - maximised: $rootScope.DaWindowData[i].maximised,
9230   - size: {
9231   - width: $rootScope.DaWindowData[i].width,
9232   - height: $rootScope.DaWindowData[i].height
9233   - },
9234   - id: $rootScope.DaWindowData[i].voId,
  9113 + // maximised: $rootScope.DaWindowData[i].maximised,
  9114 + // size: {
  9115 + // width: $rootScope.DaWindowData[i].width,
  9116 + // height: $rootScope.DaWindowData[i].height
  9117 + // },
  9118 + // id: $rootScope.DaWindowData[i].voId,
9235 9119  
9236   - imageId: $rootScope.DaWindowData[i].imageId,
9237   - position: {
9238   - top: $rootScope.DaWindowData[i].top,
9239   - left: $rootScope.DaWindowData[i].left,
9240   - },
9241   - mType: $rootScope.DaWindowData[i].moduleName,
9242   - containsCapturedContent: true,
  9120 + // imageId: $rootScope.DaWindowData[i].imageId,
  9121 + // position: {
  9122 + // top: $rootScope.DaWindowData[i].top,
  9123 + // left: $rootScope.DaWindowData[i].left,
  9124 + // },
  9125 + // mType: $rootScope.DaWindowData[i].moduleName,
  9126 + // containsCapturedContent: true,
9243 9127  
9244   - zoom: $rootScope.DaWindowData[i].zoomInOut,
9245   - skinId: $rootScope.DaWindowData[i].curentEthnicity,
9246   - isResizeLock: false , //N
9247   - mode: $rootScope.DaWindowData[i].mode,
9248   - windowListId: 0,//N
9249   - canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition,
9250   - canvasHScrollX: $rootScope.DaWindowData[i].CanvasDivLeftPosition,
9251   - isCallOutVisible: false,
9252   - annotationData:$rootScope.DaWindowData[i].annotationData,
9253   - isLeftToolBarVisible: false,
9254   - isModuleLoaded: false,
9255   - searchSelectedText: $rootScope.DaWindowData[i].searchSelectedText,
9256   - prevId: $rootScope.DaWindowData[i].prevId,
  9128 + // zoom: $rootScope.DaWindowData[i].zoomInOut,
  9129 + // skinId: $rootScope.DaWindowData[i].curentEthnicity,
  9130 + // isResizeLock: false , //N
  9131 + // mode: $rootScope.DaWindowData[i].mode,
  9132 + // windowListId: 0,//N
  9133 + // canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition,
  9134 + // canvasHScrollX: $rootScope.DaWindowData[i].CanvasDivLeftPosition,
  9135 + // isCallOutVisible: false,
  9136 + // annotationData:$rootScope.DaWindowData[i].annotationData,
  9137 + // isLeftToolBarVisible: false,
  9138 + // isModuleLoaded: false,
  9139 + // searchSelectedText: $rootScope.DaWindowData[i].searchSelectedText,
  9140 + // prevId: $rootScope.DaWindowData[i].prevId,
9257 9141  
9258   - isTransparent: $rootScope.DaWindowData[i].isTransparent,
9259   - transparencyBounds: $rootScope.DaWindowData[i].transparencyBounds,
9260   - transparencyValue: $rootScope.DaWindowData[i].transNumber,
9261   - layerNumberTransparency: $rootScope.DaWindowData[i].layerNumberTransparency,
9262   - transparencyX: $rootScope.DaWindowData[i].transparencyX,
9263   - transparencyY: $rootScope.DaWindowData[i].transparencyY,
9264   - layerNumberBeforeTBDraw: $rootScope.DaWindowData[i].layerNumberBeforeTBDraw,
9265   - showHideAnnotations: $rootScope.DaWindowData[i].showHideAnnotations
  9142 + // isTransparent: $rootScope.DaWindowData[i].isTransparent,
  9143 + // transparencyBounds: $rootScope.DaWindowData[i].transparencyBounds,
  9144 + // transparencyValue: $rootScope.DaWindowData[i].transNumber,
  9145 + // layerNumberTransparency: $rootScope.DaWindowData[i].layerNumberTransparency,
  9146 + // transparencyX: $rootScope.DaWindowData[i].transparencyX,
  9147 + // transparencyY: $rootScope.DaWindowData[i].transparencyY,
  9148 + // layerNumberBeforeTBDraw: $rootScope.DaWindowData[i].layerNumberBeforeTBDraw,
  9149 + // showHideAnnotations: $rootScope.DaWindowData[i].showHideAnnotations
9266 9150  
9267 9151  
9268   - }
9269   - }
  9152 + // }
  9153 + // }
9270 9154  
9271   - }
  9155 + // }
9272 9156  
9273   - localStorage.setItem("daDataObject",JSON.stringify($scope.updatedWindowListForSaveCB) );
  9157 + //localStorage.setItem("daDataObject",JSON.stringify($scope.updatedWindowListForSaveCB) );
9274 9158 if(result!=null && result!="ADMIN" )
9275 9159 {
9276 9160 var userid= $rootScope.userData.Id;
... ... @@ -9297,21 +9181,23 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9297 9181  
9298 9182 }
9299 9183 });
9300   - $(".export-image").css("display", "none");
  9184 + $(".modal-backdrop").css("opacity", "0");
  9185 + $(".modal-backdrop").css("z-index", "0");
  9186 + $(".export-image").modal("hide")
9301 9187  
9302 9188 };
9303 9189  
9304 9190 $rootScope.SaveOpenImagefile = function () {
9305 9191 // select one module from multiple
9306 9192 var PanelElement= $scope.GetPanelElement($rootScope.panelNameWithCb);
9307   -
  9193 + var fileName = $("#filename_open").val() + '.jpg';
9308 9194 var canvasDiv = PanelElement.canvasDivElement;
9309 9195 if (canvasDiv == null || canvasDiv == undefined) return;
9310 9196 var canvasDivId = canvasDiv.id;
9311 9197 $("#" + canvasDivId).append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
9312 9198 html2canvas($("#" + canvasDivId), {
9313 9199 onrendered: function (canvas) {
9314   - var fileName = document.getElementById("filename_open").value + '.jpg';
  9200 +
9315 9201 if (typeof (fileName) == "undefined" || fileName == ".jpg")
9316 9202 fileName = "Untitled.jpg"
9317 9203  
... ... @@ -9340,7 +9226,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9340 9226 .then(
9341 9227 function (result) {
9342 9228  
9343   - localStorage.setItem("daDataObject",JSON.stringify($scope.updatedWindowListForSaveCB) );
  9229 + //localStorage.setItem("daDataObject",JSON.stringify($scope.updatedWindowListForSaveCB) );
9344 9230 if(result!=null && result!="ADMIN" )
9345 9231 {
9346 9232 var userid= $rootScope.userData.Id;
... ... @@ -9367,8 +9253,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9367 9253  
9368 9254 }
9369 9255 });
9370   - $(".export-image-ipad").css("display", "none");
9371   -
  9256 + $(".modal-backdrop").css("opacity", "0");
  9257 + $(".modal-backdrop").css("z-index", "0");
  9258 + $(".export-image-ipad").modal("hide");
  9259 +
9372 9260 };
9373 9261  
9374 9262 }]
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
... ... @@ -40,7 +40,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
40 40 'width': 0,
41 41 'height': 0,
42 42 'minimised': false,
43   - 'maximised': false,
  43 + 'maximised': true,
44 44 'minmaxAutoEvent':true,
45 45 'isLabExChanged':false
46 46  
... ... @@ -311,8 +311,9 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
311 311 var keywords = $scope.leOpenInOtherModules.id;
312 312  
313 313 $scope.SetLEwindowStoreData(windowviewid, 'keywords', keywords);
314   - var isMaximize = $scope.leOpenInOtherModules.maximised;
315   - var isMinimize = $scope.leOpenInOtherModules.minimised;
  314 + var isMaximize = $scope.leOpenInOtherModules.maximised!=undefined?$scope.leOpenInOtherModules.maximised:false;
  315 + var isMinimize = $scope.leOpenInOtherModules.minimised!=undefined?$scope.leOpenInOtherModules.minimised:false;
  316 + ;
316 317 $scope.SetLEwindowStoreData(windowviewid, 'maximised', isMaximize);
317 318 $scope.SetLEwindowStoreData(windowviewid, 'minimised', isMinimize);
318 319  
... ... @@ -537,7 +538,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
537 538 $rootScope.resetMenuOption();
538 539  
539 540 //remove pre event
540   - $("#labImagePanel_" + windowviewid).off("click");
  541 + // $("#labImagePanel_" + windowviewid).off("click");
541 542  
542 543 $("#labImagePanel_" + windowviewid).on('click', function (event) {
543 544 var pnlName = event.currentTarget.id;
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
... ... @@ -213,8 +213,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
213 213 var aiTitle = $scope.VidOpenInOtherModules.anatomyTitle;
214 214 $scope.SetVideowindowStoreData(windowviewid, 'currentViewTitle', aiTitle);
215 215 localStorage.setItem("currentViewTitle", aiTitle);
216   - var isMaximize = $scope.VidOpenInOtherModules.maximised;
217   - var isMinimize = $scope.VidOpenInOtherModules.minimised;
  216 + var isMaximize = $scope.VidOpenInOtherModules.maximised!=undefined?$scope.VidOpenInOtherModules.maximised:false;
  217 + var isMinimize = $scope.VidOpenInOtherModules.minimised!=undefined?$scope.VidOpenInOtherModules.minimised:false;
  218 +
218 219 $scope.SetVideowindowStoreData(windowviewid, 'maximised', isMaximize);
219 220 $scope.SetVideowindowStoreData(windowviewid, 'minimised', isMinimize);
220 221  
... ... @@ -447,7 +448,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
447 448 $rootScope.resetMenuOption();
448 449 // call from while open module in CB
449 450 //remove pre event
450   - $("#vidImagePanel_" + windowviewid).off("click");
  451 + // $("#vidImagePanel_" + windowviewid).off("click");
451 452  
452 453 $("#vidImagePanel_" + windowviewid).on('click', function (event) {
453 454 //after drawing annotation click not work on iPad/Android device
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
... ... @@ -224,8 +224,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
224 224 var aiTitle = $scope.picOpenInOtherModules.anatomyTitle;
225 225 $scope.SetPICwindowStoreData(windowviewid, 'currentViewTitle', aiTitle);
226 226 localStorage.setItem("currentViewTitle", aiTitle);
227   - var isMaximize = $scope.picOpenInOtherModules.maximised;
228   - var isMinimize = $scope.picOpenInOtherModules.minimised;
  227 + var isMaximize = $scope.picOpenInOtherModules.maximised!=undefined?$scope.picOpenInOtherModules.maximised:false;
  228 + var isMinimize = $scope.picOpenInOtherModules.minimised!=undefined?$scope.picOpenInOtherModules.minimised:false;
  229 +
229 230 $scope.SetPICwindowStoreData(windowviewid, 'maximised', isMaximize);
230 231 $scope.SetPICwindowStoreData(windowviewid, 'minimised', isMinimize);
231 232  
... ... @@ -281,7 +282,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
281 282 content: '<div>'+
282 283 ' <div class="container-fluid">'+
283 284 ' <div class="row">'+
284   - '<div class="img-thumbnail" style="overflow: hidden;width:100%;position:relative" id="canvasDivPIC_' + windowviewid + '" ><canvas id="canvasPaintPIC_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2277" height="1000" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasPIC_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2277" height="1000" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' +
  285 + '<div class="img-thumbnail" style="overflow: scroll;width:100%;position:relative" id="canvasDivPIC_' + windowviewid + '" ><canvas id="canvasPaintPIC_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2277" height="1000" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasPIC_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2277" height="1000" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' +
285 286 '<img id="mypic_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute">' +
286 287 '</div>'+
287 288 '</div></div></div>',
... ... @@ -374,10 +375,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
374 375  
375 376 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
376 377  
377   - $('#PicView').css("height", $(window).outerHeight() - 65);
378   -
379   - $('#PicView').css("width", $(window).outerWidth() - 15);
380   -
  378 + if (!$rootScope.isCallFromOtherModule) {
  379 + $('#PicView').css("height", $(window).outerHeight() - 65);
  380 + $('#PicView').css("width", $(window).outerWidth() - 15);
  381 + }
  382 +
381 383 var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height();
382 384  
383 385 $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5);
... ... @@ -433,7 +435,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
433 435 $rootScope.resetMenuOption();
434 436  
435 437 //remove pre event
436   - $("#picImagePanel_" + windowviewid).off("click");
  438 + // $("#picImagePanel_" + windowviewid).off("click");
437 439  
438 440 $("#picImagePanel_" + windowviewid).on('click', function (event) {
439 441 //after drawing annotation click not work on iPad/Android device
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -34,21 +34,27 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
34 34 $scope.isListViewDataLoaded = true;
35 35  
36 36 $scope.setActiveTab = function (tabToSet) {
  37 + if(tabToSet=="" ||tabToSet==undefined)
  38 + {
  39 + $scope.activeTab=1;
  40 + }
  41 + else
  42 + {
  43 + $scope.activeTab = tabToSet;
  44 + }
  45 + localStorage.setItem("activeTab", $scope.activeTab);
  46 +
  47 + if ($scope.activeTab == 1) {
  48 + $('#grid-view').css("display", "block");
  49 + $('#list-view').css("display", "none");
  50 + $("#demoView").remove();
  51 + }
  52 + else {
37 53  
38   - $scope.activeTab = tabToSet==undefined?1:tabToSet;
39   - localStorage.setItem("activeTab", $scope.activeTab);
40   -
41   - if ($scope.activeTab == 1) {
42   - $('#grid-view').css("display", "block");
43   - $('#list-view').css("display", "none");
44   - $("#demoView").remove();
45   - }
46   - else {
47   -
48   - $('#grid-view').css("display", "none");
49   - $('#list-view').css("display", "block");
50   - }
51   - };
  54 + $('#grid-view').css("display", "none");
  55 + $('#list-view').css("display", "block");
  56 + }
  57 + };
52 58  
53 59 $scope.ObjectAttribute=function(windowviewid)
54 60 {
... ... @@ -87,7 +93,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
87 93 'width': 0,
88 94 'height': 0,
89 95 'minimised': false,
90   - 'maximised': false,
  96 + 'maximised': true,
91 97 'minmaxAutoEvent':true,
92 98 'id': 0,
93 99 'selectedPins': [],
... ... @@ -240,7 +246,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
240 246 }
241 247 }
242 248  
243   - $scope.initializeAAWindowData($rootScope.MULTI_VIEW_ID,true,undefined);
  249 + $scope.initializeAAWindowData($rootScope.MULTI_VIEW_ID,true,undefined);
244 250  
245 251 $rootScope.openModules.push({ "ModuleId": 2 });
246 252 if ($rootScope.refreshcheck == null) {
... ... @@ -253,62 +259,60 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
253 259 $scope.SetAAwindowStoreData($rootScope.MULTI_VIEW_ID,'moduleName',"ATLAS_ANATOMY");
254 260  
255 261 $rootScope.currentActiveModuleTitle = "ATLAS_ANATOMY";
256   - $scope.AllBodyRegion = BodyRegions;
257   - $scope.AllBodySystem = BodySystems;
258   - $scope.AllOrientation = ViewOrientations;
259   - $scope.AllImageType = ImageTypes;
  262 + $scope.AllBodyRegion = BodyRegions;
  263 + $scope.AllBodySystem = BodySystems;
  264 + $scope.AllOrientation = ViewOrientations;
  265 + $scope.AllImageType = ImageTypes;
260 266  
261   - if (localStorage.getItem("CurrentBodyRegion") != '') {
262   - $("#region option[value='" + localStorage.getItem('CurrentBodyRegion') + "']").prop('selected', true);
263   - }
264   - if (localStorage.getItem("CurrentBodySystem") != '') {
265   - $("#system option[value='" + localStorage.getItem('CurrentBodySystem') + "']").prop('selected', true);
266   - }
267   - if (localStorage.getItem("CurrentOrientation") != '') {
268   - $("#orientation option[value='" + localStorage.getItem('CurrentOrientation') + "']").prop('selected', true);
269   - }
270   - if (localStorage.getItem("CurrentImageType") != '') {
271   - $("#Type option[value='" + localStorage.getItem('CurrentImageType') + "']").prop('selected', true);
272   - }
273   - $scope.query.selectedbodyregion = localStorage.getItem('CurrentBodyRegion');
274   - $scope.query.selectedbodysystem = localStorage.getItem('CurrentBodySystem');
275   - $scope.query.selectedorientation = localStorage.getItem('CurrentOrientation');
276   - $scope.query.selectedimagetype = localStorage.getItem('CurrentImageType');
277   -
278   - $scope.FilterByImage(1, $scope.query,$rootScope.MULTI_VIEW_ID);
279   - setTimeout(function () {
280   - if ($('#grid-view').css("display") == "block") {
281   - if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) {
282   - $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail');
283   - }
284   - if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null && $location.url() == "/tile-view-list") {
285   -
286   - $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow');
287   - }
288   - }
289   - if ($('#list-view').css("display") == "block") {
  267 + if (localStorage.getItem("CurrentBodyRegion") != '') {
  268 + $("#region option[value='" + localStorage.getItem('CurrentBodyRegion') + "']").prop('selected', true);
  269 + }
  270 + if (localStorage.getItem("CurrentBodySystem") != '') {
  271 + $("#system option[value='" + localStorage.getItem('CurrentBodySystem') + "']").prop('selected', true);
  272 + }
  273 + if (localStorage.getItem("CurrentOrientation") != '') {
  274 + $("#orientation option[value='" + localStorage.getItem('CurrentOrientation') + "']").prop('selected', true);
  275 + }
  276 + if (localStorage.getItem("CurrentImageType") != '') {
  277 + $("#Type option[value='" + localStorage.getItem('CurrentImageType') + "']").prop('selected', true);
  278 + }
  279 + $scope.query.selectedbodyregion = localStorage.getItem('CurrentBodyRegion');
  280 + $scope.query.selectedbodysystem = localStorage.getItem('CurrentBodySystem');
  281 + $scope.query.selectedorientation = localStorage.getItem('CurrentOrientation');
  282 + $scope.query.selectedimagetype = localStorage.getItem('CurrentImageType');
290 283  
291   - var AAListViewScroll = $rootScope.getLocalStorageValue("AAListViewScroll");
292   - if (typeof (AAListViewScroll) !== "undefined" && AAListViewScroll !== null && AAListViewScroll !== '' && $location.url() == "/tile-view-list") {
293   - if (typeof InstallTrigger !== 'undefined') {
  284 + $scope.FilterByImage(1, $scope.query,$rootScope.MULTI_VIEW_ID);
  285 +
  286 + setTimeout(function () {
  287 +
  288 + if ($('#grid-view').css("display") == "block") {
  289 + if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) {
  290 + $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail');
  291 + }
  292 + if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null && $location.url() == "/tile-view-list") {
294 293  
295   - $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AAListViewScroll') }, 'slow');
296   - }
297   - else {
  294 + $("#grid-view").animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow');
  295 + }
  296 + }
  297 + if ($('#list-view').css("display") == "block") {
  298 + var AAListViewScroll = $rootScope.getLocalStorageValue("AAListViewScroll");
  299 + if (typeof (AAListViewScroll) !== "undefined" && AAListViewScroll !== null && AAListViewScroll !== '' && $location.url() == "/tile-view-list") {
  300 + if (typeof InstallTrigger !== 'undefined') {
298 301  
299   - $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AAListViewScroll') }, 'slow');
300   - }
301   - $("#list-view table tbody tr").removeClass("active");
302   - $("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active");
303   - }
  302 + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AAListViewScroll') }, 'slow');
  303 + }
  304 + else {
304 305  
305   - }
  306 + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AAListViewScroll') }, 'slow');
  307 + }
  308 + $("#list-view table tbody tr").removeClass("active");
  309 + $("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active");
  310 + }
306 311  
307   - $scope.EnableUI();
308   -
309   - }, 100);
  312 + }
310 313  
311   - // $('#list-view').css('display', 'none');
  314 + }, 100);
  315 +
312 316 }
313 317  
314 318 $scope.openModuleItemView = function ($event) {
... ... @@ -379,7 +383,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
379 383 //3. set opened module item ti
380 384 localStorage.setItem("currentViewTitle", OpenedTileData[6]);
381 385 if ($('#grid-view').css("display") == "block") {
382   - localStorage.setItem("AAGridViewScroll", $($window).scrollTop());
  386 + localStorage.setItem("AAGridViewScroll", $("#grid-view").scrollTop());
383 387 localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id'));
384 388 }
385 389  
... ... @@ -411,7 +415,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
411 415 var OpenItemImagePath = "../../../content/images/aa/images/" +OpenedTileData[3];
412 416 $scope.SetAAwindowStoreData(windowviewid,'OpenItemImagePath',OpenItemImagePath);
413 417 $rootScope.listArray.push({ "imageName": OpenItemImagePath, "text": moduleItemDataToBeSaved });
414   - $("#viewList").append("<div class='col-xs-12 text-center' style='padding-top:15px;padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:15px;background-color:#fff;'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:95px!important;' src=" + OpenItemImagePath + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + moduleItemDataToBeSaved + "</div></div></div><a id=" + moduleItemDataToBeSavedID + " style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>");
  418 + $("#viewList").append("<div class='col-xs-12 text-center' style='padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:10px;background-color:#fff;'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:115px!important;' src=" + OpenItemImagePath + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + moduleItemDataToBeSaved + "</div></div></div><a id=" + moduleItemDataToBeSavedID + " style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>");
415 419 }
416 420  
417 421 $rootScope.openAAModuleItemMain = function () {
... ... @@ -504,10 +508,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
504 508 $scope.SetAAwindowStoreData(windowviewid, 'isShowSelectedPins', $scope.aaOpenInOtherModules.showSelectedPins);
505 509 if ($scope.aaOpenInOtherModules.showHideAnnotations != undefined && $scope.aaOpenInOtherModules.showHideAnnotations != "") {
506 510 $scope.SetAAwindowStoreData(windowviewid, 'showHideAnnotations', $scope.aaOpenInOtherModules.showHideAnnotations);
507   - }
508   -
509   - var isMaximize = $scope.aaOpenInOtherModules.maximised;
510   - var isMinimize = $scope.aaOpenInOtherModules.minimised;
  511 + }
  512 +
  513 + var isMaximize = $scope.aaOpenInOtherModules.maximised!=undefined?$scope.aaOpenInOtherModules.maximised:false;
  514 + var isMinimize = $scope.aaOpenInOtherModules.minimised!=undefined?$scope.aaOpenInOtherModules.minimised:false;
  515 +
511 516 $scope.SetAAwindowStoreData(windowviewid, 'maximised', isMaximize);
512 517 $scope.SetAAwindowStoreData(windowviewid, 'minimised', isMinimize);
513 518  
... ... @@ -615,7 +620,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
615 620 }
616 621 else {
617 622 $scope.jsPanelWidth = $(window).outerWidth() - 20;
618   - $scope.jsPanelHeight = $(window).outerHeight() - 150;
  623 + $scope.jsPanelHeight = $(window).outerHeight() - 140;
619 624 $scope.jsPanelLeft = 1;
620 625 $scope.jsPanelTop = 70;
621 626 }
... ... @@ -659,7 +664,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
659 664 }
660 665 $scope.SetAAwindowStoreData(windowviewid, 'maximised',true);
661 666 $scope.SetAAwindowStoreData(windowviewid, 'minimised',false);
662   - var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-70;
  667 + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
663 668 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
664 669 },
665 670 onnormalized:function (panel) {
... ... @@ -670,7 +675,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
670 675 }
671 676 $scope.SetAAwindowStoreData(windowviewid, 'minimised',false);
672 677 $scope.SetAAwindowStoreData(windowviewid, 'maximised',false);
673   - var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-70;
  678 + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
674 679 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
675 680 },
676 681 resizable: {
... ... @@ -680,7 +685,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
680 685 $scope.SetAAwindowStoreData(windowviewid, 'width', ui.size.width);
681 686 $scope.SetAAwindowStoreData(windowviewid, 'height', ui.size.height);
682 687 $rootScope.UnsaveCurriculum = true;
683   - var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-70;
  688 + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
684 689 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
685 690 }
686 691  
... ... @@ -757,16 +762,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
757 762  
758 763 $scope.loadAAModule = function (windowviewid) {
759 764  
760   - if ($rootScope.isCallFromOtherModule) {
761   - var canvasDIvHeight = parseInt($('#AAImagePanel_' + windowviewid).outerHeight()) - 100;
762   - }
763   - else
764   - {
765   - var canvasDIvHeight = parseInt($('#AAImagePanel_' + windowviewid).outerHeight()) - 90;
  765 + if (!$rootScope.isCallFromOtherModule) {
766 766 $('#aaBodyView').css("height", $(window).outerHeight() - 65);
767 767 $('#aaBodyView').css("width", $(window).outerWidth() - 15);
768 768 }
769   -
  769 +
  770 + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
770 771 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
771 772 $('.canvasDivClass').css("height", canvasDIvHeight);
772 773  
... ... @@ -984,7 +985,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
984 985 //call when module loaded
985 986 $rootScope.resetMenuOption();
986 987 //remove pre event
987   - $("#AAImagePanel_" + windowviewid).off("click");
  988 + // $("#AAImagePanel_" + windowviewid).off("click");
988 989  
989 990 $("#AAImagePanel_" + windowviewid).on('click', function (event) {
990 991 var pnlName=event.currentTarget.id;
... ... @@ -1474,19 +1475,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1474 1475 })
1475 1476 }
1476 1477  
1477   - $scope.FilterByImage = function (moduleId, query,windowviewid) {
  1478 + $scope.FilterByImage = function (moduleId, query,windowviewid) {
1478 1479 $scope.DisableUI();
1479   - if(windowviewid==undefined)
1480   - {
1481   - windowviewid= $rootScope.MULTI_VIEW_ID;
  1480 + if (windowviewid == undefined) {
  1481 + windowviewid = $rootScope.MULTI_VIEW_ID;
1482 1482 }
1483   - console.log(query);
1484   - //$scope.moduleId = moduleId;
1485   - $scope.filterstring = true;
1486 1483  
1487   - console.log('loadForModuleById is called');
  1484 + setTimeout(function(){
  1485 + $scope.FilterSearch(moduleId, query,windowviewid);
  1486 + },200)
  1487 +
  1488 + }
  1489 +
  1490 + $scope.FilterSearch = function (moduleId, query,windowviewid) {
  1491 + $scope.filterstring = true;
1488 1492  
1489   - // $rootScope.moduleName = Modules[moduleId].Name;
1490 1493 $scope.SetAAwindowStoreData(windowviewid,'moduleName',"ATLAS_ANATOMY");
1491 1494 while ($scope.searchAAListViewData.length) {
1492 1495 $scope.searchAAListViewData.pop();
... ... @@ -1524,7 +1527,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1524 1527 else {
1525 1528 localStorage.setItem("CurrentImageType", '');
1526 1529 }
1527   -
  1530 +
  1531 +
1528 1532 var promise = ModuleService.loadModuleDataBasedOnModuleName(Modules[moduleId].Name)
1529 1533 .then(
1530 1534 function (result) {
... ... @@ -1535,6 +1539,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1535 1539 .select();
1536 1540  
1537 1541 $('#grid-view').empty();
  1542 +
1538 1543 angular.forEach($scope.selectedAAListViewData, function (value, key) {
1539 1544  
1540 1545 var selectimg = true;
... ... @@ -1638,7 +1643,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1638 1643 $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>');
1639 1644 }
1640 1645  
1641   - $timeout(function () { $scope.EnableUI(); }, 500);
  1646 + $timeout(function () {
  1647 + $scope.EnableUI();
  1648 + $scope.ResetGridListLength();
  1649 + }, 500);
1642 1650 },
1643 1651 function (error) {
1644 1652 $timeout(function () { $scope.EnableUI(); }, 500);
... ... @@ -1647,8 +1655,39 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1647 1655 )
1648 1656 }
1649 1657  
1650   - $scope.Reset = function (moduleId, query,windowviewid) {
  1658 + $scope.ResetGridListLength=function()
  1659 + {
  1660 + var $ua = navigator.userAgent;
  1661 +
  1662 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  1663 +
  1664 + if(screen.height<=768)
  1665 + {
  1666 + $('#ListViewDiv').css({"height":"300","overflow":"scroll"});
  1667 + $('#grid-view').css({"height":"535","overflow":"scroll"});
  1668 + }
  1669 + else if(screen.height<=1024)
  1670 + {
  1671 + $('#ListViewDiv').css({"height":"460","overflow":"scroll"});
  1672 + $('#grid-view').css({"height":"720","overflow":"scroll"});
  1673 + }
  1674 + else
  1675 + {
  1676 + $('#ListViewDiv').css({"height":"880","overflow":"scroll"});
  1677 + $('#grid-view').css({"height":"950","overflow":"scroll"});
  1678 + }
  1679 +
  1680 + }
  1681 + else
  1682 + {
  1683 + $('#ListViewDiv').css({"height":"490","overflow":"scroll"});
  1684 + $('#grid-view').css({"height":"720","overflow":"scroll"});
  1685 + }
  1686 +
  1687 + }
1651 1688  
  1689 + $scope.Reset = function (moduleId, query,windowviewid) {
  1690 + $scope.DisableUI();
1652 1691 if(windowviewid==undefined) // call from also home controller list manager
1653 1692 windowviewid= $rootScope.MULTI_VIEW_ID;
1654 1693  
... ... @@ -1674,8 +1713,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1674 1713  
1675 1714 $scope.filterstring = false;
1676 1715  
1677   - $scope.FilterByImage(1, query,windowviewid);
1678   -
  1716 + setTimeout(function(){
  1717 + $scope.FilterSearch(1, query,windowviewid)
  1718 + },200)
  1719 +
1679 1720 }
1680 1721  
1681 1722 $scope.showSelectedSystemPins = function (event,windowviewid) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... ... @@ -397,7 +397,9 @@ AIA.constant(&quot;LoginConstants&quot;, {
397 397 "ACCOUNT_NUMBER_NOT_EXIST": "1",
398 398 "EDITION_NOT_EXIST": "3",
399 399 "MASTER_SITEIP_NOT_EXIST": "2",
400   - "LICENSE_INACTIVE": "6",
  400 + "LICENSE_INACTIVE": "6",
  401 + "SITELICENSE_EXPIRED": "7",
  402 + "SITELICENSE_NOTSTARTED": "8",
401 403 "INVALID_CLIENT": "Clinet is not valid",
402 404 "MSG_NOT_AUTHORIZE_SITE_USER": "User is not authorized.",
403 405 });
... ... @@ -422,6 +424,7 @@ AIA.constant(&quot;LoginMessageConstants&quot;, {
422 424 "PASSWORD_UPDATE_SUCCESS": "Password updated successfully",
423 425 "PASSWORD_UPDATE_FAILED": "Password update failed",
424 426 "SUBSCRIPTION_EXPIRATION_MESSAGE": "Your license is expired since ",
  427 + "SUBSCRIPTION_NOT_START_MESSAGE": "Your license Subscription is not started yet. It will continue on ",
425 428 "LICENSE_INACTIVE_MESSAGE": "Your license is inactive.",
426 429 "INVALID_USER": "Invalid UserID",
427 430 "USER_INACTIVE_MESSAGE": "User ID is inactive.",
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... ... @@ -65,7 +65,7 @@
65 65 </style>
66 66 <div id="aaDetailPageDiv" class="ng-scope" ng-controller="TileViewListController">
67 67 <div class="tools pull-left">
68   - <div class="toggle-icon toggleBar toggleHeadingButton" id="sideBarToggle" onclick="SideBarToggleAA(event)" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"></div>
  68 + <div class="toggle-icon toggleBar toggleHeadingButton" id="sideBarToggle" onclick="SideBarToggleAA(event)" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"style="top:120px;"></div>
69 69 <div class="sprit-icon">
70 70 <div class="col-sm-6" style="width:50%;float:left"><button onclick="hidePins(event)" id="hidePinBtn" style="background-position: 10px 5px;" class="btn btn-black btn-sm tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Hide Pins"></button> </div>
71 71 <div class="col-sm-6" style="width:50%;float:left"><button class="btn btn-black btn-sm pull-right tooltip-custom" id="selectedPin" style="background-position: 15px -24px;" onclick="showSelectedPins(event)" data-toggle="tooltip" data-placement="bottom" title="Show Selected Pins"></button></div>
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/tile-view.html
... ... @@ -2,7 +2,7 @@
2 2 <div ng-include="'app/widget/MainMenu.html'" />
3 3 <div class="main" ng-init="loadForModuleById(1)">
4 4 <!--<div class="main">-->
5   - <div class="col-sm-12" style="padding-left:25px; width:99%">
  5 + <div class="col-sm-12" style="padding-left:25px; width:100%">
6 6 <div class="breadcrumb">
7 7 <div class="row center-block">
8 8 <h5 class="text-center text-primary txt-white f15">Display Image By</h5>
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html
1 1 ๏ปฟ<div class="bodyWrap row no-scroll">
2 2 <div ng-include="'app/widget/MainMenu.html'" />
3 3 <div class="main" id="imgParent" style="" ng-init="loadAIModuleById(13)">
4   - <div class="row">
5   - <div class="col-sm-12 stickey-area" style="padding-left:25px; width:99%">
6   - <div class="breadcrumb" style="padding-bottom:5px;">
7   - <div class="row" align="center">
8   - <form class="form-inline padd5">
9   - <div class="form-group">
10   - <label for="exampleInputName2" class="text-primary">Search</label>
11   - <input type="text" ng-model="query.SearchText" class="form-control input-sm col-sm" id="txtSerachInput" placeholder="">
12   - </div>
13   - <button type="button" class="btn btn-primary btn-sm" ng-click="ApplySearch(query)" style="margin-right:2px; width: 65px" >
14   - <i class="fa fa-search"></i>
15   - </button>
16   - </form>
17   - <nav>
18   - <ul class="pagination pagination-sm no-margin" style="cursor: pointer;">
19   - <li><span id="A" ng-click="ApplySearchByAlphabet('A')"> A</span></li>
20   - <li><span id="B" ng-click="ApplySearchByAlphabet('B')"> B</span></li>
21   - <li><span id="C" ng-click="ApplySearchByAlphabet('C')"> C</span></li>
22   - <li><span id="D" ng-click="ApplySearchByAlphabet('D')"> D</span></li>
23   - <li><span id="E" ng-click="ApplySearchByAlphabet('E')"> E</span></li>
24   - <li><span id="F" ng-click="ApplySearchByAlphabet('F')"> F</span></li>
25   - <li><span id="G" ng-click="ApplySearchByAlphabet('G')"> G</span></li>
26   - <li><span id="H" ng-click="ApplySearchByAlphabet('H')"> H</span></li>
27   - <li><span id="I" ng-click="ApplySearchByAlphabet('I')"> I</span></li>
28   - <li><span id="J" ng-click="ApplySearchByAlphabet('J')"> J</span></li>
29   - <li><span id="K" ng-click="ApplySearchByAlphabet('K')"> K</span></li>
30   - <li><span id="L" ng-click="ApplySearchByAlphabet('L')"> L</span></li>
31   - <li><span id="M" ng-click="ApplySearchByAlphabet('M')"> M</span></li>
32   - <li><span id="N" ng-click="ApplySearchByAlphabet('N')"> N</span></li>
33   - <li><span id="O" ng-click="ApplySearchByAlphabet('O')"> O</span></li>
34   - <li><span id="P" ng-click="ApplySearchByAlphabet('P')"> P</span></li>
35   - <li><span id="Q" ng-click="ApplySearchByAlphabet('Q')"> Q</span></li>
36   - <li><span id="R" ng-click="ApplySearchByAlphabet('R')"> R</span></li>
37   - <li><span id="S" ng-click="ApplySearchByAlphabet('S')"> S</span></li>
38   - <li><span id="T" ng-click="ApplySearchByAlphabet('T')"> T</span></li>
39   - <li><span id="U" ng-click="ApplySearchByAlphabet('U')"> U</span></li>
40   - <li><span id="V" ng-click="ApplySearchByAlphabet('V')"> V</span></li>
41   - <li><span id="W" ng-click="ApplySearchByAlphabet('W')"> W</span></li>
42   - <li><span id="X" ng-click="ApplySearchByAlphabet('X')"> X</span></li>
43   - <li><span id="Y" ng-click="ApplySearchByAlphabet('Y')"> Y</span></li>
44   - <li><span id="Z" ng-click="ApplySearchByAlphabet('Z')"> Z</span></li>
  4 + <div class="col-sm-12 stickey-area" style="padding-left:25px; width:100%">
  5 + <div class="breadcrumb" style="padding-bottom:5px;">
  6 + <div class="row" align="center">
  7 + <form class="form-inline padd5">
  8 + <div class="form-group">
  9 + <label for="exampleInputName2" class="text-primary">Search</label>
  10 + <input type="text" ng-model="query.SearchText" class="form-control input-sm col-sm" id="txtSerachInput" placeholder="">
  11 + </div>
  12 + <button type="button" class="btn btn-primary btn-sm" ng-click="ApplySearch(query)" style="margin-right:2px; width: 65px" >
  13 + <i class="fa fa-search"></i>
  14 + </button>
  15 + </form>
  16 + <nav>
  17 + <ul class="pagination pagination-sm no-margin" style="cursor: pointer;">
  18 + <li><span id="A" ng-click="ApplySearchByAlphabet('A')"> A</span></li>
  19 + <li><span id="B" ng-click="ApplySearchByAlphabet('B')"> B</span></li>
  20 + <li><span id="C" ng-click="ApplySearchByAlphabet('C')"> C</span></li>
  21 + <li><span id="D" ng-click="ApplySearchByAlphabet('D')"> D</span></li>
  22 + <li><span id="E" ng-click="ApplySearchByAlphabet('E')"> E</span></li>
  23 + <li><span id="F" ng-click="ApplySearchByAlphabet('F')"> F</span></li>
  24 + <li><span id="G" ng-click="ApplySearchByAlphabet('G')"> G</span></li>
  25 + <li><span id="H" ng-click="ApplySearchByAlphabet('H')"> H</span></li>
  26 + <li><span id="I" ng-click="ApplySearchByAlphabet('I')"> I</span></li>
  27 + <li><span id="J" ng-click="ApplySearchByAlphabet('J')"> J</span></li>
  28 + <li><span id="K" ng-click="ApplySearchByAlphabet('K')"> K</span></li>
  29 + <li><span id="L" ng-click="ApplySearchByAlphabet('L')"> L</span></li>
  30 + <li><span id="M" ng-click="ApplySearchByAlphabet('M')"> M</span></li>
  31 + <li><span id="N" ng-click="ApplySearchByAlphabet('N')"> N</span></li>
  32 + <li><span id="O" ng-click="ApplySearchByAlphabet('O')"> O</span></li>
  33 + <li><span id="P" ng-click="ApplySearchByAlphabet('P')"> P</span></li>
  34 + <li><span id="Q" ng-click="ApplySearchByAlphabet('Q')"> Q</span></li>
  35 + <li><span id="R" ng-click="ApplySearchByAlphabet('R')"> R</span></li>
  36 + <li><span id="S" ng-click="ApplySearchByAlphabet('S')"> S</span></li>
  37 + <li><span id="T" ng-click="ApplySearchByAlphabet('T')"> T</span></li>
  38 + <li><span id="U" ng-click="ApplySearchByAlphabet('U')"> U</span></li>
  39 + <li><span id="V" ng-click="ApplySearchByAlphabet('V')"> V</span></li>
  40 + <li><span id="W" ng-click="ApplySearchByAlphabet('W')"> W</span></li>
  41 + <li><span id="X" ng-click="ApplySearchByAlphabet('X')"> X</span></li>
  42 + <li><span id="Y" ng-click="ApplySearchByAlphabet('Y')"> Y</span></li>
  43 + <li><span id="Z" ng-click="ApplySearchByAlphabet('Z')"> Z</span></li>
45 44  
46   - </ul>
47   - <button type="button" class="btn btn-primary btn-sm" ng-click="Reset(query)" style="margin-bottom:23px"><i class="fa fa-eye"></i>Show All</button>
48   - </nav>
  45 + </ul>
  46 + <button type="button" class="btn btn-primary btn-sm" ng-click="Reset(query)" style="margin-bottom:23px"><i class="fa fa-eye"></i>Show All</button>
  47 + </nav>
49 48  
50   - <div data-pagination="" data-num-pages="numPages()"
51   - data-current-page="currentPage" data-max-size="maxSize"
52   - data-boundary-links="true" style="cursor: pointer;">
53   - </div>
  49 + <div data-pagination="" data-num-pages="numPages()"
  50 + data-current-page="currentPage" data-max-size="maxSize"
  51 + data-boundary-links="true" style="cursor: pointer;">
54 52 </div>
55   -
56 53 </div>
57   - </div>
58   - </div>
59   - <div class="row tab-content" style="padding-left:25px; width:99%">
60   - <div class="customTable" role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view">
61   - </div>
62   - <div class="customTable" role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view">
63   - <div class="panel col-sm-12 table-responsive">
64   - <table class="table table-hover table-fixed bg-white table-txt12">
65   - <thead class="clsthead">
66   - <tr class="active">
67   - <th width="20%">Title</th>
68   - </tr>
69   - </thead>
70   - <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">
71   - <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="OpenAdamImage($event)" ng-repeat="item in selectedAIListViewData">
72   - <td width="20%">
73   - {{item._Title}}
74   - </td>
75   - </tr>
76   - </tbody>
77   - <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">
78   - <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="OpenAdamImage($event)" ng-repeat="item in searchAIListViewData">
79   - <td width="20%">
80   - {{item._Title}}
81   - </td>
82   - </tr>
83 54  
84   - </tbody>
85   - </table>
  55 + </div>
  56 + <div class="row tab-content">
  57 + <div class="customTable" role="tabpanel" class="tab-pane active" id="grid-view">
86 58 </div>
87   - <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;">
88   - <div class="row well">
89   - <div title="{{SelectedAITitle}}" class="col-sm-3 col-lg-2 no-padding">
90   - <div class="thumbnail no-margin">
91   - <img id="{{SelectedAIId}}" src="{{SelectedAIthumbImage}}" alt="" title="{{SelectedAITitle}}" data-ng-click="OpenAdamImage($event)">
  59 + <div class="customTable" role="tabpanel" id="list-view">
  60 + <div class="panel col-sm-12 table-responsive">
  61 + <table class="table table-hover table-fixed bg-white table-txt12">
  62 + <thead class="clsthead">
  63 + <tr class="active">
  64 + <th width="20%">Title</th>
  65 + </tr>
  66 + </thead>
  67 + <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">
  68 + <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="OpenAdamImage($event)" ng-repeat="item in selectedAIListViewData">
  69 + <td width="20%">
  70 + {{item._Title}}
  71 + </td>
  72 + </tr>
  73 + </tbody>
  74 + <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">
  75 + <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="OpenAdamImage($event)" ng-repeat="item in searchAIListViewData">
  76 + <td width="20%">
  77 + {{item._Title}}
  78 + </td>
  79 + </tr>
  80 +
  81 + </tbody>
  82 + </table>
  83 + </div>
  84 + <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;">
  85 + <div class="row well" style="margin-bottom: 0px;">
  86 + <div title="{{SelectedAITitle}}" class="col-sm-3 col-lg-2 no-padding">
  87 + <div class="thumbnail no-margin">
  88 + <img id="{{SelectedAIId}}" src="{{SelectedAIthumbImage}}" alt="" title="{{SelectedAITitle}}" data-ng-click="OpenAdamImage($event)" style="height:150px">
  89 + </div>
92 90 </div>
  91 + <div class="class="col-sm-9 col-lg-9"" style="padding-left:10px;">
  92 + <div align="left" style="height:130px;overflow-y:scroll !important;padding-left: 20px; -webkit-overflow-scrolling:touch !important;">
  93 + <p ng-bind-html="SelectedAISummary"></p>
  94 + </div>
  95 + <button id="{{SelectedAIId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="OpenAdamImage($event)">Open</button>
  96 + </div>
  97 +
93 98 </div>
94   - <div class="col-sm-9 col-lg-9" style="padding-left:10px;">
95   - <p class="f11" ng-bind-html="SelectedCISummary"></p>
96   - <button id="{{SelectedAIId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="OpenAdamImage($event)">Open</button>
97   - </div>
  99 +
98 100 </div>
99   -
  101 + <!-- <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;">
  102 + <div class="row well">
  103 + <div title="{{SelectedAITitle}}" class="col-sm-3 col-lg-2 no-padding">
  104 + <div class="thumbnail no-margin">
  105 + <img id="{{SelectedAIId}}" src="{{SelectedAIthumbImage}}" alt="" title="{{SelectedAITitle}}" data-ng-click="OpenAdamImage($event)">
  106 + </div>
  107 + </div>
  108 + <div class="col-sm-9 col-lg-9" style="padding-left:10px;">
  109 + <p class="f11" ng-bind-html="SelectedCISummary"></p>
  110 + <button id="{{SelectedAIId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="OpenAdamImage($event)">Open</button>
  111 + </div>
  112 + </div>
  113 +
  114 + </div> -->
100 115 </div>
101 116 </div>
102   - </div>
103   - </div>
104   - <div id="aiSpinner" class="spinner" ng-show="isLoading" style="visibility: hidden; opacity: 1; width: 100%; height: 100%; top: 0; bottom: 0%; left: 0; right: 0%; margin-left: 0px;">
105   - <img id="img-spinner" class="spinner" src="content/images/common/loading.gif" alt="Loading" />
  117 + </div>
106 118 </div>
  119 +
107 120 </div>
108 121  
109 122  
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
1 1 ๏ปฟ
2   -<div class="bodyWrap row ">
  2 +<div class="bodyWrap row no-scroll">
3 3 <div ng-include="'app/widget/MainMenu.html'" />
4 4 <div class="main" ng-init="loadAIModuleById(5)">
5   - <div class="col-sm-12 stickey-area clsstickydiv">
  5 + <div class="col-sm-12 stickey-area clsstickydiv" style="padding-left:25px; width:100%">
6 6 <div class="breadcrumb">
7 7 <div class="row center-block">
8 8 <h5 class="text-center text-primary txt-white f15">Display Animation By</h5>
... ... @@ -53,74 +53,78 @@
53 53 </div>
54 54 </div>
55 55 </div>
56   - </div>
57   -
58   - <div class="row tab-content" style="padding-left:25px; width:99%">
59   - <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view">
60   - </div>
61   - <div class="customTable" role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view">
62   - <div class="panel col-sm-12 table-responsive">
63   - <table class="table table-hover table-fixed bg-white table-txt12">
64   - <thead class="clsthead">
65   - <tr class="active" style="background:#f5f5f5;">
66   - <th width="25%">Title</th>
67   - <th width="25%">Region</th>
68   - <th width="25%">System</th>
69   - <th>Specialty</th>
70   - </tr>
71   - </thead>
72   - <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">
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   - <td width="25%">
75   - ({{item._id}}) {{item._Title}}
76   - </td>
77   - <td width="25%">
78   - {{item._BodyRegion}}
79   - </td>
80   - <td width="25%">
81   - {{item._BodySystem}}
82   - </td>
83   - <td>
84   - {{item._MedicalSpecialty}}
85   - </td>
86   - </tr>
87   - </tbody>
88   - <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">
89   - <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData">
90   - <td width="25%">
91   - ({{item._id}}) {{item._Title}}
92   - </td>
93   - <td width="25%">
94   - {{item._BodyRegion}}
95   - </td>
96   - <td width="25%">
97   - {{item._BodySystem}}
98   - </td>
99   - <td>
100   - {{item._MedicalSpecialty}}
101   - </td>
102   - </tr>
103   - <!--<tr ng-if="typeof(searchCAListViewData) == 'undefined' || searchCAListViewData == null || searchCAListViewData == ''">
104   - <td colspan="3"><strong style="color:black;">No animation found for the selected search criteria!</strong></td>
105   - </tr>-->
106   - </tbody>
107   - </table>
108   - </div>
109   - <div class="col-sm-12" ng-show=" hiderow" style="padding-left:25px;padding-top:10px;">
110   - <div class="row well">
111   - <div title="{{SelectedCATitle}}" class="col-sm-3 col-lg-2 no-padding">
112   - <div class="thumbnail no-margin">
113   - <img id="{{SelectedCAId}}" src="{{SelectedCAthumbImage}}" style="width:100%;height:100%;" alt=" " title="{{SelectedCATitle}}" data-ng-click="openView($event)">
114   - </div>
  56 +
  57 + <div class="row tab-content">
  58 + <div class="customTable" role="tabpanel" class="tab-pane active" id="grid-view">
  59 + </div>
  60 + <div class="customTable" role="tabpanel" id="list-view">
  61 + <div class="panel col-sm-12 table-responsive">
  62 + <table class="table table-hover table-fixed bg-white table-txt12">
  63 + <thead class="clsthead">
  64 + <tr class="active" style="background:#f5f5f5;">
  65 + <th width="25%">Title</th>
  66 + <th width="25%">Region</th>
  67 + <th width="25%">System</th>
  68 + <th>Specialty</th>
  69 + </tr>
  70 + </thead>
  71 + <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">
  72 + <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData">
  73 + <td width="25%">
  74 + ({{item._id}}) {{item._Title}}
  75 + </td>
  76 + <td width="25%">
  77 + {{item._BodyRegion}}
  78 + </td>
  79 + <td width="25%">
  80 + {{item._BodySystem}}
  81 + </td>
  82 + <td>
  83 + {{item._MedicalSpecialty}}
  84 + </td>
  85 + </tr>
  86 + </tbody>
  87 + <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">
  88 + <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData">
  89 + <td width="25%">
  90 + ({{item._id}}) {{item._Title}}
  91 + </td>
  92 + <td width="25%">
  93 + {{item._BodyRegion}}
  94 + </td>
  95 + <td width="25%">
  96 + {{item._BodySystem}}
  97 + </td>
  98 + <td>
  99 + {{item._MedicalSpecialty}}
  100 + </td>
  101 + </tr>
  102 + <!--<tr ng-if="typeof(searchCAListViewData) == 'undefined' || searchCAListViewData == null || searchCAListViewData == ''">
  103 + <td colspan="3"><strong style="color:black;">No animation found for the selected search criteria!</strong></td>
  104 + </tr>-->
  105 + </tbody>
  106 + </table>
115 107 </div>
116   - <div class="col-sm-9 col-lg-9" style="padding-left:10px;">
117   - <p class="f11" ng-bind-html="SelectedCASummary"></p>
118   - <button id="{{SelectedCAId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="openView($event)">Open</button>
  108 + <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;">
  109 + <div class="row well" style="margin-bottom: 0px;">
  110 + <div title="{{SelectedCATitle}}" class="col-sm-3 col-lg-2 no-padding">
  111 + <div class="thumbnail no-margin">
  112 + <img id="{{SelectedCAId}}" src="{{SelectedCAthumbImage}}" alt="" title="{{SelectedCATitle}}" data-ng-click="openView($event)" style="height:150px">
  113 + </div>
  114 + </div>
  115 + <div class="class="col-sm-9 col-lg-9"" style="padding-left:10px;">
  116 + <div align="left" style="height:130px;overflow-y:scroll !important;padding-left: 20px; -webkit-overflow-scrolling:touch !important;">
  117 + <p ng-bind-html="SelectedCASummary"></p>
  118 + </div>
  119 + <button id="{{SelectedCAId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="openView($event)">Open</button>
  120 + </div>
  121 +
  122 + </div>
  123 +
119 124 </div>
120 125 </div>
121 126 </div>
122   - </div>
123   - </div>
  127 + </div>
124 128 </div>
125 129 </div>
126 130  
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
... ... @@ -2,7 +2,7 @@
2 2 <div class="bodyWrap row no-scroll">
3 3 <div ng-include=" 'app/widget/MainMenu.html' " />
4 4 <div class="main" ng-init="loadAIModuleById(4)">
5   - <div class="col-sm-12 stickey-area clsstickydiv">
  5 + <div class="col-sm-12 stickey-area clsstickydiv" style="padding-left:25px; width:100%">
6 6 <div class="breadcrumb">
7 7 <div class="row center-block">
8 8 <h5 class="text-center text-primary txt-white f15">Display Image By</h5>
... ... @@ -61,102 +61,97 @@
61 61 <button type="button" class="btn btn-primary btn-sm col-xs-12" ng-click="Reset(query)"><i class="fa fa-eye"></i></button>
62 62 </div>
63 63 </div>
64   - <!--<button class="btn btn-primary btn-sm" ng-click="ApplySearch(query)"><i class="fa fa-search"></i></button>&nbsp;<button class="btn btn-primary btn-sm col-md-9" ng-click="Reset(query)"><i class="fa fa-eye"></i> Show All</button>-->
65 64 </div>
66 65 </div>
67 66 </div>
68 67 </div>
69   - </div>
70   -
71 68  
72   - <div class="row tab-content" style="padding-left:25px; width:99%">
73   -
74   - <!--<div role="tabpanel" class="tab-pane active" id="grid-view">-->
75   - <div class="customTable" role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view">
76   -
77   - </div>
78   - <!--<div role="tabpanel" class="tab-pane" id="list-view">-->
79   - <div class="customTable" role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view">
80   - <!--<div class="col-sm-12 table-responsive">-->
81   - <div class="panel col-sm-12 table-responsive">
82   - <!--<table class="table table-hover table-condensed bg-white" style="padding-left:25px; width:99%">-->
83   - <table class="table table-hover table-fixed bg-white table-txt12">
84   - <thead class="clsthead">
85   - <tr class="active">
86   - <th width="20%">Title</th>
87   - <th width="20%">Region</th>
88   - <th width="20%">System</th>
89   - <th width="10%">View</th>
90   - <th width="10%">Type</th>
91   - <th>Specialty</th>
92   - </tr>
93   - </thead>
94   - <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">
95   - <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIListViewData">
96   - <td width="20%">
97   - {{item._Title}}
98   - </td>
99   - <td width="20%">
100   - {{item._BodyRegion}}
101   - </td>
102   - <td width="20%">
103   - {{item._BodySystem}}
104   - </td>
105   - <td width="10%">
106   - {{item._ViewOrientation}}
107   - </td>
108   - <td width="10%">
109   - {{item._ImageType}}
110   - </td>
111   - <td>
112   - {{item._MedicalSpecialty}}
113   - </td>
114   - </tr>
115   - </tbody>
116   - <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">
117   - <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCIListViewData">
118   - <td width="20%">
119   - {{item._Title}}
120   - </td>
121   - <td width="20%">
122   - {{item._BodyRegion}}
123   - </td>
124   - <td width="20%">
125   - {{item._BodySystem}}
126   - </td>
127   - <td width="10%">
128   - {{item._ViewOrientation}}
129   - </td>
130   - <td width="10%">
131   - {{item._ImageType}}
132   - </td>
133   - <td>
134   - {{item._MedicalSpecialty}}
135   - </td>
136   - </tr>
137   -
138   - </tbody>
139   - </table>
  69 + <div class="row tab-content">
  70 + <div class="customTable" role="tabpanel" class="tab-pane active" id="grid-view">
140 71 </div>
141   - <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;">
142   - <div class="row well">
143   - <div title="{{SelectedCITitle}}" class="col-sm-3 col-lg-2 no-padding">
144   - <div class="thumbnail no-margin">
145   - <img id="{{SelectedCIId}}" src="{{SelectedCIthumbImage}}" alt="" title="{{SelectedCITitle}}" data-ng-click="openView($event)">
  72 + <div class="customTable" role="tabpanel" id="list-view">
  73 + <div class="panel col-sm-12 table-responsive">
  74 + <!--<table class="table table-hover table-condensed bg-white" style="padding-left:25px; width:99%">-->
  75 + <table class="table table-hover table-fixed bg-white table-txt12">
  76 + <thead class="clsthead">
  77 + <tr class="active">
  78 + <th width="20%">Title</th>
  79 + <th width="20%">Region</th>
  80 + <th width="20%">System</th>
  81 + <th width="10%">View</th>
  82 + <th width="10%">Type</th>
  83 + <th>Specialty</th>
  84 + </tr>
  85 + </thead>
  86 + <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">
  87 + <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIListViewData">
  88 + <td width="20%">
  89 + {{item._Title}}
  90 + </td>
  91 + <td width="20%">
  92 + {{item._BodyRegion}}
  93 + </td>
  94 + <td width="20%">
  95 + {{item._BodySystem}}
  96 + </td>
  97 + <td width="10%">
  98 + {{item._ViewOrientation}}
  99 + </td>
  100 + <td width="10%">
  101 + {{item._ImageType}}
  102 + </td>
  103 + <td>
  104 + {{item._MedicalSpecialty}}
  105 + </td>
  106 + </tr>
  107 + </tbody>
  108 + <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">
  109 + <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCIListViewData">
  110 + <td width="20%">
  111 + {{item._Title}}
  112 + </td>
  113 + <td width="20%">
  114 + {{item._BodyRegion}}
  115 + </td>
  116 + <td width="20%">
  117 + {{item._BodySystem}}
  118 + </td>
  119 + <td width="10%">
  120 + {{item._ViewOrientation}}
  121 + </td>
  122 + <td width="10%">
  123 + {{item._ImageType}}
  124 + </td>
  125 + <td>
  126 + {{item._MedicalSpecialty}}
  127 + </td>
  128 + </tr>
  129 +
  130 + </tbody>
  131 + </table>
  132 + </div>
  133 +
  134 + <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;">
  135 + <div class="row well" style="margin-bottom: 0px;">
  136 + <div title="{{SelectedCITitle}}" class="col-sm-3 col-lg-2 no-padding">
  137 + <div class="thumbnail no-margin">
  138 + <img id="{{SelectedCIId}}" src="{{SelectedCIthumbImage}}" alt="" title="{{SelectedCITitle}}" data-ng-click="openView($event)" style="height:150px">
  139 + </div>
146 140 </div>
  141 + <div class="class="col-sm-9 col-lg-9"" style="padding-left:10px;">
  142 + <div align="left" style="height:130px;overflow-y:scroll !important;padding-left: 20px; -webkit-overflow-scrolling:touch !important;">
  143 + <p ng-bind-html="SelectedCISummary"></p>
  144 + </div>
  145 + <button id="{{SelectedCIId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="openView($event)">Open</button>
  146 + </div>
  147 +
147 148 </div>
148   - <div class="col-sm-9 col-lg-9" style="padding-left:10px;">
149   - <p class="f11" ng-bind-html="SelectedCISummary"></p>
150   - <button id="{{SelectedCIId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="openView($event)">Open</button>
151   - </div>
  149 +
152 150 </div>
153   -
154 151 </div>
155 152 </div>
156 153 </div>
157   - </div>
158   - <div id="ciSpinner" class="spinner" ng-show="isLoading" style="visibility:hidden">
159   - <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading" />
  154 +
160 155 </div>
161 156 </div>
162 157  
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -124,7 +124,7 @@
124 124 </style>
125 125 <div class=" " id="daView" ng-controller="DAController">
126 126 <div class="pos-relative leftToolBar tools pull-left">
127   - <div class="toggle-icon toggleBar toggleHeadingButton" id="sidebarId" onclick="SideBarToggleDA(event)" title="Show/Hide Sidebar" style="top:35px;"></div>
  127 + <div class="toggle-icon toggleBar toggleHeadingButton" id="sidebarId" onclick="SideBarToggleDA(event)" title="Show/Hide Sidebar" style="top:220px;"></div>
128 128 <div class="" style="top:20px">
129 129 <div class="col-xs-6">
130 130 <button id="btnIdentify" onclick="OnIdentifyClick()" class="btn btn-primary btn-sm tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Identify"> <img src="content/images/icon-identity.png" alt=""></button>
... ... @@ -232,14 +232,13 @@
232 232  
233 233 <div class="main2">
234 234 <div class="stickey-area" style="margin-left:7px">
235   - <div class="breadcrumb ">
  235 + <div class="breadcrumb " style="margin-bottom:0px">
236 236 <div class="">
237 237 <div class="input-group col-sm-8 col-xs-7 col-md-8 pull-left" id="da-input">
238 238  
239   - <!--<input type="text" class="form-control input-sm pull-left" id="typedTermName" onclick="OnSearch(event)" ondblclick="OnSearch(event)" ng-model="searchFilter" ng-change="resetSearchListView()" ng-blur="HideSearch()" placeholder=" search...">-->
240   -
241   - <div id="backdrop" ng-show="IsSearchVisible">
  239 + <div id="backdrop">
242 240 <div id="searchListDiv" class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left">
  241 + <select id="termlistfilter" class="form-control" style="height:130px;width:100%;overflow-y:scroll;position:absolute;z-index:60001;display:none;padding:0px;left:0px;" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, false)" ng-blur="HideSearch()"></select>
243 242  
244 243 </div>
245 244 </div>
... ... @@ -247,7 +246,7 @@
247 246 </div>
248 247 <div class="btn-group" style="vertical-align:top;">
249 248  
250   - <button type="button" id="btnDATermSearch" style="padding: 5px 10px 4px 10px !important;border: none;" class="btn btn-success btn-sm" onclick="OnSearch(event)" ng-blur="HideSearch()">
  249 + <button type="button" id="btnDATermSearch" style="padding: 5px 10px 4px 10px !important;border: none;" class="btn btn-success btn-sm" onclick="OnSearch(event)">
251 250 <!--<img src="~/../content/images/DA/go-to.png" style="height: 30px;width:50px">-->
252 251 <i class="fa fa-caret-down" style="font-size:20px;"></i>
253 252 </button>
... ... @@ -278,7 +277,7 @@
278 277 </div>
279 278 <div class=" canavsParent" id="cp" style="margin-left:12px">
280 279 <div class="container-fluid">
281   - <div class="row">
  280 + <div class="row" id="bfDiv">
282 281 <input type="hidden" id="zoomValue" value="x" />
283 282 <div id="canvasDiv" class="img-thumbnail" style="width:100%;position:relative" align="center">
284 283  
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -7,17 +7,16 @@
7 7 <li id="openPictureId"><a href="#" ng-click="OpenMyPicture()">Open My Pictures</a></li>
8 8 <li id="openAnimationId"><a href="#" ng-click="OpenMyAnimation()">Open My Animations</a></li>
9 9 <li role="separator" class="divider"></li>
10   - <li ng-class="disableMenuoption"><a href="#">Test Creator</a></li>
  10 + <!-- <li ng-class="disableMenuoption"><a href="#">Test Creator</a></li>
11 11 <li ng-class="disableMenuoption"><a href="#">Open Test</a></li>
12 12 <li ng-class="disableMenuoption"><a href="#">Save Test As</a></li>
13   - <li role="separator" class="divider"></li>
  13 + <li role="separator" class="divider"></li> -->
14 14 <li ng-class="ConvertCurriculum" ng-click="ConvertCurriculum()"><a href="#" >Convert Curriculum (.sldshw to .json)</a></li>
15 15 <li id="newCurriculumid"><a href="#" ng-click="CreateNewCurriculum()" >New Curriculum</a></li>
16 16 <li ng-class="openCurriculum" ng-click="OpenExistingCurriculum($event)"><a href="#">Open Existing Curriculum</a></li>
17 17 <li ng-class="saveCurriculam" ng-click="saveCurricullam(false)"><a href="curriculum-builder-detail">Save Curriculum As</a></li>
18 18 <li role="separator" class="divider"></li>
19 19 <li id="exportImageAnchor"><a href="" data-toggle="modal" ng-click="ShowExportImageWindow()">Export Image</a></li>
20   - <li role="separator" class="divider"></li>
21 20 <li id="printAVAnchor"><a href="" data-toggle="modal" ng-click="ShowPrintWindow()">Print Active Viewer</a></li>
22 21 <li id="printAllAVAnchor"><a href="#" data-toggle="modal" ng-click="ShowAllPrintWindow()">Print All Open Viewers</a></li>
23 22 <li id="printPreviewAnchor"><a href="" data-toggle="modal" ng-click="ShowPrintPreviewWindow()">Print Preview</a></li>
... ... @@ -33,7 +32,7 @@
33 32 <!--#7904-->
34 33 <li id="annotationToolBarOptions" ><a href="#" ng-click="ShowAnnotationWindow()">Annotation Toolbar</a></li>
35 34  
36   - <li id="optionsCurriculum"><a href="#">Add to Existing Curriculum</a></li>
  35 + <!-- <li id="optionsCurriculum"><a href="#">Add to Existing Curriculum</a></li> -->
37 36 <li id="optiontSetting"><a ng-click="ShowSettingWindow()" class="cursor-pointer">Settings</a></li>
38 37 <li role="separator" class="divider"></li>
39 38 <li id="labExPdfOption"><a href="../../content/quiz/pdf/Instructor.html" target="_blank">Lab Exercises PDF</a></li>
... ...
400-SOURCECODE/AIAHTML5.Web/content/help/index.html
... ... @@ -64,6 +64,8 @@
64 64 <li>Meticulously detailed full-color illustrations of body parts, organs, structures and complete systems with pinned structures</li>
65 65 <li>Comprehensive source of clinical content helps students understand complex anatomical structures, organs and physiological systems</li>
66 66 <li>Clinical Animations - Animation presented by body region, body system, and medical specialty, or display your own animations</li>
  67 + <li>All new! Complete 3D library โ€“ Anatomy comes to life with hundreds of specific detailed structures in the highest resolution available with full rotation and exploded views</li>
  68 + <li>AIA Curriculum Builder โ€“ Integrate your own text with customized images from the AIA to create course materials, lab exercises, student presentations and custom communication tools</li>
67 69 </ul>
68 70 </div>
69 71 </div>
... ...
400-SOURCECODE/AIAHTML5.Web/index.aspx
... ... @@ -286,7 +286,7 @@
286 286 <input name="inlineRadioOptions" id="inlineRadio1" value="unblock" type="radio"> Unblock
287 287 </label>
288 288 <label class="radio-inline">
289   - <input name="inlineRadioOptions" id="inlineRadio2" value="forgotpwd" type="radio"> Forgot Password
  289 + <input name="inlineRadioOptions" id="inlineRadio2" value="forgotpwd" type="radio" checked="true"> Forgot Password
290 290 </label>
291 291 </div>
292 292 </div>
... ... @@ -1181,12 +1181,12 @@
1181 1181 </div>
1182 1182  
1183 1183 <!--Export Image Modal-->
1184   - <div class="modal fade export-image ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  1184 + <div class="modal fade export-image ui-draggable in" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
1185 1185 style="z-index: 1200002;">
1186 1186 <div class="modal-dialog modal-sm" role="document">
1187 1187 <div class="modal-content">
1188 1188 <div class="modal-header annotation-modal-header ui-draggable-handle">
1189   - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร—</span></button>
  1189 + <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseExportModal()"><span aria-hidden="true">ร—</span></button>
1190 1190 <h4 class="modal-title" id="">Save As</h4>
1191 1191 </div>
1192 1192 <div class="modal-body">
... ... @@ -1195,7 +1195,7 @@
1195 1195 <div class="form-group">
1196 1196 <label for="filename">Filename:</label>
1197 1197 <div class="input-group">
1198   - <input type="text" class="form-control" id="filename" placeholder="enter name" ng-model="filename">
  1198 + <input type="text" class="form-control" id="exportfilename" placeholder="enter name" ng-model="exportfilename">
1199 1199 <div class="input-group-addon">.jpg</div>
1200 1200 </div>
1201 1201 </div>
... ... @@ -1213,12 +1213,12 @@
1213 1213 </div>
1214 1214 </div>
1215 1215 </div>
1216   - <div class="modal fade export-image-ipad ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  1216 + <div class="modal fade export-image-ipad ui-draggable in" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
1217 1217 style="z-index: 1200002;">
1218 1218 <div class="modal-dialog modal-sm" role="document" style="width:400px">
1219 1219 <div class="modal-content">
1220 1220 <div class="modal-header annotation-modal-header ui-draggable-handle">
1221   - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร—</span></button>
  1221 + <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseExportModal()"><span aria-hidden="true">ร—</span></button>
1222 1222 <h4 class="modal-title" id="">Download Export Image</h4>
1223 1223 </div>
1224 1224 <div class="modal-body" style="width: 400px; height: 100px; overflow-x: auto;">
... ...
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js
... ... @@ -76,10 +76,10 @@ var jsPanel = {
76 76 '<div class="jsPanel-hdr jsPanel-theme-default">' +
77 77 '<h3 class="jsPanel-title"></h3>' +
78 78 '<div class="jsPanel-hdr-r">' +
79   - '<div class="jsPanel-btn-close "><span class="jsglyph jsglyph-remove"></span></div>' +
80   - '<div class="jsPanel-btn-max"><span class="jsglyph jsglyph-maximize"></span></div>' +
81   - '<div class="jsPanel-btn-norm"><span class="jsglyph jsglyph-normalize"></span></div>' +
82   - '<div class="jsPanel-btn-min"><span id="minSpan" class="fa fa-minus"></span></div>' +
  79 + '<div class="jsPanel-btn-close " title="close"><span class="jsglyph jsglyph-remove"></span></div>' +
  80 + '<div class="jsPanel-btn-max" title="maximize"><span class="jsglyph jsglyph-maximize"></span></div>' +
  81 + '<div class="jsPanel-btn-norm" title="restore"><span class="jsglyph jsglyph-normalize"></span></div>' +
  82 + '<div class="jsPanel-btn-min" title="minimize"><span id="minSpan" class="fa fa-minus"></span></div>' +
83 83  
84 84 //'<div class="jsPanel-btn-min"><span class="jsglyph jsglyph-minimize"></span></div>' +
85 85 //'<div class="jsPanel-btn-small"><span class="jsglyph jsglyph-chevron-up"></span></div>' +
... ... @@ -135,7 +135,7 @@ var jsPanel = {
135 135 // title h3 might be to small: load() is async!
136 136 jsPanel.resizeTitle(panel);
137 137 // update option.size (content might come delayed)
138   - jsPanel.updateOptionSize(panel, panel.option.size);
  138 + //jsPanel.updateOptionSize(panel, panel.option.size);
139 139 })
140 140 .then(function (data, textStatus, jqXHR) {
141 141 if (oAjax.then && $.isArray(oAjax.then)) {
... ... @@ -145,7 +145,7 @@ var jsPanel = {
145 145 // title h3 might be to small: load() is async!
146 146 jsPanel.resizeTitle(panel);
147 147 // update option.size (content might come delayed)
148   - jsPanel.updateOptionSize(panel, panel.option.size);
  148 + //jsPanel.updateOptionSize(panel, panel.option.size);
149 149 }
150 150 }, function (jqXHR, textStatus, errorThrown) {
151 151 if (oAjax.then && $.isArray(oAjax.then)) {
... ... @@ -775,7 +775,7 @@ var jsPanel = {
775 775 // title h3 might be to small: load() is async!
776 776 jsPanel.resizeTitle(panel);
777 777 // update option.size (content might come delayed)
778   - jsPanel.updateOptionSize(panel, panel.option.size);
  778 + //jsPanel.updateOptionSize(panel, panel.option.size);
779 779 // fix for a bug in jQuery-UI draggable? that causes the jsPanel to reduce width when dragged beyond boundary of containing element and option.size.width is 'auto'
780 780 panel.content.css('width', function () {
781 781 return panel.content.outerWidth();
... ... @@ -858,52 +858,33 @@ var jsPanel = {
858 858 //birendra
859 859 var currentController = panel.option.currentController;
860 860 if (pathname == "/curriculum-builder-detail")
861   - {
862   -
863   -
864   - if (currentController == 'DAController') {
865   - var len= (panel.option.id).split("_").length;
866   - var MultiWinId = (panel.option.id).split("_")[len-1];
867   - $('#canvasDivDA_' + MultiWinId).css('height', 460);
868   -
869   - }
870   - else if(currentController == 'TileViewListController')
871   - {
872   - var len= (panel.option.id).split("_").length;
873   - var MultiWinId = (panel.option.id).split("_")[len-1];
874   - $('#canvasAADiv_' + MultiWinId).css('height', 490);
875   -
876   - }
877   - else if (currentController == "CIController")
878   - {
879   -
880   - var len = (panel.option.id).split("_").length;
881   - var MultiWinId = (panel.option.id).split("_")[len - 1];
882   - $('#canvasDivCI_' + MultiWinId).css('height', 450);
883   - }
884   - else
885   - {
886   - // add for other module like AI when implemt for CB
887   - $('#canvasDiv').css('height', 470);
888   - }
889   -
890   - panel.css({
  861 + {
  862 + var ht=$("#cbdivarea").height()-100;
  863 + var wt= $("#cbdivarea").width();
  864 + panel.css({
891 865 top: parseInt(80),
892   - left: parseInt(320),
893   - width: currentController == 'CIController' ? 1010 : 1025,
894   - height: currentController == 'CIController' ? 550 : currentController == 'CAController' ? 545: 580,
  866 + left:parseInt(10),
  867 + width: wt,
  868 + height:ht,
895 869 });
  870 +
896 871  
897 872 }
898 873 else
899 874 {
900   - var ht=parseInt(panel.parent().outerHeight()) - parseInt(panel.option.maximizedMargin.top) - parseInt(panel.option.maximizedMargin.bottom) - 65;
  875 + //disable resize and drag on full screen
  876 + // panel.resizable({ disabled: true });
  877 + // panel.draggable({ disabled: true });
  878 + //maximize
  879 + var screenWidth =screen.width-20;
  880 + var screenHeight =screen.height<1024 ?screen.height-80:screen.height-230;
  881 + var ht=$(window).outerHeight()-10 - parseInt(panel.option.maximizedMargin.top) - parseInt(panel.option.maximizedMargin.bottom) - 65;
  882 + var wt=$(window).outerWidth()-10 - parseInt(panel.option.maximizedMargin.left) - parseInt(panel.option.maximizedMargin.right);
901 883 panel.css({
902 884 top: parseInt(70),//panel.option.maximizedMargin.top),
903   - left:currentController == 'CIController' ? 15 : parseInt(panel.option.maximizedMargin.left),
904   - width: parseInt(panel.parent().outerWidth(), 10) - parseInt(panel.option.maximizedMargin.left) - parseInt(panel.option.maximizedMargin.right),
905   - //height: parseInt(panel.parent().outerHeight()) - parseInt(panel.option.maximizedMargin.top) - parseInt(panel.option.maximizedMargin.bottom) - 65
906   - height: currentController == 'MyAnimationController' ? 510 : ht
  885 + left:parseInt(panel.option.maximizedMargin.left),
  886 + width: currentController == 'CAController' ? screenWidth: currentController == '3dAController' ? screenWidth: wt,
  887 + height:currentController == '3dAController' ? screenHeight: ht,
907 888 });
908 889  
909 890  
... ... @@ -977,8 +958,8 @@ var jsPanel = {
977 958 });
978 959 // update panel size to have correct values when normalizing again
979 960 if (panel.status === "normalized" || panel.option.panelstatus === "normalized") {
980   - panel.option.size.width = panel.outerWidth();
981   - panel.option.size.height = panel.outerHeight();
  961 + //panel.option.size.width = panel.outerWidth();
  962 + //panel.option.size.height = panel.outerHeight();
982 963 }
983 964 panel.animate({
984 965 opacity: 0
... ... @@ -1063,32 +1044,6 @@ var jsPanel = {
1063 1044 if (pathname == "/curriculum-builder-detail")
1064 1045 {
1065 1046  
1066   - if (currentController == 'DAController') {
1067   - var len= (panel.option.id).split("_").length;
1068   - var MultiWinId = (panel.option.id).split("_")[len-1];
1069   - $('#canvasDivDA_' + MultiWinId).css('height', (parseInt(panel.option.size.height, 10)-100));
1070   -
1071   - }
1072   - else if(currentController == 'TileViewListController')
1073   - {
1074   - var len= (panel.option.id).split("_").length;
1075   - var MultiWinId = (panel.option.id).split("_")[len-1];
1076   - $('#canvasAADiv_' + MultiWinId).css('height', (parseInt(panel.option.size.height, 10)-70));
1077   -
1078   - }
1079   - else if (currentController == 'CIController') {
1080   - var len = (panel.option.id).split("_").length;
1081   - var MultiWinId = (panel.option.id).split("_")[len - 1];
1082   - $('#canvasDivCI_' + MultiWinId).css('height', (parseInt(panel.option.size.height, 10) - 70));
1083   -
1084   - }
1085   - else
1086   - {
1087   - // add for other module like CI,AI when implemt for CB
1088   - $('#canvasDiv').css('height', (parseInt(panel.option.size.height, 10)-100));
1089   -
1090   - }
1091   -
1092 1047 panel.css({
1093 1048 width: panel.option.size.width,
1094 1049 height: currentController == 'CIController' ? parseInt(panel.option.size.height, 10) : currentController == 'CAController' ? parseInt(panel.option.size.height, 10) : parseInt(panel.option.size.height, 10) + 35,
... ... @@ -1100,9 +1055,11 @@ var jsPanel = {
1100 1055 }
1101 1056 else
1102 1057 {
  1058 + var ht=$(window).outerHeight()-panel.option.size.height<200?$(window).outerHeight()-200:panel.option.size.height;
  1059 + var wt=screen.width<1025?screen.width-100:$(window).innerWidth()-panel.option.size.width<300?$(window).innerWidth()-300:panel.option.size.width;
1103 1060 panel.css({
1104   - width: currentController == 'CIController' ? panel.option.size.width - 18 : panel.option.size.width,
1105   - height: currentController == 'CAController' ? parseInt(panel.option.size.height, 10) : parseInt(panel.option.size.height, 10) + 35,
  1061 + width: wt,
  1062 + height:ht,
1106 1063 top: panelTop,
1107 1064 left: panel.option.position.left
1108 1065 });
... ... @@ -1431,14 +1388,11 @@ var jsPanel = {
1431 1388 if (jspanel.attr("id") !== $(elmt).attr("id")) {
1432 1389  
1433 1390 var pathname = window.location.pathname;
1434   - //birendra
1435   - if (pathname == "/curriculum-builder-detail") {
1436 1391 var zindex = $(elmt).css("z-index");
1437 1392 if (zindex = "auto") {
1438 1393 $(elmt).css('z-index', '1');
1439 1394 }
1440   - }
1441   -
  1395 +
1442 1396 allZi.push($(elmt).css("z-index"));
1443 1397  
1444 1398 }
... ... @@ -2447,7 +2401,7 @@ console.log(&quot;jsPanel version: &quot; + jsPanel.version);
2447 2401 "onbeforeminimize": false,
2448 2402 "onbeforenormalize": false,
2449 2403 "onclosed": false,
2450   - "oncmaximized": false,
  2404 + "onmaximized": false,
2451 2405 "onminimized": false,
2452 2406 "onnormalized": false,
2453 2407 "overflow": 'hidden',
... ...
400-SOURCECODE/Admin/.angular-cli.json
... ... @@ -19,9 +19,11 @@
19 19 "testTsconfig": "tsconfig.spec.json",
20 20 "prefix": "app",
21 21 "styles": [
22   - "styles.css"
  22 + "styles.css",
  23 + "../node_modules/chosen-js/chosen.min.css"
23 24 ],
24   - "scripts": [],
  25 + "scripts": ["../node_modules/chosen-js/chosen.jquery.min.js"
  26 + ],
25 27 "environmentSource": "environments/environment.ts",
26 28 "environments": {
27 29 "dev": "environments/environment.ts",
... ...
400-SOURCECODE/Admin/package-lock.json
... ... @@ -235,13 +235,9 @@
235 235 "dev": true
236 236 },
237 237 "@angular/material": {
238   - "version": "6.4.7",
239   - "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.4.7.tgz",
240   - "integrity": "sha512-SdNx7Xovi24Kw9eU6lkLhY/7f2M7L9F+/uh6XuPr4jbGgCUVVpeeVI5ztZhsZRbj1sN+/r1p5w8u62apWWl5Ww==",
241   - "requires": {
242   - "parse5": "^5.0.0",
243   - "tslib": "^1.7.1"
244   - }
  238 + "version": "2.0.0-beta.2",
  239 + "resolved": "https://registry.npmjs.org/@angular/material/-/material-2.0.0-beta.2.tgz",
  240 + "integrity": "sha1-Ze6HM5kDR7dRi39CET4C4GncEJs="
245 241 },
246 242 "@angular/platform-browser": {
247 243 "version": "4.4.7",
... ... @@ -321,6 +317,14 @@
321 317 "@angular-devkit/core": "0.0.20"
322 318 }
323 319 },
  320 + "@types/chosen-js": {
  321 + "version": "1.6.0",
  322 + "resolved": "https://registry.npmjs.org/@types/chosen-js/-/chosen-js-1.6.0.tgz",
  323 + "integrity": "sha1-RA+oi9qIE4GR1PdnMN7rZT6tkWI=",
  324 + "requires": {
  325 + "@types/jquery": "*"
  326 + }
  327 + },
324 328 "@types/jasmine": {
325 329 "version": "2.5.54",
326 330 "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.5.54.tgz",
... ... @@ -337,9 +341,9 @@
337 341 }
338 342 },
339 343 "@types/jquery": {
340   - "version": "2.0.54",
341   - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.54.tgz",
342   - "integrity": "sha512-D/PomKwNkDfSKD13DEVQT/pq2TUjN54c6uB341fEZanIzkjfGe7UaFuuaLZbpEiS5j7Wk2MUHAZqZIoECw29lg=="
  344 + "version": "2.0.46",
  345 + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.46.tgz",
  346 + "integrity": "sha512-U64bkZqTfFi4HXHqOckD1Uxvg+oPooCjD5bQ10t9xOG5Ke6cR8tFnvERXrQtrRWvgS428nhAL1V8qv1b88kgyQ=="
343 347 },
344 348 "@types/node": {
345 349 "version": "6.14.7",
... ... @@ -1211,6 +1215,11 @@
1211 1215 "hoek": "2.x.x"
1212 1216 }
1213 1217 },
  1218 + "bootstrap": {
  1219 + "version": "3.1.1",
  1220 + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.1.1.tgz",
  1221 + "integrity": "sha1-F+FO0mHA/Nm1LqmqZCD21RzV+nc="
  1222 + },
1214 1223 "boxen": {
1215 1224 "version": "1.3.0",
1216 1225 "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz",
... ... @@ -1599,6 +1608,11 @@
1599 1608 "upath": "^1.1.1"
1600 1609 }
1601 1610 },
  1611 + "chosen-js": {
  1612 + "version": "1.8.7",
  1613 + "resolved": "https://registry.npmjs.org/chosen-js/-/chosen-js-1.8.7.tgz",
  1614 + "integrity": "sha512-eVdrZJ2U5ISdObkgsi0od5vIJdLwq1P1Xa/Vj/mgxkMZf14DlgobfB6nrlFi3kW4kkvKLsKk4NDqZj1MU1DCpw=="
  1615 + },
1602 1616 "chownr": {
1603 1617 "version": "1.1.2",
1604 1618 "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz",
... ... @@ -6062,6 +6076,11 @@
6062 6076 "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=",
6063 6077 "dev": true
6064 6078 },
  6079 + "jquery": {
  6080 + "version": "3.0.0",
  6081 + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.0.0.tgz",
  6082 + "integrity": "sha1-laKpVBKRqfgZ4Bb4W6JHEW0D5Ks="
  6083 + },
6065 6084 "js-base64": {
6066 6085 "version": "2.5.1",
6067 6086 "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",
... ... @@ -7140,6 +7159,13 @@
7140 7159 "requires": {
7141 7160 "@types/jquery": "^2.0.39",
7142 7161 "@types/select2": "4.0.42"
  7162 + },
  7163 + "dependencies": {
  7164 + "@types/jquery": {
  7165 + "version": "2.0.56",
  7166 + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.56.tgz",
  7167 + "integrity": "sha512-tcNulMBr4fuMeBhwrRNQw3JaWg7vXP9bi64nKM5qYbaIN/oyo4n9O4TG5Thyn1BmhH159XvDxD4y3kqqpYS4sg=="
  7168 + }
7143 7169 }
7144 7170 },
7145 7171 "ngx-bootstrap": {
... ... @@ -8072,12 +8098,6 @@
8072 8098 "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
8073 8099 "dev": true
8074 8100 },
8075   - "parse5": {
8076   - "version": "5.1.0",
8077   - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
8078   - "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==",
8079   - "optional": true
8080   - },
8081 8101 "parsejson": {
8082 8102 "version": "0.0.3",
8083 8103 "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz",
... ...
400-SOURCECODE/Admin/package.json
... ... @@ -19,19 +19,23 @@
19 19 "@angular/core": "^4.2.4",
20 20 "@angular/forms": "^4.2.4",
21 21 "@angular/http": "^4.2.4",
22   - "@angular/material": "^6.2.0",
  22 + "@angular/material": "^2.0.0-beta.2",
23 23 "@angular/platform-browser": "^4.2.4",
24 24 "@angular/platform-browser-dynamic": "^4.2.4",
25 25 "@angular/router": "^4.2.4",
26 26 "@ng-idle/core": "^2.0.0-beta.9",
27 27 "@ng-idle/keepalive": "^2.0.0-beta.9",
28 28 "@ng-select/ng-select": "^2.1.2",
  29 + "@types/chosen-js": "^1.6.0",
29 30 "@types/node": "^6.0.102",
30 31 "angular2-json2csv": "^1.1.2",
31 32 "angular2-moment": "^1.9.0",
32 33 "angular4-slimscroll": "^1.0.5",
  34 + "bootstrap": "^3.1.1",
  35 + "chosen-js": "^1.8.7",
33 36 "classlist.js": "1.1.20150312",
34 37 "core-js": "^2.5.3",
  38 + "jquery": "^3.0.0",
35 39 "karma-coverage-istanbul-reporter": "^1.4.2",
36 40 "karma-jasmine": "^1.1.1",
37 41 "ng2-bs3-modal": "^0.10.4",
... ... @@ -53,6 +57,7 @@
53 57 "@angular/language-service": "^4.2.4",
54 58 "@types/jasmine": "~2.5.53",
55 59 "@types/jasminewd2": "~2.0.2",
  60 + "@types/jquery": "^2.0.46",
56 61 "@types/node": "~6.0.60",
57 62 "codelyzer": "~3.2.0",
58 63 "jasmine-core": "~2.6.2",
... ...
400-SOURCECODE/Admin/src/app/app.component.html
... ... @@ -14,9 +14,6 @@
14 14 <button type="button" class="btn btn-primary dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
15 15 {{global.DisplayName}} <!--<span class="caret"></span>-->
16 16 </button>
17   - <!--<ul class="dropdown-menu">
18   - <li><a href="#"><strong>Date:</strong> 11/21/2016</a></li>
19   - </ul>-->
20 17 </div>
21 18 </div>
22 19 <button type="button" class="navbar-toggle collapsed mar-top17" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
... ... @@ -37,69 +34,6 @@
37 34 </li>
38 35 </ul>
39 36 </li>
40   - <!--<li class="dropdown">
41   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Profile<span class="caret"></span></a>
42   - <ul class="dropdown-menu">
43   - <li><a [routerLink]="['updateuserprofile']">Update Profile</a></li>
44   -
45   - <li><a [routerLink]="['changeuserpassword']">Change Password</a></li>
46   -
47   - <li><a [routerLink]="['changeuserid']">Change User ID</a></li>
48   -
49   - </ul>
50   - </li>
51   - <li class="dropdown">
52   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Licenses<span class="caret"></span></a>
53   - <ul class="dropdown-menu">
54   -
55   - <li><a [routerLink]="['searchlicense']">Search License</a></li>
56   - <li><a [routerLink]="['addlicense']">Add New License</a></li>
57   - </ul>
58   - </li>
59   - <li class="dropdown">
60   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Product Features<span class="caret"></span></a>
61   - <ul class="dropdown-menu">
62   - <li><a [routerLink]="['managediscountcode']">Manage Discount Code</a></li>
63   - <li><a [routerLink]="['subscriptionprice']">Subscription Price</a></li>
64   - </ul>
65   - </li>
66   - <li class="dropdown">
67   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Users<span class="caret"></span></a>
68   - <ul class="dropdown-menu">
69   - <li><a [routerLink]="['users']">List User</a></li>
70   - <li><a [routerLink]="['adduser']">Add User</a></li>
71   - <li><a [routerLink]="['unblockuser']">Unblock User</a></li>
72   - <li><a [routerLink]="['usergroup']">User Group</a></li>
73   - </ul>
74   - </li>
75   - <li class="dropdown">
76   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Reports<span class="caret"></span></a>
77   - <ul class="dropdown-menu">
78   - <li><a [routerLink]="['usagereport']">Usage Report</a></li>
79   - <li><a [routerLink]="['customersummaryreport']">Customer Summary Report</a></li>
80   - <li><a [routerLink]="['expiringsubscriptionreport']">Expiring Subscription Report</a></li>
81   - <li><a [routerLink]="['subscriptionreport']">New Subscription Report</a></li>
82   - <li><a [routerLink]="['subscriptioncancellationreport']">Subscription Cancellation Report</a></li>
83   - <li><a [routerLink]="['netadsubscriptionreport']">Net AD Subscription Report</a></li>
84   - <li><a [routerLink]="['sitelicenseusagereport']">Site License Usage Report</a></li>
85   - <li><a [routerLink]="['discountcodereport']">Discount Code Report</a></li>
86   - <li><a [routerLink]="['imageexportreport']">Image Export Report</a></li>
87   - </ul>
88   - </li>
89   - <li class="dropdown">
90   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Site Account<span class="caret"></span></a>
91   - <ul class="dropdown-menu">
92   - <li><a [routerLink]="['sitelicenseaccount']">Add Building Level Account</a></li>
93   - </ul>
94   - </li>
95   - <li class="dropdown">
96   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Settings<span class="caret"></span></a>
97   - <ul class="dropdown-menu">
98   - <li><a [routerLink]="['editlicensebasicsettings']">View/Update Profile</a></li>
99   - <li><a [routerLink]="['licensemodestysettings']">Manage Modesty Settings</a></li>
100   - <li><a [routerLink]="['licensemodulesettings']">Manage Module</a></li>
101   - </ul>
102   - </li>-->
103 37 <li><a href="/" (click)="Product()">Product</a></li>
104 38 </ul>
105 39 <!--logout-->
... ... @@ -111,11 +45,8 @@
111 45 </div>
112 46 <div class="btn-group pull-right hidden-sm mar-top17 mob2">
113 47 <button id="btndisplayname" type="button" class="btn btn-primary dropdown-toggle btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
114   - {{global.DisplayName}} <!--<span class="caret"></span>-->
  48 + {{global.DisplayName}}
115 49 </button>
116   - <!--<ul class="dropdown-menu">
117   - <li><a href="#"><strong>Date:</strong> 11/21/2016</a></li>
118   - </ul>-->
119 50 </div>
120 51 </div>
121 52 <!--logout-->
... ... @@ -129,18 +60,4 @@
129 60 <router-outlet>
130 61 <modal-confirm></modal-confirm>
131 62 </router-outlet>
132   - <!-- main-heading -->
133   - <!--<div class="col-sm-12 pageHeading">
134   - <h4>Update Profile</h4>
135   - </div>-->
136   - <!-- main-heading -->
137   - <!-- container -->
138   - <!--<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
139   - <div class="container-fluid main-full">-->
140   - <!-- html of other components -->
141   -
142   -
143   - <!--</div>
144   - </div>-->
145   - <!-- container -->
146 63 </div>
... ...
400-SOURCECODE/Admin/src/app/app.component.ts
... ... @@ -81,8 +81,10 @@ export class AppComponent implements OnInit {
81 81 // console.log("You\'ve gone idle!");
82 82 // });
83 83  
84   - if(window.location.hostname=="localhost")
  84 + if(window.location.host=="localhost:4200")
85 85 {
  86 + // for 'ng serve --open' command
  87 + //**** for localhost:4200 *****//
86 88 //insert new session
87 89 this.loginManageStatus('insert');
88 90 }
... ... @@ -149,7 +151,7 @@ export class AppComponent implements OnInit {
149 151 this._loadingService.HideLoading("global-loading");
150 152 }
151 153  
152   - if(window.location.hostname!="localhost")
  154 + if(window.location.host!="localhost:4200")
153 155 {
154 156 localStorage.removeItem('loggedInUserDetails');
155 157 window.location.href = window.location.origin;
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.html
... ... @@ -25,7 +25,7 @@
25 25  
26 26 <form class="row" [formGroup]="insertUpdateLicenseFrm" (submit)="InsertUpdateLicense(templatesuccess)">
27 27  
28   - <div class="well marginBtm12">
  28 + <div class="well marginBtm12" id="addlicenseDiv">
29 29  
30 30 <div class="row" *ngIf="alerts != ''">
31 31 <div class="col-xs-12">
... ... @@ -480,7 +480,8 @@
480 480 <div class="col-sm-12">
481 481 <div class="row">
482 482 <div class="col-sm-12 marginTop10 text-right">
483   - <button class="btn btn-primary btn-sm" type="submit" [disabled]="!insertUpdateLicenseFrm.valid || alerts != '' || this.editionLoginsText == ''"><i class="fa fa-plus-circle "></i> Add</button>
  483 + <button *ngIf="license.LicenseId <= 0" class="btn btn-primary btn-sm" type="submit" [disabled]="!insertUpdateLicenseFrm.valid || alerts != '' || this.editionLoginsText == ''"><i class="fa fa-plus-circle "></i> Add</button>
  484 + <button *ngIf="license.LicenseId > 0" class="btn btn-primary btn-sm" type="submit" [disabled]="!insertUpdateLicenseFrm.valid || alerts != '' || this.editionLoginsText == ''"><i class="fa fa-plus-circle "></i> Update</button>
484 485 <button *ngIf="license.LicenseId > 0" class="btn btn-primary btn-sm" type="button" (click)="CancelAddEdit()"><i class="fa fa-close"></i>Cancel</button>
485 486 </div>
486 487 </div>
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts
... ... @@ -12,6 +12,7 @@ import { BsModalRef } from &#39;ngx-bootstrap/modal/bs-modal-ref.service&#39;;
12 12 import { ContenteditableModelDirective } from '../../shared/contenteditabledirective';
13 13 import { NumberOnlyDirective } from '../../shared/numberonlydirective';
14 14 import { ConfirmService } from '../../shared/confirm/confirm.service';
  15 +import { LoadingService } from '../../shared/loading.service';
15 16 @Component({
16 17 templateUrl: './addlicense.component.html'
17 18 })
... ... @@ -50,10 +51,12 @@ export class AddLicense implements OnInit {
50 51 dateEndInvalid: boolean = false;
51 52 dateRenewInvalid: boolean = false;
52 53 NumberOfRows:number=0;
53   - constructor(private licenseService: LicenseService, private globalService: GlobalService,
  54 + constructor(private _loadingService: LoadingService,private licenseService: LicenseService, private globalService: GlobalService,
54 55 private router: Router, private activeRoute: ActivatedRoute,
55   - private fb: FormBuilder, private modalService: BsModalService,private _confirmService: ConfirmService) { }
  56 + private fb: FormBuilder, private modalService: BsModalService,private _confirmService: ConfirmService) {
56 57  
  58 + }
  59 +
57 60 ngOnInit(): void {
58 61 this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' });
59 62 this.divClass = 'col-sm-12';
... ... @@ -100,6 +103,15 @@ export class AddLicense implements OnInit {
100 103 totalRenewals: [0],
101 104 isActive: ['false']
102 105 });
  106 +
  107 + var $ua = navigator.userAgent;
  108 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  109 + $('#addlicenseDiv').css('height','920px')
  110 + }
  111 + else
  112 + {
  113 + $('#addlicenseDiv').css('height','840px')
  114 + }
103 115 this.GetLicenseType();
104 116 this.GetCountry();
105 117 this.GetState();
... ... @@ -517,25 +529,29 @@ export class AddLicense implements OnInit {
517 529 AfterInsertData(data, template) {
518 530 if (data.Status == "false") {
519 531 this.alerts = "<span>License save unsuccessfull.</span>";
520   - } else {
  532 + }
  533 + else
  534 + {
521 535 if(this.insertUpdateLicenseFrm.controls['licenseTypeId'].value==4)
522 536 {
523 537 this._confirmService.activate("License saved successfully. Mail has been sent", "alertMsg");
524 538 }
525 539 else{
526 540 this._confirmService.activate("License saved successfully.", "alertMsg");
527   - }
528   -
  541 + }
529 542 }
  543 + this._loadingService.HideLoading("global-loading");
530 544 }
531 545  
532 546 AfterUpdateData(data, template) {
533 547 if (data.Status == "false") {
534 548 this.alerts = "<span>License update unsuccessfull.</span>";
535   - } else {
536   - this._confirmService.activate("License updated successfully.", "alertMsg");
537   -
  549 + }
  550 + else
  551 + {
  552 + this._confirmService.activate("License updated successfully.", "alertMsg");
538 553 }
  554 + this._loadingService.HideLoading("global-loading");
539 555 }
540 556  
541 557 OnLoginBlur() {
... ... @@ -696,8 +712,17 @@ export class AddLicense implements OnInit {
696 712 }
697 713 else {
698 714 this.insertUpdateLicenseFrm.controls['editionLoginArr'].value.forEach(element => {
699   - if (element.Login > 0) {
700   - this.editionLoginsText += element.Id.toString() + '-' + element.Login + '|';
  715 + if (element.Checked > 0) {
  716 + if(element.Login=='')
  717 + {
  718 + //set 0 edition for update license
  719 + this.editionLoginsText += element.Id.toString() + '-' + 0 + '|';
  720 + }
  721 + else
  722 + {
  723 + this.editionLoginsText += element.Id.toString() + '-' + element.Login + '|';
  724 + }
  725 +
701 726 }
702 727 });
703 728 }
... ... @@ -713,7 +738,9 @@ export class AddLicense implements OnInit {
713 738 if (response == 'True') {
714 739 this.alerts += '<span>Account number already exists. Enter a different account number.</span>';
715 740 }
716   - if (this.alerts == '') {
  741 + if (this.alerts == '')
  742 + {
  743 + this._loadingService.ShowLoading("global-loading");
717 744 return this.licenseService.InsertLicense(obj)
718 745 .subscribe(
719 746 n => (this.AfterInsertData(n, template)),
... ... @@ -722,13 +749,15 @@ export class AddLicense implements OnInit {
722 749 },
723 750 error => this.error = <any>error);
724 751 }
725   - else {
  752 + else
  753 + {
726 754 if (this.insertUpdateLicenseFrm.controls['renew'].value && this.insertUpdateLicenseFrm.controls['renewDate'].value == undefined) {
727 755 this.alerts = 'Renew date is required';
728 756 }
729 757 if (this.alerts == '') {
730   - console.log(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value + ', ' + this.insertUpdateLicenseFrm.controls['subscriptionEndDate'].value + ', ' + this.insertUpdateLicenseFrm.controls['renewDate'].value);
731   - console.log(obj.subscriptionStartDate + ', ' + obj.subscriptionEndDate + ', ' + obj.renewDate);
  758 + //console.log(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value + ', ' + this.insertUpdateLicenseFrm.controls['subscriptionEndDate'].value + ', ' + this.insertUpdateLicenseFrm.controls['renewDate'].value);
  759 + // console.log(obj.subscriptionStartDate + ', ' + obj.subscriptionEndDate + ', ' + obj.renewDate);
  760 + this._loadingService.ShowLoading("global-loading");
732 761 return this.licenseService.UpdateLicense(obj)
733 762 .subscribe(
734 763 n => (this.AfterUpdateData(n, template)),
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.html
... ... @@ -37,39 +37,18 @@
37 37 <div class="col-sm-12">
38 38  
39 39 <div class="panel-body">
40   -
41   - <!-- form -->
42   - <form class="form-horizontal" [formGroup]="updateLicenseBasicSettingsFrm" (submit)="UpdateLicenseBasicSettings(templatesuccess)">
43   -
44   - <div class="form-group" *ngIf="this.globalService.UserType == 1 || this.globalService.UserType == 2">
45   - <label for="inputEmail3" class="col-sm-4 control-label">Account Number :</label>
46   - <div class="col-sm-7" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
47   - <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
48   - aria-controls="dropdown-basic" style="height: 30px;">
49   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
50   - <span class="caret pull-right" style="margin-top: 6px;"></span>
51   - </button>
52   - <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu" role="menu" aria-labelledby="button-basic" style="overflow: scroll; height: 200px;" (scroll)="onScroll($event)">
53   - <li role="menuitem">
54   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(0, 'Select')">Select</a>
55   - </li>
56   - <li role="menuitem" *ngFor="let item of tempLstAccountNumbers">
57   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(item.m_Item1, item.m_Item2)">{{item.m_Item2}}</a>
58   - </li>
59   - </ul>
60   - </div>
61   - </div>
62   -
63   - <div class="form-group" *ngIf="this.globalService.UserType > 2">
  40 + <div class="form-horizontal">
  41 + <div class="form-group">
64 42 <label for="inputEmail3" class="col-sm-4 control-label">Account Number :</label>
65   - <div class="col-sm-7" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
66   - <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
67   - aria-controls="dropdown-basic" style="height: 30px;">
68   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
69   - </button>
  43 + <div class="col-sm-7">
  44 + <select id='accountSelect'>
  45 + <option *ngFor="let item of tempLstAccountNumbers" [value]="item.m_Item1">{{item.m_Item2}}</option>
  46 + </select>
70 47 </div>
71 48 </div>
72   -
  49 + </div>
  50 + <!-- form -->
  51 + <form class="form-horizontal" [formGroup]="updateLicenseBasicSettingsFrm" (submit)="UpdateLicenseBasicSettings(templatesuccess)">
73 52 <div class="form-group">
74 53 <label for="inputPassword3" class="col-sm-4 control-label">Licensee First Name <span class="red">*</span> :</label>
75 54 <div class="col-sm-7">
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts
... ... @@ -11,13 +11,14 @@ import { BsModalService } from &#39;ngx-bootstrap/modal&#39;;
11 11 import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
12 12 import { ContenteditableModelDirective } from '../../shared/contenteditabledirective'
13 13 import { ConfirmService } from '../../shared/confirm/confirm.service';
  14 +import { LoadingService } from '../../shared/loading.service';
  15 +declare var $:JQueryStatic;
14 16 @Component({
15 17 templateUrl: './editlicensebasicsettings.component.html'
16 18 })
17 19  
18 20 export class EditLicenseBasicSettings implements OnInit {
19 21  
20   - lstAccountNumbers: any;
21 22 tempLstAccountNumbers: any;
22 23 lstCountry: any;
23 24 lstState: any;
... ... @@ -29,23 +30,20 @@ export class EditLicenseBasicSettings implements OnInit {
29 30 modalRef: BsModalRef;
30 31 ConvertedPhoneno: string;
31 32 MinusCharater: number;
32   - accountDropDownText: string;
33   - loopIdx1: number;
34   - loopIdx2: number;
35   - lastScrollPos: number;
  33 + LicenseId:number=0;
  34 + AccountNumber:string='';
36 35  
37   - constructor(private licenseService: LicenseService,
  36 + constructor(private _loadingService: LoadingService,private licenseService: LicenseService,
38 37 public globalService: GlobalService, private router: Router,
39 38 private activeRoute: ActivatedRoute, private fb: FormBuilder,
40 39 private modalService: BsModalService, private _confirmService: ConfirmService) { }
41 40  
42 41 ngOnInit(): void {
  42 + this._loadingService.ShowLoading("global-loading");
  43 + $('#accountSelect').chosen({allow_single_deselect:true,width:'300px',placeholder_text_single:'Select Account',search_contains:true});
  44 +
43 45 this.license = new License();
44 46 this.alerts = '';
45   - this.accountDropDownText = 'Select';
46   - this.loopIdx1 = 0;
47   - this.loopIdx2 = 0;
48   - this.lastScrollPos = 0;
49 47 this.updateLicenseBasicSettingsFrm = this.fb.group({
50 48 licenseId: [0],
51 49 accountNumber: ['', [Validators.required,this.noWhitespaceValidator]],
... ... @@ -63,7 +61,31 @@ export class EditLicenseBasicSettings implements OnInit {
63 61 });
64 62 this.GetCountry();
65 63 this.GetState();
66   - this.GetLicenseAccounts();
  64 +
  65 + if (this.globalService.UserType > 2) {
  66 + this.tempLstAccountNumbers=[];
  67 + this.tempLstAccountNumbers.push({m_Item1:this.globalService.AccLicId,m_Item2:this.globalService.AccountNumber});
  68 + this.AccountNumberChanged(this.globalService.AccLicId,this.globalService.AccountNumber);
  69 +
  70 + setTimeout(function(){
  71 + $('#accountSelect').prop('disabled', true).trigger("chosen:updated");
  72 + $('#accountSelect').trigger('chosen:updated');
  73 +
  74 + }, 500);
  75 + this._loadingService.HideLoading("global-loading");
  76 + }
  77 + else
  78 + {
  79 + this.GetLicenseAccounts();
  80 + }
  81 + $('#accountSelect')
  82 + .on('change', (e, args) => {
  83 + var selectedValue = Number(args.selected);
  84 + var selectedText= $(".chosen-single span" ).text();
  85 + this.AccountNumberChanged(selectedValue,selectedText);
  86 + });
  87 +
  88 +
67 89 }
68 90 public noWhitespaceValidator(control: FormControl) {
69 91 // new validation for intial whaite space
... ... @@ -151,31 +173,23 @@ export class EditLicenseBasicSettings implements OnInit {
151 173 }
152 174  
153 175 GetLicenseAccounts() {
  176 + this.tempLstAccountNumbers=[];
154 177 this.licenseService.GetLicenseAccounts(0)
155   - .subscribe(st => {
156   - this.lstAccountNumbers = st;
157   - this.tempLstAccountNumbers = [];
158   - this.loopIdx1 = 0;
159   - this.loopIdx2 = 0;
160   - this.lastScrollPos = 0;
161   - this.tempLstAccountNumbers = [];
162   - if (this.globalService.UserType > 2) {
163   - this.accountDropDownText = this.globalService.AccountNumber;
164   - this.tempLstAccountNumbers.push(this.accountDropDownText);
165   - this.AccountNumberChanged(this.globalService.AccLicId, this.accountDropDownText);
166   - }
167   - else {
168   - for (var i = 0; i < 50; i++) {
169   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
170   - }
171   - }
172   - },
173   - error => this.error = <any>error);
  178 + .subscribe(st => {
  179 + var newOption = $('<option value=""></option>');
  180 + $('#accountSelect').append(newOption);
  181 + this.tempLstAccountNumbers=st;
  182 + setTimeout(function(){
  183 + $('#accountSelect').trigger('chosen:updated');
  184 + }, 500);
  185 + this._loadingService.HideLoading("global-loading");
  186 +
  187 + }, error => this.error = <any>error);
174 188 }
175 189  
176 190 GetLicenseById() {
177   - if (this.license.LicenseId != 0) {
178   - this.licenseService.GetLicenseById(this.license.LicenseId)
  191 + if (this.LicenseId != 0) {
  192 + this.licenseService.GetLicenseById(this.LicenseId)
179 193 .subscribe(st => {
180 194 this.license = st;
181 195  
... ... @@ -191,38 +205,14 @@ export class EditLicenseBasicSettings implements OnInit {
191 205 this.updateLicenseBasicSettingsFrm.controls['countryId'].setValue(this.license.CountryId);
192 206 this.updateLicenseBasicSettingsFrm.controls['zip'].setValue(this.license.Zip);
193 207 this.updateLicenseBasicSettingsFrm.controls['emailId'].setValue(this.license.EmailId);
194   - //this.updateLicenseBasicSettingsFrm.controls['phone'].setValue(this.license.Phone);
195   - var str = this.license.Phone;
196   - var origPh = this.license.Phone;
197   - str = str.replace(" ", "");
198   - str = str.replace("-", "").replace("-", "");
199   - if (str.length >= 10) {
200   - origPh = str.substr(0, 3) + "-" + str.substr(3, 3) + "-" + str.substr(5, 4)
201   - }
202   - else {
203   - this.MinusCharater = 10 - str.length;
204   - this.AddZeroInPhoneNo(this.MinusCharater, str);
205   - origPh = this.ConvertedPhoneno.substr(0, 2) + "-" + this.ConvertedPhoneno.substr(2, 5) + "-" + this.ConvertedPhoneno.substr(5, 9)
206   -
207   -
208   - }
209   - this.updateLicenseBasicSettingsFrm.controls['phone'].setValue(origPh);
210   - //if (str.search("-") == -1) {
211   - // alert(str);
212   - //}
213   - //else {
214   - // var splitted = str.split("-");
215   - // if (splitted.length >= 2) {
216   -
217   - // }
218   - //}
  208 + this.updateLicenseBasicSettingsFrm.controls['phone'].setValue(this.license.Phone);
  209 + this._loadingService.HideLoading("global-loading");
219 210 },
220 211 error => this.error = <any>error);
221 212 }
222 213 }
223 214  
224   - AccountNumberChanged(LicenseId: number, SelectText: string) {
225   - this.accountDropDownText = SelectText;
  215 + AccountNumberChanged(LicenseId: number,AccountNumber:string) {
226 216 if (LicenseId == 0) {
227 217 this.updateLicenseBasicSettingsFrm.reset();
228 218 this.updateLicenseBasicSettingsFrm.controls['licenseId'].setValue(0);
... ... @@ -230,76 +220,26 @@ export class EditLicenseBasicSettings implements OnInit {
230 220 this.updateLicenseBasicSettingsFrm.controls['stateId'].setValue(0);
231 221 return;
232 222 }
233   - this.license.LicenseId = LicenseId;
  223 + this._loadingService.ShowLoading("global-loading");
  224 + this.LicenseId=LicenseId;
  225 + this.AccountNumber=AccountNumber;
234 226 this.GetLicenseById();
235 227 return false;
236 228 }
237 229  
238   - onScroll($event) {
239   - if (this.globalService.loggedInUser.UserTypeId > 2) return;
240   - if (this.lastScrollPos > $event.target.scrollTop) {
241   - for (var i = 0; i < 1000; i++) {
242   - if (this.loopIdx1 > 0)
243   - this.tempLstAccountNumbers.unshift(this.lstAccountNumbers[this.loopIdx1--]);
244   - }
245   - }
246   - else {
247   - for (var i = 0; i < 1000; i++) {
248   - if (this.loopIdx2 < this.lstAccountNumbers.length)
249   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
250   - }
251   - }
252   - this.lastScrollPos = $event.target.scrollTop;
253   - }
254   -
255   - onOpenChange(data: boolean): void {
256   - if (this.globalService.loggedInUser.UserTypeId > 2) return;
257   - if (!data) {
258   - this.loopIdx1 = 0;
259   - this.loopIdx2 = 0;
260   - this.tempLstAccountNumbers = [];
261   - for (var i = 0; i < 50; i++) {
262   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
263   - }
264   - }
265   - }
266   -
267   - onKeyPress($event) {
268   - if (this.globalService.loggedInUser.UserTypeId > 2) return;
269   - let FindItem = this.lstAccountNumbers.find(C => (C.m_Item2.toLowerCase().indexOf($event.key) == 0));
270   - let prevIdx = 0;
271   - if (FindItem != null) {
272   - for (var i = 0; i < this.lstAccountNumbers.length; i++) {
273   - if (FindItem.m_Item1 == this.lstAccountNumbers[i].m_Item1) {
274   - prevIdx = i;
275   - break;
276   - }
277   - }
278   - this.tempLstAccountNumbers = [];
279   - this.loopIdx1 = prevIdx;
280   - this.loopIdx2 = prevIdx;
281   - for (var i = 0; i < 50; i++) {
282   - if (this.loopIdx2 < this.lstAccountNumbers.length)
283   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
284   - }
285   - this.lastScrollPos = 0;
286   - $event.target.nextElementSibling.scrollTop = 0;
287   - }
288   - }
289   -
290 230 AfterUpdateData(data, template) {
291 231 if (data.Status == "false") {
292 232 this.alerts = "<span>License profile update unsuccessfull.</span>";
293 233 } else {
294   - //this.modalAlerts = "<p>License updated successfully</p>";
295 234 this._confirmService.activate("License profile updated successfully.", "alertMsg");
296   - // this.modalRef = this.modalService.show(template);
297 235 }
  236 + this._loadingService.HideLoading("global-loading");
298 237 }
299 238  
300 239 UpdateLicenseBasicSettings(template: TemplateRef<any>) {
301 240 this.alerts = '';
302 241 if (this.alerts == '') {
  242 + this._loadingService.ShowLoading("global-loading");
303 243 var obj = this.updateLicenseBasicSettingsFrm.value;
304 244 return this.licenseService.UpdateLicenseBasicSettings(obj)
305 245 .subscribe(
... ... @@ -308,19 +248,5 @@ export class EditLicenseBasicSettings implements OnInit {
308 248 }
309 249  
310 250 }
311   - AddZeroInPhoneNo(num: number, phone: string) {
312   - if (num = 1) { this.ConvertedPhoneno = phone + "0"; }
313   - if (num = 2) { this.ConvertedPhoneno = phone + "00"; }
314   - if (num = 3) { this.ConvertedPhoneno = phone + "000"; }
315   - if (num = 4) { this.ConvertedPhoneno = phone + "0000"; }
316   - if (num = 5) { this.ConvertedPhoneno = phone + "00000"; }
317   - if (num = 6) { this.ConvertedPhoneno = phone + "000000"; }
318   - if (num = 7) { this.ConvertedPhoneno = phone + "0000000"; }
319   - if (num = 8) { this.ConvertedPhoneno = phone + "00000000"; }
320   - if (num = 9) { this.ConvertedPhoneno = phone + "000000000"; }
321   - if (num = 10) { this.ConvertedPhoneno = phone + "0000000000"; }
322   -
323   -
324   - }
325 251  
326 252 }
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.html
... ... @@ -40,41 +40,20 @@
40 40 <div class="row">
41 41 <div class="col-lg-4 col-sm-6">
42 42 <div class="row">
43   - <div class="col-sm-12" *ngIf="this.globalService.UserType == 1 || this.globalService.UserType == 2">
  43 + <div class="col-sm-12">
44 44 <div class="form-group marginTop5">
45 45 <label for="Account Number" class="col-sm-6 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
46 46 </div>
47   - <div class="col-sm-6 col-lg-6 padd-left0 padd-right0" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
48   - <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
49   - aria-controls="dropdown-basic" style="height: 30px;">
50   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
51   - <span class="caret pull-right" style="margin-top: 6px;"></span>
52   - </button>
53   - <ul id="dropdown-basic" #dropdownul *dropdownMenu class="dropdown-menu" role="menu" aria-labelledby="button-basic" style="overflow: scroll; height: 200px;" (scroll)="onScroll($event)">
54   - <li role="menuitem">
55   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(0, 'Select')">Select</a>
56   - </li>
57   - <li role="menuitem" *ngFor="let item of tempLstAccountNumbers">
58   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(item.m_Item1, item.m_Item2)">{{item.m_Item2}}</a>
59   - </li>
60   - </ul>
  47 + <div class="col-sm-6 col-lg-6 padd-left0 padd-right0">
  48 + <select id='accountSelect'>
  49 + <option *ngFor="let item of tempLstAccountNumbers" [value]="item.m_Item1">{{item.m_Item2}}</option>
  50 + </select>
61 51 </div>
62   - </div>
63   - <div class="col-sm-12" *ngIf="this.globalService.UserType > 2">
64   - <div class="form-group marginTop5">
65   - <label for="Account Number" class="col-sm-6 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
66   - </div>
67   - <div class="col-sm-6 col-lg-6 padd-left0 padd-right0" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
68   - <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
69   - aria-controls="dropdown-basic" style="height: 30px;">
70   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
71   - </button>
72   - </div>
73   - </div>
  52 + </div>
74 53 </div>
75 54 </div>
76 55  
77   - <div class="col-lg-4 col-sm-8">
  56 + <div class="col-lg-4 col-sm-6">
78 57  
79 58 <form class="form-inline marginTop10">
80 59 <div class="form-group">
... ... @@ -89,7 +68,7 @@
89 68 </label>
90 69 </div>
91 70  
92   - <button class="btn btn-primary btn-sm" type="button" (click)="ShowModestyorSites(templateinfo)" [disabled]="license.LicenseId == 0">Go <i class="fa fa-arrow-right"></i></button>
  71 + <button class="btn btn-primary btn-sm" type="button" (click)="ShowModestyorSites(templateinfo)" [disabled]="LicenseId == 0">Go <i class="fa fa-arrow-right"></i></button>
93 72 </form>
94 73  
95 74 </div>
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts
1   -import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core';
  1 +import { Component, OnInit,AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core';
2 2 import { LicenseService } from './license.service';
3 3 import { GlobalService } from '../../shared/global';
4 4 import { Router, ActivatedRoute } from '@angular/router';
5 5 import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
6   -import { License } from '../userentity/datamodel';
7   -import { BsDatepickerModule } from 'ngx-bootstrap';
8   -import { Http, Response } from '@angular/http';
9   -import { DatePipe } from '@angular/common';
10 6 import { BsModalService } from 'ngx-bootstrap/modal';
11 7 import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
12   -import { ContenteditableModelDirective } from '../../shared/contenteditabledirective'
13 8 import { ConfirmService } from '../../shared/confirm/confirm.service';
  9 +import { LoadingService } from '../../shared/loading.service';
  10 +import * as jQuery from 'jquery';
  11 +declare var $:JQueryStatic;
14 12 @Component({
15 13 templateUrl: './licensemodestysettings.component.html'
16 14 })
17 15  
18 16 export class LicenseModestySettings implements OnInit {
19 17  
20   - lstAccountNumbers: any;
21 18 tempLstAccountNumbers: any;
22 19 lstLicenseSites: any;
23 20 lstLicenseEditionModesty: any;
24   - license: License;
  21 + //license: License;
25 22 updateModestySettingsFrm: FormGroup;
26 23 error: any;
27 24 alerts: string;
... ... @@ -30,57 +27,70 @@ export class LicenseModestySettings implements OnInit {
30 27 modalRef: BsModalRef;
31 28 selectedSiteId: number = 0;
32 29 isBuildingLevel: boolean = false;
33   - accountDropDownText: string;
34   - loopIdx1: number;
35   - loopIdx2: number;
36   - lastScrollPos: number;
  30 + LicenseId:number=0;
  31 + AccountNumber:string='';
37 32  
38   - constructor(private licenseService: LicenseService, public globalService: GlobalService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder,
39   - private modalService: BsModalService, private _confirmService: ConfirmService) { }
  33 + constructor(private _loadingService: LoadingService,private licenseService: LicenseService, public globalService: GlobalService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder,
  34 + private modalService: BsModalService, private _confirmService: ConfirmService) {
  35 + }
40 36  
41 37 ngOnInit(): void {
42   - this.license = new License();
43   - this.license.LicenseId = 0;
  38 + this._loadingService.ShowLoading("global-loading");
  39 + $('#accountSelect').chosen({allow_single_deselect:true,width:'200px',placeholder_text_single:'Select Account',search_contains:true});
44 40 this.alerts = '';
45   - this.accountDropDownText = 'Select';
46   - this.loopIdx1 = 0;
47   - this.loopIdx2 = 0;
48   - this.lastScrollPos = 0;
49 41 this.updateModestySettingsFrm = this.fb.group({
50 42 licenseId: [0],
51 43 accountNumber: ['', Validators.required],
52 44 siteId: [0],
53 45 lstModesty: [this.fb.array([])],
54   - });
55   - this.GetLicenseAccounts();
56   - }
  46 + });
  47 + $('#AccountNumber').prop('disabled', true);
  48 +
  49 + if (this.globalService.UserType > 2) {
  50 + this.tempLstAccountNumbers=[];
  51 + this.tempLstAccountNumbers.push({m_Item1:this.globalService.AccLicId,m_Item2:this.globalService.AccountNumber});
  52 + this.AccountNumberChanged(this.globalService.AccLicId,this.globalService.AccountNumber);
  53 +
  54 + setTimeout(function(){
  55 + $('#accountSelect').prop('disabled', true).trigger("chosen:updated");
  56 + $('#accountSelect').trigger('chosen:updated');
  57 +
  58 + }, 500);
  59 + this._loadingService.HideLoading("global-loading");
  60 + }
  61 + else
  62 + {
  63 + this.GetLicenseAccounts();
  64 + }
  65 + $('#accountSelect')
  66 + .on('change', (e, args) => {
  67 + var selectedValue = Number(args.selected);
  68 + var selectedText= $(".chosen-single span" ).text();
  69 + this.AccountNumberChanged(selectedValue,selectedText);
  70 + });
57 71  
  72 + }
58 73 openModal(template: TemplateRef<any>) {
59 74 this.modalRef = this.modalService.show(template);
60 75 }
61 76  
62 77 GetLicenseAccounts() {
  78 + this.tempLstAccountNumbers=[];
63 79 this.licenseService.GetLicenseAccounts(0)
64   - .subscribe(st => {
65   - this.lstAccountNumbers = st;
66   - this.loopIdx1 = 0;
67   - this.loopIdx2 = 0;
68   - this.lastScrollPos = 0;
69   - this.tempLstAccountNumbers = [];
70   - if (this.globalService.UserType > 2) {
71   - this.accountDropDownText = this.globalService.AccountNumber;
72   - this.tempLstAccountNumbers.push(this.accountDropDownText);
73   - this.AccountNumberChanged(this.globalService.AccLicId, this.accountDropDownText);
74   - }
75   - else {
76   - for (var i = 0; i < 50; i++) {
77   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
78   - }
79   - }
  80 + .subscribe(st => {
  81 + var newOption = $('<option value=""></option>');
  82 + $('#accountSelect').append(newOption);
  83 + this.tempLstAccountNumbers=st;
  84 + setTimeout(function(){
  85 + $('#accountSelect').trigger('chosen:updated');
  86 + }, 500);
  87 + this._loadingService.HideLoading("global-loading");
  88 +
80 89 }, error => this.error = <any>error);
81 90 }
82 91  
83 92 ShowModestyorSites(template: TemplateRef<any>) {
  93 + this._loadingService.ShowLoading("global-loading");
84 94 this.lstLicenseEditionModesty = null;
85 95 this.lstLicenseSites = null;
86 96 this.selectedSiteId = 0;
... ... @@ -88,22 +98,24 @@ export class LicenseModestySettings implements OnInit {
88 98 this.GetLicenseEditionModesty();
89 99 }
90 100 else {
91   - this.licenseService.GetLicenseSites(this.license.AccountNumber, 1, 1000)
  101 + this.licenseService.GetLicenseSites(this.AccountNumber, 1, 1000)
92 102 .subscribe(st => {
93 103 this.lstLicenseSites = st.LicenseSiteList;
94 104 if (this.lstLicenseSites.length == 0) {
95 105 this.modalMessage = 'Account is not a building level account.';
96   - this.openModal(template);
  106 + this.openModal(template);
97 107 }
  108 + this._loadingService.HideLoading("global-loading");
98 109 }, error => this.error = <any>error);
99 110 }
100 111 }
101 112  
102 113 GetLicenseEditionModesty() {
103   - this.licenseService.GetLicenseModestySettings(this.license.LicenseId, this.selectedSiteId)
  114 + this.licenseService.GetLicenseModestySettings(this.LicenseId, this.selectedSiteId)
104 115 .subscribe(st => {
105 116 this.lstLicenseEditionModesty = st;
106 117 this.updateModestySettingsFrm.setControl('lstModesty', this.fb.array(this.lstLicenseEditionModesty));
  118 + this._loadingService.HideLoading("global-loading");
107 119 }, error => this.error = <any>error);
108 120 }
109 121  
... ... @@ -113,95 +125,36 @@ export class LicenseModestySettings implements OnInit {
113 125 this.lstLicenseEditionModesty = null;
114 126 return;
115 127 }
  128 + this._loadingService.ShowLoading("global-loading");
116 129 this.GetLicenseEditionModesty();
117 130 }
118 131  
119   - GetLicenseById() {
120   - if (this.license.LicenseId != 0) {
121   - this.licenseService.GetLicenseById(this.license.LicenseId)
122   - .subscribe(st => {
123   - this.license = st;
124   - this.updateModestySettingsFrm.controls['licenseId'].setValue(this.license.LicenseId);
125   - this.updateModestySettingsFrm.controls['accountNumber'].setValue(this.license.AccountNumber);
126   - },
127   - error => this.error = <any>error);
128   - }
129   - }
130   -
131   - AccountNumberChanged(LicenseId: number, SelectText: string) {
132   - this.accountDropDownText = SelectText;
133   - this.license.LicenseId = LicenseId;
  132 + AccountNumberChanged(LicenseId: number,AccountNumber:string) {
134 133 this.lstLicenseEditionModesty = null;
135 134 this.lstLicenseSites = null;
136 135 this.selectedSiteId = 0;
137 136 this.isBuildingLevel = false;
138   - this.GetLicenseById();
139   - return false;
140   - }
141   -
142   - onScroll($event) {
143   - if (this.lastScrollPos > $event.target.scrollTop) {
144   - for (var i = 0; i < 1000; i++) {
145   - if (this.loopIdx1 > 0)
146   - this.tempLstAccountNumbers.unshift(this.lstAccountNumbers[this.loopIdx1--]);
147   - }
148   - }
149   - else {
150   - for (var i = 0; i < 1000; i++) {
151   - if (this.loopIdx2 < this.lstAccountNumbers.length)
152   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
153   - }
154   - }
155   - this.lastScrollPos = $event.target.scrollTop;
  137 + this.LicenseId=LicenseId;
  138 + this.AccountNumber=AccountNumber;
  139 +
  140 + this.updateModestySettingsFrm.controls['licenseId'].setValue(LicenseId);
  141 + this.updateModestySettingsFrm.controls['accountNumber'].setValue(AccountNumber);
156 142 }
157 143  
158   - onOpenChange(data: boolean): void {
159   - if (!data) {
160   - this.loopIdx1 = 0;
161   - this.loopIdx2 = 0;
162   - this.tempLstAccountNumbers = [];
163   - this.lastScrollPos = 0;
164   - for (var i = 0; i < 50; i++) {
165   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
166   - }
167   - }
168   - }
169   -
170   - onKeyPress($event) {
171   - let FindItem = this.lstAccountNumbers.find(C => (C.m_Item2.toLowerCase().indexOf($event.key) == 0));
172   - let prevIdx = 0;
173   - if (FindItem != null) {
174   - this.tempLstAccountNumbers = [];
175   - for (var i = 0; i < this.lstAccountNumbers.length; i++) {
176   - if (FindItem.m_Item1 == this.lstAccountNumbers[i].m_Item1) {
177   - prevIdx = i;
178   - break;
179   - }
180   - }
181   - this.loopIdx1 = prevIdx;
182   - this.loopIdx2 = prevIdx;
183   - for (var i = 0; i < 50; i++) {
184   - if (this.loopIdx2 < this.lstAccountNumbers.length)
185   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
186   - }
187   - this.lastScrollPos = 0;
188   - $event.target.nextElementSibling.scrollTop = 0;
189   - }
190   - }
191 144  
192 145 AfterUpdateData(data, template) {
193 146 if (data.Status == "false") {
194 147 this.alerts = "<span>License modesty settings update unsuccessfull.</span>";
195 148 } else {
196   - this._confirmService.activate("License modesty settings updated successfully.", "alertMsg");
197   - // this.modalAlerts = "<p>License modesty setings updated successfully.</p>";
198   - // this.modalRef = this.modalService.show(template);
  149 + this._confirmService.activate("License modesty settings updated successfully.", "alertMsg");
199 150 }
  151 + this._loadingService.HideLoading("global-loading");
200 152 }
201 153  
202 154 UpdateLicenseModestySettings(template: TemplateRef<any>) {
203 155 this.alerts = '';
204 156 if (this.alerts == '') {
  157 + this._loadingService.ShowLoading("global-loading");
205 158 var obj = this.updateModestySettingsFrm.value;
206 159 return this.licenseService.UpdateLicenseModestySettings(obj)
207 160 .subscribe(
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.html
... ... @@ -26,39 +26,18 @@
26 26  
27 27 <div class="well no-margin-btm">
28 28 <div class="row">
29   - <div class="col-lg-4 col-sm-4">
  29 + <div class="col-lg-4 col-sm-7">
30 30 <div class="row">
31   - <div class="col-sm-12" *ngIf="this.globalService.UserType == 1 || this.globalService.UserType == 2">
  31 + <div class="col-sm-12">
32 32 <div class="form-group marginTop5">
33   - <label for="Account Number" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
  33 + <label for="Account Number" class="col-sm-5 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
34 34 </div>
35   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
36   - <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle"
37   - aria-controls="dropdown-basic" style="width: 200px; height: 30px;">
38   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
39   - <span class="caret pull-right" style="margin-top: 6px;"></span>
40   - </button>
41   - <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu" role="menu" aria-labelledby="button-basic" style="overflow: scroll; height: 200px;" (scroll)="onScroll($event)">
42   - <li role="menuitem">
43   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(0, 'Select')">Select</a>
44   - </li>
45   - <li role="menuitem" *ngFor="let item of tempLstAccountNumbers">
46   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(item.m_Item1, item.m_Item2)">{{item.m_Item2}}</a>
47   - </li>
48   - </ul>
  35 + <div class="col-sm-6 col-lg-6 padd-left0 padd-right0">
  36 + <select id='accountSelect'>
  37 + <option *ngFor="let item of tempLstAccountNumbers" [value]="item.m_Item1">{{item.m_Item2}}</option>
  38 + </select>
49 39 </div>
50   - </div>
51   - <div class="col-sm-12" *ngIf="this.globalService.UserType > 2">
52   - <div class="form-group marginTop5">
53   - <label for="Account Number" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
54   - </div>
55   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
56   - <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle"
57   - aria-controls="dropdown-basic" style="width: 200px; height: 30px;">
58   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
59   - </button>
60   - </div>
61   - </div>
  40 + </div>
62 41 </div>
63 42 </div>
64 43 </div>
... ... @@ -94,7 +73,7 @@
94 73  
95 74 <div class="row">
96 75 <div class="col-sm-12 marginTop20 text-center">
97   - <button type="submit" class="btn btn-primary btn-sm" [disabled]="license.LicenseId == 0"><i class="fa fa-check"></i> Save</button>
  76 + <button type="submit" class="btn btn-primary btn-sm" [disabled]="LicenseId == 0"><i class="fa fa-check"></i> Save</button>
98 77 </div>
99 78 </div>
100 79 </form>
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.ts
... ... @@ -4,20 +4,17 @@ import { GlobalService } from &#39;../../shared/global&#39;;
4 4 import { Router, ActivatedRoute } from '@angular/router';
5 5 import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
6 6 import { License } from '../userentity/datamodel';
7   -import { BsDatepickerModule } from 'ngx-bootstrap';
8   -import { Http, Response } from '@angular/http';
9   -import { DatePipe } from '@angular/common';
10 7 import { BsModalService } from 'ngx-bootstrap/modal';
11 8 import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
12   -import { ContenteditableModelDirective } from '../../shared/contenteditabledirective'
13 9 import { ConfirmService } from '../../shared/confirm/confirm.service';
  10 +import { LoadingService } from '../../shared/loading.service';
  11 +declare var $:JQueryStatic;
14 12 @Component({
15 13 templateUrl: './licensemodulesettings.component.html'
16 14 })
17 15  
18 16 export class LicenseModuleSettings implements OnInit {
19 17  
20   - lstAccountNumbers: any;
21 18 tempLstAccountNumbers: any;
22 19 lstModuleStatus: any;
23 20 license: License;
... ... @@ -26,30 +23,49 @@ export class LicenseModuleSettings implements OnInit {
26 23 alerts: string;
27 24 modalAlerts: string;
28 25 modalRef: BsModalRef;
29   - accountDropDownText: string;
30   - loopIdx1: number;
31   - loopIdx2: number;
32   - lastScrollPos: number;
  26 + LicenseId:number=0;
  27 + AccountNumber:string='';
33 28  
34   - constructor(private licenseService: LicenseService,
  29 + constructor(private _loadingService: LoadingService, private licenseService: LicenseService,
35 30 public globalService: GlobalService,
36 31 private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder,
37 32 private modalService: BsModalService, private _confirmService: ConfirmService) { }
38 33  
39 34 ngOnInit(): void {
  35 + this._loadingService.ShowLoading("global-loading");
  36 + $('#accountSelect').chosen({allow_single_deselect:true,width:'200px',placeholder_text_single:'Select Account',search_contains:true });
  37 +
40 38 this.license = new License();
41   - this.license.LicenseId = 0;
42 39 this.alerts = '';
43   - this.accountDropDownText = 'Select';
44   - this.loopIdx1 = 0;
45   - this.loopIdx2 = 0;
46   - this.lastScrollPos = 0;
47 40 this.updateModuleSettingsFrm = this.fb.group({
48 41 licenseId: [0],
49 42 accountNumber: [''],
50 43 lstModuleStatus: [this.fb.array([])],
51 44 });
52   - this.GetLicenseAccounts();
  45 +
  46 + if (this.globalService.UserType > 2) {
  47 + this.tempLstAccountNumbers=[];
  48 + this.tempLstAccountNumbers.push({m_Item1:this.globalService.AccLicId,m_Item2:this.globalService.AccountNumber});
  49 + this.AccountNumberChanged(this.globalService.AccLicId,this.globalService.AccountNumber);
  50 +
  51 + setTimeout(function(){
  52 + $('#accountSelect').prop('disabled', true).trigger("chosen:updated");
  53 + $('#accountSelect').trigger('chosen:updated');
  54 +
  55 + }, 500);
  56 + this._loadingService.HideLoading("global-loading");
  57 + }
  58 + else
  59 + {
  60 + this.GetLicenseAccounts();
  61 + }
  62 + $('#accountSelect')
  63 + .on('change', (e, args) => {
  64 + var selectedValue = Number(args.selected);
  65 + var selectedText= $(".chosen-single span" ).text();
  66 + this.AccountNumberChanged(selectedValue,selectedText);
  67 + });
  68 +
53 69 }
54 70  
55 71 openModal(template: TemplateRef<any>) {
... ... @@ -57,118 +73,54 @@ export class LicenseModuleSettings implements OnInit {
57 73 }
58 74  
59 75 GetLicenseAccounts() {
  76 + this.tempLstAccountNumbers=[];
60 77 this.licenseService.GetLicenseAccounts(0)
61   - .subscribe(st => {
62   - this.lstAccountNumbers = st;
63   - this.tempLstAccountNumbers = [];
64   - this.loopIdx1 = 0;
65   - this.loopIdx2 = 0;
66   - this.lastScrollPos = 0;
67   - this.tempLstAccountNumbers = [];
68   - if (this.globalService.UserType > 2) {
69   - this.accountDropDownText = this.globalService.AccountNumber;
70   - this.tempLstAccountNumbers.push(this.accountDropDownText);
71   - this.AccountNumberChanged(this.globalService.AccLicId, this.accountDropDownText);
72   - }
73   - else {
74   - for (var i = 0; i < 50; i++) {
75   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
76   - }
77   - }
  78 + .subscribe(st => {
  79 + var newOption = $('<option value=""></option>');
  80 + $('#accountSelect').append(newOption);
  81 + this.tempLstAccountNumbers=st;
  82 + setTimeout(function(){
  83 + $('#accountSelect').trigger('chosen:updated');
  84 + }, 500);
  85 + this._loadingService.HideLoading("global-loading");
  86 +
78 87 }, error => this.error = <any>error);
79 88 }
80 89  
81 90 GetLicenseModulesStatus() {
82   - this.licenseService.GetLicenseModulesStatus(this.license.LicenseId)
  91 + this.licenseService.GetLicenseModulesStatus(this.LicenseId)
83 92 .subscribe(st => {
84 93 this.lstModuleStatus = st;
85 94 this.updateModuleSettingsFrm.setControl('lstModuleStatus', this.fb.array(this.lstModuleStatus));
  95 + this._loadingService.HideLoading("global-loading");
86 96 }, error => this.error = <any>error);
87 97 }
88 98  
89   - GetLicenseById() {
90   - if (this.license.LicenseId != 0) {
91   - this.licenseService.GetLicenseById(this.license.LicenseId)
92   - .subscribe(st => {
93   - this.license = st;
94   - this.updateModuleSettingsFrm.controls['licenseId'].setValue(this.license.LicenseId);
95   - this.updateModuleSettingsFrm.controls['accountNumber'].setValue(this.license.AccountNumber);
96   - this.GetLicenseModulesStatus();
97   - },
98   - error => this.error = <any>error);
99   - }
100   - }
101   -
102   - AccountNumberChanged(LicenseId: number, SelectText: string) {
103   - this.accountDropDownText = SelectText;
104   - this.license.LicenseId = LicenseId;
  99 + AccountNumberChanged(LicenseId: number,AccountNumber:string) {
  100 + this._loadingService.ShowLoading("global-loading");
105 101 this.lstModuleStatus = null;
106   - this.GetLicenseById();
107   - return false;
108   - }
  102 + this.LicenseId=LicenseId;
  103 + this.AccountNumber=AccountNumber;
109 104  
110   - onScroll($event) {
111   - if (this.lastScrollPos > $event.target.scrollTop) {
112   - for (var i = 0; i < 1000; i++) {
113   - if (this.loopIdx1 > 0)
114   - this.tempLstAccountNumbers.unshift(this.lstAccountNumbers[this.loopIdx1--]);
115   - }
116   - }
117   - else {
118   - for (var i = 0; i < 1000; i++) {
119   - if (this.loopIdx2 < this.lstAccountNumbers.length)
120   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
121   - }
122   - }
123   - this.lastScrollPos = $event.target.scrollTop;
124   - }
  105 + this.updateModuleSettingsFrm.controls['licenseId'].setValue(LicenseId);
  106 + this.updateModuleSettingsFrm.controls['accountNumber'].setValue(AccountNumber);
  107 + this.GetLicenseModulesStatus();
125 108  
126   - onOpenChange(data: boolean): void {
127   - if (!data) {
128   - this.loopIdx1 = 0;
129   - this.loopIdx2 = 0;
130   - this.tempLstAccountNumbers = [];
131   - for (var i = 0; i < 50; i++) {
132   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
133   - }
134   - }
135   - }
136   -
137   - onKeyPress($event) {
138   - let FindItem = this.lstAccountNumbers.find(C => (C.m_Item2.toLowerCase().indexOf($event.key) == 0));
139   - let prevIdx = 0;
140   - if (FindItem != null) {
141   - for (var i = 0; i < this.lstAccountNumbers.length; i++) {
142   - if (FindItem.m_Item1 == this.lstAccountNumbers[i].m_Item1) {
143   - prevIdx = i;
144   - break;
145   - }
146   - }
147   - this.tempLstAccountNumbers = [];
148   - this.loopIdx1 = prevIdx;
149   - this.loopIdx2 = prevIdx;
150   - for (var i = 0; i < 50; i++) {
151   - if (this.loopIdx2 < this.lstAccountNumbers.length)
152   - this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
153   - }
154   - this.lastScrollPos = 0;
155   - $event.target.nextElementSibling.scrollTop = 0;
156   - }
157 109 }
158 110  
159 111 AfterUpdateData(data, template) {
160 112 if (data.Status == "false") {
161 113 this.alerts = "<span>License module status update unsuccessfull</span>";
162 114 } else {
163   - // this.modalAlerts = "<p>License module status updated successfully</p>";
164 115 this._confirmService.activate("License module status updated successfully.", "alertMsg");
165   - //this.modalRef = this.modalService.show(template);
166 116 }
  117 + this._loadingService.HideLoading("global-loading");
167 118 }
168 119  
169 120 UpdateLicenseModulesStatus(template: TemplateRef<any>) {
170 121 this.alerts = '';
171 122 if (this.alerts == '') {
  123 + this._loadingService.ShowLoading("global-loading");
172 124 var obj = this.updateModuleSettingsFrm.value;
173 125 return this.licenseService.UpdateLicenseModulesStatus(obj)
174 126 .subscribe(
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.html
... ... @@ -176,12 +176,12 @@
176 176 <div id="datetimepicker1" class="input-group input-group-sm input-append date">
177 177 <input type="text" class="form-control" id="SubscriptionStartDate" formControlName="subscriptionStartDate" #dp1="bsDatepicker"
178 178 bsDatepicker [(bsValue)]="bsValue1" [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig" (bsValueChange)="DateChange(dp1)"
179   - (change)="DateChange(dp1)">
  179 + (change)="DateChange(dp1)" placeholder="mm/dd/yyyyy">
180 180 <span class="input-group-btn add-on">
181 181 <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar icon-calendar"></i></button>
182 182 </span>
183 183 </div>
184   - <span class="help-block">(mm/dd/yyyy)</span>
  184 + <!-- <span class="help-block">(mm/dd/yyyy)</span> -->
185 185 <div *ngIf="dateStartInvalid && searchLicenseFrm.controls.subscriptionStartDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription start date requires date in mm/dd/yyyy format</div>
186 186 </div>
187 187 </div>
... ... @@ -194,12 +194,12 @@
194 194 <div id="datetimepicker2" class="input-group input-group-sm input-append date">
195 195 <input type="text" class="form-control" id="SubscriptionEndDate" formControlName="subscriptionEndDate" #dp2="bsDatepicker"
196 196 bsDatepicker [(bsValue)]="bsValue2" [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig" (bsValueChange)="DateChange(dp2)"
197   - (change)="DateChange(dp2)">
  197 + (change)="DateChange(dp2)" placeholder="mm/dd/yyyyy">
198 198 <span class="input-group-btn add-on">
199 199 <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar icon-calendar"></i></button>
200 200 </span>
201 201 </div>
202   - <span class="help-block">(mm/dd/yyyy)</span>
  202 + <!-- <span class="help-block">(mm/dd/yyyy)</span> -->
203 203 <div *ngIf="dateEndInvalid && searchLicenseFrm.controls.subscriptionEndDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription end date requires date in mm/dd/yyyy format</div>
204 204 </div>
205 205 </div>
... ... @@ -265,8 +265,11 @@
265 265 <td style="text-align: center; width: 200px">{{item.RenewDate == '0001-01-01T00:00:00' ? '' : item.RenewDate | date: 'MM/dd/yyyy'}}</td>
266 266 <td style="text-align: center; width: 200px">{{item.SubscriptionEndDate == '0001-01-01T00:00:00' ? '' : item.SubscriptionEndDate | date: 'MM/dd/yyyy'}}</td>
267 267 <td style="text-align: center; width: 150px">
268   - <span *ngIf="item.IsActive" class="label label-success">Active</span>
269   - <span *ngIf="!item.IsActive" class="label label-default">Inactive</span>
  268 + <span *ngIf="item.LicStatus=='Active'" class="label label-success">Active</span>
  269 + <span *ngIf="item.LicStatus=='Inactive'" class="label label-default">Inactive</span>
  270 + <span *ngIf="item.LicStatus=='Expired'" class="label label-default">Expired</span>
  271 + <!-- <span *ngIf="item.IsActive" class="label label-success">Active</span>
  272 + <span *ngIf="!item.IsActive" class="label label-default">Inactive</span> -->
270 273 </td>
271 274 <td style="text-align: center; width: 200px">{{item.EntryDate == '0001-01-01T00:00:00' ? '' : item.EntryDate | date: 'MM/dd/yyyy'}}</td>
272 275 <td style="text-align: center; width: 200px">{{item.ModifyDate == '0001-01-01T00:00:00' ? '' : item.ModifyDate | date: 'MM/dd/yyyy'}}</td>
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.ts
1   -import { Component, OnInit, AfterViewChecked, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewChecked, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef, ViewChild,HostListener } from '@angular/core';
2 2 import { LicenseService } from './license.service';
3 3 import { Router, ActivatedRoute } from '@angular/router';
4 4 import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
... ... @@ -53,12 +53,28 @@ export class SearchLicense implements OnInit, AfterViewChecked {
53 53 dateStartInvalid: boolean = false;
54 54 dateEndInvalid: boolean = false;
55 55 tempSearchParams: any;
  56 + // Declare height and width variables
  57 + scrHeight:any;
  58 + scrWidth:any;
  59 + @HostListener('window:resize', ['$event'])
  60 + getScreenSize(event?) {
  61 +
  62 + var $ua = navigator.userAgent;
  63 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  64 + this.scrHeight = window.innerHeight-515;
  65 + }
  66 + else
  67 + {
  68 + this.scrHeight = window.innerHeight-475;
  69 + }
  70 + }
56 71 constructor(private licenseService: LicenseService, private router: Router,
57 72 private activeRoute: ActivatedRoute, private fb: FormBuilder,
58 73 private modalService: BsModalService, public global: GlobalService,
59   - private _loadingService: LoadingService, private _confirmService: ConfirmService) { }
  74 + private _loadingService: LoadingService, private _confirmService: ConfirmService) { this.getScreenSize();}
60 75  
61 76 ngOnInit(): void {
  77 + this._loadingService.ShowLoading("global-loading");
62 78 this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' });
63 79 this.divClass = 'col-sm-12';
64 80 this.license = new License();
... ... @@ -114,13 +130,12 @@ export class SearchLicense implements OnInit, AfterViewChecked {
114 130 }
115 131 });
116 132 this.NoRecord = this.global.NoRecords;
117   - this._loadingService.ShowLoading("global-loading");
118 133 this.recordCount = 0;
119 134 this.pagerComponent = new PagerComponent();
120 135 $('#fixed_hdr2').fxdHdrCol({
121 136 fixedCols: 0,
122 137 width: "100%",
123   - height: 300,
  138 + height: this.scrHeight,
124 139 colModal: [
125 140 { width: 150, align: 'center' },
126 141 { width: 150, align: 'center' },
... ... @@ -152,7 +167,7 @@ export class SearchLicense implements OnInit, AfterViewChecked {
152 167 testScript.setAttribute("type", "text/javascript");
153 168 document.body.appendChild(testScript);
154 169 }
155   - this._loadingService.HideLoading("global-loading");
  170 +
156 171 }
157 172  
158 173 ngAfterViewChecked() {
... ... @@ -234,16 +249,15 @@ export class SearchLicense implements OnInit, AfterViewChecked {
234 249  
235 250 public SearchLicenses(evt: any) {
236 251 if (this.alerts != '') return;
237   - this._loadingService.ShowLoading("global-loading");
238 252 if (!this.returnFrom) {
239 253 this.selectedRow = -1;
240 254 this.selectedId = -1;
241 255 }
242 256 if (this.returnFrom) this.returnFrom = false;
  257 + this._loadingService.ShowLoading("global-loading");
243 258 var tempArr = evt.split(',');
244 259 this.pageNo = parseInt(tempArr[0]);
245 260 this.pageLength = parseInt(tempArr[1]);
246   - this._loadingService.ShowLoading("global-loading");
247 261 this.licenseService.GetLicenses(this.searchLicenseFrm.value, this.pageNo, this.pageLength)
248 262 .subscribe(x => { this.BindFormFields(x);
249 263 this.tempSearchParams = {
... ... @@ -263,6 +277,7 @@ export class SearchLicense implements OnInit, AfterViewChecked {
263 277 'pageNo': this.pageNo,
264 278 'pageLength': this.pageLength
265 279 };
  280 + this._loadingService.HideLoading("global-loading");
266 281  
267 282 }, error => this.error = error);
268 283 }
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/sitelicenseaccount.component.html
... ... @@ -40,18 +40,17 @@
40 40 <div class="row">
41 41 <div class="well no-margin-btm" [style.visibility]="(mode == 'Search') ? 'visible' : 'hidden'">
42 42 <div class="row">
43   - <div class="col-lg-4 col-sm-4 padd-right0">
  43 + <div class="col-lg-4 col-sm-7 padd-right0">
44 44 <div class="row">
45 45 <div class="col-sm-12">
46 46 <div class="form-group marginTop5">
47   - <label for="AccountNo" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
48   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
49   - <select class="form-control input-sm" id="AccountNumber" (change)="AccountNumberChanged($event.target.value)">
50   - <option value="0">Select</option>
51   - <option *ngFor="let item of lstAccountNumbers" value="{{item.m_Item1}}">
52   - {{item.m_Item2}}
53   - </option>
54   - </select>
  47 + <label for="AccountNo" class="col-sm-5 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
  48 + <div class="col-sm-5 col-lg-6 padd-left0 padd-right0">
  49 + <select id="accountSelect" class="form-control input-sm">
  50 + <option *ngFor="let item of lstAccountNumbers" value="{{item.m_Item1}}">
  51 + {{item.m_Item2}}
  52 + </option>
  53 + </select>
55 54 </div>
56 55 </div>
57 56 </div>
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/sitelicenseaccount.component.ts
1   -import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef, ViewChild,HostListener } from '@angular/core';
2 2 import { LicenseService } from './license.service';
3 3 import { Router, ActivatedRoute } from '@angular/router';
4 4 import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
5 5 import { License } from '../userentity/datamodel';
6   -import { BsDatepickerModule } from 'ngx-bootstrap';
7   -import { Http, Response } from '@angular/http';
8   -import { DatePipe } from '@angular/common';
9 6 import { BsModalService } from 'ngx-bootstrap/modal';
10 7 import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
11 8 import { PagerComponent } from '../../shared/pager/pager.component';
12 9 import { LoadingService } from '../../shared/loading.service';
13 10 import { GlobalService } from '../../shared/global';
14 11 import { ConfirmService } from '../../shared/confirm/confirm.service';
15   -declare var $:any;
  12 +declare var $:JQueryStatic;
  13 +declare var jQuery:any;
16 14  
17 15 @Component({
18 16 templateUrl: './sitelicenseaccount.component.html'
... ... @@ -46,15 +44,35 @@ export class SiteLicenseAccount implements OnInit {
46 44 pageNo: number;
47 45 pageLength: number;
48 46 lstLicenseSiteAdmin: any;
  47 + LicenseId:number=0;
  48 + AccountNumber:string='';
  49 + // Declare height and width variables
  50 + scrHeight:any;
  51 + scrWidth:any;
  52 + @HostListener('window:resize', ['$event'])
  53 + getScreenSize(event?) {
  54 +
  55 + var $ua = navigator.userAgent;
  56 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  57 + this.scrHeight = window.innerHeight-410;
  58 + }
  59 + else
  60 + {
  61 + this.scrHeight = window.innerHeight-360;
  62 + }
  63 + }
49 64  
50 65 constructor(private licenseService: LicenseService,
51 66 private router: Router, private activeRoute: ActivatedRoute,
52 67 private fb: FormBuilder, private modalService: BsModalService,
53 68 public global: GlobalService, private _loadingService: LoadingService,
54   - private _confirmService: ConfirmService) { }
  69 + private _confirmService: ConfirmService) {this.getScreenSize(); }
55 70  
56 71 ngOnInit(): void
57 72 {
  73 + this._loadingService.ShowLoading("global-loading");
  74 + $('#accountSelect').chosen({allow_single_deselect:true,width:'200px',placeholder_text_single:'Select Account',search_contains:true});
  75 +
58 76 this.divClass = 'col-sm-12';
59 77 this.license = new License();
60 78 this.license.LicenseId = 0;
... ... @@ -88,11 +106,34 @@ export class SiteLicenseAccount implements OnInit {
88 106 this.GetCountry();
89 107 this.GetState();
90 108 this.GetEditions();
91   - this.GetLicenseAccounts();
92   - $('#fixed_hdr2').fxdHdrCol({
  109 +
  110 + if (this.global.UserType > 2) {
  111 + this.lstAccountNumbers=[];
  112 + this.lstAccountNumbers.push({m_Item1:this.global.AccLicId,m_Item2:this.global.AccountNumber});
  113 + this.AccountNumberChanged(this.global.AccLicId,this.global.AccountNumber);
  114 +
  115 + setTimeout(function(){
  116 + $('#accountSelect').prop('disabled', true).trigger("chosen:updated");
  117 + $('#accountSelect').trigger('chosen:updated');
  118 +
  119 + }, 500);
  120 + this._loadingService.HideLoading("global-loading");
  121 + }
  122 + else
  123 + {
  124 + this.GetLicenseAccounts();
  125 + }
  126 + $('#accountSelect')
  127 + .on('change', (e, args) => {
  128 + var selectedValue = Number(args.selected);
  129 + var selectedText= $(".chosen-single span" ).text();
  130 + this.AccountNumberChanged(selectedValue,selectedText);
  131 + });
  132 +
  133 + jQuery('#fixed_hdr2').fxdHdrCol({
93 134 fixedCols: 0,
94 135 width: "100%",
95   - height: 330,
  136 + height: this.scrHeight,
96 137 colModal: [
97 138 { width: 200, align: 'center' },
98 139 { width: 200, align: 'center' },
... ... @@ -238,27 +279,29 @@ export class SiteLicenseAccount implements OnInit {
238 279 this.lstClientAdmin = tempArr;
239 280 }
240 281  
241   - GetLicenseAccounts() {
242   - this.licenseService.GetLicenseAccounts(3)
243   - .subscribe(st => {
244   - this.lstAccountNumbers = [];
245   - if (this.global.UserType > 2) {
246   - this.lstAccountNumbers.push({ 'm_Item1': this.global.AccLicId, 'm_Item2': this.global.AccountNumber});
247   - }
248   - else {
249   - this.lstAccountNumbers = st;
250   - }
251   - }, error => this.error = <any>error);
  282 + GetLicenseAccounts() {
  283 + this.lstAccountNumbers=[];
  284 + this.licenseService.GetLicenseAccounts(3)
  285 + .subscribe(st => {
  286 + var newOption = $('<option value=""></option>');
  287 + $('#accountSelect').append(newOption);
  288 + this.lstAccountNumbers=st;
  289 + setTimeout(function(){
  290 + $('#accountSelect').trigger('chosen:updated');
  291 + }, 500);
  292 + this._loadingService.HideLoading("global-loading");
  293 +
  294 + }, error => this.error = <any>error);
252 295 }
253 296  
254   - AccountNumberChanged(LicenseId: number){
  297 + AccountNumberChanged(LicenseId: number,AccountNumber:string) {
  298 + this._loadingService.ShowLoading("global-loading");
255 299 this.selectedRow = -1;
256   - this.license.LicenseId = LicenseId;
  300 + this.LicenseId = LicenseId;
  301 + this.AccountNumber=AccountNumber;
257 302 this.lstLicenseSites = null;
258 303 this.NoRecord = '';
259   - if(this.license.LicenseId == 0){
260   - return;
261   - }
  304 +
262 305 this.GetLicenseById();
263 306 }
264 307  
... ... @@ -368,9 +411,9 @@ export class SiteLicenseAccount implements OnInit {
368 411 }
369 412  
370 413 GetLicenseById() {
371   - if(this.license.LicenseId != 0)
  414 + if(this.LicenseId != 0)
372 415 {
373   - this.licenseService.GetLicenseById(this.license.LicenseId)
  416 + this.licenseService.GetLicenseById(this.LicenseId)
374 417 .subscribe(st => {
375 418 this.license = st;
376 419 this.insertUpdateSiteLicenseFrm.controls['licenseId'].setValue(this.license.LicenseId);
... ... @@ -387,6 +430,7 @@ export class SiteLicenseAccount implements OnInit {
387 430 });
388 431 });
389 432 this.insertUpdateSiteLicenseFrm.setControl('editionLoginArr', this.fb.array(this.lstEditionLogins));
  433 + this._loadingService.HideLoading("global-loading");
390 434 },
391 435 error => this.error = <any>error);
392 436 }
... ...
400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.component.html
... ... @@ -41,7 +41,7 @@
41 41 </div>
42 42  
43 43 <div class="row">
44   - <div class="col-lg-3 col-sm-4">
  44 + <div class="col-lg-3 col-sm-3">
45 45 <div class="row">
46 46 <div class="col-sm-12">
47 47 <div class="form-group marginTop5">
... ... @@ -53,7 +53,7 @@
53 53 </div>
54 54 </div>
55 55 </div>
56   - <div class="col-lg-4 col-sm-4">
  56 + <div class="col-lg-3 col-sm-3">
57 57 <div class="row">
58 58 <div class="col-sm-12">
59 59 <div class="form-group marginTop5">
... ... @@ -62,19 +62,19 @@
62 62 <div id="datetimepicker1" class="input-group input-append date">
63 63 <input id="SearchStartDate" type="text" class="form-control" formControlName="searchStartDate"
64 64 #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" (bsValueChange)="DateChange(dp1)" (change)="DateChange(dp1)"
65   - [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig">
  65 + [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig" placeholder="mm/dd/yyyy">
66 66 <span class="input-group-btn add-on">
67 67 <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button>
68 68 </span>
69 69 </div>
70   - <span class="help-block">(mm/dd/yyyy)</span>
  70 + <!-- <span class="help-block">(mm/dd/yyyy)</span> -->
71 71 <div *ngIf="dateStartInvalid && manageDiscountCodeFrm.controls.searchStartDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Discount start date requires date in mm/dd/yyyy format</div>
72 72 </div>
73 73 </div>
74 74 </div>
75 75 </div>
76 76 </div>
77   - <div class="col-lg-4 col-sm-4">
  77 + <div class="col-lg-3 col-sm-3">
78 78 <div class="row">
79 79 <div class="col-sm-12">
80 80 <div class="form-group marginTop5">
... ... @@ -83,12 +83,12 @@
83 83 <div id="datetimepicker2" class="input-group input-append date">
84 84 <input id="SearchEndDate" type="text" class="form-control" formControlName="searchEndDate"
85 85 #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" (bsValueChange)="DateChange(dp2)" (change)="DateChange(dp2)"
86   - [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig">
  86 + [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig" placeholder="mm/dd/yyyy">
87 87 <span class="input-group-btn add-on">
88 88 <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button>
89 89 </span>
90 90 </div>
91   - <span class="help-block">(mm/dd/yyyy)</span>
  91 + <!-- <span class="help-block">(mm/dd/yyyy)</span> -->
92 92 <div *ngIf="dateEndInvalid && manageDiscountCodeFrm.controls.searchEndDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Discount end date requires date in mm/dd/yyyy format</div>
93 93 </div>
94 94 </div>
... ... @@ -96,10 +96,13 @@
96 96 </div>
97 97 </div>
98 98  
99   - <div class="col-lg-1 col-sm-4">
  99 + <div class="col-lg-2 col-sm-3">
100 100 <div class="row">
101 101 <div class="col-sm-12">
102 102 <div class="form-group marginTop5">
  103 + <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs">&nbsp;</label>
  104 + </div>
  105 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
103 106 <button (click)="SearchRecords()" type="button" class="btn btn-primary btn-sm" [disabled]="dateStartInvalid || dateEndInvalid || Searchalerts != ''"><i class="fa fa-search"></i> Search</button>
104 107 </div>
105 108 </div>
... ...
400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.component.ts
1   -import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef, ViewChild,HostListener } from '@angular/core';
2 2 import { ManageDiscountCodeService } from './managediscountcode.service';
3 3 import { Router } from '@angular/router';
4 4 import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
... ... @@ -52,10 +52,25 @@ NoRecord: string;
52 52 recordCount: number;
53 53 pageNo: number;
54 54 pageLength: number;
  55 +// Declare height and width variables
  56 +scrHeight:any;
  57 +scrWidth:any;
  58 +@HostListener('window:resize', ['$event'])
  59 +getScreenSize(event?) {
  60 +
  61 + var $ua = navigator.userAgent;
  62 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  63 + this.scrHeight = window.innerHeight-415;
  64 + }
  65 + else
  66 + {
  67 + this.scrHeight = window.innerHeight-365;
  68 + }
  69 +}
55 70  
56 71 constructor(private manageDiscountCodeService: ManageDiscountCodeService, private router: Router,
57 72 private fb: FormBuilder, private modalService: BsModalService, public global: GlobalService,
58   - private _loadingService: LoadingService, private _confirmService: ConfirmService) { }
  73 + private _loadingService: LoadingService, private _confirmService: ConfirmService) {this.getScreenSize(); }
59 74  
60 75 ngOnInit(): void {
61 76 this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' });
... ... @@ -82,7 +97,7 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
82 97 $('#fixed_hdr2').fxdHdrCol({
83 98 fixedCols: 0,
84 99 width: "100%",
85   - height: 330,
  100 + height: this.scrHeight,
86 101 colModal: [
87 102 { width: 250, align: 'center' },
88 103 { width: 250, align: 'center' },
... ...
400-SOURCECODE/Admin/src/app/components/Reports/customersummaryreport.component.ts
1   -import { Component, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewChecked, ViewChild,HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -55,8 +55,24 @@ export class CustomerSummaryReport implements OnInit, AfterViewChecked {
55 55 recordCount: number;
56 56 pageNo: number;
57 57 pageLength: number;
  58 + // Declare height and width variables
  59 + scrHeight:any;
  60 + scrWidth:any;
  61 + @HostListener('window:resize', ['$event'])
  62 + getScreenSize(event?) {
  63 +
  64 + var $ua = navigator.userAgent;
  65 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  66 + this.scrHeight = window.innerHeight-580;
  67 + }
  68 + else
  69 + {
  70 + this.scrHeight = window.innerHeight-480;
  71 + }
  72 +
  73 + }
58 74 constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder,
59   - private modalService: BsModalService, public global: GlobalService, private _loadingService: LoadingService) { }
  75 + private modalService: BsModalService, public global: GlobalService, private _loadingService: LoadingService) { this.getScreenSize(); }
60 76  
61 77 ngOnInit(): void {
62 78 this.ExportingStart = false;
... ... @@ -72,24 +88,23 @@ export class CustomerSummaryReport implements OnInit, AfterViewChecked {
72 88 sAccountType: [0],
73 89 iState: [0],
74 90 sSubscriptionStart: [0.00],
75   - sSubscriptionEnd: [0.00],
  91 + sSubscriptionEnd: [''],
76 92 iCountry: [0]
77 93 });
78   -
  94 + this._loadingService.ShowLoading("global-loading");
79 95 this.GetCountry();
80 96 this.GetState();
81 97 this.GetAccountType();
82 98 this.GetLicenceType();
83 99 this.recordCount = 0;
84   - this.pageNo = 0;
  100 + this.pageNo = 1;
85 101 this.pageLength = 10;
86 102 this.pagerComponent = new PagerComponent();
87   - this.GetCustomerSummeryReport('1, ' + this.pageLength);
88   -
  103 +
89 104 $('#fixed_hdr2').fxdHdrCol({
90 105 fixedCols: 0,
91 106 width: "100%",
92   - height: 300,
  107 + height: this.scrHeight,
93 108 colModal: [
94 109 { width: 150, align: 'center' },
95 110 { width: 200, align: 'center' },
... ... @@ -113,14 +128,15 @@ export class CustomerSummaryReport implements OnInit, AfterViewChecked {
113 128 ],
114 129 sort: true
115 130 });
116   - document.getElementById("fixed_table_rc").remove();
117   - var testScript = document.createElement("script");
118   - testScript.setAttribute("id", "fixed_table_rc");
119   - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
120   - testScript.setAttribute("type", "text/javascript");
121   - document.body.appendChild(testScript);
122   - //this.GetUsageReport();
123   - this._loadingService.HideLoading("global-loading");
  131 + if(document.getElementById("fixed_table_rc") != null){
  132 + document.getElementById("fixed_table_rc").remove();
  133 + var testScript = document.createElement("script");
  134 + testScript.setAttribute("id", "fixed_table_rc");
  135 + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
  136 + testScript.setAttribute("type", "text/javascript");
  137 + document.body.appendChild(testScript);
  138 + }
  139 +
124 140 }
125 141 ngAfterViewChecked() {
126 142 $('#fixed_hdr2 thead').css('width', $('#fixed_hdr2 tbody tr:eq(0)').width());
... ... @@ -141,14 +157,19 @@ export class CustomerSummaryReport implements OnInit, AfterViewChecked {
141 157 }
142 158  
143 159 GetCustomerSummeryReport(evt: any) {
  160 + this._loadingService.ShowLoading("global-loading");
144 161 var tempArr = evt.split(',');
145 162 this.pageNo = parseInt(tempArr[0]);
  163 + var actulalength=this.pageLength;
146 164 this.pageLength = parseInt(tempArr[1]);
147   - this._loadingService.ShowLoading("global-loading");
  165 +
148 166 this.CustomerSummaryReport = this.CustomerSummaryReportForm.value;
149 167 var obj = this.CustomerSummaryReport;
150 168 if (this.ExportingStart) {
151   - this.reportservice.GetCustomerSummeryReport(obj, this.pageNo, this.pageLength).subscribe((CustomerSummaryReports: CustomerSummaryReports[]) => { this.ExportService(CustomerSummaryReports); }, error => this.error = <any>error);
  169 + this.reportservice.GetCustomerSummeryReport(obj, this.pageNo, this.pageLength).subscribe((CustomerSummaryReports: CustomerSummaryReports[]) => {
  170 + //reset length after csvexport
  171 + this.pageLength=actulalength;
  172 + this.ExportService(CustomerSummaryReports); }, error => this.error = <any>error);
152 173 }
153 174 else {
154 175 this.reportservice.GetCustomerSummeryReport(obj, this.pageNo, this.pageLength).subscribe((CustomerSummaryReports: CustomerSummaryReports[]) => { this.BindFormFields(CustomerSummaryReports); }, error => this.error = <any>error);
... ... @@ -166,13 +187,13 @@ export class CustomerSummaryReport implements OnInit, AfterViewChecked {
166 187 if (this.lstCustomerSummaryReport.length > 0) {
167 188 this.NoRecord = '';
168 189 this.buttonStatus = true;
169   - this._loadingService.HideLoading("global-loading");
  190 +
170 191 }
171 192 if (this.lstCustomerSummaryReport.length == 0) {
172 193 this.NoRecord = this.global.NoRecords;
173   - this._loadingService.HideLoading("global-loading");
174 194 this.buttonStatus = false;
175 195 }
  196 + this._loadingService.HideLoading("global-loading");
176 197 }
177 198 ExportEvent() {
178 199 if (this.buttonStatus) {
... ...
400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts
1   -import { Component, OnInit, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, ViewChild,HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -55,11 +55,25 @@ export class DiscountCodeReport implements OnInit {
55 55 recordCount: number;
56 56 pageNo: number;
57 57 pageLength: number;
  58 + // Declare height and width variables
  59 + scrHeight:any;
  60 + scrWidth:any;
  61 + @HostListener('window:resize', ['$event'])
  62 + getScreenSize(event?) {
58 63  
  64 + var $ua = navigator.userAgent;
  65 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  66 + this.scrHeight = window.innerHeight-470;
  67 + }
  68 + else
  69 + {
  70 + this.scrHeight = window.innerHeight-400;
  71 + }
  72 + }
59 73 constructor(private router: Router, private reportservice: ReportService,
60 74 private manageDiscountCodeService: ManageDiscountCodeService,
61 75 private fb: FormBuilder, private modalService: BsModalService, public global: GlobalService,
62   - private _loadingService: LoadingService, private _confirmService: ConfirmService) { }
  76 + private _loadingService: LoadingService, private _confirmService: ConfirmService) { this.getScreenSize();}
63 77  
64 78 ngOnInit(): void {
65 79 this.ExportingStart = false;
... ... @@ -83,24 +97,24 @@ export class DiscountCodeReport implements OnInit {
83 97 $('#fixed_hdr2').fxdHdrCol({
84 98 fixedCols: 0,
85 99 width: "100%",
86   - height: 330,
  100 + height: this.scrHeight,
87 101 colModal: [
88   - { width: 180, align: 'center' },
  102 + { width: 200, align: 'center' },
89 103 { width: 230, align: 'center' },
90   - { width: 150, align: 'Center' },
91   - { width: 150, align: 'Center' },
  104 + { width: 250, align: 'Center' },
  105 + { width: 250, align: 'Center' },
92 106 { width: 350, align: 'Center' },
93 107 { width: 500, align: 'Center' },
94   - { width: 130, align: 'Center' },
95   - { width: 120, align: 'center' },
96   - { width: 280, align: 'Center' },
97   - { width: 180, align: 'center' },
98   - { width: 200, align: 'center' },
99   - { width: 170, align: 'center' },
100   - { width: 80, align: 'center' },
101   - { width: 150, align: 'center' },
102   - { width: 150, align: 'center' },
103   - { width: 180, align: 'Center' },
  108 + // { width: 130, align: 'Center' },
  109 + // { width: 120, align: 'center' },
  110 + // { width: 280, align: 'Center' },
  111 + // { width: 180, align: 'center' },
  112 + // { width: 200, align: 'center' },
  113 + // { width: 170, align: 'center' },
  114 + // { width: 80, align: 'center' },
  115 + // { width: 150, align: 'center' },
  116 + // { width: 150, align: 'center' },
  117 + // { width: 180, align: 'Center' },
104 118 //{ width: 400, align: 'Center' },
105 119 //{ width: 150, align: 'center' },
106 120 //{ width: 110, align: 'center' },
... ... @@ -143,6 +157,7 @@ export class DiscountCodeReport implements OnInit {
143 157 GetDiscountReport(evt: any) {
144 158 var tempArr = evt.split(',');
145 159 this.pageNo = parseInt(tempArr[0]);
  160 + var actulalength=this.pageLength;
146 161 this.pageLength = parseInt(tempArr[1]);
147 162 this.alerts = '';
148 163 this.global.compareTwoDates(this.DiscountCodeReportForm.controls['sToDate'].value, this.DiscountCodeReportForm.controls['sFromDate'].value);
... ... @@ -154,7 +169,10 @@ export class DiscountCodeReport implements OnInit {
154 169 this.NewSubscription = this.DiscountCodeReportForm.value;
155 170 var obj = this.NewSubscription;
156 171 if (this.ExportingStart) {
157   - this.reportservice.GetDiscountReport(obj, this.pageNo, this.pageLength).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.ExportService(DiscountCodeReports); }, error => this.error = <any>error);
  172 + this.reportservice.GetDiscountReport(obj, this.pageNo, this.pageLength).subscribe((DiscountCodeReports: DiscountCodeReports[]) => {
  173 + //reset length after csvexport
  174 + this.pageLength=actulalength;
  175 + this.ExportService(DiscountCodeReports); }, error => this.error = <any>error);
158 176 }
159 177 else {
160 178 this.reportservice.GetDiscountReport(obj, this.pageNo, this.pageLength).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.BindFormFields(DiscountCodeReports); }, error => this.error = <any>error);
... ...
400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html
... ... @@ -25,8 +25,7 @@
25 25 <label for="FromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label>
26 26 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
27 27 <div id="datetimepicker2" class="input-group input-group-sm input-append date">
28   - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1">
29   - <!--(keyup)="onKeyUp($event)" [ngClass]="{'alert alert-danger' : !enableTextboxColor}"-->
  28 + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1">
30 29 <span class="input-group-btn add-on">
31 30 <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button>
32 31 </span>
... ...
400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts
1   -import { Component, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewChecked, ViewChild,HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -60,94 +60,27 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
60 60 pageLength: number;
61 61 key: string = 'AccountNumber'; //set default
62 62 reverse: boolean = false;
63   - //settings = {
64   - // actions: { add: false, edit: false, delete: false },
65   - // pager: {
66   - // display: true,
67   - // perPage: 5
68   - // },
69   - // attr: {
70   - // class: 'table table-condensed table-bordered table-striped table-hover'
71   - // },
72   - // //hideSubHeader:true,
73   - // //rowClassFunction: (row) => {
74   - // // if (row.index == this.selectedRow) {
75   - // // return 'ng2-smart-row selected';
76   - // // }
77   - // // else {
78   - // // return 'ng2-smart-row';
79   - // // }
80   - // //},
81   - // //noDataMessage:'Loading, Please wait...',
82   - // columns: {
83   - // AccountNumber: {
84   - // title: 'Account Number',
85   - // width: '140px',
86   -
87   -
88   - // },
89   - // LicenseeName: {
90   - // title: 'Licensee Name',
91   - // width: '140px'
92   - // },
93   - // LicenseType: {
94   - // title: 'License Type',
95   - // width: '140px'
96   - // },
97   - // InstitutionName: {
98   - // title: 'Institution Name',
99   - // width: '140px'
100   - // }
101   - // ,
102   - // //Edition: {
103   - // // title: 'Edition',
104   - // // width: '140px'
105   - // //}
106   - // //,
107   - // StartDate: {
108   - // title: 'Start Date',
109   - // width: '140px'
110   - // },
111   - // EndDate: {
112   - // title: 'End Date',
113   - // width: '140px'
114   - // }
115   - // ,
116   - // LicenseCreationDate: {
117   - // title: 'Original Entry Date',
118   - // width: '140px'
119   - // },
120   - // SubscriptionPrice: {
121   - // title: 'Subscription Price',
122   - // width: '140px'
123   - // },
124   - // AccountType: {
125   - // title: 'Account Type',
126   - // width: '140px'
127   - // }
128   - // ,
129   - // DaysRemaining: {
130   - // title: 'Time Period',
131   - // width: '140px'
132   - // }
133   - // ,
134   - // CardNumber: {
135   - // title: 'Credit Card Number',
136   - // width: '140px'
137   - // }
138   - // //Serial_No: {
139   - // // title: 'Serial_No'
140   - // //}
141   -
  63 +
  64 + ExpiringSubscription = new ExpiringSubscriptionReports();
  65 + // Declare height and width variables
  66 + scrHeight:any;
  67 + scrWidth:any;
  68 + @HostListener('window:resize', ['$event'])
  69 + getScreenSize(event?) {
142 70  
143   - // }
144   - //};
  71 + var $ua = navigator.userAgent;
  72 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  73 + this.scrHeight = window.innerHeight-580;
  74 + }
  75 + else
  76 + {
  77 + this.scrHeight = window.innerHeight-480;
  78 + }
145 79  
146   - //source: LocalDataSource;
147   - ExpiringSubscription = new ExpiringSubscriptionReports();
  80 + }
148 81 constructor(private router: Router, private reportservice: ReportService,
149 82 private fb: FormBuilder, private modalService: BsModalService,
150   - public global: GlobalService, private _loadingService: LoadingService) { }
  83 + public global: GlobalService, private _loadingService: LoadingService) {this.getScreenSize(); }
151 84  
152 85 ngOnInit(): void {
153 86 this.buttonStatus = false;
... ... @@ -164,7 +97,7 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
164 97 iAccountTypeId: [0],
165 98 iStateId: [0],
166 99 iStartPrice: [0.00],
167   - iEndPrice: [0.00],
  100 + iEndPrice: [''],
168 101 iCountryId: [0]
169 102 });
170 103 this.alerts = '';
... ... @@ -177,41 +110,43 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
177 110 this.pageNo = 1;
178 111 this.pageLength = 10;
179 112 this.pagerComponent = new PagerComponent();
180   - this._loadingService.HideLoading("global-loading");
181   - //this.GetCustomerSummeryReport();
  113 +
182 114 $('#fixed_hdr2').fxdHdrCol({
183 115 fixedCols: 0,
184 116 width: "100%",
185   - height: 300,
  117 + height: this.scrHeight,
186 118 colModal: [
  119 + { width: 160, align: 'center' },
187 120 { width: 180, align: 'center' },
188   - { width: 230, align: 'center' },
189   - { width: 150, align: 'Center' },
190 121 { width: 150, align: 'Center' },
191   - { width: 350, align: 'Center' },
192   - { width: 500, align: 'Center' },
  122 + { width: 250, align: 'Center' },
  123 + { width: 160, align: 'Center' },
  124 + { width: 130, align: 'Center' },
193 125 { width: 130, align: 'Center' },
194 126 { width: 150, align: 'center' },
195   - { width: 280, align: 'Center' },
196   - { width: 180, align: 'center' },
197   - { width: 200, align: 'center' },
198   - { width: 170, align: 'center' },
199   - { width: 80, align: 'center' },
200   - { width: 150, align: 'center' },
  127 + { width: 160, align: 'Center' },
201 128 { width: 150, align: 'center' },
202   - { width: 180, align: 'Center' },
  129 + { width: 160, align: 'center' },
  130 + // { width: 170, align: 'center' },
  131 + // { width: 80, align: 'center' },
  132 + // { width: 150, align: 'center' },
  133 + // { width: 150, align: 'center' },
  134 + // { width: 180, align: 'Center' },
203 135 //{ width: 400, align: 'Center' },
204 136 //{ width: 150, align: 'center' },
205 137 //{ width: 110, align: 'center' },
206 138 ],
207 139 sort: true
208 140 });
209   - document.getElementById("fixed_table_rc").remove();
210   - var testScript = document.createElement("script");
211   - testScript.setAttribute("id", "fixed_table_rc");
212   - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
213   - testScript.setAttribute("type", "text/javascript");
214   - document.body.appendChild(testScript);
  141 +
  142 + if(document.getElementById("fixed_table_rc") != null){
  143 + document.getElementById("fixed_table_rc").remove();
  144 + var testScript = document.createElement("script");
  145 + testScript.setAttribute("id", "fixed_table_rc");
  146 + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
  147 + testScript.setAttribute("type", "text/javascript");
  148 + document.body.appendChild(testScript);
  149 + }
215 150 }
216 151 ngAfterViewChecked() {
217 152 $('#fixed_hdr2 thead').css('width', $('#fixed_hdr2 tbody tr:eq(0)').width());
... ... @@ -235,6 +170,7 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
235 170 GetExpiringSubscriptionReport(evt: any) {
236 171 var tempArr = evt.split(',');
237 172 this.pageNo = parseInt(tempArr[0]);
  173 + var actulalength=this.pageLength;
238 174 this.pageLength = parseInt(tempArr[1]);
239 175 this.alerts = '';
240 176 this.global.compareTwoDates(this.ExpiringSubscriptionReportForm.controls['sToDate'].value, this.ExpiringSubscriptionReportForm.controls['sFromDate'].value);
... ... @@ -246,7 +182,10 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
246 182 this.ExpiringSubscription = this.ExpiringSubscriptionReportForm.value;
247 183 var obj = this.ExpiringSubscription;
248 184 if (this.ExportingStart) {
249   - this.reportservice.GetExpiringSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { this.ExportService(ExpiringSubscriptionReports); }, error => this.error = <any>error);
  185 + this.reportservice.GetExpiringSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => {
  186 + //reset length after csvexport
  187 + this.pageLength=actulalength;
  188 + this.ExportService(ExpiringSubscriptionReports); }, error => this.error = <any>error);
250 189 }
251 190 else {
252 191 this.reportservice.GetExpiringSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { this.BindFormFields(ExpiringSubscriptionReports); }, error => this.error = <any>error);
... ... @@ -282,51 +221,20 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
282 221 this.key = key;
283 222 this.reverse = !this.reverse;
284 223 }
285   - //compareTwoDates() {
286   -
287   - // if (new Date(this.ExpiringSubscriptionReportForm.controls['sToDate'].value) < new Date(this.ExpiringSubscriptionReportForm.controls['sFromDate'].value)) {
288   -
289   - // //this.enableTextboxColor = false;
290   - // }
291   - //}
292   -
293   - onKeyUp(event: any) {
294   - debugger;;
295   - //this.enableTextboxColor = true;
296   - };
297   -
298   - //onKeyPress(event: any) {
299   - // debugger;;
300   - // this.enableTextboxColor = true;
301   - //};
302   -
303   - onchange(event: any) {
304   - debugger;;
305   - //this.enableTextboxColor = true;
306   - };
307   -
308   - //onKeydown(event: any) {
309   - // debugger;;
310   - // this.enableTextboxColor = true;
311   - //}
312 224  
313 225 BindFormFields(datas) {
314 226 this.recordCount = datas.RecordCount;
315 227 this.lstExpiringSubscriptionReport = datas.ExpiringSubscription;
316   - //this.source = new LocalDataSource(this.lstExpiringSubscriptionReport);
317   - //let data = datas.ExpiringSubscription;
318   - //this.source = new LocalDataSource(data);
319   -
  228 +
320 229 this.numberOfExpiringSubscriptionReport = this.lstExpiringSubscriptionReport.length; this.limit = this.lstExpiringSubscriptionReport.length;
321 230 if (this.lstExpiringSubscriptionReport.length > 0) {
322 231 this.NoRecord = '';
323 232 this.buttonStatus = true;
324   - this._loadingService.HideLoading("global-loading");
325 233 }
326 234 if (this.lstExpiringSubscriptionReport.length == 0) {
327   - this.NoRecord = this.global.NoRecords;
328   - this._loadingService.HideLoading("global-loading");
  235 + this.NoRecord = this.global.NoRecords;
329 236 this.buttonStatus = false;
330 237 }
  238 + this._loadingService.HideLoading("global-loading");
331 239 }
332 240 }
... ...
400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.html
... ... @@ -66,7 +66,7 @@
66 66 </div>
67 67 </div>
68 68  
69   - <div class="col-lg-3 col-sm-3">
  69 + <div class="col-lg-2 col-sm-3">
70 70 <div class="row">
71 71  
72 72 <div class="col-sm-12">
... ... @@ -75,27 +75,6 @@
75 75 </div>
76 76 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
77 77 <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button>
78   - <!--modal-->
79   - <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal">
80   - <div class="modal-dialog modal-sm" role="document">
81   - <div class="modal-content">
82   - <div class="modal-header annotation-modal-header ui-draggable-handle">
83   - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร—</span></button>
84   - <h4 class="modal-title" id="">Alert</h4>
85   - </div>
86   - <div class="modal-body">
87   - <h5>No record found.</h5>
88   - </div>
89   - <div class="modal-footer">
90   - <div class="row">
91   - <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>
92   - </div>
93   - </div>
94   -
95   - </div>
96   - </div>
97   - </div>-->
98   - <!--modal-->
99 78 </div>
100 79 </div>
101 80 </div>
... ...
400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts
1   -import { Component, OnInit, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, ViewChild,HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -53,10 +53,25 @@ export class ImageExportReport implements OnInit {
53 53 recordCount: number;
54 54 pageNo: number;
55 55 pageLength: number;
  56 + // Declare height and width variables
  57 + scrHeight:any;
  58 + scrWidth:any;
  59 + @HostListener('window:resize', ['$event'])
  60 + getScreenSize(event?) {
  61 +
  62 + var $ua = navigator.userAgent;
  63 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  64 + this.scrHeight = window.innerHeight-430;
  65 + }
  66 + else
  67 + {
  68 + this.scrHeight = window.innerHeight-385;
  69 + }
  70 + }
56 71  
57 72 constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder,
58 73 private modalService: BsModalService, public global: GlobalService,
59   - private _loadingService: LoadingService, private _confirmService: ConfirmService) { }
  74 + private _loadingService: LoadingService, private _confirmService: ConfirmService) {this.getScreenSize(); }
60 75  
61 76 ngOnInit(): void {
62 77 this.buttonStatus = false;
... ... @@ -75,16 +90,15 @@ export class ImageExportReport implements OnInit {
75 90 $('#fixed_hdr2').fxdHdrCol({
76 91 fixedCols: 0,
77 92 width: "100%",
78   - height: 330,
  93 + height: this.scrHeight,
79 94 colModal: [
80   - { width: 180, align: 'center' },
81   - { width: 230, align: 'center' },
  95 + { width: 250, align: 'center' },
  96 + { width: 200, align: 'center' },
  97 + { width: 200, align: 'Center' },
  98 + { width: 250, align: 'Center' },
  99 + { width: 200, align: 'Center' },
82 100 { width: 150, align: 'Center' },
83   - //{ width: 150, align: 'Center' },
84   - { width: 350, align: 'Center' },
85   - { width: 300, align: 'Center' },
86   - { width: 130, align: 'Center' },
87   - { width: 120, align: 'center' },
  101 + { width: 200, align: 'center' },
88 102 { width: 150, align: 'center' },
89 103 { width: 180, align: 'center' },
90 104 ],
... ... @@ -109,6 +123,7 @@ export class ImageExportReport implements OnInit {
109 123 GetImageExportReport(evt: any) {
110 124 var tempArr = evt.split(',');
111 125 this.pageNo = parseInt(tempArr[0]);
  126 + var actulalength=this.pageLength;
112 127 this.pageLength = parseInt(tempArr[1]);
113 128 this.alerts = '';
114 129 this.global.compareTwoDates(this.ImageExportReportForm.controls['sToDate'].value, this.ImageExportReportForm.controls['sFromDate'].value);
... ... @@ -120,7 +135,10 @@ export class ImageExportReport implements OnInit {
120 135 this.imageexportreport = this.ImageExportReportForm.value;
121 136 var obj = this.imageexportreport;
122 137 if (this.ExportingStart) {
123   - this.reportservice.GetImageExportReport(obj, this.pageNo, this.pageLength).subscribe((ImageExportReports: ImageExportReports[]) => { this.ExportService(ImageExportReports); }, error => this.error = <any>error);
  138 + this.reportservice.GetImageExportReport(obj, this.pageNo, this.pageLength).subscribe((ImageExportReports: ImageExportReports[]) => {
  139 + //reset length after csvexport
  140 + this.pageLength=actulalength;
  141 + this.ExportService(ImageExportReports); }, error => this.error = <any>error);
124 142 }
125 143 else {
126 144 this.reportservice.GetImageExportReport(obj, this.pageNo, this.pageLength).subscribe((ImageExportReports: ImageExportReports[]) => { this.BindFormFields(ImageExportReports); }, error => this.error = <any>error);
... ...
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
... ... @@ -84,27 +84,6 @@
84 84 <div class="col-sm-12">
85 85 <div class="form-group marginTop5 text-right">
86 86 <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button>
87   - <!--modal-->
88   - <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal">
89   - <div class="modal-dialog modal-sm" role="document">
90   - <div class="modal-content">
91   - <div class="modal-header annotation-modal-header ui-draggable-handle">
92   - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร—</span></button>
93   - <h4 class="modal-title" id="">Alert</h4>
94   - </div>
95   - <div class="modal-body">
96   - <h5>Account number does not exist in the system.</h5>
97   - </div>
98   - <div class="modal-footer">
99   - <div class="row">
100   - <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>
101   - </div>
102   - </div>
103   -
104   - </div>
105   - </div>
106   - </div>-->
107   - <!--modal-->
108 87 </div>
109 88 </div>
110 89 </div>
... ... @@ -134,8 +113,7 @@
134 113 <tr *ngFor="let item of lstNetAdSubscriptionReport">
135 114 <td>{{item.LicenseType}}</td>
136 115 <td>{{item.AccountType}}</td>
137   - <td>{{item.InstitutionName}}</td>
138   -
  116 + <td>{{item.InstitutionName}}</td>
139 117 <td>{{item.LicenseCreationDate=='01/01/9999'?'':item.LicenseCreationDate| date: 'MM/dd/yyyy'}}</td>
140 118 <td>{{item.ActiveSubscription}}</td>
141 119 <td>{{item.RenewSubscription}}</td>
... ... @@ -143,6 +121,18 @@
143 121 <td>{{item.NetAdSubscription}}</td>
144 122 </tr>
145 123 </tbody>
  124 + <tfoot *ngFor="let total of TotalNetAdSubscription" style="font-weight: bold;background-color: #e3dbf3;">
  125 + <tr>
  126 + <td>{{total.LicenseType}}</td>
  127 + <td>{{total.AccountType}}</td>
  128 + <td>{{total.InstitutionName}}</td>
  129 + <td>{{total.LicenseCreationDate}}</td>
  130 + <td>{{total.ActiveSubscription}}</td>
  131 + <td>{{total.RenewSubscription}}</td>
  132 + <td>{{total.InActiveSubscription}}</td>
  133 + <td>{{total.NetAdSubscription}}</td>
  134 + </tr>
  135 + </tfoot>
146 136 </table>
147 137 <admin-pager [recordCount]="recordCount" [pageNo]="pageNo" [pageLength]="pageLength" (pagerEvent)="GetNetAdSummaryReport($event)"></admin-pager>
148 138 <div class="row">
... ...
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
1   -import { Component, OnInit, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, ViewChild ,HostListener} from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -25,6 +25,7 @@ declare var $: any;
25 25 })
26 26 export class NetAdSubscriptionReport implements OnInit {
27 27 public lstNetAdSubscriptionReport: any;
  28 + public TotalNetAdSubscription: any;
28 29 public lstLicenceType: any;
29 30 NetAdSubscriptionReportForm: FormGroup;
30 31 NetAdSubscriptionReports: NetAdSubscriptionReports[];
... ... @@ -53,10 +54,24 @@ export class NetAdSubscriptionReport implements OnInit {
53 54 recordCount: number;
54 55 pageNo: number;
55 56 pageLength: number;
  57 + // Declare height and width variables
  58 + scrHeight:any;
  59 + scrWidth:any;
  60 + @HostListener('window:resize', ['$event'])
  61 + getScreenSize(event?) {
56 62  
  63 + var $ua = navigator.userAgent;
  64 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  65 + this.scrHeight = window.innerHeight-470;
  66 + }
  67 + else
  68 + {
  69 + this.scrHeight = window.innerHeight-405;
  70 + }
  71 + }
57 72 constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder,
58 73 private modalService: BsModalService, public global: GlobalService,
59   - private _loadingService: LoadingService, private _confirmService: ConfirmService) { }
  74 + private _loadingService: LoadingService, private _confirmService: ConfirmService) {this.getScreenSize(); }
60 75  
61 76 ngOnInit(): void {
62 77 this.ExportingStart = false;
... ... @@ -70,7 +85,7 @@ export class NetAdSubscriptionReport implements OnInit {
70 85 sToDate: [this.date],
71 86 iLicenseTypeId: [0],
72 87 iStartPrice: [0],
73   - iEndPrice: [0],
  88 + iEndPrice: [''],
74 89 });
75 90 this.alerts = '';
76 91 this._loadingService.ShowLoading("global-loading");
... ... @@ -82,24 +97,24 @@ export class NetAdSubscriptionReport implements OnInit {
82 97 $('#fixed_hdr2').fxdHdrCol({
83 98 fixedCols: 0,
84 99 width: "100%",
85   - height: 330,
  100 + height: this.scrHeight,
86 101 colModal: [
87 102 { width: 180, align: 'center' },
88 103 { width: 230, align: 'center' },
89   - { width: 150, align: 'Center' },
  104 + { width: 250, align: 'Center' },
90 105 { width: 150, align: 'Center' },
91 106 { width: 350, align: 'Center' },
92 107 { width: 200, align: 'Center' },
93   - { width: 200, align: 'Center' },
  108 + { width: 250, align: 'Center' },
94 109 { width: 120, align: 'center' },
95   - { width: 280, align: 'Center' },
96   - { width: 180, align: 'center' },
97   - { width: 200, align: 'center' },
98   - { width: 170, align: 'center' },
99   - { width: 80, align: 'center' },
100   - { width: 150, align: 'center' },
101   - { width: 150, align: 'center' },
102   - { width: 180, align: 'Center' },
  110 + // { width: 280, align: 'Center' },
  111 + // { width: 180, align: 'center' },
  112 + // { width: 200, align: 'center' },
  113 + // { width: 170, align: 'center' },
  114 + // { width: 80, align: 'center' },
  115 + // { width: 150, align: 'center' },
  116 + // { width: 150, align: 'center' },
  117 + // { width: 180, align: 'Center' },
103 118 ],
104 119 sort: true
105 120 });
... ... @@ -127,12 +142,15 @@ export class NetAdSubscriptionReport implements OnInit {
127 142 this._loadingService.ShowLoading("global-loading");
128 143 var tempArr = evt.split(',');
129 144 this.pageNo = parseInt(tempArr[0]);
  145 + var actulalength=this.pageLength;
130 146 this.pageLength = parseInt(tempArr[1]);
131 147 this._loadingService.ShowLoading("global-loading");
132 148 this.NetAdSubscriptionReport = this.NetAdSubscriptionReportForm.value;
133 149 var obj = this.NetAdSubscriptionReport;
134 150 if (this.ExportingStart) {
135 151 this.reportservice.GetNetAdSummaryReport(obj, this.pageNo, this.pageLength).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => {
  152 + //reset length after csvexport
  153 + this.pageLength=actulalength;
136 154 this.ExportService(NetAdSubscriptionReports); }, error => this.error = <any>error);
137 155 }
138 156 else {
... ... @@ -148,7 +166,26 @@ export class NetAdSubscriptionReport implements OnInit {
148 166  
149 167 BindFormFields(data) {
150 168 this.recordCount = data.RecordCount;
  169 + this.TotalNetAdSubscription=[];
151 170 this.lstNetAdSubscriptionReport = data.NetAdSubscriptionList;
  171 + var index = this.lstNetAdSubscriptionReport.length;
  172 + var lastentry=this.lstNetAdSubscriptionReport[index-1];
  173 + if(lastentry!=undefined && lastentry.LicenseType=='Total')
  174 + {
  175 + this.TotalNetAdSubscription=[{
  176 + AccountType:lastentry.AccountType,
  177 + ActiveSubscription:lastentry.ActiveSubscription,
  178 + AccounInActiveSubscriptiontType:lastentry.InActiveSubscription,
  179 + InstitutionName:lastentry.InstitutionName,
  180 + LicenseType:lastentry.LicenseType,
  181 + NetAdSubscription:lastentry.NetAdSubscription,
  182 + RenewSubscription:lastentry.RenewSubscription,
  183 + }]
  184 +
  185 + }
  186 +
  187 + this.lstNetAdSubscriptionReport.splice(index-1,1)
  188 +
152 189 if (this.lstNetAdSubscriptionReport.length > 0) {
153 190 this.NoRecord = '';
154 191 this.buttonStatus = true;
... ...
400-SOURCECODE/Admin/src/app/components/Reports/report.service.ts
... ... @@ -104,13 +104,13 @@ export class ReportService {
104 104 }
105 105 if (obj.sToDate == '') {
106 106 obj.sToDate = '1/1/9999';
107   - }
108   - if (obj.iStartPrice === '') {
109   - obj.iStartPrice = -1;
110   - }
111   - if (obj.iEndPrice === '') {
112   - obj.iEndPrice = -1;
113   - }
  107 + }
  108 + if (obj.iStartPrice == undefined || obj.iStartPrice==='')
  109 + obj.iStartPrice = -1;
  110 +
  111 + if (obj.iEndPrice == undefined || obj.iEndPrice === '')
  112 + obj.iEndPrice = -1;
  113 +
114 114 obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy');
115 115 obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy');
116 116  
... ...
400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts
1   -import { Component, OnInit, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, ViewChild,HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -54,9 +54,24 @@ export class SiteLicenseUsageReport implements OnInit {
54 54 pageNo: number;
55 55 pageLength: number;
56 56 DisableAccountNumberControl: boolean;
  57 + // Declare height and width variables
  58 + scrHeight:any;
  59 + scrWidth:any;
  60 + @HostListener('window:resize', ['$event'])
  61 + getScreenSize(event?) {
  62 +
  63 + var $ua = navigator.userAgent;
  64 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  65 + this.scrHeight = window.innerHeight-470;
  66 + }
  67 + else
  68 + {
  69 + this.scrHeight = window.innerHeight-400;
  70 + }
  71 + }
57 72 constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder,
58 73 private modalService: BsModalService, public global: GlobalService,
59   - private _loadingService: LoadingService, private _confirmService: ConfirmService) { }
  74 + private _loadingService: LoadingService, private _confirmService: ConfirmService) {this.getScreenSize(); }
60 75  
61 76 ngOnInit(): void {
62 77 this.ExportingStart = false;
... ... @@ -80,24 +95,24 @@ export class SiteLicenseUsageReport implements OnInit {
80 95 $('#fixed_hdr2').fxdHdrCol({
81 96 fixedCols: 0,
82 97 width: "100%",
83   - height: 330,
  98 + height: this.scrHeight,
84 99 colModal: [
85 100 { width: 180, align: 'center' },
86   - { width: 230, align: 'center' },
87   - { width: 150, align: 'Center' },
  101 + { width: 250, align: 'center' },
  102 + { width: 250, align: 'Center' },
88 103 { width: 150, align: 'Center' },
89 104 { width: 350, align: 'Center' },
90 105 { width: 500, align: 'Center' },
91 106 { width: 130, align: 'Center' },
92   - { width: 120, align: 'center' },
93   - { width: 280, align: 'Center' },
94   - { width: 180, align: 'center' },
95   - { width: 200, align: 'center' },
96   - { width: 170, align: 'center' },
97   - { width: 80, align: 'center' },
98   - { width: 150, align: 'center' },
99   - { width: 150, align: 'center' },
100   - { width: 180, align: 'Center' },
  107 + // { width: 120, align: 'center' },
  108 + // { width: 280, align: 'Center' },
  109 + // { width: 180, align: 'center' },
  110 + // { width: 200, align: 'center' },
  111 + // { width: 170, align: 'center' },
  112 + // { width: 80, align: 'center' },
  113 + // { width: 150, align: 'center' },
  114 + // { width: 150, align: 'center' },
  115 + // { width: 180, align: 'Center' },
101 116 ],
102 117 sort: true
103 118 });
... ... @@ -114,8 +129,7 @@ export class SiteLicenseUsageReport implements OnInit {
114 129 testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
115 130 testScript.setAttribute("type", "text/javascript");
116 131 document.body.appendChild(testScript);
117   - }
118   -
  132 + }
119 133 }
120 134  
121 135 GetEdition() {
... ... @@ -132,12 +146,16 @@ export class SiteLicenseUsageReport implements OnInit {
132 146 this._loadingService.ShowLoading("global-loading");
133 147 var tempArr = evt.split(',');
134 148 this.pageNo = parseInt(tempArr[0]);
  149 + var actulalength=this.pageLength;
135 150 this.pageLength = parseInt(tempArr[1]);
136 151 this._loadingService.ShowLoading("global-loading");
137 152 this.SiteLicenseUsageReport = this.SiteLicenseUsageReportForm.value;
138 153 var obj = this.SiteLicenseUsageReport;
139 154 if (this.ExportingStart) {
140   - this.reportservice.GetSiteLicenseUsageReport(obj, this.pageNo, this.pageLength).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.ExportService(SiteLicenseUsageReports); }, error => this.error = <any>error);
  155 + this.reportservice.GetSiteLicenseUsageReport(obj, this.pageNo, this.pageLength).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => {
  156 + //reset length after csvexport
  157 + this.pageLength=actulalength;
  158 + this.ExportService(SiteLicenseUsageReports); }, error => this.error = <any>error);
141 159 }
142 160 else {
143 161 this.reportservice.GetSiteLicenseUsageReport(obj, this.pageNo, this.pageLength).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.BindFormFields(SiteLicenseUsageReports); }, error => this.error = <any>error);
... ... @@ -169,7 +187,7 @@ export class SiteLicenseUsageReport implements OnInit {
169 187 ExportEvent() {
170 188 if (this.buttonStatus) {
171 189 this.ExportingStart = true;
172   - this.GetSiteLicenseUsageReport('1, ' + this.pageLength);
  190 + this.GetSiteLicenseUsageReport('1, ' + this.recordCount);
173 191 this.ExportingStart = false;
174 192 }
175 193 }
... ...
400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.ts
1   -import { Component, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewChecked, ViewChild,HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -56,9 +56,25 @@ export class SubscriptionCancellationReport implements OnInit {
56 56 pageNo: number;
57 57 pageLength: number;
58 58 NewSubscription = new SubscriptionCancellationReports();
  59 + // Declare height and width variables
  60 + scrHeight:any;
  61 + scrWidth:any;
  62 + @HostListener('window:resize', ['$event'])
  63 + getScreenSize(event?) {
  64 +
  65 + var $ua = navigator.userAgent;
  66 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  67 + this.scrHeight = window.innerHeight-600;
  68 + }
  69 + else
  70 + {
  71 + this.scrHeight = window.innerHeight-490;
  72 + }
  73 +
  74 + }
59 75 constructor(private router: Router, private reportservice: ReportService,
60 76 private fb: FormBuilder, private modalService: BsModalService,
61   - public global: GlobalService, private _loadingService: LoadingService) { }
  77 + public global: GlobalService, private _loadingService: LoadingService) {this.getScreenSize(); }
62 78  
63 79 ngOnInit(): void {
64 80 this.ExportingStart = false;
... ... @@ -75,7 +91,7 @@ export class SubscriptionCancellationReport implements OnInit {
75 91 iAccountTypeId: [0],
76 92 iStateId: [0],
77 93 icStartPrice: [0],
78   - icEndPrice: [0],
  94 + icEndPrice: [''],
79 95 iCountryId: [0],
80 96 });
81 97 this.alerts = '';
... ... @@ -87,42 +103,41 @@ export class SubscriptionCancellationReport implements OnInit {
87 103 this.pageNo = 1;
88 104 this.pageLength = 10;
89 105 this.pagerComponent = new PagerComponent();
90   - this._loadingService.HideLoading("global-loading");
91   - //this.GetSubscriptionReport();
92 106 $('#fixed_hdr2').fxdHdrCol({
93 107 fixedCols: 0,
94 108 width: "100%",
95   - height: 300,
  109 + height: this.scrHeight,
96 110 colModal: [
97   - { width: 180, align: 'center' },
98   - { width: 230, align: 'center' },
99   - { width: 150, align: 'Center' },
  111 + { width: 140, align: 'center' },
  112 + { width: 170, align: 'center' },
100 113 { width: 150, align: 'Center' },
101   - { width: 350, align: 'Center' },
102   - { width: 500, align: 'Center' },
  114 + { width: 160, align: 'Center' },
103 115 { width: 130, align: 'Center' },
  116 + { width: 400, align: 'Center' },
  117 + { width: 100, align: 'Center' },
  118 + { width: 140, align: 'center' },
  119 + { width: 100, align: 'Center' },
  120 + { width: 140, align: 'center' },
104 121 { width: 150, align: 'center' },
105   - { width: 280, align: 'Center' },
106   - { width: 180, align: 'center' },
107   - { width: 200, align: 'center' },
108   - { width: 170, align: 'center' },
109   - { width: 80, align: 'center' },
110   - { width: 150, align: 'center' },
111   - { width: 150, align: 'center' },
112   - { width: 180, align: 'Center' },
  122 + // { width: 170, align: 'center' },
  123 + // { width: 80, align: 'center' },
  124 + // { width: 150, align: 'center' },
  125 + // { width: 150, align: 'center' },
  126 + // { width: 180, align: 'Center' },
113 127 //{ width: 400, align: 'Center' },
114 128 //{ width: 150, align: 'center' },
115 129 //{ width: 110, align: 'center' },
116 130 ],
117 131 sort: true
118 132 });
119   - document.getElementById("fixed_table_rc").remove();
120   - var testScript = document.createElement("script");
121   - testScript.setAttribute("id", "fixed_table_rc");
122   - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
123   - testScript.setAttribute("type", "text/javascript");
124   - document.body.appendChild(testScript);
125   - this.GetSubscriptionCancellationReport('1, ' + this.pageLength);
  133 + if(document.getElementById("fixed_table_rc") != null){
  134 + document.getElementById("fixed_table_rc").remove();
  135 + var testScript = document.createElement("script");
  136 + testScript.setAttribute("id", "fixed_table_rc");
  137 + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
  138 + testScript.setAttribute("type", "text/javascript");
  139 + document.body.appendChild(testScript);
  140 + }
126 141  
127 142 }
128 143  
... ... @@ -152,11 +167,15 @@ export class SubscriptionCancellationReport implements OnInit {
152 167 this._loadingService.ShowLoading("global-loading");
153 168 var tempArr = evt.split(',');
154 169 this.pageNo = parseInt(tempArr[0]);
  170 + var actulalength=this.pageLength;
155 171 this.pageLength = parseInt(tempArr[1]);
156 172 this.NewSubscription = this.SubscriptionCancellationReportForm.value;
157 173 var obj = this.NewSubscription;
158 174 if (this.ExportingStart) {
159   - this.reportservice.GetSubscriptionCancellationReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { this.ExportService(SubscriptionCancellationReports); }, error => this.error = <any>error);
  175 + this.reportservice.GetSubscriptionCancellationReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => {
  176 + //reset length after csvexport
  177 + this.pageLength=actulalength;
  178 + this.ExportService(SubscriptionCancellationReports); }, error => this.error = <any>error);
160 179 }
161 180 else {
162 181 this.reportservice.GetSubscriptionCancellationReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { this.BindFormFields(SubscriptionCancellationReports); }, error => this.error = <any>error);
... ...
400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts
1   -import { Component, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewChecked, ViewChild,HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -56,9 +56,25 @@ export class SubscriptionReport implements OnInit {
56 56 pageNo: number;
57 57 pageLength: number;
58 58 NewSubscription = new SubscriptionReports();
  59 + // Declare height and width variables
  60 + scrHeight:any;
  61 + scrWidth:any;
  62 + @HostListener('window:resize', ['$event'])
  63 + getScreenSize(event?) {
  64 +
  65 + var $ua = navigator.userAgent;
  66 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  67 + this.scrHeight = window.innerHeight-580;
  68 + }
  69 + else
  70 + {
  71 + this.scrHeight = window.innerHeight-480;
  72 + }
  73 +
  74 + }
59 75 constructor(private router: Router, private reportservice: ReportService,
60 76 private fb: FormBuilder, private modalService: BsModalService,
61   - public global: GlobalService, private _loadingService: LoadingService) { }
  77 + public global: GlobalService, private _loadingService: LoadingService) { this.getScreenSize();}
62 78  
63 79 ngOnInit(): void {
64 80 this.ExportingStart = false;
... ... @@ -92,37 +108,39 @@ export class SubscriptionReport implements OnInit {
92 108 $('#fixed_hdr2').fxdHdrCol({
93 109 fixedCols: 0,
94 110 width: "100%",
95   - height: 300,
  111 + height: this.scrHeight,
96 112 colModal: [
97   - { width: 180, align: 'center' },
98   - { width: 230, align: 'center' },
  113 + { width: 140, align: 'center' },
  114 + { width: 170, align: 'center' },
99 115 { width: 150, align: 'Center' },
100 116 { width: 150, align: 'Center' },
101   - { width: 350, align: 'Center' },
102   - { width: 500, align: 'Center' },
103   - { width: 130, align: 'Center' },
104   - { width: 150, align: 'center' },
105   - { width: 280, align: 'Center' },
106   - { width: 180, align: 'center' },
107   - { width: 200, align: 'center' },
108   - { width: 170, align: 'center' },
109   - { width: 80, align: 'center' },
  117 + { width: 140, align: 'Center' },
  118 + { width: 400, align: 'Center' },
  119 + { width: 100, align: 'Center' },
110 120 { width: 150, align: 'center' },
  121 + { width: 100, align: 'Center' },
  122 + { width: 140, align: 'center' },
111 123 { width: 150, align: 'center' },
112   - { width: 180, align: 'Center' },
  124 + // { width: 170, align: 'center' },
  125 + // { width: 80, align: 'center' },
  126 + // { width: 150, align: 'center' },
  127 + // { width: 150, align: 'center' },
  128 + // { width: 180, align: 'Center' },
113 129 //{ width: 400, align: 'Center' },
114 130 //{ width: 150, align: 'center' },
115 131 //{ width: 110, align: 'center' },
116 132 ],
117 133 sort: true
118 134 });
119   - document.getElementById("fixed_table_rc").remove();
120   - var testScript = document.createElement("script");
121   - testScript.setAttribute("id", "fixed_table_rc");
122   - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
123   - testScript.setAttribute("type", "text/javascript");
124   - document.body.appendChild(testScript);
125   - //this.GetUsageReport();
  135 + if(document.getElementById("fixed_table_rc") != null){
  136 + document.getElementById("fixed_table_rc").remove();
  137 + var testScript = document.createElement("script");
  138 + testScript.setAttribute("id", "fixed_table_rc");
  139 + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
  140 + testScript.setAttribute("type", "text/javascript");
  141 + document.body.appendChild(testScript);
  142 + }
  143 +
126 144 }
127 145  
128 146  
... ... @@ -151,11 +169,15 @@ export class SubscriptionReport implements OnInit {
151 169 this._loadingService.ShowLoading("global-loading");
152 170 var tempArr = evt.split(',');
153 171 this.pageNo = parseInt(tempArr[0]);
  172 + var actulalength=this.pageLength;
154 173 this.pageLength = parseInt(tempArr[1]);
155 174 this.NewSubscription = this.SubscriptionReportForm.value;
156 175 var obj = this.NewSubscription;
157 176 if (this.ExportingStart) {
158   - this.reportservice.GetSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionReports: SubscriptionReports[]) => { this.ExportService(SubscriptionReports); }, error => this.error = <any>error);
  177 + this.reportservice.GetSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionReports: SubscriptionReports[]) => {
  178 + //reset length after csvexport
  179 + this.pageLength=actulalength;
  180 + this.ExportService(SubscriptionReports); }, error => this.error = <any>error);
159 181 }
160 182 else {
161 183 this.reportservice.GetSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionReports: SubscriptionReports[]) => { this.BindFormFields(SubscriptionReports); }, error => this.error = <any>error);
... ...
400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.ts
1   -import { Component, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewChecked, ViewChild, HostListener } from '@angular/core';
2 2 import { Router } from '@angular/router';
3 3 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
4 4 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
... ... @@ -69,16 +69,6 @@ export class UsageReport implements OnInit, AfterViewChecked {
69 69 attr: {
70 70 class: 'table table-condensed table-bordered table-striped table-hover'
71 71 },
72   - //hideSubHeader:true,
73   - //rowClassFunction: (row) => {
74   - // if (row.index == this.selectedRow) {
75   - // return 'ng2-smart-row selected';
76   - // }
77   - // else {
78   - // return 'ng2-smart-row';
79   - // }
80   - //},
81   - //noDataMessage:'Loading, Please wait...',
82 72 columns: {
83 73 LoginId: {
84 74 title: 'User Name',
... ... @@ -139,11 +129,26 @@ export class UsageReport implements OnInit, AfterViewChecked {
139 129  
140 130 }
141 131 };
142   - //source: LocalDataSource;
143   -
  132 +
  133 + // Declare height and width variables
  134 + scrHeight:any;
  135 + scrWidth:any;
  136 + @HostListener('window:resize', ['$event'])
  137 + getScreenSize(event?) {
  138 +
  139 + var $ua = navigator.userAgent;
  140 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  141 + this.scrHeight = window.innerHeight-520;
  142 + }
  143 + else
  144 + {
  145 + this.scrHeight = window.innerHeight-440;
  146 + }
  147 + }
  148 +
144 149 constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder,
145 150 private modalService: BsModalService, public global: GlobalService,
146   - private _loadingService: LoadingService) { }
  151 + private _loadingService: LoadingService) {this.getScreenSize(); }
147 152  
148 153  
149 154 ngOnInit(): void {
... ... @@ -168,13 +173,7 @@ export class UsageReport implements OnInit, AfterViewChecked {
168 173 this.alerts = '';
169 174 this.GetCountry();
170 175 this.GetState();
171   - //this.GetUsageReport();
172 176  
173   - var testScript = document.createElement("script");
174   - testScript.setAttribute("id", "fixed_table_rc");
175   - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
176   - testScript.setAttribute("type", "text/javascript");
177   - document.body.appendChild(testScript);
178 177 this.recordCount = 0;
179 178 this.pageNo = 0;
180 179 this.pageLength = 10;
... ... @@ -183,37 +182,45 @@ export class UsageReport implements OnInit, AfterViewChecked {
183 182 $('#fixed_hdr2').fxdHdrCol({
184 183 fixedCols: 0,
185 184 width: "100%",
186   - height: 300,
  185 + height: this.scrHeight,
187 186 colModal: [
188   - { width: 180, align: 'center' },
189   - { width: 230, align: 'center' },
  187 + { width: 150, align: 'center' },
  188 + { width: 150, align: 'center' },
  189 + { width: 150, align: 'Center' },
190 190 { width: 150, align: 'Center' },
  191 + { width: 300, align: 'Center' },
191 192 { width: 150, align: 'Center' },
192   - { width: 350, align: 'Center' },
193   - { width: 500, align: 'Center' },
194 193 { width: 130, align: 'Center' },
195 194 { width: 120, align: 'center' },
196   - { width: 280, align: 'Center' },
197   - { width: 180, align: 'center' },
198   - { width: 200, align: 'center' },
199   - { width: 170, align: 'center' },
200   - { width: 120, align: 'center' },
201   - { width: 150, align: 'center' },
202   - { width: 150, align: 'center' },
203   - { width: 180, align: 'Center' },
204   - { width: 400, align: 'Center' },
  195 + { width: 150, align: 'Center' },
  196 + { width: 140, align: 'center' },
  197 + { width: 100, align: 'center' },
205 198 { width: 150, align: 'center' },
206   - { width: 110, align: 'center' },
  199 + { width: 120, align: 'center' },
  200 + // { width: 150, align: 'center' },
  201 + // { width: 150, align: 'center' },
  202 + // { width: 180, align: 'Center' },
  203 + // { width: 400, align: 'Center' },
  204 + // { width: 150, align: 'center' },
  205 + // { width: 110, align: 'center' },
207 206 ],
208 207 sort: true
209 208 });
210   - document.getElementById("fixed_table_rc").remove();
  209 + if(document.getElementById("fixed_table_rc") != null){
  210 + document.getElementById("fixed_table_rc").remove();
  211 + var testScript = document.createElement("script");
  212 + testScript.setAttribute("id", "fixed_table_rc");
  213 + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
  214 + testScript.setAttribute("type", "text/javascript");
  215 + document.body.appendChild(testScript);
  216 + }
211 217  
212 218 }
213 219  
214 220 GetUsageReport(evt: any) {
215 221 var tempArr = evt.split(',');
216 222 this.pageNo = parseInt(tempArr[0]);
  223 + var actulalength=this.pageLength;
217 224 this.pageLength = parseInt(tempArr[1]);
218 225 this.alerts = '';
219 226 this.global.compareTwoDates(this.UsageReportForm.controls['sToDate'].value, this.UsageReportForm.controls['sFromDate'].value);
... ... @@ -225,7 +232,10 @@ export class UsageReport implements OnInit, AfterViewChecked {
225 232 this.usagereport = this.UsageReportForm.value;
226 233 var obj = this.usagereport;
227 234 if (this.ExportingStart) {
228   - this.reportservice.GetUsageReport(obj,this.pageNo, this.pageLength).subscribe((UsageReports: UsageReports[]) => { this.ExportService(UsageReports); }, error => this.error = <any>error);
  235 + this.reportservice.GetUsageReport(obj,this.pageNo, this.pageLength).subscribe((UsageReports: UsageReports[]) => {
  236 + //reset length after csvexport
  237 + this.pageLength=actulalength;
  238 + this.ExportService(UsageReports); }, error => this.error = <any>error);
229 239 }
230 240 else {
231 241 this.reportservice.GetUsageReport(obj, this.pageNo, this.pageLength).subscribe((UsageReports: UsageReports[]) => { this.BindFormFields(UsageReports); }, error => this.error = <any>error);
... ... @@ -248,8 +258,6 @@ export class UsageReport implements OnInit, AfterViewChecked {
248 258 BindFormFields(dataResult) {
249 259 this.recordCount = dataResult.RecordCount;
250 260 this.lstUserUsageReport = dataResult.UserUsage;
251   - //this.data = dataResult.UserUsage;
252   - //this.source = new LocalDataSource(data);
253 261 this.numberOfUsageReport = this.lstUserUsageReport.length; this.limit = this.lstUserUsageReport.length;
254 262 if (this.lstUserUsageReport.length > 0) {
255 263 this.NoRecord = '';
... ...
400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
1   -import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, OnChanges, SimpleChanges, TemplateRef, Pipe, PipeTransform, ViewChild } from '@angular/core';
  1 +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, OnChanges, SimpleChanges, TemplateRef, Pipe, PipeTransform, ViewChild,HostListener } from '@angular/core';
2 2 import { SubscriptionPriceService } from './subscriptionprice.service';
3 3 import { Router } from '@angular/router';
4 4 import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
... ... @@ -41,10 +41,25 @@ recordCount: number;
41 41 pageNo: number;
42 42 pageLength: number;
43 43 RecordDeleted: number[];
  44 +// Declare height and width variables
  45 +scrHeight:any;
  46 +scrWidth:any;
  47 +@HostListener('window:resize', ['$event'])
  48 +getScreenSize(event?) {
  49 +
  50 + var $ua = navigator.userAgent;
  51 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  52 + this.scrHeight = window.innerHeight-400;
  53 + }
  54 + else
  55 + {
  56 + this.scrHeight = window.innerHeight-350;
  57 + }
  58 +}
44 59  
45 60 constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router,
46 61 private fb: FormBuilder, private modalService: BsModalService, public global: GlobalService,
47   - private _loadingService: LoadingService, private _confirmService: ConfirmService) { }
  62 + private _loadingService: LoadingService, private _confirmService: ConfirmService) { this.getScreenSize();}
48 63  
49 64 ngOnInit(): void {
50 65 this.divClass = 'col-sm-12';
... ... @@ -64,7 +79,7 @@ RecordDeleted: number[];
64 79 $('#fixed_hdr2').fxdHdrCol({
65 80 fixedCols: 0,
66 81 width: "100%",
67   - height: 300,
  82 + height: this.scrHeight,
68 83 colModal: [
69 84 { width: 150, align: 'center' },
70 85 { width: 490, align: 'center' },
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.html
... ... @@ -71,35 +71,14 @@
71 71 <div *ngIf="!adduserFrm.controls.LastName.valid && adduserFrm.controls.LastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last Name is required</div>
72 72 </div>
73 73 </div>
74   - <div *ngIf="this.router.url == '/adduser'">
75   - <div class="form-group" #accountNo *ngIf="this.commonService.UserType == 1 || this.commonService.UserType == 2">
76   - <label for="inputEmail3" class="col-sm-4 control-label">Account Number <span class="red">*</span> :</label>
77   - <div class="col-sm-7" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)" [dropup]="isDropup">
78   - <button id="button-dropup" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
79   - aria-controls="dropdown-dropup" style="height: 30px;">
80   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
81   - <span class="caret pull-right" style="margin-top: 6px;"></span>
82   - </button>
83   - <ul id="dropdown-basic" *dropdownMenu class="dropdown-menu" role="menu" aria-labelledby="button-basic" style="overflow: scroll; height: 200px;" (scroll)="onScroll($event)">
84   - <li role="menuitem">
85   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(0, 'Select')">Select</a>
86   - </li>
87   - <li role="menuitem" *ngFor="let item of tempLstAccountNumbers">
88   - <a class="dropdown-item" href="#" (click)="AccountNumberChanged(item.Id, item.AccountNumber)">{{item.AccountNumber}}</a>
89   - </li>
90   - </ul>
91   - </div>
92   - </div>
93   -
94   - <div class="form-group" #accountNo *ngIf="this.commonService.UserType > 2">
95   - <label for="inputEmail3" class="col-sm-4 control-label">Account Number <span class="red">*</span> :</label>
96   - <div class="col-sm-7" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)" [dropup]="isDropup">
97   - <button id="button-dropup" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
98   - aria-controls="dropdown-dropup" style="height: 30px;">
99   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
100   - </button>
  74 + <div class="form-group">
  75 + <label for="inputEmail3" class="col-sm-4 control-label">Account Number <span class="red">*</span> :</label>
  76 + <div class="col-sm-7">
  77 + <select id='accountSelect'>
  78 + <option *ngFor="let item of tempLstAccountNumbers" [value]="item.Id">{{item.AccountNumber}}</option>
  79 + </select>
  80 + </div>
101 81 </div>
102   - </div>
103 82 <div class="form-group">
104 83 <label for="inputEmail3" class="col-sm-4 control-label">User Type <span class="red">*</span> :</label>
105 84 <div class="col-sm-7">
... ... @@ -118,7 +97,6 @@
118 97 </select>
119 98 </div>
120 99 </div>
121   - </div>
122 100 <div class="row">
123 101 <div class="col-sm-12 marginTop20 text-center">
124 102 <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" (click)="AddUser()"><i class="fa fa-plus-circle"></i> Add</button>
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
... ... @@ -7,19 +7,18 @@ import { User,License } from &#39;../userentity/datamodel&#39;;
7 7 import { Http, Response } from '@angular/http';
8 8 import { GlobalService } from '../../shared/global';
9 9 import { LicenseService } from '../licenseentity/license.service';
10   -//import { DBOperation } from 'S';
11   -import { Observable } from 'rxjs/Observable';
12 10 import { ConfirmService } from '../../shared/confirm/confirm.service';
13 11 import 'rxjs/Rx';
14 12 import 'rxjs/add/operator/map';
15 13 import 'rxjs/add/operator/filter';
16 14 import { LoadingService } from '../../shared/loading.service';
  15 +declare var $:JQueryStatic;
17 16  
18 17 @Component({
19   - templateUrl: './adduser.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html'
  18 + templateUrl: './adduser.component.html'
20 19 })
21 20  
22   -export class AddUser implements OnInit, AfterViewInit {
  21 +export class AddUser implements OnInit {
23 22 user: User;
24 23 baseUrl: string = "User";
25 24 adduserFrm: FormGroup;
... ... @@ -29,35 +28,23 @@ export class AddUser implements OnInit, AfterViewInit {
29 28 alerts: string;
30 29 emailPattern = "^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$";
31 30 public UserTypeList: any;
32   - public AccountNumberList: any;
33 31 tempLstAccountNumbers: any;
34 32 public ProductEditionList: any;
35 33 modalTitle: string;
36   - accountDropDownText: string;
37   - loopIdx1: number;
38   - loopIdx2: number;
39   - lastScrollPos: number;
40 34 license: License;
41 35 LicenseTypeId:number=0;
42   - //@ViewChild("profileModal")
43   - //profileModal: ModalComponent;
44   - //errorMessage: any;
45   - @ViewChild('accountNo') accountNodiv: ElementRef;
46   - isDropup = false;
47   -
  36 + LicenseId:number=0;
  37 + AccountNumber:string='';
  38 +
48 39 constructor(private _loadingService: LoadingService, private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
49   - private _confirmService: ConfirmService, public commonService: GlobalService,private licenseService: LicenseService,
50   - ) { }
  40 + private _confirmService: ConfirmService, public commonService: GlobalService,private licenseService: LicenseService) { }
51 41  
52 42 ngOnInit(): void {
53   -
  43 + this._loadingService.ShowLoading("global-loading");
  44 + $('#accountSelect').chosen({allow_single_deselect:true,width:'300px',placeholder_text_single:'Select Account',search_contains:true });
  45 +
54 46 this.user = new User();
55 47 this.alerts = '';
56   - this.accountDropDownText = 'Select';
57   - this.loopIdx1 = 0;
58   - this.loopIdx2 = 0;
59   - this.lastScrollPos = 0
60   - //this.userservice.GetUserById(this.UserId);
61 48 this.adduserFrm = this.fb.group({
62 49 id: [''],
63 50 UserName: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]],
... ... @@ -71,24 +58,32 @@ export class AddUser implements OnInit, AfterViewInit {
71 58 ProductEditionId: ['', Validators.required]
72 59 });
73 60  
74   - this._loadingService.ShowLoading("global-loading");
75 61 this.bindUsers(0);
76   - if(this.router.url === '/adduser')
77   - {
78   - this.GetAccountNumber();
79   - }
80   - else{
81   - this._loadingService.HideLoading("global-loading");
82   - }
83   -
84   - }
85   - ngAfterViewInit() {
86   - if(this.router.url === '/adduser')
87   - {
88   - this.CheckDropDownOrUp(this.accountNodiv.nativeElement);
89   - }
90   -
  62 + if (this.commonService.UserType > 2) {
  63 + this.tempLstAccountNumbers=[];
  64 + this.tempLstAccountNumbers.push({Id:this.commonService.AccLicId,AccountNumber:this.commonService.AccountNumber});
  65 + this.AccountNumberChanged(this.commonService.AccLicId,this.commonService.AccountNumber);
  66 +
  67 + setTimeout(function(){
  68 + $('#accountSelect').prop('disabled', true).trigger("chosen:updated");
  69 + $('#accountSelect').trigger('chosen:updated');
  70 +
  71 + }, 500);
  72 + this._loadingService.HideLoading("global-loading");
  73 + }
  74 + else
  75 + {
  76 + this.GetAccountNumber();
  77 + }
  78 + $('#accountSelect')
  79 + .on('change', (e, args) => {
  80 + var selectedValue = Number(args.selected);
  81 + var selectedText= $(".chosen-single span" ).text();
  82 + this.AccountNumberChanged(selectedValue,selectedText);
  83 + });
  84 +
91 85 }
  86 +
92 87 redirect() {
93 88 this.router.navigate(['/']);
94 89 }
... ... @@ -149,40 +144,32 @@ export class AddUser implements OnInit, AfterViewInit {
149 144  
150 145 }
151 146 GetUserTypeByLicenseId() {
152   - var Accountnumber = this.adduserFrm.controls['AccountNumberId'].value;
153   - if (Accountnumber == "") { Accountnumber = 0 }
154 147 this.userservice.GetUserTypeByLicenseType({
155   - AccountNumberId: Accountnumber
156   - }).subscribe(x => { this.UserTypeList = x; }, error => this.error = <any>error);
  148 + AccountNumberId: this.LicenseId
  149 + }).subscribe(x => {
  150 + this.UserTypeList = x;
  151 + }, error => this.error = <any>error);
157 152 }
  153 +
158 154 GetAccountNumber() {
  155 + this.tempLstAccountNumbers=[];
159 156 this.userservice.GetAccountNumber()
160 157 .subscribe(x => {
161   - this.AccountNumberList = x;
162   - this.tempLstAccountNumbers = [];
163   - this.loopIdx1 = 0;
164   - this.loopIdx2 = 0;
165   - this.lastScrollPos = 0;
166   - if (this.commonService.UserType > 2) {
167   - this.accountDropDownText = this.commonService.AccountNumber;
168   - this.tempLstAccountNumbers.push(this.accountDropDownText);
169   - this.AccountNumberChanged(this.commonService.AccLicId, this.accountDropDownText);
170   - }
171   - else {
172   - for (var i = 0; i < 50; i++) {
173   - this.tempLstAccountNumbers.push(this.AccountNumberList[this.loopIdx2++]);
174   - }
  158 + var newOption = $('<option value=""></option>');
  159 + $('#accountSelect').append(newOption);
  160 + this.tempLstAccountNumbers=x;
  161 + setTimeout(function(){
  162 + $('#accountSelect').trigger('chosen:updated');
  163 + }, 500);
175 164  
176   - this._loadingService.HideLoading("global-loading");
177   - }
178   -
  165 + this._loadingService.HideLoading("global-loading");
179 166 },
180 167 error => this.error = <any>error);
181 168 }
182 169  
183 170 GetProductEdition() {
184 171 this.userservice.GetProductEdition({
185   - AccountNumberId: this.adduserFrm.controls['AccountNumberId'].value
  172 + AccountNumberId: this.LicenseId
186 173 })
187 174 .subscribe(x => {
188 175 console.log(x);
... ... @@ -191,72 +178,25 @@ export class AddUser implements OnInit, AfterViewInit {
191 178 }, error => this.error = <any>error);
192 179 }
193 180  
194   - AccountNumberChanged(LicenseId: number, SelectText: string) {
  181 + AccountNumberChanged(LicenseId: number, AccountNumber: string) {
195 182 this._loadingService.ShowLoading("global-loading");
196   - this.accountDropDownText = SelectText;
197 183 this.adduserFrm.controls['AccountNumberId'].setValue(LicenseId);
  184 + this.LicenseId=LicenseId;
  185 + this.AccountNumber=AccountNumber;
  186 +
  187 + this.licenseService.GetLicenseById(LicenseId)
  188 + .subscribe(st => {
  189 + this.license = st;
  190 + this.LicenseTypeId=this.license.LicenseTypeId;
  191 + },
  192 + error => this.error = <any>error);
  193 +
198 194 this.GetUserTypeByLicenseId();
199 195 this.GetProductEdition();
200 196  
201   - this.licenseService.GetLicenseById(LicenseId)
202   - .subscribe(st => {
203   - this.license = st;
204   - this.LicenseTypeId=this.license.LicenseTypeId;
205   - },
206   - error => this.error = <any>error);
207   -
208 197 return false;
209 198 }
210 199  
211   - onScroll($event) {
212   - if (this.lastScrollPos > $event.target.scrollTop) {
213   - for (var i = 0; i < 1000; i++) {
214   - if (this.loopIdx1 > 0)
215   - this.tempLstAccountNumbers.unshift(this.AccountNumberList[this.loopIdx1--]);
216   - }
217   - }
218   - else {
219   - for (var i = 0; i < 1000; i++) {
220   - if (this.loopIdx2 < this.AccountNumberList.length)
221   - this.tempLstAccountNumbers.push(this.AccountNumberList[this.loopIdx2++]);
222   - }
223   - }
224   - this.lastScrollPos = $event.target.scrollTop;
225   - }
226   -
227   - onOpenChange(data: boolean): void {
228   - if (!data) {
229   - this.loopIdx1 = 0;
230   - this.loopIdx2 = 0;
231   - this.tempLstAccountNumbers = [];
232   - for (var i = 0; i < 50; i++) {
233   - this.tempLstAccountNumbers.push(this.AccountNumberList[this.loopIdx2++]);
234   - }
235   - }
236   - }
237   -
238   - onKeyPress($event) {
239   - let FindItem = this.AccountNumberList.find(C => (C.AccountNumber.toLowerCase().indexOf($event.key) == 0));
240   - let prevIdx = 0;
241   - if (FindItem != null) {
242   - for (var i = 0; i < this.AccountNumberList.length; i++) {
243   - if (FindItem.Id == this.AccountNumberList[i].Id) {
244   - prevIdx = i;
245   - break;
246   - }
247   - }
248   - this.tempLstAccountNumbers = [];
249   - this.loopIdx1 = prevIdx;
250   - this.loopIdx2 = prevIdx;
251   - for (var i = 0; i < 50; i++) {
252   - if (this.loopIdx2 < this.AccountNumberList.length)
253   - this.tempLstAccountNumbers.push(this.AccountNumberList[this.loopIdx2++]);
254   - }
255   - this.lastScrollPos = 0;
256   - $event.target.nextElementSibling.scrollTop = 0;
257   - }
258   - }
259   -
260 200 public AddUser() {
261 201  
262 202 this.alerts = '';
... ... @@ -287,19 +227,16 @@ export class AddUser implements OnInit, AfterViewInit {
287 227 this.alerts += '</br><span>Last Name is required.</span>';
288 228 }
289 229  
290   - if(this.router.url === '/adduser')
291   - {
292   - if (this.adduserFrm.value.AccountNumberId == '0') {
293   - this.alerts += '</br><span>Please select account number</span>';
294   - }
295   - if (this.adduserFrm.value.UserTypeId == '0') {
296   - this.alerts += '</br><span>Please select user type</span>';
297   - }
298   - if (this.adduserFrm.value.ProductEditionId == '0') {
299   - this.alerts += '</br><span>Please select product edition</span>';
300   - }
301   - }
302   -
  230 + if (this.adduserFrm.value.AccountNumberId == '0') {
  231 + this.alerts += '</br><span>Please select account number</span>';
  232 + }
  233 + if (this.adduserFrm.value.UserTypeId == '0') {
  234 + this.alerts += '</br><span>Please select user type</span>';
  235 + }
  236 + if (this.adduserFrm.value.ProductEditionId == '0') {
  237 + this.alerts += '</br><span>Please select product edition</span>';
  238 + }
  239 +
303 240 if (this.alerts == '') {
304 241 var AddUserEntity = this.adduserFrm.value;
305 242 return this.userservice.InsertUser(AddUserEntity)
... ... @@ -313,7 +250,6 @@ export class AddUser implements OnInit, AfterViewInit {
313 250  
314 251 }
315 252 AfterInsertData(data) {
316   - //debugger;
317 253 if (data == "User added successfully") {
318 254 this.alerts = '';
319 255 this._confirmService.activate("User added successfully.", "alertMsg");
... ... @@ -327,44 +263,18 @@ export class AddUser implements OnInit, AfterViewInit {
327 263 _buildForm(lcid) {
328 264 this.adduserFrm = this.fb.group({
329 265 id: [''],
330   - UserName: ['', [Validators.required, Validators.minLength(8),this.noWhitespaceValidator]],
331   - Password: ['', [Validators.required, Validators.minLength(8),this.noWhitespaceValidator]],
332   - ConfirmPassword: ['', [Validators.required,this.noWhitespaceValidator]],
  266 + UserName: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]],
  267 + Password: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]],
  268 + ConfirmPassword: ['', [Validators.required,this.ClearWhitespaceValidator]],
333 269 FirstName: ['', [Validators.required,this.noWhitespaceValidator]],
334 270 LastName: ['', [Validators.required,this.noWhitespaceValidator]],
335   - EmailId: ['', [Validators.required,this.noWhitespaceValidator]],
  271 + EmailId: ['', [Validators.required,this.ClearWhitespaceValidator]],
336 272 AccountNumberId: ['', Validators.required],
337 273 UserTypeId: ['', Validators.required],
338 274 ProductEditionId: ['', Validators.required]
339 275 });
340 276 this.bindUsers(lcid);
341 277 }
342   - CheckDropDownOrUp(elm: any) {
343   - var dropDownTop = elm.children[0].offsetTop;
344   - var dropDownBottom = elm.children[0].offsetTop + elm.children[0].offsetHeight + 330;
345   - var screenBottom = (window.innerHeight) + window.pageYOffset;
346   - if (dropDownTop <= screenBottom && screenBottom <= dropDownBottom) {
347   - this.isDropup = true;
348   - }
349   - else {
350   - this.isDropup = false;
351   - }
352   - }
353   - @HostListener('window:scroll', ['$event'])
354   - onWindowScroll(event) {
355   - if(this.router.url === '/adduser')
356   - {
357   - this.CheckDropDownOrUp(this.accountNodiv.nativeElement);
358   - }
359   - }
360   -
361   - @HostListener('window:resize', ['$event'])
362   - onWindowResize(event) {
363   - if(this.router.url === '/adduser')
364   - {
365   - this.CheckDropDownOrUp(this.accountNodiv.nativeElement);
366   - }
367   - }
368 278 bindUsers(lcid) {
369 279 this.alerts = '';
370 280 if (this.commonService.UserTypeName == "Client Admin" || this.commonService.UserTypeName == "District Admin" )
... ... @@ -373,10 +283,12 @@ export class AddUser implements OnInit, AfterViewInit {
373 283 }
374 284 else
375 285 {
376   - this.accountDropDownText = 'Select';
377   - this.adduserFrm.controls['AccountNumberId'].setValue(0)
  286 + this.adduserFrm.controls['AccountNumberId'].setValue(0);
  287 + $('#accountSelect').val('').trigger('chosen:updated');
  288 + this.UserTypeList=[];
  289 + this.ProductEditionList=[];
378 290 }
379   -
  291 +
380 292 this.adduserFrm.controls['id'].setValue(0)
381 293 this.adduserFrm.controls['FirstName'].setValue('')
382 294 this.adduserFrm.controls['LastName'].setValue('')
... ... @@ -385,17 +297,9 @@ export class AddUser implements OnInit, AfterViewInit {
385 297 this.adduserFrm.controls['Password'].setValue('')
386 298 this.adduserFrm.controls['ConfirmPassword'].setValue('')
387 299  
388   - if(this.router.url === '/adduser')
389   - {
390   - this.adduserFrm.controls['UserTypeId'].setValue(0)
391   - }
392   - else
393   - {
394   - // for genral admin
395   - this.adduserFrm.controls['UserTypeId'].setValue(2)
396   - }
  300 + this.adduserFrm.controls['UserTypeId'].setValue(0)
397 301  
398   - this.adduserFrm.controls['ProductEditionId'].setValue(0)
  302 + this.adduserFrm.controls['ProductEditionId'].setValue(0);
399 303  
400 304 }
401 305 }
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/unblockuser.component.ts
... ... @@ -66,7 +66,6 @@ export class UnblockUser implements OnInit {
66 66 this.router.navigate(['/']);
67 67 }
68 68 onChange(Idx: number, Id: number, isChecked: boolean) {
69   - debugger;
70 69 if (isChecked) {
71 70 this.checkedRecords[Idx] = Id;
72 71 this.buttonStatus = true;
... ... @@ -77,7 +76,6 @@ export class UnblockUser implements OnInit {
77 76 }
78 77 }
79 78 openModal(template: TemplateRef<any>) {
80   - debugger;
81 79 this.display = 'block';
82 80 if (this.checkedRecords.filter(C => C > 0).length == 0) return;
83 81 this.modalRef = this.modalService.show(template);
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.ts
... ... @@ -15,7 +15,7 @@ import &#39;rxjs/add/operator/filter&#39;;
15 15 import { LoadingService } from '../../shared/loading.service';
16 16  
17 17 @Component({
18   - templateUrl:'./updateuserprofile.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html'
  18 + templateUrl:'./updateuserprofile.component.html'
19 19 })
20 20  
21 21 export class UpdateUserProfile implements OnInit {
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/usergroup.component.html
... ... @@ -51,14 +51,10 @@
51 51 <div class="col-sm-12">
52 52 <div class="form-group marginTop5">
53 53 <label for="AccountNumber" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
54   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0" *ngIf="this.global.UserType == 1 || this.global.UserType == 2">
55   - <select #accountvalue class="form-control input-sm " id="AccountNumber" (change)="AccountNumberChanged($event.target.value, $event)">
56   - <option value="0">Select</option>
57   - <option *ngFor="let item of lstAccountNumbers;" value="{{item.m_Item1}}">{{item.m_Item2}}</option>
58   - </select>
59   - </div>
60   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0" *ngIf="this.global.UserType > 2">
61   - <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
  54 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
  55 + <select id='accountSelect'>
  56 + <option *ngFor="let item of lstAccountNumbers" [value]="item.m_Item1">{{item.m_Item2}}</option>
  57 + </select>
62 58 </div>
63 59 </div>
64 60 </div>
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/usergroup.component.ts
... ... @@ -12,7 +12,8 @@ import { ConfirmService } from &#39;../../shared/confirm/confirm.service&#39;;
12 12 import { PagerComponent } from '../../shared/pager/pager.component';
13 13 import { LoadingService } from '../../shared/loading.service';
14 14 import { GlobalService } from '../../shared/global';
15   -declare var $: any;
  15 +declare var $:JQueryStatic;
  16 +declare var jQuery: any;
16 17  
17 18 @Component({
18 19 templateUrl: './usergroup.component.html'
... ... @@ -47,7 +48,6 @@ export class UserGroup implements OnInit, AfterViewChecked {
47 48 recordCountUser: number;
48 49 pageNoUser: number;
49 50 pageLengthUser: number;
50   - accountDropDownText: string;
51 51 loopIdx: number;
52 52 userGroupName: string;
53 53  
... ... @@ -56,12 +56,14 @@ export class UserGroup implements OnInit, AfterViewChecked {
56 56 private _confirmService: ConfirmService, public global: GlobalService, private _loadingService: LoadingService) { }
57 57  
58 58 ngOnInit(): void {
  59 + this._loadingService.ShowLoading("global-loading");
  60 + $('#accountSelect').chosen({allow_single_deselect:true,width:'200px',placeholder_text_single:'Select Account',search_contains:true});
  61 +
59 62 this.selectedRow = -1;
60 63 this.selectedId = -1;
61 64 this.divClass = 'col-sm-12';
62 65 this.license = new License();
63 66 this.alerts = '';
64   - this.accountDropDownText = 'Select';
65 67 this.loopIdx = 0;
66 68 this.userGroupName = '';
67 69 this.NoRecord = this.global.NoRecords;
... ... @@ -76,8 +78,29 @@ export class UserGroup implements OnInit, AfterViewChecked {
76 78 this.updateUserGroupFrm = this.fb.group({
77 79 userGroupName: ['', Validators.required],
78 80 });
79   - this.GetLicenseAccounts();
80   - this._loadingService.HideLoading("global-loading");
  81 + if (this.global.UserType > 2) {
  82 + this.lstAccountNumbers=[];
  83 + this.lstAccountNumbers.push({m_Item1:this.global.AccLicId,m_Item2:this.global.AccountNumber});
  84 + this.AccountNumberChanged(this.global.AccLicId);
  85 +
  86 + setTimeout(function(){
  87 + $('#accountSelect').prop('disabled', true).trigger("chosen:updated");
  88 + $('#accountSelect').trigger('chosen:updated');
  89 +
  90 + }, 500);
  91 + this._loadingService.HideLoading("global-loading");
  92 + }
  93 + else
  94 + {
  95 + this.GetLicenseAccounts();
  96 + }
  97 + $('#accountSelect')
  98 + .on('change', (e, args) => {
  99 + var selectedValue = Number(args.selected);
  100 + //var selectedText= $(".chosen-single span" ).text();
  101 + this.AccountNumberChanged(selectedValue);
  102 + });
  103 +
81 104 }
82 105  
83 106 openModal(template: TemplateRef<any>) {
... ... @@ -138,15 +161,18 @@ export class UserGroup implements OnInit, AfterViewChecked {
138 161 }
139 162  
140 163 GetLicenseAccounts() {
  164 + this.lstAccountNumbers=[];
141 165 this.userService.GetLicenseAccounts(1)
142   - .subscribe(st => {
143   - this.lstAccountNumbers = st;
144   - if (this.global.UserType > 2) {
145   - this.accountDropDownText = this.global.AccountNumber;
146   - this.AccountNumberChanged(this.global.AccLicId, this.accountDropDownText);
147   - }
148   - },
149   - error => this.error = <any>error);
  166 + .subscribe(st => {
  167 + var newOption = $('<option value=""></option>');
  168 + $('#accountSelect').append(newOption);
  169 + this.lstAccountNumbers=st;
  170 + setTimeout(function(){
  171 + $('#accountSelect').trigger('chosen:updated');
  172 + }, 500);
  173 + this._loadingService.HideLoading("global-loading");
  174 +
  175 + }, error => this.error = <any>error);
150 176 }
151 177  
152 178 GetLicenseUserGroups(evt: any) {
... ... @@ -181,8 +207,7 @@ export class UserGroup implements OnInit, AfterViewChecked {
181 207 this.GetLicenseUserGroupUsers('1, ' + this.pageLengthUser);
182 208 }
183 209  
184   - AccountNumberChanged(LicenseId: number, SelectText: string) {
185   - this.accountDropDownText = SelectText;
  210 + AccountNumberChanged(LicenseId: number) {
186 211 this.license.LicenseId = LicenseId;
187 212 this.selectedRow = -1;
188 213 this.selectedId = -1;
... ... @@ -336,7 +361,7 @@ export class UserGroup implements OnInit, AfterViewChecked {
336 361 }
337 362  
338 363 EditLicenseUserGroup() {
339   - $('.ft_r thead tr th:eq(0)').show();
  364 + jQuery('.ft_r thead tr th:eq(0)').show();
340 365 this.mode = 'Edit';
341 366 this.modalTitle = 'Edit User Group';
342 367 this.topPos = '100px';
... ... @@ -349,11 +374,11 @@ export class UserGroup implements OnInit, AfterViewChecked {
349 374 }
350 375  
351 376 ngAfterViewChecked() {
352   - $('#tblUserGroupUsers thead').css('width', $('#tblUserGroupUsers tbody tr:eq(0)').width());
  377 + jQuery('#tblUserGroupUsers thead').css('width', jQuery('#tblUserGroupUsers tbody tr:eq(0)').width());
353 378 }
354 379  
355 380 ViewLicenseUserGroup() {
356   - $('.ft_r thead tr th:eq(0)').hide();
  381 + jQuery('.ft_r thead tr th:eq(0)').hide();
357 382 this.mode = 'View';
358 383 this.modalTitle = 'View User Group';
359 384 this.topPos = '100px';
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
1   -import { Component, OnInit, AfterViewInit, ViewChild, AfterViewChecked } from '@angular/core';
  1 +import { Component, OnInit, AfterViewInit, ViewChild, AfterViewChecked,HostListener } from '@angular/core';
2 2 import { UserService } from './user.service';
3 3 import { Router } from '@angular/router';
4 4 import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
... ... @@ -67,9 +67,24 @@ export class UsersList implements OnInit, AfterViewChecked {
67 67 pageNo: number;
68 68 pageLength: number;
69 69 DisableAccountNumberControl: boolean;
  70 + // Declare height and width variables
  71 + scrHeight:any;
  72 + scrWidth:any;
  73 + @HostListener('window:resize', ['$event'])
  74 + getScreenSize(event?) {
  75 +
  76 + var $ua = navigator.userAgent;
  77 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  78 + this.scrHeight = window.innerHeight-540;
  79 + }
  80 + else
  81 + {
  82 + this.scrHeight = window.innerHeight-440;
  83 + }
  84 + }
70 85 constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
71 86 private _confirmService: ConfirmService, public global:GlobalService
72   - ) { }
  87 + ) {this.getScreenSize(); }
73 88  
74 89 ngOnInit(): void {
75 90 this.modalTitle = 'LIST USER';
... ... @@ -136,27 +151,28 @@ export class UsersList implements OnInit, AfterViewChecked {
136 151 $('#fixed_hdr2').fxdHdrCol({
137 152 fixedCols: 0,
138 153 width: "100%",
139   - height: 300,
  154 + height: this.scrHeight,
140 155 colModal: [
141 156 { width: 180, align: 'center' },
142   - { width: 230, align: 'center' },
143   - { width: 150, align: 'Center' },
144   - { width: 150, align: 'Center' },
145   - { width: 350, align: 'Center' },
  157 + { width: 160, align: 'center' },
  158 + { width: 130, align: 'Center' },
  159 + { width: 120, align: 'Center' },
146 160 { width: 200, align: 'Center' },
  161 + { width: 150, align: 'Center' },
147 162 { width: 130, align: 'Center' },
148 163 { width: 140, align: 'center' },
149   - { width: 280, align: 'Center' },
  164 + { width: 150, align: 'Center' },
150 165 { width: 180, align: 'center' },
151   - { width: 200, align: 'center' },
152   - { width: 170, align: 'center' },
153   - { width: 80, align: 'center' },
154   - { width: 150, align: 'center' },
155   - { width: 150, align: 'center' },
156   - { width: 180, align: 'Center' },
157   - { width: 400, align: 'Center' },
158   - { width: 150, align: 'center' },
159   - { width: 110, align: 'center' },
  166 + { width: 100, align: 'center' },
  167 + { width: 160, align: 'center' },
  168 +
  169 + // { width: 80, align: 'center' },
  170 + // { width: 150, align: 'center' },
  171 + // { width: 150, align: 'center' },
  172 + // { width: 180, align: 'Center' },
  173 + // { width: 400, align: 'Center' },
  174 + // { width: 150, align: 'center' },
  175 + // { width: 110, align: 'center' },
160 176 ],
161 177 sort: true
162 178 });
... ... @@ -169,8 +185,7 @@ export class UsersList implements OnInit, AfterViewChecked {
169 185 testScript.setAttribute("type", "text/javascript");
170 186 document.body.appendChild(testScript);
171 187 }
172   -
173   - //this.GetUserList();
  188 +
174 189 }
175 190 public noWhitespaceValidator(control: FormControl) {
176 191 // new validation for intial whaite space
... ... @@ -498,11 +513,7 @@ export class UsersList implements OnInit, AfterViewChecked {
498 513 else {
499 514 this.alerts ='We have encountered a technical error and same has been notified to our technical team.'
500 515 }
501   - //if (this.closeflag) {
502   - // this.close.emit(null);
503   - //}
504   - //else {
505   - //}
  516 +
506 517 }
507 518 AfterInsertDataManageRight(data) {
508 519  
... ... @@ -512,11 +523,7 @@ export class UsersList implements OnInit, AfterViewChecked {
512 523 this.checkedRecords = new Array<number>(this.UserManageRightsList.length);
513 524 this.UncheckedRecords = new Array<number>(this.UserManageRightsList.length);
514 525 }
515   - //if (this.closeflag) {
516   - // this.close.emit(null);
517   - //}
518   - //else {
519   - //}
  526 +
520 527 }
521 528 ResetFormFields() {
522 529 //this.ChangeUserIdFrm.reset()
... ...
400-SOURCECODE/Admin/src/app/shared/Pager/pager.component.html
1 1 <div class="row">
2   - <div class="col-lg-2 col-sm-4">
  2 + <div class="col-sm-3">
3 3 <div class="form-inline marginTop20">
4 4 <div class="form-group">
5 5 <label for="PerPage">Item's Per Page</label>
... ... @@ -12,7 +12,7 @@
12 12 </div>
13 13 </div>
14 14 </div>
15   - <div class="col-lg-5 col-sm-8">
  15 + <div class="col-sm-5">
16 16 <nav aria-label="...">
17 17 <ul class="pagination pagination-sm margin-btm0" (click)="PageNumberChange($event.target)">
18 18 <li [ngClass]="(pageShowList[0] == 1 ? 'disabled' : '')">
... ... @@ -41,7 +41,7 @@
41 41 </ul>
42 42 </nav>
43 43 </div>
44   - <div class="col-lg-3 col-sm-6">
  44 + <div class="col-sm-4">
45 45 <div class="form-inline marginTop20">
46 46 <div class="form-group">
47 47 <label for="Page">
... ... @@ -51,8 +51,8 @@
51 51 {{recordCount}}
52 52 </span> Page
53 53 </label>
54   - <select class="form-control input-sm" id="selectPage" (change)="PageNumberChange($event.target)">
55   - <option *ngFor="let item of pageList" [selected]="item == pageNo" [value]="item" (click)="PageNumberChange($event.target)">{{item}}</option>
  54 + <select class="form-control input-sm" id="selectPage" (change)="PageNumberChange($event.target.value)">
  55 + <option *ngFor="let item of pageList" [selected]="item == pageNo" [value]="item" >{{item}}</option>
56 56 </select>
57 57 </div>
58 58 </div>
... ...
400-SOURCECODE/Admin/src/app/shared/Pager/pager.component.ts
... ... @@ -68,7 +68,7 @@ export class PagerComponent implements OnInit, OnChanges {
68 68 }
69 69  
70 70 PageNumberChange(element: any){
71   - if(element.innerText != ''){
  71 + if(element.innerText !=undefined && element.innerText != ''){
72 72 if(element.innerText.indexOf('<') > -1) {
73 73 if(this.pageNo == 1) return;
74 74 this.pageNo = this.pageNo - 1;
... ... @@ -113,7 +113,7 @@ export class PagerComponent implements OnInit, OnChanges {
113 113 }
114 114 }
115 115 else{
116   - this.pageNo = parseInt(element.value);
  116 + this.pageNo = parseInt(element);
117 117 if(this.totalPages > 12){
118 118 if((this.pageNo % 12) != 0) {
119 119 for(var i = 0; i < 12; i++){
... ...
400-SOURCECODE/Admin/src/app/shared/global.ts
... ... @@ -48,7 +48,7 @@ export class GlobalService {
48 48  
49 49 this.NoRecords = 'No Record Found.';
50 50  
51   - this.hostURL = "http://192.168.43.9/API/Adminapi/";//Birendra Machine IP
  51 + this.hostURL = "http://localhost/API/Adminapi/";
52 52 this.LiveAPIURL = "http://interactiveanatomy.com/API/Adminapi/";
53 53 this.QAAPIURL = "http://qa.beta.interactiveanatomy.com/API/Adminapi/";
54 54 this.LocalURL = "http://localhost:4200";
... ... @@ -56,7 +56,7 @@ export class GlobalService {
56 56 // get protocol type
57 57 this.ProtocolType = window.location.protocol+"//";
58 58  
59   - if(window.location.hostname=="localhost")
  59 + if(window.location.host=="localhost:4200")
60 60 {
61 61 // for 'ng serve --open' command
62 62 //**** for localhost:4200 *****//
... ... @@ -69,8 +69,8 @@ export class GlobalService {
69 69  
70 70 }
71 71  
72   - if (this.resourceBaseUrl == this.ProtocolType+"192.168.43.9/API/Adminapi/") {
73   - if(window.location.hostname=="localhost")
  72 + if (this.resourceBaseUrl == this.ProtocolType+"localhost/API/Adminapi/") {
  73 + if(window.location.host=="localhost:4200")
74 74 {
75 75 // for 'ng serve --open' command
76 76 //**** for localhost:4200 *****//
... ... @@ -141,7 +141,13 @@ export class GlobalService {
141 141 }
142 142 compareTwoDates(todate: string, fromdate: string) {
143 143  
144   - if (new Date(todate) < new Date(fromdate)) {
  144 + if (fromdate ==null ||fromdate =='Invalid Date') {
  145 + this.ValidationMsg = 'From date is Invalid.'
  146 + }
  147 + else if (todate ==null ||todate =='Invalid Date') {
  148 + this.ValidationMsg = 'To date is Invalid.'
  149 + }
  150 + else if (new Date(todate) < new Date(fromdate)) {
145 151 this.ValidationMsg = 'The To date must be greater than the From date.'
146 152 }
147 153 else {
... ...
400-SOURCECODE/Admin/src/typings.d.ts
1 1 /* SystemJS module definition */
2 2 declare var module: NodeModule;
  3 +//declare var $: JQueryStatic;
  4 +//declare var jQuery: JQueryStatic;
3 5 interface NodeModule {
4 6 id: string;
5 7 }
  8 +interface JQuery {
  9 + chosen(options?:any):JQuery;
  10 +}
  11 +
... ...