Commit 588a25dd455e875a648d3367e32a0bbb25083d60
1 parent
fc539a2b
fixed muti lexicon issue
Showing
17 changed files
with
1950 additions
and
3604 deletions
400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs
... | ... | @@ -276,13 +276,15 @@ namespace AIAHTML5.API.Controllers |
276 | 276 | { |
277 | 277 | userInfo.userselectedModesty = modesty; |
278 | 278 | userInfo.userSelectedSkintone = skintone; |
279 | - } | |
279 | + userInfo.userLexicon = us.userLexicon; | |
280 | + } | |
280 | 281 | else |
281 | 282 | { |
282 | 283 | userInfo.userselectedModesty = null; |
283 | 284 | userInfo.userSelectedSkintone = null; |
285 | + userInfo.userLexicon = null; | |
284 | 286 | |
285 | - } | |
287 | + } | |
286 | 288 | } |
287 | 289 | |
288 | 290 | private static void CheckLicenseStatus(User userInfo) |
... | ... | @@ -427,6 +429,7 @@ namespace AIAHTML5.API.Controllers |
427 | 429 | int Status = 0; |
428 | 430 | dynamic responseData; |
429 | 431 | User settings = new User(); |
432 | + UserLexicon userLexicon = new UserLexicon(); | |
430 | 433 | |
431 | 434 | try |
432 | 435 | { |
... | ... | @@ -434,18 +437,20 @@ namespace AIAHTML5.API.Controllers |
434 | 437 | settings.userSelectedSkintone = jsonData["skintone"].Value<string>(); |
435 | 438 | settings.userSelectedFont = null; |
436 | 439 | settings.Id= jsonData["userId"].Value<int>(); |
440 | + userLexicon.primaryid= jsonData["primaryid"].Value<string>(); | |
441 | + userLexicon.secondryids = jsonData["secondryids"].Value<string>(); | |
442 | + settings.userLexicon= userLexicon; | |
437 | 443 | |
438 | - Status = AIAHTML5.API.Models.Users.SaveUserSelectedSettings(settings); | |
439 | - if (Status == 1) | |
440 | - | |
444 | + Status = AIAHTML5.API.Models.Users.SaveUserSelectedSettings(settings); | |
445 | + if (Status == 1) | |
441 | 446 | { |
442 | 447 | responseData = "1"; |
443 | - | |
444 | 448 | } |
445 | 449 | else |
446 | 450 | { |
447 | 451 | responseData = AIAConstants.SETTINGS_SAVE_FAILURE; |
448 | 452 | } |
453 | + | |
449 | 454 | return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(responseData) }; |
450 | 455 | |
451 | 456 | } | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... | ... | @@ -387,10 +387,10 @@ namespace AIAHTML5.API.Models |
387 | 387 | internal User GetSelectedSettings(int userId) |
388 | 388 | { |
389 | 389 | logger.Debug(" Inside GetSelectedSettings for userId = " + userId); |
390 | - | |
390 | + UserLexicon objlexicon = null; | |
391 | 391 | User objUser = null; |
392 | 392 | DBModel objModel = new DBModel(); |
393 | - | |
393 | + | |
394 | 394 | SqlConnection conn = new SqlConnection(dbConnectionString); |
395 | 395 | SqlCommand cmd = new SqlCommand(); |
396 | 396 | SqlDataAdapter adapter; |
... | ... | @@ -418,12 +418,17 @@ namespace AIAHTML5.API.Models |
418 | 418 | { |
419 | 419 | foreach (DataRow dr in dt.Rows) |
420 | 420 | { |
421 | + objlexicon = new UserLexicon(); | |
421 | 422 | objUser = new User(); |
422 | 423 | |
423 | 424 | objUser.Id = Convert.ToInt32(dr["UserId"]); |
424 | 425 | objUser.userSelectedSkintone = dr["Skintone"].ToString(); |
425 | 426 | objUser.userselectedModesty = dr["Modesty"].ToString(); |
426 | - logger.Debug("objUser.Id= " + objUser.Id + ",objUser.userselectedModesty= " + objUser.userselectedModesty + ",objUser.userSelectedSkintone= " + objUser.userSelectedSkintone + ",objUser.Password= " + objUser.Password + ",objUser.SecurityQuestionId= " + objUser.SecurityQuestionId); | |
427 | + objlexicon.primaryid= dr["PrimaryLexicon"].ToString(); | |
428 | + objlexicon.secondryids = dr["SecondryLexicon"].ToString(); | |
429 | + objUser.userLexicon = objlexicon; | |
430 | + | |
431 | + // logger.Debug("objUser.Id= " + objUser.Id + ",objUser.userselectedModesty= " + objUser.userselectedModesty + ",objUser.userSelectedSkintone= " + objUser.userSelectedSkintone + ",objUser.Password= " + objUser.Password + ",objUser.SecurityQuestionId= " + objUser.SecurityQuestionId); | |
427 | 432 | } |
428 | 433 | } |
429 | 434 | } |
... | ... | @@ -777,7 +782,9 @@ namespace AIAHTML5.API.Models |
777 | 782 | cmd.Parameters.AddWithValue("@iModesty", settings.userselectedModesty); |
778 | 783 | cmd.Parameters.AddWithValue("@iSkintone",settings. userSelectedSkintone); |
779 | 784 | cmd.Parameters.AddWithValue("@ifont","" ); |
780 | - | |
785 | + cmd.Parameters.AddWithValue("@pLexicon", settings.userLexicon.primaryid); | |
786 | + cmd.Parameters.AddWithValue("@sLexicon", settings.userLexicon.secondryids); | |
787 | + | |
781 | 788 | |
782 | 789 | result = cmd.ExecuteNonQuery(); |
783 | 790 | } | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/User.cs
... | ... | @@ -42,6 +42,7 @@ namespace AIAHTML5.API.Models |
42 | 42 | public String userSelectedSkintone { get; set; } |
43 | 43 | public string userselectedModesty { get; set; } |
44 | 44 | public string userSelectedFont { get; set; } |
45 | + public UserLexicon userLexicon { get; set; } | |
45 | 46 | |
46 | 47 | |
47 | 48 | public License LicenseInfo { get; set; } |
... | ... | @@ -169,4 +170,11 @@ namespace AIAHTML5.API.Models |
169 | 170 | |
170 | 171 | } |
171 | 172 | |
173 | + public class UserLexicon | |
174 | + { | |
175 | + public string primaryid { get; set; } | |
176 | + public string secondryids { get; set; } | |
177 | + | |
178 | + } | |
179 | + | |
172 | 180 | } |
173 | 181 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... | ... | @@ -1286,17 +1286,23 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1286 | 1286 | |
1287 | 1287 | $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); |
1288 | 1288 | |
1289 | - if (!$rootScope.isCallFromOtherModule) { | |
1289 | + | |
1290 | 1290 | var canvas = document.getElementById("canvasAI_" + windowviewid); |
1291 | 1291 | var canvasPaint = document.getElementById("canvasPaintAI_" + windowviewid); |
1292 | 1292 | |
1293 | - canvas.height = canvasDIvHeight; | |
1294 | - canvasPaint.height = canvasDIvHeight | |
1295 | - canvas.width = screen.width; | |
1296 | - canvasPaint.width = screen.width; | |
1293 | + canvas.height = canvasDIvHeight-30; | |
1294 | + canvasPaint.height = canvasDIvHeight-30; | |
1295 | + var $ua = navigator.userAgent; | |
1296 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
1297 | + canvas.width = screen.width-20; | |
1298 | + canvasPaint.width = screen.width-20; | |
1297 | 1299 | } |
1298 | - | |
1299 | - | |
1300 | + else | |
1301 | + { | |
1302 | + canvas.width = screen.width-40; | |
1303 | + canvasPaint.width = screen.width-40; | |
1304 | + } | |
1305 | + | |
1300 | 1306 | $scope.SetAIwindowStoreData(windowviewid, 'currentSlug', 'adam-images-detail'); |
1301 | 1307 | var openedImage = document.getElementById('aimage_' + windowviewid ); |
1302 | 1308 | openedImage.src = selectedAIImage; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -974,7 +974,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
974 | 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>' + |
975 | 975 | //'<div class="col-sm-12 img-thumbnail" align="center">' + |
976 | 976 | '<img id="ciimage_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden">' + |
977 | - '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;bottom:0px;margin-bottom:0px;padding:5px;width:100%">' + | |
977 | + '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;bottom:0px;margin-bottom:0px;padding:5px;width:99%">' + | |
978 | 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>' + |
979 | 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>' + |
980 | 980 | '</div>'+ |
... | ... | @@ -1086,10 +1086,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1086 | 1086 | |
1087 | 1087 | var canvas = document.getElementById("canvasCI_" + windowviewid); |
1088 | 1088 | var canvasPaint = document.getElementById("canvasPaintCI_" + windowviewid); |
1089 | - canvas.height = canvasDIvHeight; | |
1090 | - canvasPaint.height = canvasDIvHeight; | |
1091 | - canvas.width = screen.width-20; | |
1092 | - canvasPaint.width = screen.width-20; | |
1089 | + canvas.height = canvasDIvHeight-30; | |
1090 | + canvasPaint.height = canvasDIvHeight-30; | |
1091 | + | |
1092 | + var $ua = navigator.userAgent; | |
1093 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
1094 | + canvas.width = screen.width-20; | |
1095 | + canvasPaint.width = screen.width-20; | |
1096 | + } | |
1097 | + else | |
1098 | + { | |
1099 | + canvas.width = screen.width-40; | |
1100 | + canvasPaint.width = screen.width-40; | |
1101 | + } | |
1093 | 1102 | if(screen.height<400) |
1094 | 1103 | { |
1095 | 1104 | $('#summary_' + windowviewid).css("bottom", "-220px"); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -3183,8 +3183,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
3183 | 3183 | for (var i = 0; i < $rootScope.DaWindowData.length; i++) { |
3184 | 3184 | $scope.updatedWindowListForSaveCB.push({ |
3185 | 3185 | |
3186 | - // bodySystemTermList: $rootScope.DaWindowData[i].BodySystemData, | |
3187 | - isTitleBarVisible: false, //BodySystemData.isTitleBarVisible,//N | |
3186 | + isTitleBarVisible: false, | |
3188 | 3187 | highlightOptionsSelectedId: 0, |
3189 | 3188 | selectedStructureID: 0,//N |
3190 | 3189 | contentDescriptorId: 0, | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -65,7 +65,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
65 | 65 | 'fullTermlist':[], |
66 | 66 | 'isHighlightBodyWithCBTermData':false, |
67 | 67 | 'CurriculumTermData':[], |
68 | - 'primaryLexiconInd':[], | |
68 | + | |
69 | 69 | 'TermAnnotationText':[], |
70 | 70 | 'AllTerms':[], |
71 | 71 | 'actualTermNumber':0, |
... | ... | @@ -146,7 +146,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
146 | 146 | 'transparencyX': 0, |
147 | 147 | 'transparencyY': 0, |
148 | 148 | 'isTransparent': false, |
149 | - 'showHideAnnotations': 'showAnnotationStructure' | |
149 | + 'showHideAnnotations': 'showAnnotationStructure', | |
150 | + 'totalstructure': 0, | |
151 | + 'totalstructureLm': 0, | |
152 | + 'intervalObject': null, | |
153 | + 'isannotationReload': false | |
150 | 154 | |
151 | 155 | }; |
152 | 156 | return windata; |
... | ... | @@ -843,16 +847,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
843 | 847 | } |
844 | 848 | |
845 | 849 | $scope.loadTermData = function (windowviewid) { |
846 | - var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); | |
850 | + var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); | |
847 | 851 | // set gender |
848 | 852 | $scope.setGenderNameById(bodyViewId,windowviewid); |
853 | + $scope.LoadImageToExport(windowviewid); | |
849 | 854 | $rootScope.daloadSearchData(windowviewid); |
850 | 855 | //call time interval function until load Illustration data |
851 | 856 | var timeintval = null; |
852 | 857 | timeintval = $interval(function () { |
853 | 858 | var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); |
854 | 859 | if (vocabTermDataArray!=null) { |
855 | - $scope.stopVocab(); | |
860 | + $scope.stopVocab(timeintval); | |
856 | 861 | $scope.loadBodyView(windowviewid); |
857 | 862 | } |
858 | 863 | else |
... | ... | @@ -861,7 +866,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
861 | 866 | } |
862 | 867 | }, 100); |
863 | 868 | |
864 | - $scope.stopVocab = function () { | |
869 | + $scope.stopVocab = function (timeintval) { | |
865 | 870 | if (angular.isDefined(timeintval)) { |
866 | 871 | $interval.cancel(timeintval); |
867 | 872 | timeintval = undefined; |
... | ... | @@ -1109,7 +1114,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1109 | 1114 | var bodySystemListObj = document.getElementById("structureDropdownDA_" + windowviewid); |
1110 | 1115 | var len = bodySystemListObj!=null?(bodySystemListObj.id).split("_").length:0; |
1111 | 1116 | if (len>1) { |
1112 | - $scope.stopIntervalLoader(); | |
1117 | + $scope.stopIntervalLoader(timeintval); | |
1113 | 1118 | //wait until DOM element load of DA |
1114 | 1119 | $scope.daViewLoader(windowviewid); |
1115 | 1120 | } |
... | ... | @@ -1119,7 +1124,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1119 | 1124 | console.log("waiting for loading module"); |
1120 | 1125 | } |
1121 | 1126 | }, 200); |
1122 | - $scope.stopIntervalLoader = function () { | |
1127 | + $scope.stopIntervalLoader = function (timeintval) { | |
1123 | 1128 | if (angular.isDefined(timeintval)) { |
1124 | 1129 | $interval.cancel(timeintval); |
1125 | 1130 | timeintval = undefined; |
... | ... | @@ -1261,6 +1266,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1261 | 1266 | |
1262 | 1267 | }); |
1263 | 1268 | |
1269 | + //hide search data | |
1270 | + $("#topMenuBar .dropdown-toggle").on('click', function (event) { | |
1271 | + | |
1272 | + $timeout(function () { | |
1273 | + $scope.IsSearchVisible=false; | |
1274 | + | |
1275 | + }, 200); | |
1276 | + }); | |
1264 | 1277 | |
1265 | 1278 | $("#termlistfilter_"+windowviewid).scroll(function (event) { |
1266 | 1279 | |
... | ... | @@ -1301,6 +1314,35 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1301 | 1314 | } |
1302 | 1315 | }); |
1303 | 1316 | |
1317 | + // set search for language input | |
1318 | + $scope.langSearchLoad(windowviewid); | |
1319 | + | |
1320 | + } | |
1321 | + | |
1322 | + $scope.langSearchLoad= function(windowviewid) | |
1323 | + { | |
1324 | + $('#searchlangaugeDiv').empty(); | |
1325 | + $('#searchlangaugeDiv').css("display","none"); | |
1326 | + var languageArray = $rootScope.lexiconLanguageArray; | |
1327 | + | |
1328 | + if(languageArray.length>1) | |
1329 | + { | |
1330 | + $('#searchlangaugeDiv').css("display","block"); | |
1331 | + var option=''; | |
1332 | + for (var i = 0; i <= languageArray.length - 1; i++) { | |
1333 | + option=option+'<option value="' + languageArray[i].id + '">' + languageArray[i].language + '</option>'; | |
1334 | + } | |
1335 | + var $all = $('#searchlangaugeDiv').append( | |
1336 | + '<div class="btn-group col-sm-3 col-xs-7 col-md-2" style="margin-left:-15px;margin-right:-12px">'+ | |
1337 | + '<select class="form-control" id="searchLanguageLm_'+windowviewid+'" ng-blur="HideSearch()" style="height:30px;padding:4px 12px">'+ | |
1338 | + option+ | |
1339 | + '</select>'+ | |
1340 | + '</div>' | |
1341 | + ) | |
1342 | + $compile($all)($scope); | |
1343 | + | |
1344 | + } | |
1345 | + | |
1304 | 1346 | } |
1305 | 1347 | |
1306 | 1348 | $scope.CanvasDivScroll = function (windowviewid) { |
... | ... | @@ -1559,6 +1601,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1559 | 1601 | // side bar toggle |
1560 | 1602 | $("#sidebarId").attr("id", "sidebarId_" + windowviewid); |
1561 | 1603 | |
1604 | + $("#closeTermList").attr("id", "closeTermList_" + windowviewid); | |
1605 | + $("#selectLanguage").attr("id", "selectLanguage_" + windowviewid); | |
1606 | + $("#totalTerms").attr("id", "totalTerms_" + windowviewid); | |
1607 | + | |
1562 | 1608 | |
1563 | 1609 | // bodyview id |
1564 | 1610 | $("#Anterior").attr("id", "Anterior_" + windowviewid); |
... | ... | @@ -1583,77 +1629,90 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1583 | 1629 | $("#Skeletal").attr("id", "Skeletal_" + windowviewid); |
1584 | 1630 | $("#Urinary").attr("id", "Urinary_" + windowviewid); |
1585 | 1631 | |
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" />') | |
1632 | + var htm='<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" />'; | |
1633 | + | |
1634 | + var $all = $("#da-input_" +windowviewid).prepend(htm); | |
1587 | 1635 | $compile($all)($scope); |
1588 | 1636 | |
1637 | + | |
1589 | 1638 | } |
1590 | 1639 | |
1591 | 1640 | $rootScope.daloadSearchData = function (windowviewid) { |
1592 | 1641 | |
1593 | - $scope.SetwindowStoreData(windowviewid, 'primaryLexiconInd', []); | |
1594 | - var languageInd = []; | |
1595 | - var languageArray = []; | |
1642 | + $scope.SetwindowStoreData(windowviewid, 'vocabTempTermArray', []); | |
1643 | + $scope.SetwindowStoreData(windowviewid, 'daTermData', []); | |
1644 | + $scope.SetwindowStoreData(windowviewid, 'vocabTermArray', []); | |
1645 | + | |
1596 | 1646 | $scope.SetwindowStoreData(windowviewid, 'vocabTermDataArray', null); |
1597 | - var languageArray = $rootScope.lexiconLanguageArray; | |
1598 | - console.log('loadSearchDataForBodyView'); | |
1599 | - | |
1647 | + | |
1600 | 1648 | var currentBodyViewId = $scope.GetwindowStoreData(windowviewid, 'voId'); |
1601 | - $scope.vocabTempTermArray = []; | |
1602 | - | |
1603 | - for (var i = 0; i <= languageArray.length - 1; i++) { | |
1649 | + | |
1650 | + for (var i = 0; i <= $rootScope.lexiconLanguageArray.length - 1; i++) { | |
1651 | + | |
1604 | 1652 | var searchWorker = new Worker('search-wp.js'); |
1605 | 1653 | |
1654 | + var count= $scope.runningSearchWorkers.length==0?1:$scope.runningSearchWorkers.length+1; | |
1606 | 1655 | //push workers in array to further used the refernece to delete the workers |
1607 | - $scope.runningSearchWorkers.push({ 'workerName': searchWorker }) | |
1656 | + $scope.runningSearchWorkers.push({ 'workerName': searchWorker,'windowId':windowviewid,'count':count }); | |
1657 | + | |
1608 | 1658 | |
1609 | 1659 | searchWorker.postMessage({ |
1610 | 1660 | |
1611 | 1661 | 'currentBodyViewId': currentBodyViewId, |
1612 | - 'languageName': languageArray[i].language, | |
1613 | - 'languageID': languageArray[i].id | |
1662 | + 'languageName': $rootScope.lexiconLanguageArray[i].language, | |
1663 | + 'languageID': $rootScope.lexiconLanguageArray[i].id, | |
1664 | + 'windowid': windowviewid | |
1614 | 1665 | }) |
1615 | 1666 | |
1616 | 1667 | searchWorker.onmessage = function (e) { |
1617 | 1668 | |
1618 | 1669 | console.log('callback searchWorker , time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); |
1670 | + var vocabTempTermArray = []; | |
1671 | + var daTermData =$scope.GetwindowStoreData(e.data.winId, 'daTermData'); | |
1672 | + var vocabTermArray = $scope.GetwindowStoreData(e.data.winId, 'vocabTermArray'); | |
1619 | 1673 | |
1620 | - $scope.SetwindowStoreData(windowviewid,'TermNumberData',e.data.TermNumberData); | |
1621 | - | |
1622 | - // store image for export | |
1623 | - $scope.LoadImageToExport(windowviewid); | |
1674 | + daTermData.push({"WinId": e.data.winId, "language": e.data.language, "VocabTermData": e.data.TermNumberData}); | |
1675 | + vocabTermArray.push({"WinId": e.data.winId, "language": e.data.language, "vocabTermTxt": e.data.vocabTermTxt }); | |
1624 | 1676 | |
1625 | - // console.log("$rootScope.TermNumberData = " + e.data.TermNumberData.TermData.Term.length); | |
1677 | + $scope.SetwindowStoreData(e.data.winId, 'daTermData', daTermData); | |
1678 | + $scope.SetwindowStoreData(e.data.winId, 'vocabTermArray', vocabTermArray); | |
1626 | 1679 | |
1627 | - // console.log("$scope.BodyViewIDs" + e.data.bodyViewID); | |
1628 | - | |
1629 | - $scope.vocabTempTermArray.push({ "language": e.data.language, "VocabTermData": e.data.VocabTermData, "vocabTermTxt": e.data.vocabTermTxt }); | |
1630 | - | |
1631 | - | |
1632 | - | |
1633 | - if ($scope.vocabTempTermArray.length == $rootScope.lexiconLanguageArray.length) { | |
1634 | - $("#setting-spinner").css("display", "none"); | |
1680 | + if (vocabTermArray.length == $rootScope.lexiconLanguageArray.length) { | |
1681 | + | |
1635 | 1682 | for (var i = 0; i <= $rootScope.lexiconLanguageArray.length - 1; i++) { |
1683 | + | |
1684 | + if($rootScope.lexiconLanguageArray[0].language==daTermData[i].language) | |
1685 | + { | |
1686 | + //getting primary language term number | |
1636 | 1687 | |
1637 | - languageInd.push(i); | |
1688 | + $scope.SetwindowStoreData(daTermData[i].WinId,'TermNumberData',daTermData[i].VocabTermData); | |
1689 | + } | |
1638 | 1690 | |
1639 | - $scope.vocabTempTermArray[i].vocabTermTxt = new jinqJs() | |
1640 | - .from($scope.vocabTempTermArray[i].vocabTermTxt) | |
1641 | - .distinct('_TermText', '_ActualTermNumber') | |
1642 | - .orderBy([{ field: '_TermText', sort: 'asc' }]) | |
1643 | - .select('_ActualTermNumber', '_TermText', '_cdId'); | |
1691 | + if($rootScope.lexiconLanguageArray[0].language==vocabTermArray[i].language) | |
1692 | + { | |
1693 | + //keep primary language at top | |
1694 | + vocabTempTermArray.unshift(vocabTermArray[i]); | |
1695 | + } | |
1696 | + else | |
1697 | + { | |
1698 | + vocabTempTermArray.push(vocabTermArray[i]); | |
1699 | + } | |
1700 | + | |
1701 | + | |
1644 | 1702 | } |
1645 | 1703 | |
1646 | - $scope.SetwindowStoreData(windowviewid, 'primaryLexiconInd', languageInd); | |
1647 | - // add data vocabTermDataArray | |
1648 | - $scope.SetwindowStoreData(windowviewid, 'vocabTermDataArray', $scope.vocabTempTermArray); | |
1704 | + for (var i = 0; i <= $rootScope.lexiconLanguageArray.length - 1; i++) { | |
1649 | 1705 | |
1650 | - if ($rootScope.isListManagerMenuSelected) { | |
1651 | - $scope.loadListManger(windowviewid); | |
1652 | - } | |
1653 | - if ($scope.GetwindowStoreData(windowviewid,'isSearchClicked')) { | |
1654 | - $scope.FillSearchList(windowviewid); | |
1706 | + vocabTempTermArray[i].vocabTermTxt = new jinqJs() | |
1707 | + .from(vocabTempTermArray[i].vocabTermTxt) | |
1708 | + .distinct('_ActualTermNumber','_TermText') | |
1709 | + .orderBy([{ field: '_TermText', sort: 'asc' }]) | |
1710 | + .select(); | |
1655 | 1711 | } |
1656 | 1712 | |
1713 | + // add data vocabTermDataArray | |
1714 | + $scope.SetwindowStoreData(e.data.winId, 'vocabTermDataArray', vocabTempTermArray); | |
1715 | + | |
1657 | 1716 | // terminate search worker instances |
1658 | 1717 | if ($scope.runningSearchWorkers != null || $scope.runningSearchWorkers != undefined) { |
1659 | 1718 | |
... | ... | @@ -1661,17 +1720,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1661 | 1720 | if (workerCount > 0) { |
1662 | 1721 | for (var i = workerCount - 1; i >= 0; i--) { |
1663 | 1722 | |
1664 | - var runningWorker = $scope.runningSearchWorkers[i].workerName; | |
1665 | - runningWorker.terminate(); | |
1666 | - $scope.runningSearchWorkers.splice(i, 1); | |
1723 | + if($scope.runningSearchWorkers[i].windowId==e.data.winId) | |
1724 | + { | |
1725 | + var runningWorker = $scope.runningSearchWorkers[i].workerName; | |
1726 | + runningWorker.terminate(); | |
1727 | + $scope.runningSearchWorkers.splice(i, 1); | |
1728 | + } | |
1729 | + | |
1667 | 1730 | } |
1668 | 1731 | } |
1669 | 1732 | } |
1670 | - } | |
1671 | - | |
1672 | - console.log('JlinqActivity , time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); | |
1733 | + | |
1673 | 1734 | $scope.EnableUI(); |
1674 | 1735 | |
1736 | + } | |
1737 | + | |
1675 | 1738 | } |
1676 | 1739 | |
1677 | 1740 | } |
... | ... | @@ -1852,7 +1915,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1852 | 1915 | } |
1853 | 1916 | |
1854 | 1917 | $scope.LoadDefaultLayerImage = function (windowviewid) { |
1855 | - console.log('inside LoadDefaultLayerImage') | |
1856 | 1918 | $scope.SetwindowStoreData(windowviewid,'isNormalMode',true); |
1857 | 1919 | |
1858 | 1920 | //viewOrientationId is to pic coordinates of view and void is to pic image name from resopective json |
... | ... | @@ -1998,18 +2060,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1998 | 2060 | var serachTerm = $scope.daOpenInOtherModules.callOuts[i].termNumber.toString(); |
1999 | 2061 | var isFound = jQuery.inArray(serachTerm, CurriculumTermData) |
2000 | 2062 | if (isFound == -1) { |
2001 | - CurriculumTermData.push( | |
2002 | - | |
2003 | - { | |
2004 | - "transparentTermNumber": $scope.daOpenInOtherModules.callOuts[i].transparentTermNumber, | |
2005 | - "termNumber": $scope.daOpenInOtherModules.callOuts[i].termNumber, | |
2006 | - "istpboxTerm":$scope.daOpenInOtherModules.callOuts[i].istpboxTerm==undefined?0:$scope.daOpenInOtherModules.callOuts[i].istpboxTerm, | |
2007 | - "tips_x": $scope.daOpenInOtherModules.callOuts[i].tips_x, | |
2008 | - "tips_y": $scope.daOpenInOtherModules.callOuts[i].tips_y, | |
2009 | - "x": $scope.daOpenInOtherModules.callOuts[i].x, | |
2010 | - "y": $scope.daOpenInOtherModules.callOuts[i].y | |
2011 | - }); | |
2063 | + if($scope.daOpenInOtherModules.callOuts[i].tips_x!=undefined) | |
2064 | + { | |
2065 | + CurriculumTermData.push( | |
2066 | + { | |
2067 | + "transparentTermNumber": $scope.daOpenInOtherModules.callOuts[i].transparentTermNumber.toString(), | |
2068 | + "termNumber": $scope.daOpenInOtherModules.callOuts[i].termNumber.toString(), | |
2069 | + "istpboxTerm":$scope.daOpenInOtherModules.callOuts[i].istpboxTerm==undefined?0:$scope.daOpenInOtherModules.callOuts[i].istpboxTerm, | |
2070 | + "tips_x": $scope.daOpenInOtherModules.callOuts[i].tips_x, | |
2071 | + "tips_y": $scope.daOpenInOtherModules.callOuts[i].tips_y, | |
2072 | + "x": $scope.daOpenInOtherModules.callOuts[i].x, | |
2073 | + "y": $scope.daOpenInOtherModules.callOuts[i].y | |
2074 | + }); | |
2075 | + | |
2076 | + } | |
2077 | + else | |
2078 | + { | |
2079 | + CurriculumTermData.push({ | |
2080 | + "transparentTermNumber": $scope.daOpenInOtherModules.callOuts[i].transparentTermNumber.toString(), | |
2081 | + "termNumber": $scope.daOpenInOtherModules.callOuts[i].termNumber.toString(), | |
2082 | + "istpboxTerm":$scope.daOpenInOtherModules.callOuts[i].istpboxTerm==undefined?0:$scope.daOpenInOtherModules.callOuts[i].istpboxTerm, | |
2083 | + 'relatedTerm':$scope.daOpenInOtherModules.callOuts[i].relatedTerm.toString() | |
2084 | + }); | |
2012 | 2085 | |
2086 | + } | |
2013 | 2087 | } |
2014 | 2088 | |
2015 | 2089 | } |
... | ... | @@ -2149,9 +2223,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2149 | 2223 | var canvasID = "canvasDA_" + windowviewid; |
2150 | 2224 | |
2151 | 2225 | //register touch end and touchmove event for touch devices |
2152 | - var ATBarHtml = $("#canvasDivDA_" + windowviewid).append('<canvas id="' + canvasPaintID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="' + canvasID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" ng-click="onDrawingCanvasClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas>'); | |
2226 | + var ATBarHtml = $("#canvasDivDA_" + windowviewid).append('<canvas id="' + canvasPaintID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" width="2277" height="3256" class="canvas-annotationStyle1"></canvas><canvas id="' + canvasID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" ng-click="onDrawingCanvasClick($event)" width="2277" height="3256" class="canvas-annotationStyle"></canvas>'); | |
2153 | 2227 | $compile(ATBarHtml)($scope); |
2154 | - | |
2228 | + | |
2155 | 2229 | } |
2156 | 2230 | var isCBAnnotationActive= $scope.GetwindowStoreData(windowviewid, 'isCBAnnotationActive'); |
2157 | 2231 | |
... | ... | @@ -2427,6 +2501,39 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2427 | 2501 | $('#draggable_' + windowviewid).css("left", dragdivleft); |
2428 | 2502 | $('#draggable_' + windowviewid).css("top", dragdivtop); |
2429 | 2503 | |
2504 | + var canvas = document.getElementById("canvasDA_" + windowviewid); | |
2505 | + var canvasPaint = document.getElementById("canvasPaintDA_" + windowviewid); | |
2506 | + | |
2507 | + if(viewOrientationId!=1 && viewOrientationId!=4) | |
2508 | + { | |
2509 | + if(viewOrientationId==5) | |
2510 | + { | |
2511 | + //lateral arm | |
2512 | + canvas.height = 1500; | |
2513 | + canvasPaint.height =1500; | |
2514 | + | |
2515 | + } | |
2516 | + else if(viewOrientationId==6) | |
2517 | + { | |
2518 | + //medial arm | |
2519 | + canvas.height = 1400; | |
2520 | + canvasPaint.height = 1400; | |
2521 | + | |
2522 | + } | |
2523 | + var $ua = navigator.userAgent; | |
2524 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
2525 | + canvas.width = screen.width-145; | |
2526 | + canvasPaint.width = screen.width-145; | |
2527 | + } | |
2528 | + else | |
2529 | + { | |
2530 | + canvas.width = screen.width-165; | |
2531 | + canvasPaint.width = screen.width-165; | |
2532 | + } | |
2533 | + | |
2534 | + } | |
2535 | + | |
2536 | + | |
2430 | 2537 | } |
2431 | 2538 | |
2432 | 2539 | |
... | ... | @@ -2799,26 +2906,36 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2799 | 2906 | // Scroll canvas based on CB data |
2800 | 2907 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
2801 | 2908 | if (isHighlightBodyWithCBTermData == true) { |
2802 | - var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX; | |
2803 | - var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX; | |
2804 | - $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
2805 | - $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
2806 | - | |
2807 | - $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); | |
2808 | - $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); | |
2809 | - } | |
2909 | + if($scope.daOpenInOtherModules!=null) | |
2910 | + { | |
2911 | + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX; | |
2912 | + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX; | |
2913 | + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
2914 | + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
2915 | + | |
2916 | + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); | |
2917 | + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); | |
2918 | + } | |
2919 | + else | |
2920 | + { | |
2921 | + var canvasHScrollX = $scope.GetwindowStoreData(windowviewid,'CanvasDivLeftPosition'); | |
2922 | + var canvasVScrollX = $scope.GetwindowStoreData(windowviewid,'CanvasDivTopPosition'); | |
2923 | + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
2924 | + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
2925 | + } | |
2926 | + | |
2927 | + } | |
2810 | 2928 | |
2811 | 2929 | $scope.DisableUI(); |
2812 | - if ($scope.isSearchDataLoaded) { | |
2813 | - $scope.EnableUI(); | |
2814 | - } | |
2930 | + | |
2815 | 2931 | var isHighLight=$scope.GetwindowStoreData(windowviewid,'isHighLight'); |
2816 | 2932 | var isGenderChnage = $scope.GetwindowStoreData(windowviewid,'isGenderChnage'); |
2817 | 2933 | var isViewChange = $scope.GetwindowStoreData(windowviewid,'isViewChange'); |
2818 | 2934 | var isHighlightBodyByBodySystem=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem'); |
2819 | 2935 | var isListManagerSelected = $scope.GetwindowStoreData(windowviewid, 'isListManagerSelected'); |
2820 | 2936 | // var isTBACtive = $scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated'); |
2821 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated')) { | |
2937 | + var isLexiconReload= $scope.GetwindowStoreData(windowviewid, 'isannotationReload'); | |
2938 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated') && isLexiconReload==false) { | |
2822 | 2939 | |
2823 | 2940 | $scope.DrawTransparencyBox(windowviewid); |
2824 | 2941 | |
... | ... | @@ -2830,17 +2947,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2830 | 2947 | else if (isHighLight == true || (isListManagerSelected == true) || ((isGenderChnage == true) && (isHighLight == true)) |
2831 | 2948 | || ((isViewChange == true) && (isHighLight == true)) || isHighlightBodyByBodySystem == true) { |
2832 | 2949 | |
2833 | - console.log('1. $rootScope.isHighLight= ' + isHighLight) | |
2834 | - | |
2835 | 2950 | $scope.SetwindowStoreData(windowviewid, 'isHighLight', true); |
2836 | 2951 | $scope.DisableUI(); |
2837 | 2952 | $scope.highLightBody(windowviewid); |
2838 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
2953 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true && isLexiconReload==false) { | |
2839 | 2954 | $scope.CalculateDimensionsAndDrawTBox(windowviewid); |
2840 | 2955 | } |
2841 | 2956 | } |
2842 | 2957 | else { |
2843 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
2958 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true && isLexiconReload==false) { | |
2844 | 2959 | $scope.CalculateDimensionsAndDrawTBox(windowviewid); |
2845 | 2960 | } |
2846 | 2961 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
... | ... | @@ -3004,76 +3119,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3004 | 3119 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
3005 | 3120 | |
3006 | 3121 | previousHighlightList.push(RGBColor); |
3007 | - | |
3122 | + | |
3008 | 3123 | //Save Term Number to Showing Annotaion Text for CB Module |
3009 | 3124 | var AllTerms = $scope.GetwindowStoreData(windowviewid, 'AllTerms'); |
3010 | 3125 | AllTerms.push({ '_TermNumber': RGBColor }); |
3011 | 3126 | var fullTermlist = $scope.GetwindowStoreData(windowviewid, 'fullTermlist'); |
3012 | - fullTermlist.push(parseInt(RGBColor)); | |
3127 | + fullTermlist.push(RGBColor); | |
3128 | + | |
3129 | + $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
3013 | 3130 | |
3014 | - if ($scope.GetwindowStoreData(windowviewid,'isHighLight')) { | |
3015 | - | |
3016 | - if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { | |
3017 | - if ($scope.machedIcolorInBodyRegion.length > 0) { | |
3018 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == false) { | |
3019 | - for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) { | |
3020 | - var bodyRegionId = $scope.machedIcolorInBodyRegion[i]; | |
3021 | - | |
3022 | - var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid; | |
3023 | - var grayCanvas = document.getElementById(grayCanvasID); | |
3024 | - | |
3025 | - var grayCanvasContext = grayCanvas.getContext("2d"); | |
3026 | - var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList'); | |
3027 | - if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) { | |
3028 | - var grayImageData = grayImageDataList[bodyRegionId - 1]; | |
3029 | - grayCanvasContext.putImageData(grayImageData, 0, 0); | |
3030 | - } | |
3031 | - | |
3032 | - // for mirrored canvas | |
3033 | - var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); | |
3034 | - if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") { | |
3035 | - if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) { | |
3036 | - var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid; | |
3037 | - var grayCanvasMR = document.getElementById(grayCanvasID); | |
3038 | - | |
3039 | - var grayCanvasContextMR = grayCanvasMR.getContext("2d"); | |
3040 | - var grayImageMRDataList=$scope.GetwindowStoreData(windowviewid,'grayImageMRDataList'); | |
3041 | - if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) { | |
3042 | - var grayImageDataMR = grayImageMRDataList[bodyRegionId]; | |
3043 | - | |
3044 | - grayCanvasContextMR.putImageData(grayImageDataMR, 0, 0); | |
3045 | - } | |
3046 | - } | |
3047 | - } | |
3048 | - } | |
3049 | - } | |
3050 | - } | |
3051 | - } | |
3052 | - | |
3053 | - $scope.highLightBodyBasedOnIcolor(RGBColor,windowviewid); | |
3054 | - } | |
3055 | - | |
3056 | - | |
3057 | - //extarct clicked body part is extarct button is already enabled. | |
3058 | - | |
3059 | - if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { | |
3060 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == false) { | |
3061 | - $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); | |
3062 | - } | |
3063 | - $scope.enableExtract(false,windowviewid); | |
3064 | - } | |
3065 | - | |
3066 | - var annotationText | |
3067 | - var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); | |
3068 | - if (TermNData != null && TermNData != undefined) { | |
3069 | - | |
3070 | - annotationText = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
3071 | - } | |
3072 | - else | |
3073 | - { | |
3074 | - $rootScope.daloadSearchData(windowviewid); | |
3075 | - annotationText = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
3076 | - } | |
3077 | 3131 | var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); |
3078 | 3132 | |
3079 | 3133 | var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30; |
... | ... | @@ -3081,39 +3135,78 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3081 | 3135 | var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left; |
3082 | 3136 | var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top; |
3083 | 3137 | |
3138 | + var ismultiannotation=$scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON'); | |
3139 | + | |
3140 | + var newTerm=[] | |
3141 | + | |
3142 | + newTerm.push({ | |
3143 | + "termNumber": RGBColor, | |
3144 | + "istpboxTerm":0, | |
3145 | + "tips_x": tips_x, | |
3146 | + "tips_y": tips_y, | |
3147 | + "posx": posx, | |
3148 | + "posy": posy | |
3084 | 3149 | |
3085 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { | |
3150 | + }) | |
3086 | 3151 | |
3087 | - $scope.MultiLanguageAnnationArray = []; | |
3088 | 3152 | |
3089 | - $scope.saveTermNumberForSaveCB(windowviewid,true,RGBColor,tips_x,tips_y,posx,posy); | |
3090 | - | |
3091 | - if (TermAnnotationText.length>0) { | |
3092 | - for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
3153 | + if ($scope.GetwindowStoreData(windowviewid,'isHighLight') || $scope.GetwindowStoreData(windowviewid,'isExtract') == true) { | |
3154 | + var ActualTermNo = $scope.getActualTermNumber(RGBColor, windowviewid); | |
3093 | 3155 | |
3094 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
3156 | + if (ActualTermNo != null) { | |
3157 | + | |
3158 | + //3. Find Term No List Based on ActualTermNo | |
3159 | + var TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3160 | + | |
3161 | + if (TermList != null) { | |
3162 | + for(var i=0;i<TermList.length;i++) | |
3163 | + { | |
3164 | + if(TermList[i]._TermNumber!=RGBColor) | |
3165 | + { | |
3166 | + AllTerms.push({ '_TermNumber': TermList[i]._TermNumber }); | |
3167 | + fullTermlist.push(TermList[i]._TermNumber); | |
3168 | + //skip position for related term of RGBColor | |
3169 | + newTerm.push({ | |
3170 | + "termNumber":TermList[i]._TermNumber, | |
3171 | + "istpboxTerm":0 | |
3172 | + }) | |
3173 | + } | |
3174 | + | |
3175 | + } | |
3176 | + $scope.SetwindowStoreData(windowviewid, 'AllTerms',AllTerms); | |
3177 | + $scope.SetwindowStoreData(windowviewid, 'fullTermlist',fullTermlist); | |
3178 | + $scope.saveTermNumberForSaveCB(windowviewid,ismultiannotation,newTerm); | |
3179 | + | |
3095 | 3180 | } |
3096 | - | |
3097 | - $scope.createDynamicSpeechBubble(evt, MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3181 | + } | |
3182 | + | |
3183 | + if ($scope.GetwindowStoreData(windowviewid,'isHighLight')) { | |
3184 | + $scope.HighlightBodyByTermList(TermList,windowviewid); | |
3185 | + } | |
3186 | + else if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { | |
3187 | + if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == false) { | |
3188 | + $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); | |
3189 | + } | |
3190 | + $scope.enableExtract(false,windowviewid); | |
3098 | 3191 | } |
3099 | - } | |
3100 | - else | |
3192 | + } | |
3193 | + else | |
3101 | 3194 | { |
3102 | - $scope.MultiLanguageAnnationArray = []; | |
3103 | - $scope.saveTermNumberForSaveCB(windowviewid,false,RGBColor,tips_x,tips_y,posx,posy); | |
3104 | - | |
3105 | - if (TermAnnotationText.length > 0) { | |
3106 | - | |
3107 | - for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
3108 | - | |
3109 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
3110 | - } | |
3111 | - | |
3112 | - $scope.createDynamicSpeechBubble(evt, MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3113 | - } | |
3195 | + $scope.saveTermNumberForSaveCB(windowviewid,ismultiannotation,newTerm); | |
3114 | 3196 | |
3115 | 3197 | } |
3116 | 3198 | |
3199 | + $scope.MultiLanguageAnnationArray = []; | |
3200 | + | |
3201 | + if (TermAnnotationText.length > 0) { | |
3202 | + | |
3203 | + for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
3204 | + | |
3205 | + $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
3206 | + } | |
3207 | + | |
3208 | + $scope.createDynamicSpeechBubble(evt, MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3209 | + } | |
3117 | 3210 | |
3118 | 3211 | } |
3119 | 3212 | |
... | ... | @@ -3138,19 +3231,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3138 | 3231 | |
3139 | 3232 | if (bodyRegionId == 3) { |
3140 | 3233 | //set z index of hip canavs to fix the issue caused by overlapping of arm canavs on hip canavs. |
3141 | - imgCanvas.style.zIndex = "11000"; | |
3234 | + imgCanvas.style.zIndex = "1000"; | |
3142 | 3235 | } |
3143 | 3236 | if (bodyRegionId.match('modestyImg')) { |
3144 | 3237 | //added class to further access this canavs to show and hide leaf as per modesty seting |
3145 | 3238 | imgCanvas.className = 'modestyImg_'+windowviewid; |
3146 | 3239 | imgCanvas.style.visibility = 'hidden' |
3147 | 3240 | //set z index to make leaf canvas on top of hip canavs |
3148 | - imgCanvas.style.zIndex = "11000"; | |
3241 | + imgCanvas.style.zIndex = "1000"; | |
3149 | 3242 | } |
3150 | 3243 | var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); |
3151 | 3244 | |
3152 | 3245 | if ((bodyVid == 11 || bodyVid == 9) && bodyRegionId == 6) { |
3153 | - imgCanvas.style.zIndex = "11000"; | |
3246 | + imgCanvas.style.zIndex = "1000"; | |
3154 | 3247 | } |
3155 | 3248 | |
3156 | 3249 | if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { |
... | ... | @@ -3310,65 +3403,63 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3310 | 3403 | // Scroll canvas based on CB data |
3311 | 3404 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
3312 | 3405 | if (isHighlightBodyWithCBTermData == true) { |
3313 | - var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX; | |
3314 | - var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX; | |
3315 | - $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
3316 | - $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
3317 | - | |
3318 | - $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); | |
3319 | - $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); | |
3406 | + if($scope.daOpenInOtherModules!=null) | |
3407 | + { | |
3408 | + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX; | |
3409 | + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX; | |
3410 | + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
3411 | + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
3412 | + | |
3413 | + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); | |
3414 | + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); | |
3415 | + } | |
3416 | + else | |
3417 | + { | |
3418 | + var canvasHScrollX = $scope.GetwindowStoreData(windowviewid,'CanvasDivLeftPosition'); | |
3419 | + var canvasVScrollX = $scope.GetwindowStoreData(windowviewid,'CanvasDivTopPosition'); | |
3420 | + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
3421 | + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
3422 | + } | |
3423 | + | |
3320 | 3424 | } |
3321 | 3425 | |
3322 | 3426 | $scope.DisableUI(); |
3323 | - if ($scope.isSearchDataLoaded) { | |
3324 | - $scope.EnableUI(); | |
3325 | - } | |
3427 | + | |
3326 | 3428 | var isHighLight=$scope.GetwindowStoreData(windowviewid,'isHighLight'); |
3327 | 3429 | var isGenderChnage = $scope.GetwindowStoreData(windowviewid,'isGenderChnage'); |
3328 | 3430 | var isViewChange = $scope.GetwindowStoreData(windowviewid,'isViewChange'); |
3329 | 3431 | var isHighlightBodyByBodySystem=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem'); |
3330 | 3432 | var isExtract= $scope.GetwindowStoreData(windowviewid,'isExtract') |
3331 | 3433 | var isListManagerSelected = $scope.GetwindowStoreData(windowviewid, 'isListManagerSelected'); |
3332 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated')) { | |
3434 | + var isLexiconReload= $scope.GetwindowStoreData(windowviewid, 'isannotationReload'); | |
3435 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated') && isLexiconReload==false) { | |
3333 | 3436 | |
3334 | 3437 | $scope.DrawTransparencyBox(windowviewid); |
3335 | 3438 | |
3336 | 3439 | } |
3337 | - else if (isExtract == true) { | |
3440 | + else if (isExtract == true) { | |
3338 | 3441 | $scope.DisableUI(); |
3339 | 3442 | $scope.highLightBody(windowviewid); |
3340 | 3443 | |
3341 | - //Add code for Showing Annotation in Extract mode | |
3342 | - var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); | |
3343 | - if (isHighlightBodyWithCBTermData == true) { | |
3344 | - $scope.ShowCBDataBodyView(windowviewid); | |
3345 | - } | |
3346 | - $scope.EnableUI(); | |
3347 | - | |
3348 | 3444 | } |
3349 | 3445 | else if (isHighLight == true || (isListManagerSelected == true) || ((isGenderChnage == true) && (isHighLight == true)) |
3350 | 3446 | || ((isViewChange == true) && (isHighLight == true)) || isExtract == true || isHighlightBodyByBodySystem == true) { |
3351 | 3447 | |
3352 | - console.log('2. $rootScope.isHighLight= ' + isHighLight) | |
3353 | - | |
3354 | - console.log('inside start of non flipped. ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
3355 | 3448 | $scope.SetwindowStoreData(windowviewid,'isHighLight',true); |
3356 | 3449 | |
3357 | - console.log('just before highLightBody call'); | |
3358 | 3450 | $scope.DisableUI(); |
3359 | 3451 | $scope.highLightBody(windowviewid); |
3360 | 3452 | |
3361 | - console.log('just after highLightBody call'); | |
3362 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
3453 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true && isLexiconReload==false) { | |
3363 | 3454 | $scope.CalculateDimensionsAndDrawTBox(windowviewid); |
3364 | 3455 | } |
3365 | 3456 | |
3366 | 3457 | } |
3367 | - else { | |
3368 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
3458 | + else | |
3459 | + { | |
3460 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true && isLexiconReload==false) { | |
3369 | 3461 | $scope.CalculateDimensionsAndDrawTBox(windowviewid); |
3370 | 3462 | } |
3371 | - var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); | |
3372 | 3463 | if (isHighlightBodyWithCBTermData == true) { |
3373 | 3464 | $scope.ShowCBDataBodyView(windowviewid); |
3374 | 3465 | } |
... | ... | @@ -3494,36 +3585,32 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3494 | 3585 | |
3495 | 3586 | //Modesty ON |
3496 | 3587 | if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { |
3497 | - RGBColor = DA[0].figLeafTermId; | |
3498 | - annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor, null, windowviewid); | |
3499 | - } | |
3588 | + // clear prev annotation | |
3589 | + $scope.SetwindowStoreData(windowviewid,'TermAnnotationText',[]); | |
3590 | + RGBColor = DA[0].figLeafTermId; | |
3591 | + annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor, null, windowviewid); | |
3592 | + } | |
3500 | 3593 | //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to |
3501 | 3594 | //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er |
3502 | 3595 | // |
3503 | 3596 | else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') { |
3504 | 3597 | |
3505 | - bodyRegionId = maskCanvasId.split("_")[0].slice(-1); | |
3598 | + var bodyRegionId = maskCanvasId.split("_")[0].slice(-1); | |
3506 | 3599 | maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid; |
3507 | 3600 | |
3508 | 3601 | var maskCanvas = document.getElementById(maskCanvasId); |
3509 | 3602 | var maskCanvasContext = maskCanvas.getContext("2d"); |
3510 | 3603 | RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, BodyRegoinX, BodyRegoinY); |
3511 | - | |
3512 | 3604 | } |
3513 | - else { | |
3605 | + else | |
3606 | + { | |
3514 | 3607 | RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, BodyRegoinX, BodyRegoinY); |
3515 | - | |
3516 | 3608 | } |
3517 | - var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); | |
3518 | - if (TermNData != null && TermNData != undefined) { | |
3519 | - annotationText = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
3520 | 3609 | |
3521 | - } | |
3522 | - else { | |
3523 | - $rootScope.daloadSearchData(windowviewid); | |
3524 | - annotationText = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
3610 | + $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
3611 | + | |
3612 | + var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); | |
3525 | 3613 | |
3526 | - } | |
3527 | 3614 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
3528 | 3615 | |
3529 | 3616 | previousHighlightList.push(RGBColor); |
... | ... | @@ -3532,105 +3619,85 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3532 | 3619 | var AllTerms = $scope.GetwindowStoreData(windowviewid, 'AllTerms'); |
3533 | 3620 | AllTerms.push({ '_TermNumber': RGBColor }); |
3534 | 3621 | var fullTermlist = $scope.GetwindowStoreData(windowviewid, 'fullTermlist'); |
3535 | - fullTermlist.push(parseInt(RGBColor)); | |
3622 | + fullTermlist.push(RGBColor); | |
3623 | + | |
3624 | + var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30; | |
3625 | + var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10; | |
3626 | + var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left; | |
3627 | + var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top; | |
3536 | 3628 | |
3537 | - if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true) { | |
3538 | - if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { | |
3539 | - if ($scope.machedIcolorInBodyRegion.length > 0) { | |
3540 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == false) { | |
3541 | - for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) { | |
3542 | - var bodyRegionId = $scope.machedIcolorInBodyRegion[i]; | |
3629 | + var ismultiannotation=$scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON'); | |
3543 | 3630 | |
3544 | - var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid; | |
3545 | - var grayCanvas = document.getElementById(grayCanvasID); | |
3546 | - var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList'); | |
3547 | - var grayCanvasContext = grayCanvas.getContext("2d"); | |
3548 | - if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) { | |
3549 | - var grayImageData = grayImageDataList[bodyRegionId - 1]; | |
3550 | - grayCanvasContext.putImageData(grayImageData, 0, 0); | |
3551 | - } | |
3552 | - var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); | |
3553 | - // for unhighlight the mirrored body region | |
3554 | - if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") { | |
3555 | - if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) { | |
3556 | - var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid; | |
3557 | - var grayCanvasMR = document.getElementById(grayCanvasID); | |
3558 | - var grayImageMRDataList=$scope.GetwindowStoreData(windowviewid,'grayImageMRDataList'); | |
3559 | - var grayCanvasContextMR = grayCanvasMR.getContext("2d"); | |
3631 | + var newTerm=[] | |
3560 | 3632 | |
3561 | - if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) { | |
3633 | + newTerm.push({ | |
3634 | + "termNumber": RGBColor, | |
3635 | + "istpboxTerm":0, | |
3636 | + "tips_x": tips_x, | |
3637 | + "tips_y": tips_y, | |
3638 | + "posx": posx, | |
3639 | + "posy": posy | |
3562 | 3640 | |
3563 | - var grayImageDataMR = grayImageMRDataList[bodyRegionId]; | |
3641 | + }) | |
3564 | 3642 | |
3565 | - grayCanvasContextMR.putImageData(grayImageDataMR, 0, 0); | |
3643 | + if (($scope.GetwindowStoreData(windowviewid,'isHighLight') && !(maskCanvasId.match('modestyImg') && RGBColor != '000000') )|| $scope.GetwindowStoreData(windowviewid,'isExtract') == true) { | |
3644 | + var ActualTermNo = $scope.getActualTermNumber(RGBColor, windowviewid); | |
3566 | 3645 | |
3567 | - } | |
3568 | - } | |
3569 | - } | |
3646 | + if (ActualTermNo != null) { | |
3570 | 3647 | |
3648 | + //3. Find Term No List Based on ActualTermNo | |
3649 | + var TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3650 | + | |
3651 | + if (TermList != null) { | |
3652 | + for(var i=0;i<TermList.length;i++) | |
3653 | + { | |
3654 | + if(TermList[i]._TermNumber!=RGBColor) | |
3655 | + { | |
3656 | + AllTerms.push({ '_TermNumber': TermList[i]._TermNumber }); | |
3657 | + fullTermlist.push(TermList[i]._TermNumber); | |
3658 | + //skip position for related term of RGBColor | |
3659 | + newTerm.push({ | |
3660 | + "termNumber":TermList[i]._TermNumber, | |
3661 | + "istpboxTerm":0 | |
3662 | + }) | |
3571 | 3663 | } |
3664 | + | |
3572 | 3665 | } |
3666 | + $scope.SetwindowStoreData(windowviewid, 'AllTerms',AllTerms); | |
3667 | + $scope.SetwindowStoreData(windowviewid, 'fullTermlist',fullTermlist); | |
3668 | + $scope.saveTermNumberForSaveCB(windowviewid,ismultiannotation,newTerm); | |
3669 | + | |
3573 | 3670 | } |
3671 | + } | |
3672 | + | |
3673 | + if ($scope.GetwindowStoreData(windowviewid,'isHighLight')) { | |
3674 | + $scope.HighlightBodyByTermList(TermList,windowviewid); | |
3574 | 3675 | } |
3575 | - | |
3576 | - if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { } | |
3577 | - else | |
3578 | - { | |
3579 | - $scope.highLightBodyBasedOnIcolor(RGBColor,windowviewid); | |
3580 | - } | |
3581 | - | |
3582 | - } | |
3583 | - | |
3584 | - //extarct clisked body part is extarct button is already enabled. | |
3585 | - if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { | |
3586 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == false) { | |
3587 | - $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); | |
3676 | + else if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { | |
3677 | + if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == false) { | |
3678 | + $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); | |
3679 | + } | |
3680 | + $scope.enableExtract(false,windowviewid); | |
3588 | 3681 | } |
3589 | - $scope.enableExtract(false,windowviewid); | |
3590 | - } | |
3591 | - | |
3592 | - var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); | |
3593 | - | |
3594 | - var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30; | |
3595 | - var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10; | |
3596 | - var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left; | |
3597 | - var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top; | |
3598 | - | |
3599 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { | |
3600 | - $scope.MultiLanguageAnnationArray = []; | |
3601 | - $scope.saveTermNumberForSaveCB(windowviewid,true,RGBColor,tips_x,tips_y,posx,posy); | |
3682 | + } | |
3683 | + else | |
3684 | + { | |
3685 | + $scope.saveTermNumberForSaveCB(windowviewid,ismultiannotation,newTerm); | |
3602 | 3686 | |
3603 | - if (TermAnnotationText.length > 0) { | |
3604 | - for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
3687 | + } | |
3605 | 3688 | |
3606 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
3607 | - } | |
3689 | + $scope.MultiLanguageAnnationArray = []; | |
3690 | + if (TermAnnotationText.length > 0) { | |
3691 | + for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
3608 | 3692 | |
3609 | - $scope.createDynamicSpeechBubble(evt, MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3693 | + $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
3610 | 3694 | } |
3611 | 3695 | |
3696 | + $scope.createDynamicSpeechBubble(evt, MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3612 | 3697 | } |
3613 | - else | |
3614 | - { | |
3615 | - $scope.MultiLanguageAnnationArray = []; | |
3616 | 3698 | |
3617 | - $scope.saveTermNumberForSaveCB(windowviewid,false,RGBColor,tips_x,tips_y,posx,posy); | |
3618 | - | |
3619 | - if (TermAnnotationText.length > 0) { | |
3620 | - for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
3621 | - | |
3622 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
3623 | - } | |
3624 | - | |
3625 | - console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
3626 | - | |
3627 | - $scope.createDynamicSpeechBubble(evt, MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3628 | - } | |
3629 | - | |
3630 | - } | |
3631 | - | |
3632 | - | |
3633 | - } | |
3699 | + | |
3700 | + } | |
3634 | 3701 | |
3635 | 3702 | $scope.ShowCBDataBodyView = function(windowviewid) |
3636 | 3703 | { |
... | ... | @@ -3650,30 +3717,36 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3650 | 3717 | var CurriculumTermData = $scope.GetwindowStoreData(windowviewid,'CurriculumTermData'); |
3651 | 3718 | for (var i = 0; i < CurriculumTermData.length; i++) { |
3652 | 3719 | $scope.MultiLanguageAnnationArray = []; $scope.annotationTextArrayT1 = []; $scope.annotationTextArrayT2 = []; |
3653 | - var annotationtext = $scope.GetAnnotationText(parseInt(CurriculumTermData[i].termNumber),windowviewid); | |
3654 | - var TermAnnotationText = $scope.GetwindowStoreData(windowviewid, 'TermAnnotationText'); | |
3655 | - | |
3656 | - if(TermAnnotationText.length>0) | |
3720 | + | |
3721 | + if(CurriculumTermData[i].tips_x!=undefined) | |
3657 | 3722 | { |
3658 | - for (var j = 0; j <= TermAnnotationText.length - 1; j++) { | |
3659 | - | |
3660 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[j]); | |
3661 | - $scope.annotationTextArrayT1.push(TermAnnotationText[j]); | |
3723 | + $scope.GetAnnotationText(parseInt(CurriculumTermData[i].termNumber),windowviewid); | |
3724 | + var TermAnnotationText = $scope.GetwindowStoreData(windowviewid, 'TermAnnotationText'); | |
3725 | + | |
3726 | + if(TermAnnotationText.length>0) | |
3727 | + { | |
3728 | + for (var j = 0; j <= TermAnnotationText.length - 1; j++) { | |
3729 | + | |
3730 | + $scope.MultiLanguageAnnationArray.push(TermAnnotationText[j]); | |
3731 | + $scope.annotationTextArrayT1.push(TermAnnotationText[j]); | |
3732 | + } | |
3733 | + if (CurriculumTermData[i].transparentTermNumber == '0' || CurriculumTermData[i].transparentTermNumber == undefined) { | |
3734 | + | |
3735 | + $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y, windowviewid, CurriculumTermData[i].termNumber); | |
3736 | + } | |
3662 | 3737 | } |
3663 | - if (CurriculumTermData[i].transparentTermNumber == 0 || CurriculumTermData[i].transparentTermNumber == undefined) { | |
3664 | - | |
3665 | - $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y, windowviewid, CurriculumTermData[i].termNumber); | |
3666 | - } | |
3738 | + | |
3667 | 3739 | } |
3740 | + | |
3668 | 3741 | |
3669 | 3742 | //Load Tbox AnnotationText for Save CB |
3670 | - var annotationtext2 = $scope.GetAnnotationText(parseInt(CurriculumTermData[i].transparentTermNumber), windowviewid); | |
3743 | + $scope.GetAnnotationText(parseInt(CurriculumTermData[i].transparentTermNumber), windowviewid); | |
3671 | 3744 | var TermAnnotationText2 = $scope.GetwindowStoreData(windowviewid, 'TermAnnotationText'); |
3672 | 3745 | if (TermAnnotationText2.length > 0) { |
3673 | 3746 | for (var j = 0; j <= TermAnnotationText2.length - 1; j++) { |
3674 | 3747 | $scope.annotationTextArrayT2.push(TermAnnotationText2[j]) |
3675 | 3748 | } |
3676 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') && CurriculumTermData[i].transparentTermNumber != 0) { | |
3749 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') && CurriculumTermData[i].transparentTermNumber != '0') { | |
3677 | 3750 | |
3678 | 3751 | $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, false, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y, windowviewid, CurriculumTermData[i].transparentTermNumber); |
3679 | 3752 | } |
... | ... | @@ -3682,6 +3755,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3682 | 3755 | |
3683 | 3756 | } |
3684 | 3757 | |
3758 | + $scope.SetwindowStoreData(windowviewid, 'isannotationReload',false); | |
3685 | 3759 | $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false); |
3686 | 3760 | |
3687 | 3761 | // finish CB window load |
... | ... | @@ -3689,25 +3763,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3689 | 3763 | |
3690 | 3764 | } |
3691 | 3765 | |
3692 | - $scope.highLightBodyBasedOnIcolor = function (RGBColor,windowviewid) { | |
3693 | - //2. Find Actul Term No Based on Icolor. | |
3694 | - var ActualTermNo = $scope.getActualTermNumber(RGBColor, windowviewid); | |
3695 | - | |
3696 | - if (ActualTermNo != null) { | |
3697 | - | |
3698 | - //3. Find Term No List Based on ActualTermNo | |
3699 | - var TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3700 | - if (TermList != null) { | |
3701 | - $scope.HighlightBodyByTermList(TermList,windowviewid); | |
3702 | - } | |
3703 | - } | |
3704 | - } | |
3705 | - | |
3706 | 3766 | $scope.HighlightBodyOnExtract = function (windowviewid) { |
3707 | 3767 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
3708 | 3768 | var MaskCanvasData=$scope.GetwindowStoreData(windowviewid,'MaskCanvasData'); |
3709 | - console.log(' insode HighlightBodyOnExtract. MaskCanvasData length= ' + MaskCanvasData.length + ', previousHighlightList.length= ' + previousHighlightList.length) | |
3710 | - | |
3769 | + | |
3711 | 3770 | $("#btnExtract_" + windowviewid).removeClass("btn-black"); |
3712 | 3771 | $("#btnExtract_" + windowviewid).addClass("btn-primary"); |
3713 | 3772 | |
... | ... | @@ -3726,10 +3785,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3726 | 3785 | $scope.SetwindowStoreData(windowviewid,'layerNumber',$("#txtLayerNumberDA_" + windowviewid).val()); |
3727 | 3786 | |
3728 | 3787 | var multiTermList = []; |
3729 | - var CallBackBodyRegion = []; | |
3730 | 3788 | var selectedAnnotation; |
3731 | 3789 | var isListManagerSelected=$scope.GetwindowStoreData(windowviewid,'isListManagerSelected'); |
3732 | 3790 | var multiAnnotationIsON=$scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON'); |
3791 | + | |
3733 | 3792 | if ((previousHighlightList != null || previousHighlightList != undefined) && (previousHighlightList.length > 0) |
3734 | 3793 | && isListManagerSelected && multiAnnotationIsON == true) { |
3735 | 3794 | |
... | ... | @@ -3739,10 +3798,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3739 | 3798 | var ActualTermNo = $scope.getActualTermNumber(value, windowviewid); |
3740 | 3799 | selectedAnnotation = ActualTermNo; |
3741 | 3800 | if (ActualTermNo != null) { |
3742 | - var TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3743 | - if (TermList != null) { | |
3744 | - for (var i = 0; i < TermList.length; i++) { | |
3745 | - multiTermList.push(TermList[i]); | |
3801 | + $scope.TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3802 | + if ($scope.TermList != null) { | |
3803 | + for (var i = 0; i < $scope.TermList.length; i++) { | |
3804 | + multiTermList.push($scope.TermList[i]); | |
3746 | 3805 | } |
3747 | 3806 | } |
3748 | 3807 | } |
... | ... | @@ -3750,14 +3809,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3750 | 3809 | // to do |
3751 | 3810 | }); |
3752 | 3811 | } |
3753 | - else if (isListManagerSelected) { | |
3812 | + else if (isListManagerSelected) | |
3813 | + { | |
3754 | 3814 | |
3755 | 3815 | multiTermList = $scope.GetwindowStoreData(windowviewid,'AllTerms'); |
3756 | 3816 | selectedAnnotation = $scope.GetwindowStoreData(windowviewid,'actualTermNumber'); |
3817 | + $scope.TermList = $scope.getTermNumberList(selectedAnnotation,windowviewid); | |
3757 | 3818 | |
3758 | 3819 | } |
3759 | 3820 | else if ((previousHighlightList != null || previousHighlightList != undefined) && (previousHighlightList.length > 0) |
3760 | - && $rootScope.isCallFromOtherModule && multiAnnotationIsON == true) { | |
3821 | + && $rootScope.isCallFromOtherModule && multiAnnotationIsON == true) | |
3822 | + { | |
3761 | 3823 | |
3762 | 3824 | multiTermList = $scope.GetwindowStoreData(windowviewid,'AllTerms'); |
3763 | 3825 | angular.forEach(previousHighlightList, function (value, key) { |
... | ... | @@ -3765,10 +3827,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3765 | 3827 | var ActualTermNo = $scope.getActualTermNumber(value, windowviewid); |
3766 | 3828 | selectedAnnotation = ActualTermNo; |
3767 | 3829 | if (ActualTermNo != null) { |
3768 | - var TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3769 | - if (TermList != null) { | |
3770 | - for (var i = 0; i < TermList.length; i++) { | |
3771 | - multiTermList.push(TermList[i]); | |
3830 | + $scope.TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3831 | + if ($scope.TermList != null) { | |
3832 | + for (var i = 0; i < $scope.TermList.length; i++) { | |
3833 | + multiTermList.push($scope.TermList[i]); | |
3772 | 3834 | } |
3773 | 3835 | } |
3774 | 3836 | } |
... | ... | @@ -3782,10 +3844,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3782 | 3844 | var ActualTermNo = $scope.getActualTermNumber(value, windowviewid); |
3783 | 3845 | selectedAnnotation = ActualTermNo; |
3784 | 3846 | if (ActualTermNo != null) { |
3785 | - var TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3786 | - if (TermList != null) { | |
3787 | - for (var i = 0; i < TermList.length; i++) { | |
3788 | - multiTermList.push(TermList[i]); | |
3847 | + $scope.TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3848 | + if ($scope.TermList != null) { | |
3849 | + for (var i = 0; i < $scope.TermList.length; i++) { | |
3850 | + multiTermList.push($scope.TermList[i]); | |
3789 | 3851 | } |
3790 | 3852 | } |
3791 | 3853 | } |
... | ... | @@ -3794,14 +3856,26 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3794 | 3856 | }); |
3795 | 3857 | } |
3796 | 3858 | else if ($rootScope.isCallFromOtherModule) |
3797 | - { | |
3859 | + { | |
3860 | + //load firt time from cb | |
3798 | 3861 | multiTermList = $scope.GetwindowStoreData(windowviewid,'AllTerms'); |
3799 | - // get actual term to highlight/extract body on selected region | |
3800 | - selectedAnnotation= $scope.daOpenInOtherModules.selectedStructureId; | |
3862 | + var term=0 | |
3863 | + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid,'CurriculumTermData'); | |
3864 | + for (var i = 0; i < CurriculumTermData.length; i++) { | |
3865 | + | |
3866 | + if(CurriculumTermData[i].tips_x!=undefined) | |
3867 | + { | |
3868 | + term= CurriculumTermData[i].termNumber; | |
3869 | + } | |
3870 | + } | |
3871 | + | |
3872 | + var ActualTermNo = $scope.getActualTermNumber(term, windowviewid); | |
3873 | + selectedAnnotation = ActualTermNo; | |
3874 | + $scope.TermList = $scope.getTermNumberList(ActualTermNo,windowviewid); | |
3801 | 3875 | } |
3802 | 3876 | |
3803 | 3877 | //get term list to get term coordinates |
3804 | - $scope.TermList = $scope.getTermNumberList(selectedAnnotation,windowviewid); | |
3878 | + | |
3805 | 3879 | |
3806 | 3880 | $scope.termCoordinate = $scope.getTermCoordinate(selectedAnnotation); |
3807 | 3881 | |
... | ... | @@ -3822,6 +3896,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3822 | 3896 | loopLength = 1; |
3823 | 3897 | } |
3824 | 3898 | |
3899 | + var ExtractMasData=[]; | |
3900 | + var ReturnMasData=[]; | |
3901 | + | |
3825 | 3902 | if (loopLength !== 0) { |
3826 | 3903 | for (var x = 0; x < loopLength; x++) { |
3827 | 3904 | if (MaskCanvasData[x] != null || MaskCanvasData[x] != undefined) { |
... | ... | @@ -3831,8 +3908,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3831 | 3908 | maskData = MaskCanvasData[x].maskData; |
3832 | 3909 | |
3833 | 3910 | var coloredImageDataVar = null; |
3834 | - var grayImageDataVar = null; | |
3835 | - | |
3911 | + | |
3836 | 3912 | var white = null; |
3837 | 3913 | if (canvasId.match('_MR')) { |
3838 | 3914 | var coloredImageMRCanvasList=$scope.GetwindowStoreData(windowviewid,'coloredImageMRCanvasList'); |
... | ... | @@ -3859,40 +3935,54 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3859 | 3935 | |
3860 | 3936 | } |
3861 | 3937 | } |
3938 | + ExtractMasData.push({ | |
3939 | + 'maskCanvasData': maskData, | |
3940 | + 'coloredImageData': coloredImageDataVar, | |
3941 | + 'grayImageData': white, | |
3942 | + 'bodyRegionId': bodyRegionId, | |
3943 | + 'canvasId': canvasId | |
3862 | 3944 | |
3863 | - var worker = new Worker('extract-wp.js'); | |
3864 | - | |
3865 | - //push workers in array to further used the refernece to delete the workers | |
3866 | - $scope.runningWorkers.push({ 'workerName': worker }) | |
3867 | - | |
3868 | - console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white) | |
3945 | + }); | |
3869 | 3946 | |
3870 | - if (coloredImageDataVar != null && maskData != null && white != null) { | |
3871 | - worker.postMessage({ | |
3947 | + } | |
3948 | + } | |
3949 | + } | |
3950 | + for (var i = 0; i <= ExtractMasData.length - 1; i++) { | |
3951 | + | |
3952 | + var worker = new Worker('extract-wp.js'); | |
3872 | 3953 | |
3873 | - 'termList': multiTermList, | |
3874 | - 'maskCanvasData': maskData, | |
3875 | - 'coloredImageData': coloredImageDataVar, | |
3876 | - 'grayImageData': white, | |
3877 | - 'bodyRegionId': bodyRegionId, | |
3878 | - 'canvasId': canvasId | |
3954 | + //push workers in array to further used the refernece to delete the workers | |
3955 | + $scope.runningWorkers.push({ 'workerName': worker }) | |
3956 | + | |
3957 | + worker.postMessage({ | |
3879 | 3958 | |
3880 | - }); | |
3881 | - } | |
3882 | - worker.onmessage = function (e) { | |
3883 | - console.log('callback in extract for e.data.bodyRegionId: ' + e.data.bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); | |
3959 | + 'termList': multiTermList, | |
3960 | + 'maskCanvasData': ExtractMasData[i].maskCanvasData, | |
3961 | + 'coloredImageData': ExtractMasData[i].coloredImageData, | |
3962 | + 'grayImageData': ExtractMasData[i].grayImageData, | |
3963 | + 'bodyRegionId': ExtractMasData[i].bodyRegionId, | |
3964 | + 'canvasId': ExtractMasData[i].canvasId | |
3884 | 3965 | |
3885 | - var updatedData = e.data.value; | |
3966 | + }); | |
3886 | 3967 | |
3887 | - var bodyRegionId = e.data.bodyRegionId; | |
3968 | + worker.onmessage = function (e) { | |
3969 | + var canvasId = (e.data.canvasId).replace('_mci', ''); | |
3970 | + ReturnMasData.push({"updatedData": e.data.value, "bodyRegionId": e.data.bodyRegionId, "canvasId": canvasId}); | |
3888 | 3971 | |
3889 | - var canvasId = (e.data.canvasId).replace('_mci', ''); | |
3972 | + if(ReturnMasData.length==ExtractMasData.length) | |
3973 | + { | |
3974 | + for (var k = 0; k <= ReturnMasData.length - 1; k++) { | |
3890 | 3975 | |
3891 | - var grayCanvasID = canvasId; | |
3976 | + var updatedData = ReturnMasData[k].updatedData; | |
3892 | 3977 | |
3978 | + var bodyRegionId = ReturnMasData[k].bodyRegionId; | |
3979 | + | |
3980 | + var canvasId = ReturnMasData[k].canvasId; | |
3981 | + var grayCanvasID =canvasId; | |
3982 | + | |
3893 | 3983 | var grayCanvas = document.getElementById(grayCanvasID); |
3894 | 3984 | var grayCanvasContext = grayCanvas.getContext("2d"); |
3895 | - | |
3985 | + | |
3896 | 3986 | grayCanvasContext.putImageData(updatedData, 0, 0); |
3897 | 3987 | |
3898 | 3988 | //to resolve lateral arm black issue in highlight mode |
... | ... | @@ -3902,8 +3992,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3902 | 3992 | var canavsWidth = parseInt(grayCanvas.width); |
3903 | 3993 | var canavsHeight = parseInt(grayCanvas.height); |
3904 | 3994 | |
3905 | - console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) | |
3906 | - | |
3907 | 3995 | var imgData = grayCanvasContext.getImageData(0, 0, canavsWidth, canavsHeight); |
3908 | 3996 | var data = imgData.data; |
3909 | 3997 | var c = 0; |
... | ... | @@ -3916,76 +4004,71 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3916 | 4004 | grayCanvasContext.putImageData(imgData, 0, 0); |
3917 | 4005 | } |
3918 | 4006 | |
3919 | - CallBackBodyRegion.push(bodyRegionId); | |
3920 | - | |
3921 | - $scope.doAligneCanvasWithTerm = false; | |
3922 | - if (((viewOrientationId == '1') || (viewOrientationId == '4')) && (CallBackBodyRegion.length == 9)) { | |
3923 | - $scope.doAligneCanvasWithTerm = true; | |
3924 | - } | |
3925 | - else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && (CallBackBodyRegion.length == 5)) { | |
3926 | - $scope.doAligneCanvasWithTerm = true; | |
3927 | - } | |
3928 | - else if (((viewOrientationId == '5')) && (CallBackBodyRegion.length == 1)) { | |
3929 | - $scope.doAligneCanvasWithTerm = true; | |
3930 | - } | |
3931 | - else if (((viewOrientationId == '6')) && (CallBackBodyRegion.length == 1)) { | |
3932 | - $scope.doAligneCanvasWithTerm = true; | |
3933 | - } | |
3934 | - | |
3935 | - | |
3936 | 4007 | if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { |
3937 | 4008 | |
3938 | 4009 | // commented ,no further use |
3939 | 4010 | } |
3940 | - else { | |
4011 | + else | |
4012 | + { | |
3941 | 4013 | if (canvasId.match('_MR')) |
3942 | 4014 | { |
3943 | 4015 | var whiteImageMRDataList=$scope.GetwindowStoreData(windowviewid,'whiteImageMRDataList'); |
3944 | - whiteImageMRDataList[bodyRegionId] = e.data.value; | |
4016 | + whiteImageMRDataList[bodyRegionId] = updatedData; | |
3945 | 4017 | } |
3946 | - | |
4018 | + | |
3947 | 4019 | else { |
3948 | 4020 | var whiteImageDataList=$scope.GetwindowStoreData(windowviewid,'whiteImageDataList'); |
3949 | - whiteImageDataList[bodyRegionId - 1] = e.data.value; | |
4021 | + whiteImageDataList[bodyRegionId - 1] = updatedData; | |
3950 | 4022 | } |
3951 | 4023 | } |
3952 | - | |
3953 | - if ($scope.doAligneCanvasWithTerm == true) { | |
4024 | + } | |
4025 | + | |
4026 | + var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData'); | |
4027 | + if (isHighlightBodyWithCBTermData == false) { | |
3954 | 4028 | $scope.aligneCanvasWithTerm(windowviewid); |
4029 | + } | |
4030 | + else if (isHighlightBodyWithCBTermData == true) { | |
3955 | 4031 | |
3956 | - $scope.EnableUI(); | |
4032 | + $scope.ShowCBDataBodyView(windowviewid); | |
4033 | + } | |
3957 | 4034 | |
3958 | - // terminate extract and term-number worker instances | |
3959 | - if ($scope.runningWorkers != null || $scope.runningWorkers != undefined) { | |
3960 | - var workerCount = $scope.runningWorkers.length; | |
3961 | - if (workerCount > 0) { | |
3962 | - for (var i = workerCount - 1; i >= 0; i--) { | |
3963 | - var runningWorker = $scope.runningWorkers[i].workerName; | |
3964 | - runningWorker.terminate(); | |
3965 | - $scope.runningWorkers.splice(i, 1); | |
3966 | - } | |
3967 | - } | |
4035 | + // terminate extract and term-number worker instances | |
4036 | + if ($scope.runningWorkers != null || $scope.runningWorkers != undefined) { | |
4037 | + var workerCount = $scope.runningWorkers.length; | |
4038 | + if (workerCount > 0) { | |
4039 | + for (var i = workerCount - 1; i >= 0; i--) { | |
4040 | + var runningWorker = $scope.runningWorkers[i].workerName; | |
4041 | + runningWorker.terminate(); | |
4042 | + $scope.runningWorkers.splice(i, 1); | |
3968 | 4043 | } |
3969 | 4044 | } |
3970 | - //Set Canvas Position which saved from CB module | |
3971 | - if ($rootScope.isCallFromOtherModule) { | |
3972 | - var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX; | |
3973 | - var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX; | |
3974 | - $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
3975 | - $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
3976 | - | |
3977 | - $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); | |
3978 | - $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); | |
3979 | - } | |
3980 | - | |
3981 | - }; | |
3982 | - worker.onerror = function (e) { | |
3983 | - $rootScope.message = 'Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message; | |
3984 | - $("#daMessageModal").modal('show'); | |
3985 | - }; | |
4045 | + } | |
4046 | + | |
4047 | + //Set Canvas Position which saved from CB module | |
4048 | + if ($rootScope.isCallFromOtherModule) { | |
4049 | + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX; | |
4050 | + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX; | |
4051 | + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX); | |
4052 | + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX); | |
4053 | + | |
4054 | + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); | |
4055 | + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); | |
4056 | + } | |
4057 | + | |
4058 | + $scope.EnableUI(); | |
4059 | + ReturnMasData=[]; | |
4060 | + ExtractMasData=[]; | |
4061 | + | |
3986 | 4062 | } |
3987 | - } | |
3988 | - } | |
4063 | + | |
4064 | + }; | |
4065 | + worker.onerror = function (e) { | |
4066 | + $rootScope.message = 'Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message; | |
4067 | + $("#daMessageModal").modal('show'); | |
4068 | + }; | |
4069 | + | |
4070 | + } | |
4071 | + | |
3989 | 4072 | }, 500) |
3990 | 4073 | |
3991 | 4074 | } |
... | ... | @@ -3996,9 +4079,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3996 | 4079 | $scope.SetwindowStoreData(windowviewid,'currentLayerNumber',nlayer); |
3997 | 4080 | |
3998 | 4081 | $scope.SetwindowStoreData(windowviewid,'layerNumber',$("#txtLayerNumberDA_" + windowviewid).val()); |
3999 | - //$scope.DisableUI(); | |
4000 | - console.log('HighlightBodyByTermList is called'); | |
4001 | - | |
4082 | + | |
4002 | 4083 | $scope.highlightedBR = []; |
4003 | 4084 | $scope.runningWorkers = []; |
4004 | 4085 | ; |
... | ... | @@ -4242,10 +4323,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4242 | 4323 | $scope.TermList = $scope.getTermNumberList(lastSelectedAnnotation,windowviewid); |
4243 | 4324 | $scope.termCoordinate = $scope.getTermCoordinate(lastSelectedAnnotation); |
4244 | 4325 | |
4245 | - console.log('last selected Annotation= ' + lastSelectedAnnotation); | |
4246 | - console.log('termListCount= ' + $scope.TermList.length); | |
4247 | - console.log('termCoordinate= ' + $scope.termCoordinate.x); | |
4248 | - | |
4249 | 4326 | $scope.aligneCanvasWithTerm(windowviewid); |
4250 | 4327 | } |
4251 | 4328 | } |
... | ... | @@ -4607,8 +4684,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4607 | 4684 | |
4608 | 4685 | }); |
4609 | 4686 | |
4610 | - console.log('createTermListByPreviousTermsAndHighlight is called'); | |
4611 | - | |
4612 | 4687 | if ((multiTermList != undefined && multiTermList != null) && multiTermList.length > 0) { |
4613 | 4688 | |
4614 | 4689 | $timeout(function () { $scope.HighlightBodyByTermList(multiTermList,windowviewid); }, 50); |
... | ... | @@ -4664,9 +4739,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4664 | 4739 | var figLeafTermNo = 5868; // to do declare constant for this |
4665 | 4740 | |
4666 | 4741 | if (parseInt(termNumber) != parseInt(figLeafTermNo)) { |
4667 | - $scope.TermNumber = termNumber; | |
4668 | - for (var j = 0; j <= $rootScope.lexiconLanguageArray.length - 1; j++) { | |
4669 | - | |
4670 | 4742 | var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); |
4671 | 4743 | |
4672 | 4744 | if (TermNData != null || TermNData != undefined) { |
... | ... | @@ -4677,43 +4749,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4677 | 4749 | .select(); |
4678 | 4750 | |
4679 | 4751 | if ($scope.matchedTermNoData != null || $scope.matchedTermNoData != undefined) { |
4752 | + for (var j = 0; j <= $rootScope.lexiconLanguageArray.length - 1; j++) { | |
4680 | 4753 | //1. |
4681 | - var actualTermNo = 0; | |
4682 | - for (var z = 0; z < $scope.matchedTermNoData.length; z++) { | |
4683 | - //send actual term no to get the term text. | |
4684 | - actualTermNo = $scope.matchedTermNoData[0]._ActualTermNumber; | |
4685 | - annotationText = $scope.GetAnnotationBasedOnActualTermNo(actualTermNo, $rootScope.lexiconLanguageArray[j].language, windowviewid); | |
4686 | - annotation.push(annotationText); | |
4687 | - $scope.SetwindowStoreData(windowviewid,'TermAnnotationText',annotation); | |
4688 | - $scope.SetwindowStoreData(windowviewid,'actualTermNumber',actualTermNo); | |
4689 | - break; | |
4690 | - }; | |
4691 | - } | |
4692 | - else { | |
4693 | - // send term no to vocab json data to get the text | |
4754 | + var actualTermNo = 0; | |
4755 | + for (var z = 0; z < $scope.matchedTermNoData.length; z++) { | |
4756 | + //send actual term no to get the term text. | |
4757 | + actualTermNo = $scope.matchedTermNoData[0]._ActualTermNumber; | |
4758 | + annotationText = $scope.GetAnnotationBasedOnActualTermNo(actualTermNo, $rootScope.lexiconLanguageArray[j].language, windowviewid); | |
4759 | + annotation.push(annotationText); | |
4760 | + $scope.SetwindowStoreData(windowviewid,'TermAnnotationText',annotation); | |
4761 | + $scope.SetwindowStoreData(windowviewid,'actualTermNumber',actualTermNo); | |
4762 | + break; | |
4763 | + }; | |
4764 | + } | |
4765 | + | |
4694 | 4766 | } |
4767 | + | |
4695 | 4768 | } |
4696 | - else { | |
4697 | - var currentBodyViewId = $scope.GetwindowStoreData(windowviewid,'voId'); | |
4698 | - var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json'; | |
4699 | - DataService.getAnotherJson(termJsonPath) | |
4700 | - .then( | |
4701 | - function (result) { | |
4702 | - $scope.SetwindowStoreData(windowviewid,'TermNumberData',result); | |
4703 | - $scope.GetAnnotationText(termNumber,windowviewid); | |
4704 | - }) | |
4705 | - } | |
4706 | - } | |
4707 | 4769 | |
4708 | 4770 | } |
4709 | 4771 | |
4710 | - return annotation; | |
4711 | 4772 | } |
4712 | 4773 | |
4713 | 4774 | $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo, language, windowviewid) { |
4714 | - // clear prev annotation | |
4715 | - $scope.SetwindowStoreData(windowviewid,'TermAnnotationText',[]); | |
4716 | - | |
4775 | + | |
4717 | 4776 | var Annotation; |
4718 | 4777 | |
4719 | 4778 | var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); |
... | ... | @@ -4722,9 +4781,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4722 | 4781 | |
4723 | 4782 | if (vocabTermDataArray[j].language == language) { |
4724 | 4783 | |
4725 | - if (vocabTermDataArray[j].VocabTermData != null || vocabTermDataArray[j].VocabTermData != undefined) { | |
4784 | + if (vocabTermDataArray[j].vocabTermTxt != null || vocabTermDataArray[j].vocabTermTxt != undefined) { | |
4726 | 4785 | $scope.matchedActualTermData = new jinqJs() |
4727 | - .from(vocabTermDataArray[j].VocabTermData.VocabTerms.Term) | |
4786 | + .from(vocabTermDataArray[j].vocabTermTxt) | |
4728 | 4787 | .where('_ActualTermNumber == ' + actualTermNo) |
4729 | 4788 | .select(); |
4730 | 4789 | |
... | ... | @@ -5119,6 +5178,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5119 | 5178 | } |
5120 | 5179 | |
5121 | 5180 | }); |
5181 | + $('.dynCross_'+windowviewid).unbind('click');//remove multiple event | |
5122 | 5182 | $('.dynCross_'+windowviewid).on('click', function (evt) { |
5123 | 5183 | if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) { |
5124 | 5184 | var removeid=$(this).parent().parent().attr('id'); |
... | ... | @@ -5134,10 +5194,52 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5134 | 5194 | var termNumber = removeid.split("-")[1]; |
5135 | 5195 | var CurriculumTermData = []; |
5136 | 5196 | CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); |
5197 | + | |
5198 | + //get related term of highted or extract body view | |
5199 | + var matchList=[]; | |
5200 | + var relatedTermList = new jinqJs() | |
5201 | + .from(CurriculumTermData) | |
5202 | + .where( function(row, index) { | |
5203 | + return ( (row.relatedTerm == termNumber || row.termNumber == termNumber) && row.istpboxTerm==0 ); | |
5204 | + }) | |
5205 | + //.where('relatedTerm == ' + termNumber,"termNumber == " + termNumber) | |
5206 | + .select('termNumber'); | |
5207 | + | |
5208 | + for(var tm=0;tm<relatedTermList.length;tm++) | |
5209 | + { | |
5210 | + matchList.push(relatedTermList[tm].termNumber); | |
5211 | + } | |
5212 | + | |
5213 | + //delete related term | |
5137 | 5214 | CurriculumTermData = new jinqJs() |
5138 | - .from(CurriculumTermData) | |
5139 | - .delete().at("termNumber == " + termNumber).select(); | |
5215 | + .from(CurriculumTermData) | |
5216 | + .delete().at('relatedTerm == ' + termNumber,'istpboxTerm == ' + 0) | |
5217 | + .select() | |
5140 | 5218 | |
5219 | + | |
5220 | + //delete annotation term | |
5221 | + CurriculumTermData = new jinqJs() | |
5222 | + .from(CurriculumTermData) | |
5223 | + .delete().at("termNumber == " + termNumber,'istpboxTerm == ' + 0).select(); | |
5224 | + | |
5225 | + //update ter list | |
5226 | + var fullTermlist=$scope.GetwindowStoreData(windowviewid,'fullTermlist'); | |
5227 | + var AllTerms=$scope.GetwindowStoreData(windowviewid,'AllTerms'); | |
5228 | + | |
5229 | + fullTermlist = new jinqJs() | |
5230 | + .from(fullTermlist) | |
5231 | + .not() | |
5232 | + .in(matchList, '_TermNumber') | |
5233 | + .select() | |
5234 | + | |
5235 | + AllTerms = new jinqJs() | |
5236 | + .from(AllTerms) | |
5237 | + .not() | |
5238 | + .in(matchList, '_TermNumber') | |
5239 | + .select() | |
5240 | + | |
5241 | + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', fullTermlist); | |
5242 | + $scope.SetwindowStoreData(windowviewid, 'AllTerms', AllTerms); | |
5141 | 5243 | $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData); |
5142 | 5244 | $rootScope.UnsaveCurriculum = true; |
5143 | 5245 | |
... | ... | @@ -5156,7 +5258,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5156 | 5258 | $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y, windowviewid, termNumber); |
5157 | 5259 | //history maintained issue |
5158 | 5260 | if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { |
5159 | - $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("zIndex", "60000"); | |
5261 | + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("z-index", "60000"); | |
5160 | 5262 | } |
5161 | 5263 | |
5162 | 5264 | $('#sppeachBubble_' + windowviewid + '-' + termNumber).draggable( |
... | ... | @@ -5207,6 +5309,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5207 | 5309 | |
5208 | 5310 | } |
5209 | 5311 | }); |
5312 | + $('#crossDiv_'+windowviewid).unbind('click');//remove multiple event | |
5210 | 5313 | $('#crossDiv_'+windowviewid).on('click', function (evt) { |
5211 | 5314 | var len= (evt.target.id).split("_").length; |
5212 | 5315 | var windid = (evt.target.id).split("_")[len-1]; |
... | ... | @@ -5220,12 +5323,53 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5220 | 5323 | $rootScope.UnsaveCurriculum = true; |
5221 | 5324 | var CurriculumTermData = []; |
5222 | 5325 | CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); |
5326 | + //get related term of highted or extract body view | |
5327 | + var matchList=[]; | |
5328 | + var relatedTermList = new jinqJs() | |
5329 | + .from(CurriculumTermData) | |
5330 | + .where( function(row, index) { | |
5331 | + return ( (row.relatedTerm == termNumber || row.termNumber == termNumber)&& row.istpboxTerm==0); | |
5332 | + }) | |
5333 | + //.where('relatedTerm == ' + termNumber,"termNumber == " + termNumber) | |
5334 | + .select('termNumber'); | |
5335 | + | |
5336 | + for(var tm=0;tm<relatedTermList.length;tm++) | |
5337 | + { | |
5338 | + matchList.push(relatedTermList[tm].termNumber); | |
5339 | + } | |
5340 | + | |
5341 | + //delete related term | |
5223 | 5342 | CurriculumTermData = new jinqJs() |
5224 | - .from(CurriculumTermData) | |
5225 | - .delete().at("termNumber == " + termNumber).select(); | |
5343 | + .from(CurriculumTermData) | |
5344 | + .delete().at('relatedTerm == ' + termNumber,'istpboxTerm == ' + 0) | |
5345 | + .select(); | |
5346 | + | |
5226 | 5347 | |
5348 | + //delete annotation term | |
5349 | + CurriculumTermData = new jinqJs() | |
5350 | + .from(CurriculumTermData) | |
5351 | + .delete().at("termNumber == " + termNumber ,'istpboxTerm == ' + 0).select(); | |
5352 | + | |
5353 | + //update ter list | |
5354 | + var fullTermlist=$scope.GetwindowStoreData(windowviewid,'fullTermlist'); | |
5355 | + var AllTerms=$scope.GetwindowStoreData(windowviewid,'AllTerms'); | |
5356 | + | |
5357 | + fullTermlist = new jinqJs() | |
5358 | + .from(fullTermlist) | |
5359 | + .not() | |
5360 | + .in(matchList, '_TermNumber') | |
5361 | + .select() | |
5362 | + | |
5363 | + AllTerms = new jinqJs() | |
5364 | + .from(AllTerms) | |
5365 | + .not() | |
5366 | + .in(matchList, '_TermNumber') | |
5367 | + .select() | |
5368 | + | |
5369 | + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', fullTermlist); | |
5370 | + $scope.SetwindowStoreData(windowviewid, 'AllTerms', AllTerms); | |
5227 | 5371 | $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData); |
5228 | - | |
5372 | + | |
5229 | 5373 | $('#' + removeid).remove(); |
5230 | 5374 | }); |
5231 | 5375 | } |
... | ... | @@ -5306,6 +5450,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5306 | 5450 | } |
5307 | 5451 | |
5308 | 5452 | }); |
5453 | + $('.dynCross_anno_'+windowviewid).unbind('click');//remove multiple event | |
5309 | 5454 | $('.dynCross_anno_'+windowviewid).on('click', function (evt) { |
5310 | 5455 | if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) { |
5311 | 5456 | var removeid=$(this).parent().parent().attr('id'); |
... | ... | @@ -5358,30 +5503,31 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5358 | 5503 | $('#dot_annotation_' + windid).remove(); |
5359 | 5504 | $('#dot_annotation_' + windid).css("visibility", "hidden"); |
5360 | 5505 | $scope.angle(x, y, leftpos, toptpos, false,windid); |
5361 | - }, | |
5506 | + }, | |
5362 | 5507 | |
5363 | - //Update Annotation Cordianate in case of show single Annotation | |
5364 | - stop: function (evt) { | |
5365 | - var clickedSpeechBubbleId = $(this).attr("id"); | |
5366 | - var bubbleId = (clickedSpeechBubbleId).split("-")[0]; | |
5367 | - var len = (bubbleId).split("_").length; | |
5368 | - var windowviewid = (bubbleId).split("_")[len - 1]; | |
5369 | - var sppechBubbleId = $(this).attr("id").substring(12); | |
5370 | - var termNumber = (clickedSpeechBubbleId).split("-")[1]; | |
5371 | - $rootScope.UnsaveCurriculum = true; | |
5372 | - $timeout(function () { | |
5373 | - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
5374 | - var BubleObj = document.getElementById(clickedSpeechBubbleId); | |
5375 | - var CurriculumTermData = new jinqJs() | |
5376 | - .from(CurriculumTermData) | |
5377 | - .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; }) | |
5378 | - .at("transparentTermNumber == " + termNumber); | |
5379 | - | |
5380 | - }, 100); | |
5381 | - | |
5382 | - } | |
5508 | + //Update Annotation Cordianate in case of show single Annotation | |
5509 | + stop: function (evt) { | |
5510 | + var clickedSpeechBubbleId = $(this).attr("id"); | |
5511 | + var bubbleId = (clickedSpeechBubbleId).split("-")[0]; | |
5512 | + var len = (bubbleId).split("_").length; | |
5513 | + var windowviewid = (bubbleId).split("_")[len - 1]; | |
5514 | + var sppechBubbleId = $(this).attr("id").substring(12); | |
5515 | + var termNumber = (clickedSpeechBubbleId).split("-")[1]; | |
5516 | + $rootScope.UnsaveCurriculum = true; | |
5517 | + $timeout(function () { | |
5518 | + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
5519 | + var BubleObj = document.getElementById(clickedSpeechBubbleId); | |
5520 | + var CurriculumTermData = new jinqJs() | |
5521 | + .from(CurriculumTermData) | |
5522 | + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; }) | |
5523 | + .at("transparentTermNumber == " + termNumber); | |
5383 | 5524 | |
5384 | - }); | |
5525 | + }, 100); | |
5526 | + | |
5527 | + } | |
5528 | + | |
5529 | + }); | |
5530 | + $('.crossDiv_annotation_'+windowviewid).unbind('click');//remove multiple event | |
5385 | 5531 | $('.crossDiv_annotation_'+windowviewid).on('click', function (evt) { |
5386 | 5532 | var len= (evt.target.className).split("_").length; |
5387 | 5533 | var windid = (evt.target.className).split("_")[len-1]; |
... | ... | @@ -6260,12 +6406,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6260 | 6406 | var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid); |
6261 | 6407 | if (paintCanvasObj != null) { |
6262 | 6408 | var ctx = paintCanvasObj.getContext("2d"); |
6263 | - ctx.clearRect(0, 0, 2277, 3248); | |
6409 | + ctx.clearRect(0, 0, paintCanvasObj.width, paintCanvasObj.height); | |
6264 | 6410 | } |
6265 | 6411 | var CanvasObj = document.getElementById("canvasDA_" + windowviewid); |
6266 | 6412 | if (CanvasObj != null) { |
6267 | 6413 | var ctx1 = CanvasObj.getContext("2d"); |
6268 | - ctx1.clearRect(0, 0, 2277, 3248); | |
6414 | + ctx1.clearRect(0, 0,CanvasObj.width, CanvasObj.height); | |
6269 | 6415 | } |
6270 | 6416 | $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); |
6271 | 6417 | $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); |
... | ... | @@ -6574,7 +6720,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6574 | 6720 | $('#transparencyScale_' + windowviewid).css('top', $scope.TBDrawStartY - 90); |
6575 | 6721 | $('#transparencyScale_' + windowviewid).css('left', $scope.TBDrawStartX + 130) |
6576 | 6722 | $('#transparencyScale_' + windowviewid).css('visibility', 'visible') |
6577 | - $('#transparencyScale_' + windowviewid).css("z-index", "100000") | |
6723 | + $('#transparencyScale_' + windowviewid).css("z-index", "13000") | |
6578 | 6724 | } |
6579 | 6725 | |
6580 | 6726 | |
... | ... | @@ -6839,7 +6985,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6839 | 6985 | $('#transparencyScale_' + windowviewid).css('left', $scope.TBDrawStartX + 130) |
6840 | 6986 | |
6841 | 6987 | $('#transparencyScale_' + windowviewid).css('visibility', 'visible') |
6842 | - $('#transparencyScale_' + windowviewid).css("z-index", "100000"); | |
6988 | + $('#transparencyScale_' + windowviewid).css("z-index", "13000"); | |
6843 | 6989 | $('#transparencyScale_' + windowviewid).draggable({ containment: '#daViewDA_' + windowviewid, drag: function (evt) { } }); |
6844 | 6990 | var transNumber = $scope.GetwindowStoreData(windowviewid, 'transNumber'); |
6845 | 6991 | $("#tbSlider_" + windowviewid + " .ui-slider-handle").css("left", transNumber + "%"); |
... | ... | @@ -6871,12 +7017,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6871 | 7017 | var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid); |
6872 | 7018 | if (paintCanvasObj != null) { |
6873 | 7019 | var ctx = paintCanvasObj.getContext("2d"); |
6874 | - ctx.clearRect(0, 0, 2277, 3248); | |
7020 | + ctx.clearRect(0, 0, paintCanvasObj.width, paintCanvasObj.height); | |
6875 | 7021 | } |
6876 | 7022 | var CanvasObj = document.getElementById("canvasDA_" + windowviewid); |
6877 | 7023 | if (CanvasObj != null) { |
6878 | 7024 | var ctx1 = CanvasObj.getContext("2d"); |
6879 | - ctx1.clearRect(0, 0, 2277, 3248); | |
7025 | + ctx1.clearRect(0, 0, CanvasObj.width, CanvasObj.height); | |
6880 | 7026 | } |
6881 | 7027 | $("#annotationpaintbrushsize").removeClass("activebtncolor"); |
6882 | 7028 | $("#annotationpainteraser").removeClass("activebtncolor"); |
... | ... | @@ -8139,6 +8285,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8139 | 8285 | |
8140 | 8286 | pixelDataTrans = maskCanvasContexttrans.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1); |
8141 | 8287 | var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope,windowviewid); |
8288 | + var TBoxTermNumber=annotations.TBoxTermNumber; | |
8289 | + var NormalTermNumber=annotations.NormalTermNumber; | |
8142 | 8290 | |
8143 | 8291 | $scope.annotationTextArrayT1 = []; |
8144 | 8292 | $scope.annotationTextArrayT2 = []; |
... | ... | @@ -8149,21 +8297,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8149 | 8297 | $scope.annotationTextArrayT2.push($rootScope.annotationTextForTrans2[i]); |
8150 | 8298 | |
8151 | 8299 | } |
8152 | - var TBoxTermNumber=annotations.TBoxTermNumber; | |
8153 | - var NormalTermNumber=annotations.NormalTermNumber; | |
8154 | - | |
8300 | + | |
8155 | 8301 | var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30; |
8156 | 8302 | var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10; |
8157 | 8303 | var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left; |
8158 | 8304 | var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top; |
8159 | 8305 | |
8160 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { | |
8161 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8162 | - } | |
8163 | - else | |
8164 | - { | |
8165 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8166 | - } | |
8306 | + var isMultiAnnotation=$scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON'); | |
8307 | + | |
8308 | + $scope.saveTBoxTermNumberForSaveCB(windowviewid,isMultiAnnotation,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8167 | 8309 | |
8168 | 8310 | var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); |
8169 | 8311 | if (TermAnnotationText.length > 0) { |
... | ... | @@ -8251,6 +8393,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8251 | 8393 | |
8252 | 8394 | //Modesty ON |
8253 | 8395 | if (canvasId.match('modestyImg') && RGBColor != '000000') { |
8396 | + // clear prev annotation | |
8397 | + $scope.SetwindowStoreData(windowviewid,'TermAnnotationText',[]); | |
8398 | + | |
8254 | 8399 | RGBColor = DA[0].figLeafTermId; |
8255 | 8400 | annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor, null, windowviewid); |
8256 | 8401 | $scope.annotationTextArrayT1 = []; |
... | ... | @@ -8258,27 +8403,40 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8258 | 8403 | $scope.annotationTextArrayT1.push(annotationText); |
8259 | 8404 | $scope.annotationTextArrayT2.push(annotationText); |
8260 | 8405 | |
8261 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { | |
8262 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,0,RGBColor,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8263 | - } | |
8264 | - else | |
8265 | - { | |
8266 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,0,RGBColor,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8267 | - } | |
8406 | + var isMultiAnnotation=$scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON'); | |
8407 | + $scope.saveTBoxTermNumberForSaveCB(windowviewid,isMultiAnnotation,0,RGBColor,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8268 | 8408 | } |
8269 | 8409 | else if (canvasId.match('modestyImg') && RGBColor == '000000') |
8270 | 8410 | { |
8271 | 8411 | //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to |
8272 | 8412 | //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er |
8273 | 8413 | // |
8274 | - var bodyRegionId = canvasId.split("_")[1].slice(-1); | |
8414 | + var clickedBodyRegion; | |
8415 | + | |
8416 | + var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid,'BodyRegionCordinatesData'); | |
8417 | + var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
8418 | + if (viewOrientationId == 5) { | |
8419 | + // use for female lateral arm | |
8420 | + var clickedBodyRegionData = new jinqJs() | |
8421 | + .from(BodyRegionDictionary) | |
8422 | + .where('bodyRegionId == 6') | |
8423 | + .select(); | |
8275 | 8424 | |
8276 | - var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid; | |
8425 | + clickedBodyRegion = clickedBodyRegionData[0].bodyRegionId; | |
8426 | + canavsX = clickedBodyRegionData[0].X; | |
8427 | + canvasY = clickedBodyRegionData[0].Y; | |
8428 | + } | |
8429 | + else | |
8430 | + { | |
8431 | + clickedBodyRegion = canvasId.split("_")[1].slice(-1); | |
8432 | + } | |
8433 | + | |
8434 | + var maskCanvasId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid; | |
8277 | 8435 | var maskCanvas = document.getElementById(maskCanvasId); |
8278 | 8436 | var maskCanvasContext = maskCanvas.getContext("2d"); |
8279 | 8437 | |
8280 | 8438 | //transparecncy canvas |
8281 | - var maskCanvasTransId = 'transparencyTempCanvasMask_' + bodyRegionId + '_mci' + "_" + windowviewid; | |
8439 | + var maskCanvasTransId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci' + "_" + windowviewid; | |
8282 | 8440 | var maskCanvastrans = document.getElementById(maskCanvasTransId); |
8283 | 8441 | var maskCanvasContexttrans = maskCanvastrans.getContext("2d"); |
8284 | 8442 | |
... | ... | @@ -8287,28 +8445,23 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8287 | 8445 | var pixelDataTrans = maskCanvasContexttrans.getImageData(Math.round(actulalX - canavsX), Math.round(actualY - canvasY), 1, 1); |
8288 | 8446 | |
8289 | 8447 | var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope,windowviewid); |
8448 | + var TBoxTermNumber=annotations.TBoxTermNumber; | |
8449 | + var NormalTermNumber=annotations.NormalTermNumber; | |
8290 | 8450 | |
8451 | + | |
8291 | 8452 | $scope.annotationTextArrayT1 = []; |
8292 | 8453 | $scope.annotationTextArrayT2 = []; |
8293 | - for (var i = 0; i <= annotations.annotationT1.length - 1; i++) { | |
8294 | - $scope.annotationTextArrayT1.push(annotations.annotationT1[i]); | |
8295 | - | |
8296 | - } | |
8297 | - for (var i = 0; i <= annotations.annotationT2.length - 1; i++) { | |
8298 | - $scope.annotationTextArrayT2.push(annotations.annotationT2[i]); | |
8454 | + for (var i = 0; i <= $rootScope.annotationTextForTrans1.length - 1; i++) { | |
8455 | + $scope.annotationTextArrayT1.push($rootScope.annotationTextForTrans1[i]); | |
8299 | 8456 | } |
8457 | + for (var i = 0; i <= $rootScope.annotationTextForTrans2.length - 1; i++) { | |
8458 | + $scope.annotationTextArrayT2.push($rootScope.annotationTextForTrans2[i]); | |
8459 | + | |
8460 | + } | |
8300 | 8461 | |
8301 | - var TBoxTermNumber=annotations.TBoxTermNumber; | |
8302 | - var NormalTermNumber=annotations.NormalTermNumber; | |
8303 | - | |
8304 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { | |
8305 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8306 | - } | |
8307 | - else | |
8308 | - { | |
8309 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8310 | - } | |
8311 | - | |
8462 | + var isMultiAnnotation=$scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON'); | |
8463 | + $scope.saveTBoxTermNumberForSaveCB(windowviewid,isMultiAnnotation,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8464 | + | |
8312 | 8465 | } |
8313 | 8466 | |
8314 | 8467 | var tCanvasTopPos = $(".ui-wrapper").css("top"); |
... | ... | @@ -8363,6 +8516,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8363 | 8516 | var pixelDataTrans = maskCanvasContexttrans.getImageData(imgX, imgY, 1, 1); |
8364 | 8517 | |
8365 | 8518 | var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope,windowviewid); |
8519 | + | |
8520 | + var TBoxTermNumber=annotations.TBoxTermNumber; | |
8521 | + var NormalTermNumber=annotations.NormalTermNumber; | |
8366 | 8522 | |
8367 | 8523 | $scope.annotationTextArrayT1 = []; |
8368 | 8524 | $scope.annotationTextArrayT2 = []; |
... | ... | @@ -8373,21 +8529,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8373 | 8529 | $scope.annotationTextArrayT2.push($rootScope.annotationTextForTrans2[i]); |
8374 | 8530 | } |
8375 | 8531 | |
8376 | - var TBoxTermNumber=annotations.TBoxTermNumber; | |
8377 | - var NormalTermNumber=annotations.NormalTermNumber; | |
8378 | - | |
8379 | 8532 | var tips_x= parseInt( MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30; |
8380 | 8533 | var tips_y= parseInt( MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10; |
8381 | 8534 | var posx= MousePositionX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left; |
8382 | 8535 | var posy= MousePositionY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top; |
8383 | 8536 | |
8384 | - if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { | |
8385 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,true,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8386 | - } | |
8387 | - else | |
8388 | - { | |
8389 | - $scope.saveTBoxTermNumberForSaveCB(windowviewid,false,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8390 | - } | |
8537 | + var isMultiAnnotation=$scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON'); | |
8538 | + $scope.saveTBoxTermNumberForSaveCB(windowviewid,isMultiAnnotation,TBoxTermNumber,NormalTermNumber,tips_x,tips_y,posx,posy);//Calling Method for Tbox termnumber SaveCB | |
8391 | 8539 | |
8392 | 8540 | var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); |
8393 | 8541 | if (TermAnnotationText.length > 0) { |
... | ... | @@ -8417,8 +8565,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8417 | 8565 | } |
8418 | 8566 | |
8419 | 8567 | CurriculumTermData.push({ |
8420 | - "transparentTermNumber": parseInt(TBoxTermNumber), | |
8421 | - "termNumber": parseInt(NormalTermNumber), | |
8568 | + "transparentTermNumber": TBoxTermNumber, | |
8569 | + "termNumber": NormalTermNumber, | |
8422 | 8570 | "istpboxTerm":1, |
8423 | 8571 | "tips_x": tips_x, |
8424 | 8572 | "tips_y": tips_y, |
... | ... | @@ -8473,8 +8621,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8473 | 8621 | $('.crossDiv_annotation_' + windowviewid).parent().parent().remove(); |
8474 | 8622 | $('#bord_annotation_' + windowviewid).remove(); |
8475 | 8623 | $('#dot_annotation_' + windowviewid).remove(); |
8476 | - | |
8477 | - | |
8478 | 8624 | |
8479 | 8625 | // remove all in multi annotation |
8480 | 8626 | $('.com_' + windowviewid).remove(); |
... | ... | @@ -8483,18 +8629,52 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8483 | 8629 | $('#dot_' + windowviewid).remove(); |
8484 | 8630 | $('#bord_' + windowviewid).remove(); |
8485 | 8631 | $('#crossDiv_' + windowviewid).parent().parent().remove(); |
8632 | + | |
8486 | 8633 | } |
8487 | 8634 | |
8488 | - //Added Method to Save TransparencyBox TermNumbers for SaveCB | |
8489 | - $scope.saveTermNumberForSaveCB = function (windowviewid,isMultiAnnotation,NormalTermNumber,tips_x,tips_y,posx,posy) { | |
8635 | + //Added method to remove All Previous Annotations and reload by lexicon | |
8636 | + $scope.removeAllAnnotationText = function (windowviewid) { | |
8637 | + | |
8638 | + // remove all in multi annotation in TP | |
8639 | + $('.dynCross_anno_' + windowviewid).parent().parent().parent().remove(); | |
8640 | + | |
8641 | + // remove all in single annotation in TP | |
8642 | + $('.crossDiv_annotation_' + windowviewid).parent().parent().remove(); | |
8643 | + $('#bord_annotation_' + windowviewid).remove(); | |
8644 | + $('#dot_annotation_' + windowviewid).remove(); | |
8645 | + | |
8646 | + // remove all in multi annotation | |
8647 | + $('.com_' + windowviewid).remove(); | |
8490 | 8648 | |
8491 | - var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
8649 | + // remove all in single annotation | |
8650 | + $('#dot_' + windowviewid).remove(); | |
8651 | + $('#bord_' + windowviewid).remove(); | |
8652 | + $('#crossDiv_' + windowviewid).parent().parent().remove(); | |
8492 | 8653 | |
8493 | - if(!isMultiAnnotation) | |
8494 | - { | |
8495 | - // remove all in multi annotation | |
8496 | - $('.com_' + windowviewid).remove(); | |
8497 | - | |
8654 | + //--------------------------------------------------------------------------------- | |
8655 | + // tp box | |
8656 | + // remove all in multi annotation | |
8657 | + $('.dynCross_anno_' + windowviewid).parent().parent().parent().remove(); | |
8658 | + | |
8659 | + // remove all in single annotation | |
8660 | + $('.crossDiv_annotation_' + windowviewid).parent().parent().remove(); | |
8661 | + $('#bord_annotation_' + windowviewid).remove(); | |
8662 | + $('#dot_annotation_' + windowviewid).remove(); | |
8663 | + | |
8664 | + $scope.SetwindowStoreData(windowviewid, 'isannotationReload',true); | |
8665 | + | |
8666 | + } | |
8667 | + | |
8668 | + //Added Method to Save TransparencyBox TermNumbers for SaveCB | |
8669 | + $scope.saveTermNumberForSaveCB = function (windowviewid,isMultiAnnotation,TermData) { | |
8670 | + | |
8671 | + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
8672 | + | |
8673 | + if(!isMultiAnnotation) | |
8674 | + { | |
8675 | + // remove all in multi annotation | |
8676 | + $('.com_' + windowviewid).remove(); | |
8677 | + | |
8498 | 8678 | // remove all in single annotation |
8499 | 8679 | $('#dot_' + windowviewid).remove(); |
8500 | 8680 | $('#bord_' + windowviewid).remove(); |
... | ... | @@ -8504,16 +8684,40 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8504 | 8684 | .from(CurriculumTermData) |
8505 | 8685 | .delete().at('istpboxTerm == ' + 0).select(); |
8506 | 8686 | } |
8687 | + | |
8688 | + if(TermData.length>0) | |
8689 | + { | |
8690 | + var relatedterm=''; | |
8691 | + for(var i=0;i<TermData.length;i++) | |
8692 | + { | |
8693 | + if(TermData[i].tips_x!=undefined) | |
8694 | + { | |
8695 | + relatedterm=TermData[i].termNumber; | |
8696 | + CurriculumTermData.push({ | |
8697 | + "transparentTermNumber": '0', | |
8698 | + "termNumber": TermData[i].termNumber, | |
8699 | + "istpboxTerm":0, | |
8700 | + "tips_x":TermData[i].tips_x , | |
8701 | + "tips_y":TermData[i].tips_y , | |
8702 | + "x": TermData[i].posx , | |
8703 | + "y":TermData[i].posy | |
8704 | + }); | |
8705 | + } | |
8706 | + else | |
8707 | + { | |
8708 | + CurriculumTermData.push({ | |
8709 | + "transparentTermNumber": '0', | |
8710 | + "termNumber": TermData[i].termNumber, | |
8711 | + "istpboxTerm":0, | |
8712 | + 'relatedTerm':relatedterm | |
8713 | + }); | |
8714 | + | |
8715 | + } | |
8716 | + | |
8717 | + } | |
8718 | + | |
8719 | + } | |
8507 | 8720 | |
8508 | - CurriculumTermData.push({ | |
8509 | - "transparentTermNumber": 0, | |
8510 | - "termNumber": parseInt(NormalTermNumber), | |
8511 | - "istpboxTerm":0, | |
8512 | - "tips_x": tips_x, | |
8513 | - "tips_y": tips_y, | |
8514 | - "x": posx, | |
8515 | - "y": posy | |
8516 | - }); | |
8517 | 8721 | |
8518 | 8722 | $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData); |
8519 | 8723 | |
... | ... | @@ -8566,7 +8770,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8566 | 8770 | } |
8567 | 8771 | var RGBColor = (Red + Green + Blue); |
8568 | 8772 | $rootScope.annotationTextForTrans1 = []; |
8569 | - var annotationText1 = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
8773 | + $scope.GetAnnotationText(parseInt(RGBColor),windowviewid); | |
8570 | 8774 | var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); |
8571 | 8775 | for (var i = 0; i <= TermAnnotationText.length - 1; i++) { |
8572 | 8776 | $rootScope.annotationTextForTrans1.push(TermAnnotationText[i]); |
... | ... | @@ -8602,15 +8806,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8602 | 8806 | var RGBColorTrans = (RedTrans + GreenTrans + BlueTrans); |
8603 | 8807 | |
8604 | 8808 | $rootScope.annotationTextForTrans2 = []; |
8605 | - var annotationText2 = $scope.GetAnnotationText(parseInt(RGBColorTrans),windowviewid); | |
8809 | + $scope.GetAnnotationText(parseInt(RGBColorTrans),windowviewid); | |
8606 | 8810 | var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); |
8607 | 8811 | for (var i = 0; i <= TermAnnotationText.length - 1; i++) { |
8608 | 8812 | $rootScope.annotationTextForTrans2.push(TermAnnotationText[i]); |
8609 | 8813 | } |
8610 | 8814 | |
8611 | 8815 | return { |
8612 | - annotationT1: annotationText1, | |
8613 | - annotationT2: annotationText2, | |
8614 | 8816 | NormalTermNumber: RGBColor, |
8615 | 8817 | TBoxTermNumber: RGBColorTrans |
8616 | 8818 | } |
... | ... | @@ -8795,12 +8997,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8795 | 8997 | var paintCanvasObj = document.getElementById('canvasPaintDA_'+windowviewid); |
8796 | 8998 | if (paintCanvasObj != null) { |
8797 | 8999 | var ctx = paintCanvasObj.getContext("2d"); |
8798 | - ctx.clearRect(0, 0, 2277, 3248); | |
9000 | + ctx.clearRect(0, 0, paintCanvasObj.width, paintCanvasObj.height); | |
8799 | 9001 | |
8800 | 9002 | var CanvasObj = document.getElementById("canvasDA_" + windowviewid); |
8801 | 9003 | if (CanvasObj != null) { |
8802 | 9004 | var ctx1 = CanvasObj.getContext("2d"); |
8803 | - ctx1.clearRect(0, 0, 2277, 3248); | |
9005 | + ctx1.clearRect(0, 0, CanvasObj.width, CanvasObj.height); | |
8804 | 9006 | } |
8805 | 9007 | $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); |
8806 | 9008 | $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); |
... | ... | @@ -9144,7 +9346,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9144 | 9346 | $scope.CalculateImageCordinates(viewOrientationId,windowviewid); |
9145 | 9347 | } |
9146 | 9348 | else { |
9147 | - console.log('highLightBody from enableHighlight') | |
9349 | + | |
9148 | 9350 | $timeout(function () { $scope.highLightBody(windowviewid) }, 50); |
9149 | 9351 | } |
9150 | 9352 | } |
... | ... | @@ -9306,8 +9508,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9306 | 9508 | $scope.SetwindowStoreData(windowviewid,'isHighLight',false); |
9307 | 9509 | } |
9308 | 9510 | |
9309 | - //4. | |
9310 | - console.log('highLightBody from enableExtract') | |
9311 | 9511 | $scope.highLightBody(windowviewid); |
9312 | 9512 | } |
9313 | 9513 | else |
... | ... | @@ -9331,8 +9531,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9331 | 9531 | $scope.SetwindowStoreData(windowviewid,'isHighLight',false); |
9332 | 9532 | } |
9333 | 9533 | |
9334 | - //4. | |
9335 | - console.log('highLightBody from enableExtract') | |
9336 | 9534 | $scope.highLightBody(windowviewid); |
9337 | 9535 | } |
9338 | 9536 | } |
... | ... | @@ -9410,8 +9608,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9410 | 9608 | $('#btnTranparency_' + windowviewid).removeAttr('disabled', 'disabled'); |
9411 | 9609 | |
9412 | 9610 | var ColoredImageSRC = $scope.GetwindowStoreData(windowviewid, 'ColoredImageSRC'); |
9413 | - console.log('highLightBody is called and ColoredImageSRC length: ' + ColoredImageSRC.length); | |
9414 | - | |
9611 | + | |
9415 | 9612 | //different body views have different count of bodyegions so the length of ColoredImageSRC will be different |
9416 | 9613 | if ((ColoredImageSRC != null || ColoredImageSRC != undefined)) { |
9417 | 9614 | var doHighlightOrExtract = false; |
... | ... | @@ -9625,11 +9822,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9625 | 9822 | var isGenderChnage = $scope.GetwindowStoreData(windowviewid, 'isGenderChnage'); |
9626 | 9823 | var isViewChange = $scope.GetwindowStoreData(windowviewid, 'isViewChange'); |
9627 | 9824 | var isListManagerAlreadySelected = $scope.GetwindowStoreData(windowviewid, 'isListManagerAlreadySelected'); |
9825 | + var isLexiconReload= $scope.GetwindowStoreData(windowviewid, 'isannotationReload'); | |
9628 | 9826 | if (((isHighlightBodyByBodySystem == true)) || (isbodySystemHighlight == true && isHighLight == true)) { |
9629 | 9827 | $scope.DisableUI(); |
9630 | 9828 | $timeout(function () { $scope.HighlightBodyByTermListForBodySystem(null, windowviewid) }, 100); |
9631 | 9829 | } |
9632 | - else if (($rootScope.isCallFromOtherModule == true) || (isListManagerSelected == true) || (previousHighlightList != null && previousHighlightList.length > 0) && (isGenderChnage == true || isViewChange == true) || isListManagerAlreadySelected == true) { | |
9830 | + else if (($rootScope.isCallFromOtherModule == true)||isLexiconReload==true || (isListManagerSelected == true) || (previousHighlightList != null && previousHighlightList.length > 0) && (isGenderChnage == true || isViewChange == true) || isListManagerAlreadySelected == true) { | |
9633 | 9831 | |
9634 | 9832 | $timeout(function () { |
9635 | 9833 | $scope.DisableUI(); |
... | ... | @@ -9641,9 +9839,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9641 | 9839 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
9642 | 9840 | if (isHighlightBodyWithCBTermData == true) { |
9643 | 9841 | $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false); |
9644 | - | |
9645 | - //$scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); | |
9646 | - | |
9842 | + | |
9843 | + $scope.SetwindowStoreData(windowviewid, 'isannotationReload',false); | |
9647 | 9844 | // finish CB window load |
9648 | 9845 | $rootScope.DAWindowLoadComplete = true; |
9649 | 9846 | } |
... | ... | @@ -9706,7 +9903,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9706 | 9903 | }) |
9707 | 9904 | |
9708 | 9905 | } |
9709 | - else { | |
9906 | + else | |
9907 | + { | |
9710 | 9908 | // This code will execute when user will select normal Mode but this time isHighlight will be false |
9711 | 9909 | console.log('highlightboy ELSE. $rootScope.isExtract= ' + $scope.GetwindowStoreData(windowviewid, 'isExtract') + ', previousHighlightList.length= ' + previousHighlightList.length) |
9712 | 9910 | |
... | ... | @@ -9965,16 +10163,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9965 | 10163 | return null; |
9966 | 10164 | } |
9967 | 10165 | } |
9968 | - else { | |
9969 | - var currentBodyViewId = $scope.GetwindowStoreData(windowviewid,'voId'); | |
9970 | - var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json'; | |
9971 | - DataService.getAnotherJson(termJsonPath) | |
9972 | - .then( | |
9973 | - function (result) { | |
9974 | - $scope.SetwindowStoreData(windowviewid,'TermNumberData',result); | |
9975 | - $scope.getTermNumberList(actualTermNo,windowviewid); | |
9976 | - }) | |
9977 | - } | |
9978 | 10166 | } |
9979 | 10167 | $scope.OnGenderChange = function (event) { |
9980 | 10168 | var len= (event.target.parentElement.id).split("_").length; |
... | ... | @@ -10133,32 +10321,63 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10133 | 10321 | } |
10134 | 10322 | |
10135 | 10323 | $scope.loadBodyViewChangedBySetting = function (windowviewid, isLexiconChange) { |
10324 | + $scope.DisableUI(); | |
10325 | + $scope.LoadImageToExport(windowviewid); | |
10136 | 10326 | var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); |
10137 | - | |
10327 | + var timeintval=$scope.GetwindowStoreData(windowviewid,'intervalObject'); | |
10138 | 10328 | if(isLexiconChange) |
10139 | 10329 | { |
10330 | + // remove first annotation text | |
10331 | + $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',true); | |
10332 | + $scope.removeAllAnnotationText(windowviewid); | |
10333 | + | |
10334 | + $scope.langSearchLoad(windowviewid); | |
10140 | 10335 | //load term data and also language data |
10141 | 10336 | $rootScope.daloadSearchData(windowviewid); |
10142 | - //call time interval function until load Illustration data | |
10143 | - var timeintval = null; | |
10144 | - timeintval = $interval(function () { | |
10145 | - var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); | |
10337 | + timeintval = $interval(function(){loadBodyViewBySetting(windowviewid)},5); | |
10338 | + $scope.SetwindowStoreData(windowviewid,'intervalObject',timeintval); | |
10339 | + function loadBodyViewBySetting(panid) { | |
10340 | + var vocabTermDataArray = $scope.GetwindowStoreData(panid, 'vocabTermDataArray'); | |
10146 | 10341 | if (vocabTermDataArray!=null) { |
10147 | - $scope.stopVocab(); | |
10148 | - $scope.CalculateImageCordinates(viewOrientationId, windowviewid); | |
10342 | + var intval=$scope.GetwindowStoreData(panid,'intervalObject'); | |
10343 | + $scope.stopVocab(intval); | |
10344 | + //loading da for selected panel | |
10345 | + $scope.CalculateImageCordinates(viewOrientationId, panid); | |
10346 | + | |
10347 | + $timeout(function () { | |
10348 | + if ($rootScope.isListManagerMenuSelected) { | |
10349 | + var selectedPanel = $("#viewName option:selected").val(); | |
10350 | + var winid = (selectedPanel).split("_")[1]; | |
10351 | + if(winid==panid) | |
10352 | + { | |
10353 | + $scope.DisableUI(); | |
10354 | + $rootScope.dalistManagerEvent(panid); | |
10355 | + } | |
10356 | + } | |
10357 | + | |
10358 | + if ($scope.GetwindowStoreData(panid,'isSearchClicked')) { | |
10359 | + $scope.DisableUI(); | |
10360 | + if ($('#searchTermListUl_' + panid).html() != "") { | |
10361 | + $('#searchTermListUl_' + panid).empty(); | |
10362 | + } | |
10363 | + $scope.FillSearchList(panid); | |
10364 | + } | |
10365 | + }, 200); | |
10366 | + | |
10149 | 10367 | } |
10150 | 10368 | else |
10151 | 10369 | { |
10152 | 10370 | console.log("waiting for search term Data"); |
10153 | 10371 | } |
10154 | - }, 100); | |
10155 | - | |
10156 | - $scope.stopVocab = function () { | |
10157 | - if (angular.isDefined(timeintval)) { | |
10158 | - $interval.cancel(timeintval); | |
10159 | - timeintval = undefined; | |
10372 | + } | |
10373 | + | |
10374 | + $scope.stopVocab = function (intvalobj) { | |
10375 | + if (angular.isDefined(intvalobj)) { | |
10376 | + $interval.cancel(intvalobj); | |
10377 | + intvalobj = undefined; | |
10160 | 10378 | } |
10161 | - }; | |
10379 | + }; | |
10380 | + | |
10162 | 10381 | } |
10163 | 10382 | else |
10164 | 10383 | { |
... | ... | @@ -10168,14 +10387,29 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10168 | 10387 | } |
10169 | 10388 | |
10170 | 10389 | $scope.loadSelectedBodyViewChange = function (currentBodyViewId,windowviewid) { |
10390 | + $scope.LoadImageToExport(windowviewid); | |
10171 | 10391 | $rootScope.daloadSearchData(windowviewid); |
10172 | 10392 | //call time interval function until load Illustration data |
10173 | 10393 | var timeintval = null; |
10174 | 10394 | timeintval = $interval(function () { |
10175 | 10395 | var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); |
10176 | 10396 | if (vocabTermDataArray!=null) { |
10177 | - $scope.stopVocab(); | |
10397 | + $scope.stopVocab(timeintval); | |
10178 | 10398 | $scope.loadSelectedBodyView(currentBodyViewId,windowviewid); |
10399 | + $timeout(function () { | |
10400 | + if ($rootScope.isListManagerMenuSelected) { | |
10401 | + $scope.DisableUI(); | |
10402 | + $rootScope.dalistManagerEvent(windowviewid) | |
10403 | + } | |
10404 | + | |
10405 | + if ($scope.GetwindowStoreData(windowviewid,'isSearchClicked')) { | |
10406 | + $scope.DisableUI(); | |
10407 | + if ($('#searchTermListUl_' + windowviewid).html() != "") { | |
10408 | + $('#searchTermListUl_' + windowviewid).empty(); | |
10409 | + } | |
10410 | + $scope.FillSearchList(windowviewid); | |
10411 | + } | |
10412 | + }, 200); | |
10179 | 10413 | } |
10180 | 10414 | else |
10181 | 10415 | { |
... | ... | @@ -10183,7 +10417,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10183 | 10417 | } |
10184 | 10418 | }, 100); |
10185 | 10419 | |
10186 | - $scope.stopVocab = function () { | |
10420 | + $scope.stopVocab = function (timeintval) { | |
10187 | 10421 | if (angular.isDefined(timeintval)) { |
10188 | 10422 | $interval.cancel(timeintval); |
10189 | 10423 | timeintval = undefined; |
... | ... | @@ -10250,111 +10484,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10250 | 10484 | ); |
10251 | 10485 | } |
10252 | 10486 | |
10253 | - // $scope.loadSelectedBodyView = function (currentBodyViewId, windowviewid) { | |
10254 | - // var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); | |
10255 | - // //remove transaprency scale | |
10256 | - // if ($('#transparencyScale_' + windowviewid) != null) { | |
10257 | - | |
10258 | - // $('#transparencyScale_' + windowviewid).css('visibility', 'hidden'); | |
10259 | - // } | |
10260 | - | |
10261 | - // $scope.SetwindowStoreData(windowviewid,'voId',currentBodyViewId); | |
10262 | - | |
10263 | - // var layerJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_layer_' + currentBodyViewId + '.json'; | |
10264 | - | |
10265 | - // DataService.getJson(layerJsonPath) | |
10266 | - // .then( | |
10267 | - // function (result) { | |
10268 | - | |
10269 | - // $scope.SetwindowStoreData(windowviewid,'BodyLayerData',result); | |
10270 | - | |
10271 | - // //set max for LayerNumber input | |
10272 | - // var totalLayer = result.Layers.DataLayer.length-1; | |
10273 | - | |
10274 | - // $scope.SetwindowStoreData(windowviewid,'totalLayers',totalLayer); | |
10275 | - | |
10276 | - // $('#txtLayerNumberDA_' + windowviewid).attr('max', totalLayer); | |
10277 | - | |
10278 | - // console.log('inside DataService.getJson. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + 'set value: ' + totalLayer); | |
10279 | - | |
10280 | - // $("#layerChangeSliderDA_" + windowviewid).slider("option", "max", totalLayer); | |
10281 | - | |
10282 | - // // CB part to load same layer while change gender/bodyview | |
10283 | - | |
10284 | - // if($rootScope.isCallFromOtherModule) | |
10285 | - // { | |
10286 | - // var cLayer= $scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
10287 | - | |
10288 | - // if(cLayer>totalLayer) | |
10289 | - // { | |
10290 | - // $scope.SetwindowStoreData(windowviewid,'layerNumber',totalLayer); | |
10291 | - // } | |
10292 | - // } | |
10293 | - // else | |
10294 | - // { | |
10295 | - // $scope.SetwindowStoreData(windowviewid,'layerNumber',0); | |
10296 | - // } | |
10297 | - | |
10298 | - // //load json for annotations | |
10299 | - | |
10300 | - // var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json'; | |
10301 | - // DataService.getAnotherJson(termJsonPath) | |
10302 | - // .then( | |
10303 | - // function (result) { | |
10304 | - // var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
10305 | - // $scope.SetwindowStoreData(windowviewid,'TermNumberData',result); | |
10306 | - // var isViewChange=$scope.GetwindowStoreData(windowviewid,'isViewChange'); | |
10307 | - // var isGenderChnage=$scope.GetwindowStoreData(windowviewid,'isGenderChnage'); | |
10308 | - // var isListManagerSelected=$scope.GetwindowStoreData(windowviewid,'isListManagerSelected'); | |
10309 | - // var isListManagerAlreadySelected=$scope.GetwindowStoreData(windowviewid,'isListManagerAlreadySelected'); | |
10310 | - // //if user seelcted any term and serached before gender cnage then itshould be highlighted in chnaged gender | |
10311 | - | |
10312 | - // if (((isListManagerSelected == true) || isListManagerAlreadySelected == true || | |
10313 | - // ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true && previousHighlightList != null | |
10314 | - // && previousHighlightList.length > 0)) | |
10315 | - // && ((isGenderChnage == true) || isViewChange == true)) { | |
10316 | - // $scope.setLayerNumberAndHighlightByTermList(windowviewid); | |
10317 | - // } | |
10318 | - // else if (previousHighlightList != null && previousHighlightList.length > 0 && | |
10319 | - // (isGenderChnage == true || isViewChange == true)) | |
10320 | - // { | |
10321 | - // $scope.SetwindowStoreData(windowviewid,'AllTerms',[]); | |
10322 | - // $scope.SetwindowStoreData(windowviewid,'isHighLight',true); | |
10323 | - // var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); | |
10324 | - // if (TermNData != undefined) { | |
10325 | - // var actualTermNumber=$scope.GetwindowStoreData(windowviewid,'actualTermNumber'); | |
10326 | - // $scope.TermList = $scope.getTermNumberList(actualTermNumber,windowviewid); | |
10327 | - // if ($scope.TermList != null && $scope.TermList.length > 0) { | |
10328 | - // $scope.setLayerNumberAndHighlightByTermList(windowviewid); | |
10329 | - // } | |
10330 | - // else { | |
10331 | - // //actual term number is not found in thsi view menas previously selected body part does not exist in this view | |
10332 | - // $scope.CalculateImageCordinates(viewOrientationId, windowviewid) | |
10333 | - // } | |
10334 | - // } | |
10335 | - | |
10336 | - // } | |
10337 | - // else { | |
10338 | - // $scope.CalculateImageCordinates(viewOrientationId, windowviewid); | |
10339 | - // $('#txtLayerNumberDA_' + windowviewid).val( $scope.GetwindowStoreData(windowviewid,'layerNumber')) | |
10340 | - | |
10341 | - // } | |
10342 | - | |
10343 | - // }, | |
10344 | - // function (error) { | |
10345 | - // // handle errors here | |
10346 | - // console.log(' $rootScope.TermNumberData= ' + error.statusText); | |
10347 | - // } | |
10348 | - // ) | |
10349 | - // }, | |
10350 | - | |
10351 | - // function (error) { | |
10352 | - // // handle errors here | |
10353 | - // console.log(' $rootScope.BodyLayerData= ' + error.statusText); | |
10354 | - // } | |
10355 | - // ); | |
10356 | - // } | |
10357 | - | |
10358 | 10487 | $scope.OnViewChange = function (event) { |
10359 | 10488 | var parentid=event.target.parentElement.id; |
10360 | 10489 | var len= (parentid).split("_").length; |
... | ... | @@ -10527,18 +10656,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10527 | 10656 | } |
10528 | 10657 | //removed the event and using function |
10529 | 10658 | $rootScope.changeNavigatorModestyEvent = function (bodyViewId, windowviewid) { |
10530 | - $scope.loadNavigatorForSelectedBodyView(bodyViewId,windowviewid); | |
10531 | - // store image for export | |
10532 | - $scope.LoadImageToExport(windowviewid); | |
10533 | - | |
10659 | + $scope.loadNavigatorForSelectedBodyView(bodyViewId,windowviewid); | |
10534 | 10660 | } |
10535 | 10661 | |
10536 | 10662 | //Reload DA controller Body View after setting Change |
10537 | 10663 | $rootScope.reloadDABodyViewEvent = function (bodyViewId,isLexiconChange, windowviewid) { |
10538 | 10664 | //console.log('reloadDABodyViewEvent'); |
10539 | 10665 | $scope.SetwindowStoreData(windowviewid,'isGlobalSettingChanged',true); |
10540 | - if ($rootScope.isSettingEventAlredayDispachted == true) { | |
10541 | - $scope.DisableUI(); | |
10666 | + if ($rootScope.isSettingEventAlredayDispachted == true) { | |
10542 | 10667 | $rootScope.isSettingEventAlredayDispachted = false; // define at home controller |
10543 | 10668 | $scope.SetwindowStoreData(windowviewid,'layerNumber',parseInt($('#txtLayerNumberDA_' + windowviewid).val())); |
10544 | 10669 | var currentLayerNumber=$scope.GetwindowStoreData(windowviewid,'currentLayerNumber'); |
... | ... | @@ -10551,19 +10676,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10551 | 10676 | $scope.loadBodyViewChangedBySetting(windowviewid,isLexiconChange); |
10552 | 10677 | } |
10553 | 10678 | |
10554 | - $scope.loadNavigatorForSelectedBodyView(bodyViewId, windowviewid); | |
10679 | + $scope.loadNavigatorForSelectedBodyView(bodyViewId, windowviewid); | |
10555 | 10680 | |
10556 | - // store image for export | |
10557 | - $scope.LoadImageToExport(windowviewid); | |
10558 | - | |
10559 | - if ($scope.GetwindowStoreData(windowviewid,'layerNumber')!= 0) { | |
10560 | - $scope.EnableUI(); | |
10561 | - } | |
10562 | 10681 | } |
10563 | 10682 | } |
10564 | 10683 | |
10565 | 10684 | $scope.loadNavigatorForSelectedBodyView = function (currentBodyViewId, windowviewid) { |
10566 | - | |
10685 | + // store image for export | |
10686 | + $scope.LoadImageToExport(windowviewid); | |
10567 | 10687 | var NavigatorData=$scope.GetwindowStoreData(windowviewid,'NavigatorData'); |
10568 | 10688 | |
10569 | 10689 | if (!$rootScope.isCallFromOtherModule) { |
... | ... | @@ -10646,7 +10766,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10646 | 10766 | DataService.getJson(bodySystemDataPath) |
10647 | 10767 | .then( |
10648 | 10768 | function (result) { |
10649 | - $scope.SetwindowStoreData(windowviewid,'BodySystemData',result); | |
10769 | + $scope.SetwindowStoreData(windowviewid,'BodySystemData',result.BodySystem.BodySystemTerm); | |
10650 | 10770 | |
10651 | 10771 | }, |
10652 | 10772 | function (error) { |
... | ... | @@ -10695,8 +10815,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10695 | 10815 | $scope.SetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem',true); |
10696 | 10816 | if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == false) { |
10697 | 10817 | //color the body gray |
10698 | - console.log('highLightBody from HighlightBodyByBodySystem'); | |
10699 | - | |
10818 | + | |
10700 | 10819 | $scope.SetwindowStoreData(windowviewid,'isHighLight',true); |
10701 | 10820 | |
10702 | 10821 | if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { |
... | ... | @@ -10870,85 +10989,70 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10870 | 10989 | |
10871 | 10990 | $scope.ShowSearch = function (windowviewid, isbuttionclick) { |
10872 | 10991 | |
10873 | - console.log('ShowSearch is called'); | |
10874 | - // clear time stamp on text box click | |
10875 | - $scope.SetwindowStoreData(windowviewid, 'SearchTimeStampValue', 0); | |
10992 | + if ($('#searchListDiv_' + windowviewid).html() != "") | |
10993 | + $('#termlistfilter_'+windowviewid).empty(); | |
10876 | 10994 | |
10877 | - // get first language term text | |
10878 | - var primaryLexiconIndx = $scope.GetwindowStoreData(windowviewid, 'primaryLexiconInd')[0]; | |
10995 | + $scope.IsSearchVisible = true; | |
10879 | 10996 | |
10880 | - var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); | |
10881 | - //this check is for log only because we are writing length so need to check if its not null or undefined | |
10882 | - if (vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) | |
10883 | - console.log('$scope.VocabTermTxt.length= ' + vocabTermDataArray[primaryLexiconIndx].vocabTermTxt.length) | |
10884 | - $scope.IsSearchVisible = true; | |
10997 | + // clear time stamp on text box click | |
10998 | + $scope.SetwindowStoreData(windowviewid, 'SearchTimeStampValue', 0); | |
10885 | 10999 | |
10886 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
10887 | - if ((vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) && (vocabTermDataArray[0].vocabTermTxt.length > 0)) { | |
10888 | - //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed | |
10889 | - //Remove the list and then Repopulate | |
10890 | - if ($('#searchListDiv_' + windowviewid).html() != "") | |
10891 | - $('#termlistfilter_'+windowviewid).empty(); | |
10892 | - //Delay compile of ul li so that the remove of li is completed. | |
10893 | - $timeout(function () { | |
11000 | + var langId = $("#searchLanguageLm_"+windowviewid+" option:selected").val(); | |
11001 | + if(langId!=undefined) | |
11002 | + { | |
11003 | + var selectedLanguage = new jinqJs() | |
11004 | + .from( $rootScope.lexiconLanguageArray) | |
11005 | + .where('id == ' + langId) | |
11006 | + .select()[0]; | |
10894 | 11007 | |
10895 | - $scope.isSearchDataLoaded = true; | |
10896 | - var ColoredImageSRC=$scope.GetwindowStoreData(windowviewid,'ColoredImageSRC'); | |
10897 | - if ((ColoredImageSRC != null || ColoredImageSRC != undefined)) { | |
11008 | + var lanName=selectedLanguage.language; | |
11009 | + } | |
11010 | + else | |
11011 | + { | |
11012 | + // get default language | |
11013 | + var lanName=$rootScope.lexiconLanguageArray[0].language | |
11014 | + } | |
11015 | + | |
11016 | + var allVocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); | |
10898 | 11017 | |
10899 | - if (((viewOrientationId == '1') || (viewOrientationId == '4')) && (ColoredImageSRC.length == 9)) { | |
10900 | - $scope.EnableUI(); | |
10901 | - } | |
10902 | - else if (((viewOrientationId == '2') || (viewOrientationId == '3')) && (ColoredImageSRC.length == 5)) { | |
10903 | - $scope.EnableUI(); | |
10904 | - } | |
10905 | - else if ((viewOrientationId == '5') && (ColoredImageSRC.length == 1)) { | |
10906 | - $scope.EnableUI(); | |
10907 | - } | |
10908 | - else if ((viewOrientationId == '6') && (ColoredImageSRC.length == 1)) { | |
10909 | - $scope.EnableUI(); | |
10910 | - } | |
10911 | - } | |
10912 | - }, 500); | |
11018 | + var languageVocabTermDataArray = new jinqJs() | |
11019 | + .from( allVocabTermDataArray) | |
11020 | + .where('language == ' + lanName) | |
11021 | + .select('vocabTermTxt')[0]; | |
10913 | 11022 | |
10914 | - var vocabTermDataArray =vocabTermDataArray[primaryLexiconIndx].vocabTermTxt; | |
11023 | + var languageVocabData= languageVocabTermDataArray.vocabTermTxt; | |
10915 | 11024 | |
10916 | - var searchvalue = $("#typedTermName_" + windowviewid).val(); | |
10917 | - | |
10918 | - var searchfilterdata = $filter('filter')(vocabTermDataArray, searchvalue); | |
10919 | - if(searchvalue.trim()!="") | |
10920 | - { | |
10921 | - $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText.length'); | |
10922 | - } | |
10923 | - else | |
10924 | - { | |
10925 | - $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText'); | |
10926 | - } | |
11025 | + var searchvalue = $("#typedTermName_" + windowviewid).val(); | |
11026 | + | |
11027 | + var searchfilterdata = $filter('filter')(languageVocabData, searchvalue); | |
11028 | + if(searchvalue.trim()!="") | |
11029 | + { | |
11030 | + $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText.length'); | |
11031 | + } | |
11032 | + else | |
11033 | + { | |
11034 | + $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText'); | |
11035 | + } | |
10927 | 11036 | |
10928 | - $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 500); | |
11037 | + $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 500); | |
10929 | 11038 | |
10930 | - $('#termlistfilter_'+windowviewid).css("display", "block"); | |
11039 | + $('#termlistfilter_'+windowviewid).css("display", "block"); | |
10931 | 11040 | |
10932 | - angular.forEach($scope.limitTofilterdata, function (value2, key2) { | |
10933 | - var $el = $('<option id=' + value2._ActualTermNumber +'_' +windowviewid+ '>' + value2._TermText + '</option>').appendTo('#termlistfilter_' + windowviewid); | |
10934 | - $compile($el)($scope); | |
10935 | - }) | |
10936 | - | |
10937 | - var $all = $('#termlistfilter_'+windowviewid).appendTo('#searchListDiv_' + windowviewid); | |
10938 | - $compile($all)($scope); | |
10939 | - | |
10940 | - if(isbuttionclick) | |
10941 | - { | |
10942 | - $timeout(function () { | |
10943 | - $('#termlistfilter_'+windowviewid).focus(); | |
10944 | - }, 200); | |
10945 | - } | |
11041 | + angular.forEach($scope.limitTofilterdata, function (value2, key2) { | |
11042 | + var $el = $('<option id=' + value2._ActualTermNumber +'_' +windowviewid+ '>' + value2._TermText + '</option>').appendTo('#termlistfilter_' + windowviewid); | |
11043 | + $compile($el)($scope); | |
11044 | + }) | |
11045 | + | |
11046 | + var $all = $('#termlistfilter_'+windowviewid).appendTo('#searchListDiv_' + windowviewid); | |
11047 | + $compile($all)($scope); | |
11048 | + | |
11049 | + if(isbuttionclick) | |
11050 | + { | |
11051 | + $timeout(function () { | |
11052 | + $('#termlistfilter_'+windowviewid).focus(); | |
11053 | + }, 200); | |
11054 | + } | |
10946 | 11055 | |
10947 | - } | |
10948 | - else { | |
10949 | - $rootScope.daloadSearchData(windowviewid); | |
10950 | - } | |
10951 | - | |
10952 | 11056 | } |
10953 | 11057 | |
10954 | 11058 | $scope.HideSearch = function () { |
... | ... | @@ -10988,102 +11092,319 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10988 | 11092 | //event remove it fire multiple time |
10989 | 11093 | $rootScope.dalistManagerEvent = function (windowviewid) { |
10990 | 11094 | |
10991 | - if ($rootScope.islistManagerEventAlredayDispachted == true) { | |
10992 | - $scope.DisableUI(); | |
10993 | - | |
10994 | - $('#bodySystems').empty(); | |
10995 | - $("#bodySystems").css("display", "block"); | |
10996 | - $("#AABodySystems").css("display", "none"); | |
11095 | + $scope.DisableUI(); | |
11096 | + $('#bodySystems').empty(); | |
11097 | + $("#bodySystems").css("display", "block"); | |
11098 | + $("#AABodySystems").css("display", "none"); | |
11099 | + | |
11100 | + $("#langaugeDivLm").css("display", "none"); | |
11101 | + $('#termList').empty(); | |
11102 | + | |
11103 | + var totalstructure=0; | |
11104 | + $rootScope.isListManagerMenuSelected = true; | |
10997 | 11105 | |
10998 | - var $all = $('<option id="0_'+windowviewid+'" selected="">All</option>').appendTo('#bodySystems'); | |
10999 | - $compile($all)($scope); | |
11106 | + $scope.SetwindowStoreData(windowviewid,'totalstructureLm',0); | |
11107 | + var languageArray = $rootScope.lexiconLanguageArray; | |
11108 | + | |
11109 | + if(languageArray.length>1) | |
11110 | + { | |
11111 | + $("#langaugeDivLm").css("display", "block"); | |
11112 | + $("#selectLanguageLm").empty(); | |
11113 | + for (var i = 0; i <= languageArray.length - 1; i++) { | |
11114 | + $('#selectLanguageLm').append('<option value="' + languageArray[i].id + '">' + languageArray[i].language + '</option>'); | |
11115 | + } | |
11116 | + } | |
11117 | + | |
11118 | + var $all = $('<option id="0_'+windowviewid+'" selected="">All</option>').appendTo('#bodySystems'); | |
11119 | + $compile($all)($scope); | |
11000 | 11120 | |
11001 | - $("#structureDropdownDA_" + windowviewid + " li a").each(function (key, value) { | |
11121 | + $("#structureDropdownDA_" + windowviewid + " li a").each(function (key, value) { | |
11122 | + if($(this).attr('id')!="0") | |
11123 | + { | |
11002 | 11124 | var sysid= $(this).attr('id') + '_' +windowviewid; |
11003 | - | |
11004 | - if ($(this).parent().hasClass("disabledSelectedSystem")) { | |
11005 | - var $systemOptions = $('<option id=' + sysid+' disabled style="color:#d0c9c9" >' + $(this).text() + '</option>').appendTo("#bodySystems") | |
11006 | - $compile($systemOptions)($scope); | |
11125 | + if ($(this).parent().hasClass("disabledSelectedSystem")) { | |
11126 | + var $systemOptions = $('<option id=' + sysid+' disabled style="color:#d0c9c9" >' + $(this).text() + '</option>').appendTo("#bodySystems") | |
11127 | + $compile($systemOptions)($scope); | |
11128 | + } | |
11129 | + else{ | |
11130 | + var $systemOptions = $('<option id=' + sysid+' >' + $(this).text() + '</option>').appendTo("#bodySystems") | |
11131 | + $compile($systemOptions)($scope); | |
11132 | + } | |
11133 | + | |
11007 | 11134 | } |
11008 | - else{ | |
11009 | - var $systemOptions = $('<option id=' + sysid+' >' + $(this).text() + '</option>').appendTo("#bodySystems") | |
11010 | - $compile($systemOptions)($scope); | |
11011 | - } | |
11012 | - | |
11013 | - }); | |
11135 | + | |
11136 | + }); | |
11137 | + | |
11138 | + // primar language | |
11139 | + var lanName=languageArray[0].language; | |
11140 | + $scope.loadListManger(windowviewid,lanName,totalstructure); | |
11141 | + | |
11142 | + $rootScope.islistManagerEventAlredayDispachted = false; | |
11143 | + $scope.EnableUI(); | |
11144 | + | |
11145 | + } | |
11146 | + | |
11147 | + $rootScope.changeLanguageLmEvent = function (windowviewid) { | |
11148 | + $scope.DisableUI(); | |
11149 | + $('#termList').empty(); | |
11150 | + var totalstructure=0; | |
11151 | + $scope.SetwindowStoreData(windowviewid,'totalstructure',0); | |
11152 | + | |
11153 | + var langId = $("#selectLanguageLm option:selected").val(); | |
11154 | + | |
11155 | + setTimeout(function () { | |
11156 | + | |
11157 | + if(langId!=undefined) | |
11158 | + { | |
11159 | + var selectedLanguage = new jinqJs() | |
11160 | + .from( $rootScope.lexiconLanguageArray) | |
11161 | + .where('id == ' + langId) | |
11162 | + .select()[0]; | |
11163 | + | |
11164 | + var lanName=selectedLanguage.language; | |
11014 | 11165 | |
11015 | - $scope.loadListManger(windowviewid); | |
11016 | - $rootScope.islistManagerEventAlredayDispachted = false; | |
11017 | 11166 | } |
11018 | 11167 | else |
11019 | 11168 | { |
11020 | - $scope.EnableUI(); | |
11169 | + var lanName=$rootScope.lexiconLanguageArray[0].language; | |
11170 | + } | |
11171 | + | |
11172 | + var sysid = $("#bodySystems option:selected").attr("id"); | |
11173 | + var bodysystemId = (sysid).split("_")[0]; | |
11174 | + if(bodysystemId=="0") | |
11175 | + { | |
11176 | + $scope.loadListManger(windowviewid,lanName,totalstructure); | |
11021 | 11177 | } |
11178 | + else | |
11179 | + { | |
11180 | + $scope.systemMatchTermLoad(bodysystemId,windowviewid,lanName,totalstructure); | |
11181 | + } | |
11182 | + | |
11183 | + },100) | |
11184 | + | |
11022 | 11185 | } |
11023 | 11186 | |
11024 | - $scope.loadListManger = function (windowviewid) { | |
11025 | - var primaryLexiconIndex = $scope.GetwindowStoreData(windowviewid, 'primaryLexiconInd')[0]; | |
11187 | + $rootScope.LoadMoreLmEvent = function (windowviewid) { | |
11188 | + $scope.DisableUI(); | |
11189 | + var langId = $("#selectLanguageLm option:selected").val(); | |
11190 | + var totalstructure = $scope.GetwindowStoreData(windowviewid, 'totalstructureLm'); | |
11191 | + | |
11192 | + setTimeout(function () { | |
11193 | + | |
11194 | + if(langId!=undefined) | |
11195 | + { | |
11196 | + var selectedLanguage = new jinqJs() | |
11197 | + .from( $rootScope.lexiconLanguageArray) | |
11198 | + .where('id == ' + langId) | |
11199 | + .select()[0]; | |
11026 | 11200 | |
11027 | - var vocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); | |
11201 | + var lanName=selectedLanguage.language; | |
11028 | 11202 | |
11029 | - if (vocabTermDataArray != null && vocabTermDataArray != undefined && vocabTermDataArray.length > 0) { | |
11030 | - $('#termList').empty(); | |
11031 | - $rootScope.isListManagerMenuSelected = true; | |
11203 | + } | |
11204 | + else | |
11205 | + { | |
11206 | + var lanName=$rootScope.lexiconLanguageArray[0].language; | |
11207 | + } | |
11032 | 11208 | |
11033 | - var vocabTermTxt = []; | |
11034 | - var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); | |
11035 | - if (TermNData != null || TermNData != undefined && TermNData.TermData.Term.length > 0) { | |
11036 | - angular.forEach(TermNData.TermData.Term, function (value1, key1) { | |
11209 | + var sysid = $("#bodySystems option:selected").attr("id"); | |
11210 | + var bodysystemId = (sysid).split("_")[0]; | |
11211 | + if(bodysystemId=="0") | |
11212 | + { | |
11213 | + $scope.loadListManger(windowviewid,lanName,totalstructure); | |
11214 | + } | |
11215 | + else | |
11216 | + { | |
11217 | + $scope.systemMatchTermLoad(bodysystemId,windowviewid,lanName,totalstructure); | |
11218 | + } | |
11219 | + | |
11220 | + }, 100); | |
11221 | + | |
11222 | + } | |
11037 | 11223 | |
11038 | - angular.forEach(vocabTermDataArray[primaryLexiconIndex].VocabTermData.VocabTerms.Term, function (value2, key2) { | |
11224 | + $scope.loadListManger = function (windowviewid,lanName,totalstructure) { | |
11225 | + | |
11226 | + var allVocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); | |
11039 | 11227 | |
11228 | + var languageVocabTermDataArray = new jinqJs() | |
11229 | + .from( allVocabTermDataArray) | |
11230 | + .where('language == ' + lanName) | |
11231 | + .select('vocabTermTxt')[0]; | |
11040 | 11232 | |
11041 | - if (value1._ActualTermNumber === value2._ActualTermNumber) { | |
11042 | - vocabTermTxt.push( | |
11043 | - { | |
11233 | + var languageVocabData= languageVocabTermDataArray.vocabTermTxt; | |
11044 | 11234 | |
11045 | - "_ActualTermNumber": value2._ActualTermNumber, | |
11046 | - "_TermText": value2._TermText, | |
11047 | - "_cdId": value2._cdId | |
11235 | + var afterskipdata = new jinqJs() | |
11236 | + .from(languageVocabData) | |
11237 | + .skip(totalstructure) | |
11238 | + .select(); | |
11048 | 11239 | |
11049 | - }); | |
11240 | + var limitTofilterdata = $filter('limitTo')(afterskipdata, 500); | |
11050 | 11241 | |
11051 | - } | |
11242 | + var option=''; | |
11052 | 11243 | |
11053 | - }) | |
11054 | - }) | |
11055 | - var VocabTermTxtfilter = new jinqJs() | |
11056 | - .from(vocabTermTxt) | |
11057 | - .distinct('_TermText', '_ActualTermNumber') | |
11058 | - .orderBy([{ field: '_TermText', sort: 'asc' }]) | |
11059 | - .select('_ActualTermNumber', '_TermText', '_cdId'); | |
11060 | - | |
11061 | - if (VocabTermTxtfilter != null || VocabTermTxtfilter != undefined) { | |
11062 | - for (var j = 0; j < VocabTermTxtfilter.length; j++) { | |
11063 | - var $el = $('<option title ="' + VocabTermTxtfilter[j]._TermText + '" id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ ' style="margin-right:-12px">' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList') | |
11064 | - $compile($el)($scope); | |
11065 | - | |
11066 | - } | |
11067 | - $scope.EnableUI(); | |
11244 | + angular.forEach(limitTofilterdata, function (value2, key2) { | |
11245 | + totalstructure=totalstructure+1; | |
11246 | + option=option+'<option id=' + value2._ActualTermNumber +'_' +windowviewid+ ' style="margin-right:-12px">' + value2._TermText + '</option>'; | |
11247 | + | |
11248 | + }) | |
11249 | + var $el = $(option).appendTo('#termList') | |
11250 | + $compile($el)($scope); | |
11068 | 11251 | |
11069 | - var termsTotal = '<span class="pull-left marginTop5">' + VocabTermTxtfilter.length + ' Structures</span>'; | |
11070 | - $("#totalTerms").empty(); | |
11071 | - $('#totalTerms').append(termsTotal); | |
11252 | + $scope.SetwindowStoreData(windowviewid,'totalstructureLm',totalstructure); | |
11253 | + var termsTotal = '<span class="pull-left marginTop5">' + totalstructure + ' Structures</span>'; | |
11072 | 11254 | |
11073 | - } | |
11074 | - } | |
11075 | - else { | |
11076 | - console.log("$rootScope.TermNumberData NOT FOUND"); | |
11077 | - $rootScope.daloadSearchData(windowviewid); | |
11255 | + $("#totalTermsLm").empty(); | |
11256 | + $("#totalTermsLm").append(termsTotal); | |
11257 | + | |
11258 | + if(totalstructure < languageVocabData.length) | |
11259 | + { | |
11260 | + $("#totalTermsLm").append('<button type="button" id="btlLoadMoreLm" class="btn btn-primary btn-block" onclick="LoadMoreLm(event)" style="width:65%;float:right">Load More Structures..</button>'); | |
11261 | + } | |
11262 | + else | |
11263 | + { | |
11264 | + $("#totalTermsLm").append('<button type="button" id="btlLoadMoreLm" class="btn btn-primary btn-block" onclick="LoadMoreLm(event)" style="width:65%;float:right">Load More Structures..</button>'); | |
11265 | + $('#btlLoadMoreLm').attr('disabled', 'disabled'); | |
11266 | + } | |
11267 | + | |
11268 | + $scope.EnableUI(); | |
11269 | + | |
11270 | + | |
11271 | + } | |
11272 | + | |
11273 | + $rootScope.refreshTermListOnSystemSelection = function (selectedBodysystemId) { | |
11274 | + var windowviewid = (selectedBodysystemId).split("_")[1]; | |
11275 | + var bodysystemId = (selectedBodysystemId).split("_")[0]; | |
11276 | + $scope.DisableUI(); | |
11277 | + $("#bodySystems").find("option:not(:disabled)").css({ "background-color": "#ffffff", "color": "#000000" }); | |
11278 | + $("#bodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
11279 | + | |
11280 | + $("#bodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
11281 | + | |
11282 | + $('#termList').empty(); | |
11283 | + | |
11284 | + $scope.SetwindowStoreData(windowviewid, 'totalstructureLm',0); | |
11285 | + var totalstructure = 0; | |
11286 | + var langId = $("#selectLanguageLm option:selected").val(); | |
11287 | + if(langId!=undefined) | |
11288 | + { | |
11289 | + var selectedLanguage = new jinqJs() | |
11290 | + .from( $rootScope.lexiconLanguageArray) | |
11291 | + .where('id == ' + langId) | |
11292 | + .select()[0]; | |
11293 | + | |
11294 | + var lanName=selectedLanguage.language; | |
11078 | 11295 | |
11079 | - } | |
11080 | 11296 | } |
11081 | - else { | |
11082 | - $rootScope.daloadSearchData(windowviewid); | |
11297 | + else | |
11298 | + { | |
11299 | + var lanName=$rootScope.lexiconLanguageArray[0].language; | |
11300 | + } | |
11083 | 11301 | |
11302 | + if(bodysystemId=="0") | |
11303 | + { | |
11304 | + setTimeout(function () { | |
11305 | + $scope.loadListManger(windowviewid,lanName,totalstructure); | |
11306 | + | |
11307 | + }, 100); | |
11308 | + } | |
11309 | + else | |
11310 | + { | |
11311 | + $scope.systemMatchTermLoad(bodysystemId,windowviewid,lanName,totalstructure); | |
11084 | 11312 | } |
11085 | 11313 | } |
11314 | + | |
11315 | + $scope.systemMatchTermLoad=function(bodysystemId,windowviewid,lanName,totalstructure) | |
11316 | + { | |
11317 | + var BodySystemData = $scope.GetwindowStoreData(windowviewid,'BodySystemData'); | |
11318 | + var systemMatchedTermList = new jinqJs() | |
11319 | + .from(BodySystemData) | |
11320 | + .where('_SystemNumber == ' + bodysystemId) | |
11321 | + .select(); | |
11322 | + if (systemMatchedTermList != null || systemMatchedTermList != undefined) { | |
11323 | + $scope.refreshTerms(systemMatchedTermList,windowviewid,lanName,totalstructure); | |
11324 | + } | |
11086 | 11325 | |
11326 | + } | |
11327 | + | |
11328 | + $scope.refreshTerms = function (termList,windowviewid,lanName,totalstructure) { | |
11329 | + var vocabTermTxt = []; | |
11330 | + var actulaTermNumber = []; | |
11331 | + var allVocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); | |
11332 | + | |
11333 | + var languageVocabTermDataArray = new jinqJs() | |
11334 | + .from( allVocabTermDataArray) | |
11335 | + .where('language == ' + lanName) | |
11336 | + .select('vocabTermTxt')[0]; | |
11337 | + | |
11338 | + var VocabTermDataText= languageVocabTermDataArray.vocabTermTxt; | |
11339 | + | |
11340 | + var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); | |
11341 | + for (var i = 0; i < termList.length; i++) { | |
11342 | + | |
11343 | + var actulaTerm = new jinqJs() | |
11344 | + .from(TermNData.TermData.Term) | |
11345 | + .where('_TermNumber == ' + termList[i]._TermNumber) | |
11346 | + .select('_ActualTermNumber'); | |
11347 | + | |
11348 | + if (actulaTerm != null || actulaTerm != undefined) { | |
11349 | + actulaTermNumber.push(actulaTerm[0]); | |
11350 | + } | |
11351 | + | |
11352 | + } | |
11353 | + | |
11354 | + angular.forEach(VocabTermDataText, function (value2, key2) { | |
11355 | + for (var i = 0; i < termList.length; i++) { | |
11356 | + if (actulaTermNumber[i]._ActualTermNumber == value2._ActualTermNumber) { | |
11357 | + vocabTermTxt.push( | |
11358 | + { | |
11359 | + "_ActualTermNumber": value2._ActualTermNumber, | |
11360 | + "_TermText": value2._TermText | |
11361 | + | |
11362 | + }); | |
11363 | + break; | |
11364 | + | |
11365 | + } | |
11366 | + } | |
11367 | + | |
11368 | + }) | |
11369 | + | |
11370 | + var VocabTermTxtfilter = new jinqJs() | |
11371 | + .from(vocabTermTxt) | |
11372 | + .distinct('_TermText', '_ActualTermNumber') | |
11373 | + .orderBy([{ field: '_TermText', sort: 'asc' }]) | |
11374 | + .select('_ActualTermNumber', '_TermText'); | |
11375 | + | |
11376 | + var option=''; | |
11377 | + if (VocabTermTxtfilter != null || VocabTermTxtfilter != undefined) { | |
11378 | + | |
11379 | + angular.forEach(VocabTermTxtfilter, function (value2, key2) { | |
11380 | + totalstructure=totalstructure+1; | |
11381 | + option=option+'<option id=' + value2._ActualTermNumber +'_' +windowviewid+ ' style="margin-right:-12px">' + value2._TermText + '</option>'; | |
11382 | + | |
11383 | + }) | |
11384 | + var $el = $(option).appendTo('#termList') | |
11385 | + $compile($el)($scope); | |
11386 | + | |
11387 | + $scope.SetwindowStoreData(windowviewid,'totalstructureLm',totalstructure); | |
11388 | + var termsTotal = '<span class="pull-left marginTop5">' + totalstructure + ' Structures</span>'; | |
11389 | + | |
11390 | + $("#totalTermsLm").empty(); | |
11391 | + $("#totalTermsLm").append(termsTotal); | |
11392 | + | |
11393 | + if(totalstructure < VocabTermTxtfilter.length) | |
11394 | + { | |
11395 | + $("#totalTermsLm").append('<button type="button" id="btlLoadMoreLm" class="btn btn-primary btn-block" onclick="LoadMoreLm(event)" style="width:65%;float:right">Load More Structures..</button>'); | |
11396 | + } | |
11397 | + else | |
11398 | + { | |
11399 | + $("#totalTermsLm").append('<button type="button" id="btlLoadMoreLm" class="btn btn-primary btn-block" onclick="LoadMoreLm(event)" style="width:65%;float:right">Load More Structures..</button>'); | |
11400 | + $('#btlLoadMoreLm').attr('disabled', 'disabled'); | |
11401 | + } | |
11402 | + | |
11403 | + } | |
11404 | + $scope.EnableUI(); | |
11405 | + | |
11406 | + } | |
11407 | + | |
11087 | 11408 | $scope.HighlightBodyOnListManagerSelection = function (selectedtermid, isTermListOptionClicked, windowviewid) { |
11088 | 11409 | $rootScope.UnsaveCurriculum = true; |
11089 | 11410 | var currenttermidTxt=$("#" + selectedtermid).text(); |
... | ... | @@ -11235,21 +11556,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11235 | 11556 | } |
11236 | 11557 | } |
11237 | 11558 | } |
11238 | - else { | |
11239 | - var currentBodyViewId = $scope.GetwindowStoreData(windowviewid,'voId') ; | |
11240 | - var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json'; | |
11241 | - DataService.getAnotherJson(termJsonPath) | |
11242 | - .then( | |
11243 | - function (result) { | |
11244 | - $scope.SetwindowStoreData(windowviewid,'TermNumberData',result); | |
11245 | - $scope.TermList = $scope.getTermNumberList(actualTermNumber,windowviewid); | |
11246 | - | |
11247 | - if (($scope.TermList != null || $scope.TermList != undefined) && $scope.TermList.length > 0) { | |
11248 | - | |
11249 | - $scope.setLayerNumberAndHighlightByTermList(windowviewid); | |
11250 | - } | |
11251 | - }) | |
11252 | - } | |
11559 | + | |
11253 | 11560 | var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers'); |
11254 | 11561 | var nlayer=$scope.GetwindowStoreData(windowviewid,'layerNumber'); |
11255 | 11562 | $('#txtLayerNumberDA_' + windowviewid).val((parseInt(nlayer))); |
... | ... | @@ -11314,8 +11621,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11314 | 11621 | var isFound = jQuery.inArray(serachTerm, fullTermlist) |
11315 | 11622 | if (isFound == -1) { |
11316 | 11623 | fullTermlist.push(serachTerm); |
11317 | - console.log("psudhed in getChildTermList") | |
11318 | - AllTerms.push({ '_TermNumber': serachTerm }) | |
11624 | + $scope.SetwindowStoreData(windowviewid,'fullTermlist',fullTermlist); | |
11625 | + AllTerms.push({ '_TermNumber': serachTerm }); | |
11626 | + $scope.SetwindowStoreData(windowviewid,'AllTerms',AllTerms); | |
11319 | 11627 | $scope.getChildTermList(serachTerm,windowviewid); |
11320 | 11628 | } |
11321 | 11629 | } |
... | ... | @@ -11343,9 +11651,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11343 | 11651 | var AllTerms=$scope.GetwindowStoreData(windowviewid,'AllTerms'); |
11344 | 11652 | for (var i = 0; i < data2.length; i++) { |
11345 | 11653 | fullTermlist.push(data2[i]._TermNumber); |
11654 | + $scope.SetwindowStoreData(windowviewid,'fullTermlist',fullTermlist); | |
11346 | 11655 | console.log("psudhed in getSiblings") |
11347 | 11656 | |
11348 | - AllTerms.push({ '_TermNumber': data2[i]._TermNumber }) | |
11657 | + AllTerms.push({ '_TermNumber': data2[i]._TermNumber }); | |
11658 | + $scope.SetwindowStoreData(windowviewid,'AllTerms',AllTerms); | |
11349 | 11659 | $scope.getChildTermList(data2[i]._TermNumber,windowviewid); |
11350 | 11660 | } |
11351 | 11661 | } |
... | ... | @@ -11422,119 +11732,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11422 | 11732 | return Math.round(iReturnValue / nExistingZoom); |
11423 | 11733 | } |
11424 | 11734 | |
11425 | - $rootScope.refreshTermListOnSystemSelection = function (selectedBodysystemId) { | |
11426 | - | |
11427 | - var windowviewid = (selectedBodysystemId).split("_")[1]; | |
11428 | - var bodysystemId = (selectedBodysystemId).split("_")[0]; | |
11429 | - $scope.DisableUI(); | |
11430 | - $("#bodySystems").find("option:not(:disabled)").css({ "background-color": "#ffffff", "color": "#000000" }); | |
11431 | - $("#bodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
11432 | - | |
11433 | - $("#bodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
11434 | - | |
11435 | - $('#termList').empty(); | |
11436 | - | |
11437 | - if (bodysystemId == 0) { | |
11438 | - $scope.loadListManger(windowviewid); | |
11439 | - } | |
11440 | - else { | |
11441 | - var currentBodyViewId = $scope.GetwindowStoreData(windowviewid,'voId'); | |
11442 | - var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json'; | |
11443 | - DataService.getJson(bodySystemDataPath) | |
11444 | - .then( | |
11445 | - function (result) { | |
11446 | - $scope.SetwindowStoreData(windowviewid,'BodySystemData',result); | |
11447 | - var systemMatchedTermList = new jinqJs() | |
11448 | - .from(result.BodySystem.BodySystemTerm) | |
11449 | - .where('_SystemNumber == ' + bodysystemId) | |
11450 | - .select(); | |
11451 | - if (systemMatchedTermList != null || systemMatchedTermList != undefined) { | |
11452 | - $scope.EnableUI(); | |
11453 | - $scope.refreshTerms(systemMatchedTermList,windowviewid); | |
11454 | - } | |
11455 | - }, | |
11456 | - function (error) { | |
11457 | - console.log(error.statusText) | |
11458 | - } | |
11459 | - ) | |
11460 | - | |
11461 | - } | |
11462 | - } | |
11463 | - | |
11464 | - $scope.refreshTerms = function (termList,windowviewid) { | |
11465 | - | |
11466 | - var path = '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json' | |
11467 | - | |
11468 | - $http({ method: 'GET', url: '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json' }).success(function (data) { | |
11469 | - | |
11470 | - var VocabTermData = data; | |
11471 | - | |
11472 | - var vocabTermTxt = []; | |
11473 | - var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); | |
11474 | - | |
11475 | - for (var i = 0; i < termList.length; i++) { | |
11476 | - | |
11477 | - var actulaTermNumber = new jinqJs() | |
11478 | - .from(TermNData.TermData.Term) | |
11479 | - .where('_TermNumber == ' + termList[i]._TermNumber) | |
11480 | - .select('_ActualTermNumber'); | |
11481 | - | |
11482 | - if (actulaTermNumber != null || actulaTermNumber != undefined) { | |
11483 | - | |
11484 | - | |
11485 | - angular.forEach(VocabTermData.VocabTerms.Term, function (value2, key2) { | |
11486 | - | |
11487 | - | |
11488 | - if (actulaTermNumber[0]._ActualTermNumber == value2._ActualTermNumber) { | |
11489 | - vocabTermTxt.push( | |
11490 | - | |
11491 | - { | |
11492 | - | |
11493 | - "_ActualTermNumber": value2._ActualTermNumber, | |
11494 | - | |
11495 | - "_TermText": value2._TermText, | |
11496 | - | |
11497 | - "_cdId": value2._cdId | |
11498 | - | |
11499 | - } | |
11500 | - | |
11501 | - ); | |
11502 | - | |
11503 | - } | |
11504 | - | |
11505 | - }) | |
11506 | - | |
11507 | - } | |
11508 | - } | |
11509 | - | |
11510 | - var VocabTermTxtfilter = new jinqJs() | |
11511 | - .from(vocabTermTxt) | |
11512 | - .distinct('_TermText', '_ActualTermNumber') | |
11513 | - .orderBy([{ field: '_TermText', sort: 'asc' }]) | |
11514 | - .select('_ActualTermNumber', '_TermText', '_cdId'); | |
11515 | - | |
11516 | - if (VocabTermTxtfilter != null || VocabTermTxtfilter != undefined) { | |
11517 | - | |
11518 | - | |
11519 | - for (var j = 0; j < VocabTermTxtfilter.length; j++) { | |
11520 | - var $el = $('<option id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ 'style="margin-right:-12px">' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList') | |
11521 | - $compile($el)($scope); | |
11522 | - } | |
11523 | - | |
11524 | - var termsTotal = '<span class="pull-left marginTop5">' + VocabTermTxtfilter.length + ' Structures</span>'; | |
11525 | - $("#totalTerms").empty(); | |
11526 | - $('#totalTerms').append(termsTotal); | |
11527 | - $scope.EnableUI(); | |
11528 | - } | |
11529 | - }) | |
11530 | - | |
11531 | - .error(function (data, status, headers, config) { | |
11532 | - console.log(data); | |
11533 | - | |
11534 | - }); | |
11535 | - | |
11536 | - } | |
11537 | - | |
11538 | 11735 | $scope.LayerChangeBasedOnKeyPressed = function (event) { |
11539 | 11736 | |
11540 | 11737 | var len= (event.currentTarget.id).split("_").length; |
... | ... | @@ -11651,14 +11848,34 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11651 | 11848 | } |
11652 | 11849 | |
11653 | 11850 | $scope.showFilteredTerms = function (windowviewid) { |
11654 | - // get first language term text | |
11655 | - var lexiconInd = $scope.GetwindowStoreData(windowviewid, 'primaryLexiconInd')[0]; | |
11851 | + var langId = $("#searchLanguageLm_"+windowviewid+" option:selected").val(); | |
11852 | + if(langId!=undefined) | |
11853 | + { | |
11854 | + var selectedLanguage = new jinqJs() | |
11855 | + .from( $rootScope.lexiconLanguageArray) | |
11856 | + .where('id == ' + langId) | |
11857 | + .select()[0]; | |
11656 | 11858 | |
11657 | - var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray')[lexiconInd].vocabTermTxt; | |
11859 | + var lanName=selectedLanguage.language; | |
11860 | + } | |
11861 | + else | |
11862 | + { | |
11863 | + // get default language | |
11864 | + var lanName=$rootScope.lexiconLanguageArray[0].language | |
11865 | + } | |
11866 | + | |
11867 | + var allVocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); | |
11868 | + | |
11869 | + var languageVocabTermDataArray = new jinqJs() | |
11870 | + .from( allVocabTermDataArray) | |
11871 | + .where('language == ' + lanName) | |
11872 | + .select('vocabTermTxt')[0]; | |
11873 | + | |
11874 | + var languageVocabData= languageVocabTermDataArray.vocabTermTxt; | |
11658 | 11875 | |
11659 | 11876 | var searchvalue = $("#typedTermName_" + windowviewid).val(); |
11660 | 11877 | |
11661 | - var searchfilterdata = $filter('filter')(vocabTermDataArray, searchvalue); | |
11878 | + var searchfilterdata = $filter('filter')(languageVocabData, searchvalue); | |
11662 | 11879 | |
11663 | 11880 | if(searchvalue.trim()!="") |
11664 | 11881 | { |
... | ... | @@ -11696,7 +11913,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11696 | 11913 | '-webkit-box-shadow': '0px 0px 2px 1px rgba(173,173,173,1)', |
11697 | 11914 | '-moz-box-shadow': '0px 0px 2px 1px rgba(173,173,173,1)', |
11698 | 11915 | 'box-shadow': '0px 0px 2px 1px rgba(173,173,173,1)', |
11699 | - 'width': '350px', | |
11916 | + 'width': '400px', | |
11700 | 11917 | 'position': 'absolute', |
11701 | 11918 | 'top': '170px', |
11702 | 11919 | 'left': '40%', |
... | ... | @@ -11736,35 +11953,147 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11736 | 11953 | $('#searchedTermListPopUp_' + windowviewid).draggable({containment:'#daViewDA_' + windowviewid}); |
11737 | 11954 | |
11738 | 11955 | setTimeout(function () { |
11956 | + if ($('#searchTermListUl_' + windowviewid).html() != "") { | |
11957 | + $('#searchTermListUl_' + windowviewid).empty(); | |
11958 | + } | |
11959 | + | |
11960 | + $('#searchTermListUl_' + windowviewid).css('height','250px'); | |
11961 | + | |
11739 | 11962 | $scope.FillSearchList(windowviewid); |
11740 | 11963 | }, 100); |
11741 | 11964 | |
11742 | 11965 | } |
11743 | - $scope.FillSearchList = function (windowviewid) { | |
11966 | + | |
11967 | + $scope.FillSearchList = function (windowviewid) { | |
11968 | + $scope.SetwindowStoreData(windowviewid,'totalstructure',0); | |
11969 | + $scope.SetwindowStoreData(windowviewid,'isSearchClicked',true); | |
11970 | + var totalstructure=0; | |
11971 | + | |
11972 | + $("#languageDiv").css("display","none"); | |
11973 | + | |
11974 | + var languageArray = $rootScope.lexiconLanguageArray; | |
11975 | + | |
11976 | + if(languageArray.length>1) | |
11977 | + { | |
11978 | + $("#languageDiv").css("display","block"); | |
11979 | + $("#selectLanguage_"+windowviewid).empty(); | |
11980 | + for (var i = 0; i <= languageArray.length - 1; i++) { | |
11981 | + $('#selectLanguage_'+windowviewid).append('<option value="' + languageArray[i].id + '">' + languageArray[i].language + '</option>'); | |
11982 | + } | |
11983 | + } | |
11984 | + | |
11985 | + // primar language | |
11986 | + var lanName=languageArray[0].language; | |
11987 | + $scope.loadSearchList(windowviewid,lanName,totalstructure); | |
11988 | + | |
11989 | + } | |
11744 | 11990 | |
11991 | + $scope.changeLanguageList = function (event) { | |
11992 | + $scope.DisableUI(); | |
11993 | + var len= (event.currentTarget.id).split("_").length; | |
11994 | + var windowviewid = (event.currentTarget.id).split("_")[len-1]; | |
11745 | 11995 | if ($('#searchTermListUl_' + windowviewid).html() != "") { |
11746 | 11996 | $('#searchTermListUl_' + windowviewid).empty(); |
11997 | + } | |
11998 | + $('#searchTermListUl_' + windowviewid).css('height','250px'); | |
11999 | + | |
12000 | + $scope.SetwindowStoreData(windowviewid,'totalstructure',0); | |
12001 | + var totalstructure=0; | |
12002 | + | |
12003 | + setTimeout(function () { | |
12004 | + var langId = $("#selectLanguage_"+windowviewid+" option:selected").val(); | |
12005 | + if(langId!=undefined) | |
12006 | + { | |
12007 | + var selectedLanguage = new jinqJs() | |
12008 | + .from( $rootScope.lexiconLanguageArray) | |
12009 | + .where('id == ' + langId) | |
12010 | + .select()[0]; | |
12011 | + | |
12012 | + var lanName=selectedLanguage.language; | |
12013 | + | |
11747 | 12014 | } |
11748 | - $scope.SetwindowStoreData(windowviewid,'isSearchClicked',true); | |
12015 | + else | |
12016 | + { | |
12017 | + var lanName=$rootScope.lexiconLanguageArray[0].language; | |
12018 | + } | |
12019 | + | |
12020 | + $scope.loadSearchList(windowviewid,lanName,totalstructure); | |
11749 | 12021 | |
11750 | - var primaryLexiconIndex = $scope.GetwindowStoreData(windowviewid, 'primaryLexiconInd')[0]; | |
11751 | - var vocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); | |
12022 | + },100) | |
12023 | + | |
12024 | + } | |
11752 | 12025 | |
11753 | - var searchvalue = $("#typedTermName_" + windowviewid).val(); | |
11754 | - var searchfilterdata = $filter('filter')(vocabTermDataArray, searchvalue); | |
12026 | + $scope.LoadMore = function (event) { | |
12027 | + $scope.DisableUI(); | |
12028 | + var len= (event.currentTarget.id).split("_").length; | |
12029 | + var windowviewid = (event.currentTarget.id).split("_")[len-1]; | |
12030 | + var totalstructure = $scope.GetwindowStoreData(windowviewid, 'totalstructure'); | |
12031 | + | |
12032 | + setTimeout(function () { | |
12033 | + var langId = $("#selectLanguage_"+windowviewid+" option:selected").val(); | |
12034 | + if(langId!=undefined) | |
12035 | + { | |
12036 | + var selectedLanguage = new jinqJs() | |
12037 | + .from( $rootScope.lexiconLanguageArray) | |
12038 | + .where('id == ' + langId) | |
12039 | + .select()[0]; | |
12040 | + | |
12041 | + var lanName=selectedLanguage.language; | |
12042 | + | |
12043 | + } | |
12044 | + else | |
12045 | + { | |
12046 | + var lanName=$rootScope.lexiconLanguageArray[0].language; | |
12047 | + } | |
12048 | + $scope.loadSearchList(windowviewid,lanName,totalstructure); | |
12049 | + | |
12050 | + }, 100); | |
12051 | + | |
12052 | + } | |
12053 | + | |
12054 | + $scope.loadSearchList = function (windowviewid,lanName,totalstructure) { | |
12055 | + | |
12056 | + var allVocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); | |
11755 | 12057 | |
11756 | - var totalstructures=0; | |
11757 | - angular.forEach(searchfilterdata[primaryLexiconIndex].VocabTermData.VocabTerms.Term, function (value2, key2) { | |
11758 | - totalstructures=totalstructures+1; | |
11759 | - var $el = $('<option id=' + value2._ActualTermNumber +'_' +windowviewid+ ' style="margin-right:-12px">' + value2._TermText + '</option>').appendTo('#searchTermListUl_' + windowviewid); | |
11760 | - $compile($el)($scope); | |
12058 | + var languageVocabTermDataArray = new jinqJs() | |
12059 | + .from( allVocabTermDataArray) | |
12060 | + .where('language == ' + lanName) | |
12061 | + .select('vocabTermTxt')[0]; | |
12062 | + | |
12063 | + var languageVocabData= languageVocabTermDataArray.vocabTermTxt; | |
12064 | + | |
12065 | + var afterskipdata = new jinqJs() | |
12066 | + .from(languageVocabData) | |
12067 | + .skip(totalstructure) | |
12068 | + .select(); | |
12069 | + | |
12070 | + var limitTofilterdata = $filter('limitTo')(afterskipdata, 500); | |
12071 | + | |
12072 | + var option=''; | |
12073 | + | |
12074 | + angular.forEach(limitTofilterdata, function (value2, key2) { | |
12075 | + totalstructure=totalstructure+1; | |
12076 | + option=option+'<option id=' + value2._ActualTermNumber +'_' +windowviewid+ ' style="margin-right:-12px">' + value2._TermText + '</option>'; | |
12077 | + | |
11761 | 12078 | }) |
11762 | - var termsTotal = '<span class="pull-left marginTop5">' + totalstructures + ' Structures</span>'; | |
11763 | - $("#totalTerms").empty(); | |
11764 | - $('#totalTerms').append(termsTotal); | |
12079 | + var $el = $(option).appendTo('#searchTermListUl_' + windowviewid); | |
12080 | + $compile($el)($scope); | |
12081 | + $scope.SetwindowStoreData(windowviewid,'totalstructure',totalstructure); | |
12082 | + var termsTotal = '<span class="pull-left marginTop5">' + totalstructure + ' Structures</span>'; | |
12083 | + $("#totalTerms_"+windowviewid).empty(); | |
12084 | + $("#totalTerms_"+windowviewid).css('padding-bottom','10px'); | |
12085 | + $("#totalTerms_"+windowviewid).append(termsTotal); | |
12086 | + | |
12087 | + if(totalstructure < languageVocabData.length) | |
12088 | + { | |
12089 | + $("#totalTerms_"+windowviewid).append('<button type="button" id="btlLoadMore_' + windowviewid + '" class="btn btn-primary btn-block" onclick="LoadMore(event)" style="width:70%;float:right">Load More Structures..</button>'); | |
12090 | + } | |
12091 | + else | |
12092 | + { | |
12093 | + $("#totalTerms_"+windowviewid).append('<button type="button" id="btlLoadMore_' + windowviewid + '" class="btn btn-primary btn-block" onclick="LoadMore(event)" style="width:70%;float:right">Load More Structures..</button>'); | |
12094 | + $('#btlLoadMore_' + windowviewid).attr('disabled', 'disabled'); | |
12095 | + } | |
11765 | 12096 | |
11766 | - $scope.EnableUI(); | |
11767 | - | |
11768 | 12097 | if (navigator.userAgent.match(/(iPod|iPhone|iPad|android)/i)) { |
11769 | 12098 | |
11770 | 12099 | $(document).on("mouseover", "#searchTermListUl_" + windowviewid+ " option", function (e) { |
... | ... | @@ -11777,11 +12106,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11777 | 12106 | }); |
11778 | 12107 | } |
11779 | 12108 | |
12109 | + $scope.EnableUI(); | |
12110 | + | |
11780 | 12111 | } |
11781 | - $scope.closeSerachTermListPopUp = function () { | |
12112 | + | |
12113 | + $scope.closeSerachTermListPopUp = function (event) { | |
11782 | 12114 | |
11783 | - var len= (event.target.parentElement.parentElement.parentElement.id).split("_").length; | |
11784 | - var windowviewid = (event.target.parentElement.parentElement.parentElement.id).split("_")[len-1]; | |
12115 | + var len= (event.currentTarget.id).split("_").length; | |
12116 | + var windowviewid = (event.currentTarget.id).split("_")[len-1]; | |
11785 | 12117 | |
11786 | 12118 | $('#searchedTermListPopUp_' + windowviewid).css('display', 'none'); |
11787 | 12119 | $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden"); |
... | ... | @@ -12009,6 +12341,37 @@ function genderChange(event) { |
12009 | 12341 | $(".custom-tooltip1").toggle(); |
12010 | 12342 | } |
12011 | 12343 | } |
12344 | +function ApplySearch(event) { | |
12345 | + event.stopPropagation(); | |
12346 | + var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); | |
12347 | + scope.$apply(function () { | |
12348 | + scope.ApplySearch(event); | |
12349 | + }); | |
12350 | +} | |
12351 | + | |
12352 | +function closeSerachTermListPopUp(event) { | |
12353 | + event.stopPropagation(); | |
12354 | + var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); | |
12355 | + scope.$apply(function () { | |
12356 | + scope.closeSerachTermListPopUp(event); | |
12357 | + }); | |
12358 | +} | |
12359 | +function changeLanguageList(event) { | |
12360 | + event.stopPropagation(); | |
12361 | + var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); | |
12362 | + scope.$apply(function () { | |
12363 | + scope.changeLanguageList(event); | |
12364 | + }); | |
12365 | +} | |
12366 | + | |
12367 | +function LoadMore(event) { | |
12368 | + event.stopPropagation(); | |
12369 | + var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); | |
12370 | + scope.$apply(function () { | |
12371 | + scope.LoadMore(event); | |
12372 | + }); | |
12373 | +} | |
12374 | + | |
12012 | 12375 | |
12013 | 12376 | function viewChange(event) { |
12014 | 12377 | event.stopPropagation(); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -39,7 +39,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
39 | 39 | ethnicity: null, |
40 | 40 | modesty: null |
41 | 41 | }; |
42 | - | |
42 | + $rootScope.lexicons = { | |
43 | + primaryid:1, | |
44 | + secondryids:[] | |
45 | + }; | |
46 | + | |
47 | + | |
43 | 48 | // on refersh this variable will also get null that is why we are only checking this variable on initialize that if it is null that means page gets refershed. |
44 | 49 | $rootScope.refreshcheck = null; |
45 | 50 | var isCommingSoonModel = true; |
... | ... | @@ -325,7 +330,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
325 | 330 | draggable: "disabled", |
326 | 331 | |
327 | 332 | size: { |
328 | - width: screen.width-10, | |
333 | + width: screen.width-30, | |
329 | 334 | height: screen.height-150 |
330 | 335 | }, |
331 | 336 | |
... | ... | @@ -649,6 +654,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
649 | 654 | sessionStorage.removeItem('isModuleOpenByOpenResource'); |
650 | 655 | sessionStorage.removeItem('ExitsCBFileDetail'); |
651 | 656 | $('#login').css('visibility', 'visible'); |
657 | + $rootScope.lexiconData(); | |
652 | 658 | |
653 | 659 | $rootScope.checkRefreshButtonClick = 1; |
654 | 660 | var date = new Date(); |
... | ... | @@ -684,8 +690,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
684 | 690 | |
685 | 691 | $scope.ValidateClientSiteUrl(); |
686 | 692 | } |
687 | - | |
688 | - else { | |
693 | + else | |
694 | + { | |
689 | 695 | if (navigator.cookieEnabled) { |
690 | 696 | |
691 | 697 | $rootScope.isLoading = false; |
... | ... | @@ -792,6 +798,156 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
792 | 798 | }, 2000); |
793 | 799 | |
794 | 800 | } |
801 | + | |
802 | + $rootScope.lexiconData = function () { | |
803 | + | |
804 | + $rootScope.lexiconAllLanguage = []; | |
805 | + $rootScope.lexiconLanguageArray = []; | |
806 | + $.ajax({ | |
807 | + url: '~/../content/data/json/da/uc_dat_default.json', | |
808 | + dataType: "json", | |
809 | + success: function (result) { | |
810 | + var plId=result.root.uc.pl.lx._id; | |
811 | + var plText=result.root.uc.pl.lx._tl; | |
812 | + | |
813 | + $rootScope.lexiconAllLanguage.push({ _id: plId, _tl: plText }); | |
814 | + $(result.root.uc.al.lx).each(function (key, value) { | |
815 | + $rootScope.lexiconAllLanguage.push({ _id: this._id, _tl: this._tl }); | |
816 | + | |
817 | + }); | |
818 | + | |
819 | + } | |
820 | + | |
821 | + }); | |
822 | + | |
823 | + $('#lexiconLangDropdown').change(function () { | |
824 | + $rootScope.isLexiconLanguageClicked = true; | |
825 | + $('#laxiconLangAdd').removeAttr('disabled'); | |
826 | + $('#laxicanlanguageChagne').removeAttr('disabled'); | |
827 | + $rootScope.selectedId = $("#lexiconLangDropdown option:selected").attr('val'); | |
828 | + $rootScope.selectedText = $("#lexiconLangDropdown option:selected").text(); | |
829 | + }); | |
830 | + | |
831 | + $('#laxiconLangAdd').click(function () { | |
832 | + if ($rootScope.isLexiconLanguageClicked == true) { | |
833 | + $rootScope.isLexiconLanguageClicked = false; | |
834 | + $("#lexiconLangDropdown :selected").remove(); | |
835 | + $('#secondLax').append('<option val="' + $rootScope.selectedId + '">' + $rootScope.selectedText + '</option>'); | |
836 | + $rootScope.lexiconLanguageArray.push({ id: $rootScope.selectedId, language: $rootScope.selectedText }); | |
837 | + $rootScope.islaxicanlanguageChange=true; | |
838 | + $('#laxiconLangAdd').attr('disabled', 'disabled'); | |
839 | + $('#laxicanlanguageChagne').attr('disabled', 'disabled'); | |
840 | + | |
841 | + $timeout(function () { | |
842 | + $('#lexiconLangDropdown').html($('#lexiconLangDropdown').find('option').sort(function (x, y) { | |
843 | + return $(x).text() > $(y).text() ? 1 : -1 | |
844 | + })); | |
845 | + }, 100); | |
846 | + } | |
847 | + }); | |
848 | + | |
849 | + $('#secondLax').change(function () { | |
850 | + $rootScope.isActiveLexiconLanguageClicked = true; | |
851 | + $rootScope.secondlaxdid = $("#secondLax option:selected").attr('val'); | |
852 | + $rootScope.secondlaxtext = $("#secondLax option:selected").text(); | |
853 | + $('#laxiconLangRemove').removeAttr('disabled'); | |
854 | + | |
855 | + }); | |
856 | + | |
857 | + $("#laxiconLangRemove").click(function () { | |
858 | + if ($rootScope.isActiveLexiconLanguageClicked == true) { | |
859 | + $rootScope.isActiveLexiconLanguageClicked = false; | |
860 | + $("#secondLax :selected").remove(); | |
861 | + $('#lexiconLangDropdown').append('<option val="' + $rootScope.secondlaxdid + '">' + $rootScope.secondlaxtext + '</option>'); | |
862 | + // $rootScope.lexiconLanguageArray.splice($rootScope.secondlaxtext, 1); | |
863 | + $rootScope.lexiconLanguageArray = []; | |
864 | + $("#secondLax > option").each(function () { | |
865 | + $rootScope.lexiconLanguageArray.push({ id: $(this).attr("val"), language: this.value }); | |
866 | + }); | |
867 | + $rootScope.lexiconLanguageArray.unshift({ id: $("#primarylaxican").attr("name"), language: $("#primarylaxican").val() }); | |
868 | + $rootScope.islaxicanlanguageChange=true; | |
869 | + | |
870 | + $timeout(function () { | |
871 | + $('#lexiconLangDropdown').html($('#lexiconLangDropdown').find('option').sort(function (x, y) { | |
872 | + return $(x).text() > $(y).text() ? 1 : -1 | |
873 | + })); | |
874 | + | |
875 | + $('#laxiconLangRemove').attr('disabled', 'disabled'); | |
876 | + $("#secondLax > option").each(function () { | |
877 | + $('#laxiconLangRemove').removeAttr('disabled'); | |
878 | + }); | |
879 | + }, 100); | |
880 | + } | |
881 | + }); | |
882 | + | |
883 | + $("#laxicanlanguageChagne").click(function () { | |
884 | + if ($rootScope.isLexiconLanguageClicked == true) { | |
885 | + $rootScope.isLexiconLanguageClicked = false; | |
886 | + var primarylaxiid = $("#lexiconLangDropdown option:selected").attr('val'); | |
887 | + var primarylaxicantext = $("#lexiconLangDropdown option:selected").text(); | |
888 | + $("#lexiconLangDropdown :selected").remove(); | |
889 | + $('#lexiconLangDropdown').append('<option val="' + $('#primarylaxican').attr("name") + '">' + $('#primarylaxican').val() + '</option>'); | |
890 | + $('#primarylaxican').val(primarylaxicantext); | |
891 | + $('#primarylaxican').attr("name", primarylaxiid); | |
892 | + $rootScope.lexiconLanguageArray[0].id = primarylaxiid; | |
893 | + $rootScope.lexiconLanguageArray[0].language = primarylaxicantext; | |
894 | + $('#laxicanlanguageChagne').attr('disabled', 'disabled'); | |
895 | + $('#laxiconLangAdd').attr('disabled', 'disabled'); | |
896 | + | |
897 | + $rootScope.islaxicanlanguageChange=true; | |
898 | + | |
899 | + $timeout(function () { | |
900 | + $('#lexiconLangDropdown').html($('#lexiconLangDropdown').find('option').sort(function (x, y) { | |
901 | + return $(x).text() > $(y).text() ? 1 : -1 | |
902 | + })); | |
903 | + }, 100); | |
904 | + | |
905 | + } | |
906 | + }); | |
907 | + } | |
908 | + | |
909 | + $rootScope.InitiateLexicon = function (primaryId,secondryIds) { | |
910 | + | |
911 | + var secondLng=[]; | |
912 | + secondLng=secondryIds.split(','); | |
913 | + var primaryLang = new jinqJs() | |
914 | + .from( $rootScope.lexiconAllLanguage) | |
915 | + .where('_id == ' + primaryId) | |
916 | + .select()[0]; | |
917 | + | |
918 | + var secondLang = new jinqJs() | |
919 | + .from( $rootScope.lexiconAllLanguage) | |
920 | + .in(secondLng, '_id') | |
921 | + .orderBy([{ field: '_tl', sort: 'asc' }]) | |
922 | + .select(); | |
923 | + $rootScope.lexiconLanguageArray.push({ id: primaryLang._id, language: primaryLang._tl }); | |
924 | + | |
925 | + $("#primarylaxican").val(primaryLang._tl); | |
926 | + $('#primarylaxican').attr("name", primaryLang._id); | |
927 | + | |
928 | + | |
929 | + secondLng.push(primaryId); | |
930 | + | |
931 | + var restLanguage = new jinqJs() | |
932 | + .from( $rootScope.lexiconAllLanguage) | |
933 | + .not() | |
934 | + .in(secondLng, '_id') | |
935 | + .orderBy([{ field: '_tl', sort: 'asc' }]) | |
936 | + .select(); | |
937 | + | |
938 | + | |
939 | + angular.forEach(restLanguage, function (value, key) { | |
940 | + $('#lexiconLangDropdown').append('<option val="' + value._id + '">' + value._tl + '</option>'); | |
941 | + }); | |
942 | + | |
943 | + angular.forEach(secondLang, function (value, key) { | |
944 | + $('#secondLax').append('<option val="' + value._id + '">' + value._tl + '</option>'); | |
945 | + $rootScope.lexiconLanguageArray.push({ id: value._id, language: value._tl }); | |
946 | + }); | |
947 | + | |
948 | + | |
949 | + } | |
950 | + | |
795 | 951 | $rootScope.getConfigurationValues = function () { |
796 | 952 | ConfigurationService.getCofigValue() |
797 | 953 | .then( |
... | ... | @@ -877,23 +1033,26 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
877 | 1033 | $rootScope.isModestyOff = false; |
878 | 1034 | localStorage.setItem("globalModesty", "Y"); |
879 | 1035 | $rootScope.formsetting = { |
880 | - ethnicity: null, | |
1036 | + ethnicity: "W", | |
881 | 1037 | modesty: "Y" |
882 | 1038 | } |
883 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting) | |
1039 | + | |
1040 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
884 | 1041 | } |
885 | 1042 | else { |
886 | 1043 | $rootScope.isModestyOn = false; |
887 | 1044 | $rootScope.isModestyOff = true; |
888 | 1045 | localStorage.setItem("globalModesty", "N"); |
889 | 1046 | $rootScope.formsetting = { |
890 | - ethnicity: null, | |
1047 | + ethnicity: "W", | |
891 | 1048 | modesty: "N" |
892 | 1049 | } |
893 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting) | |
1050 | + | |
1051 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
894 | 1052 | } |
895 | 1053 | } |
896 | - else { | |
1054 | + else | |
1055 | + { | |
897 | 1056 | localStorage.setItem("globalModesty", result.userselectedModesty); |
898 | 1057 | localStorage.setItem("globalEthnicity", result.userSelectedSkintone); |
899 | 1058 | |
... | ... | @@ -901,9 +1060,18 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
901 | 1060 | ethnicity: result.userSelectedSkintone, |
902 | 1061 | modesty: result.userselectedModesty |
903 | 1062 | } |
904 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting) | |
1063 | + | |
1064 | + $rootScope.UpdateSetting($rootScope.formsetting); | |
905 | 1065 | |
906 | 1066 | } |
1067 | + | |
1068 | + $rootScope.lexicons = { | |
1069 | + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1", | |
1070 | + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:"" | |
1071 | + }; | |
1072 | + | |
1073 | + $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids) | |
1074 | + | |
907 | 1075 | } |
908 | 1076 | else { |
909 | 1077 | if (result.userselectedModesty == undefined || result.userselectedModesty == null || |
... | ... | @@ -913,12 +1081,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
913 | 1081 | $rootScope.isModestyOff = false; |
914 | 1082 | localStorage.setItem("globalModesty", "Y"); |
915 | 1083 | $rootScope.formsetting = { |
916 | - ethnicity: null, | |
1084 | + ethnicity: "W", | |
917 | 1085 | modesty: "Y" |
918 | 1086 | } |
919 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting); | |
1087 | + $rootScope.UpdateSetting($rootScope.formsetting); | |
920 | 1088 | } |
921 | - else { | |
1089 | + else | |
1090 | + { | |
922 | 1091 | localStorage.setItem("globalModesty", result.userselectedModesty); |
923 | 1092 | localStorage.setItem("globalEthnicity", result.userSelectedSkintone); |
924 | 1093 | |
... | ... | @@ -926,9 +1095,17 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
926 | 1095 | ethnicity: result.userSelectedSkintone, |
927 | 1096 | modesty: result.userselectedModesty |
928 | 1097 | } |
929 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting) | |
1098 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
930 | 1099 | |
931 | 1100 | } |
1101 | + | |
1102 | + $rootScope.lexicons = { | |
1103 | + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1", | |
1104 | + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:"" | |
1105 | + }; | |
1106 | + | |
1107 | + $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids) | |
1108 | + | |
932 | 1109 | } |
933 | 1110 | //code for modesty setting |
934 | 1111 | $rootScope.aiaModesty = $rootScope.formsetting.modesty; |
... | ... | @@ -1452,20 +1629,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1452 | 1629 | $rootScope.isModestyOff = false; |
1453 | 1630 | localStorage.setItem("globalModesty", "Y"); |
1454 | 1631 | $rootScope.formsetting = { |
1455 | - ethnicity: null, | |
1632 | + ethnicity: "W", | |
1456 | 1633 | modesty: "Y" |
1457 | 1634 | } |
1458 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting) | |
1635 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
1459 | 1636 | } |
1460 | 1637 | else { |
1461 | 1638 | $rootScope.isModestyOn = false; |
1462 | 1639 | $rootScope.isModestyOff = true; |
1463 | 1640 | localStorage.setItem("globalModesty", "N"); |
1464 | 1641 | $rootScope.formsetting = { |
1465 | - ethnicity: null, | |
1642 | + ethnicity: "W", | |
1466 | 1643 | modesty: "N" |
1467 | 1644 | } |
1468 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting) | |
1645 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
1469 | 1646 | } |
1470 | 1647 | } |
1471 | 1648 | else { |
... | ... | @@ -1473,11 +1650,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1473 | 1650 | $rootScope.isModestyOff = false; |
1474 | 1651 | localStorage.setItem("globalModesty", "Y"); |
1475 | 1652 | $rootScope.formsetting = { |
1476 | - ethnicity: null, | |
1653 | + ethnicity: "W", | |
1477 | 1654 | modesty: "Y" |
1478 | 1655 | } |
1479 | - $rootScope.UpdateAndCloseSetting($rootScope.formsetting) | |
1656 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
1480 | 1657 | } |
1658 | + | |
1659 | + //for site user set default lexicon | |
1660 | + $rootScope.lexicons = { | |
1661 | + primaryid:"1", | |
1662 | + secondryids:"" | |
1663 | + }; | |
1664 | + | |
1665 | + $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids) | |
1481 | 1666 | //code for modesty setting |
1482 | 1667 | $rootScope.aiaModesty = $rootScope.formsetting.modesty; |
1483 | 1668 | |
... | ... | @@ -1516,7 +1701,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1516 | 1701 | $location.path('/'); |
1517 | 1702 | |
1518 | 1703 | } |
1519 | - else { | |
1704 | + else | |
1705 | + { | |
1520 | 1706 | if (result.LicenseInfo != null ) { |
1521 | 1707 | |
1522 | 1708 | //only site instructor allowed to change modesty |
... | ... | @@ -1527,11 +1713,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1527 | 1713 | $("#modestyDiv").find("*").prop('disabled', true); |
1528 | 1714 | } |
1529 | 1715 | |
1530 | - // set license id | |
1531 | - $scope.UpdateUserExportImageData(result.Id, 'LicenseId', result.LicenseId) | |
1716 | + // set license id | |
1717 | + $scope.UpdateUserExportImageData(result.Id, 'LicenseId', result.LicenseId) | |
1532 | 1718 | |
1533 | - // set license type :note 5 for demo/test license | |
1534 | - $scope.UpdateUserExportImageData(result.Id, 'LicenseTypeId', result.LicenseInfo.LicenseTypeId); | |
1719 | + // set license type :note 5 for demo/test license | |
1720 | + $scope.UpdateUserExportImageData(result.Id, 'LicenseTypeId', result.LicenseInfo.LicenseTypeId); | |
1535 | 1721 | |
1536 | 1722 | if(result.UserExportImageDetail!=null) |
1537 | 1723 | { |
... | ... | @@ -2041,90 +2227,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2041 | 2227 | ); |
2042 | 2228 | } |
2043 | 2229 | |
2044 | - $rootScope.lexiconLanguageArray = []; | |
2045 | - $rootScope.lexiconLanguageArray.push({ id: "1", language: "English" }); | |
2046 | 2230 | $(document).ready(function () { |
2047 | 2231 | |
2048 | - $rootScope.isLexiconTabClicked = true; | |
2049 | - $rootScope.lexiconData = function () { | |
2050 | - if ($rootScope.isLexiconTabClicked == true) { | |
2051 | - $rootScope.isLexiconTabClicked = false; | |
2052 | - $.ajax({ | |
2053 | - url: '~/../content/data/json/da/uc_dat_default.json', | |
2054 | - dataType: "json", | |
2055 | - success: function (result) { | |
2056 | - $(result.root.uc.al.lx).each(function (key, value) { | |
2057 | - | |
2058 | - $('#lexiconLangDropdown').append('<option val="' + this._id + '">' + this._tl + '</option>'); | |
2059 | - | |
2060 | - | |
2061 | - }); | |
2062 | - $('#lexiconLangDropdown').html($('#lexiconLangDropdown').find('option').sort(function (x, y) { | |
2063 | - | |
2064 | - return $(x).text() > $(y).text() ? 1 : -1 | |
2065 | - | |
2066 | - })); | |
2067 | - } | |
2068 | - | |
2069 | - }); | |
2070 | - } | |
2071 | - $('#lexiconLangDropdown').change(function () { | |
2072 | - $rootScope.isLexiconLanguageClicked = true; | |
2073 | - $('#laxiconLangAdd').removeAttr('disabled'); | |
2074 | - $('#laxicanlanguageChagne').removeAttr('disabled'); | |
2075 | - $rootScope.selectedId = $("#lexiconLangDropdown option:selected").attr('val'); | |
2076 | - $rootScope.selectedText = $("#lexiconLangDropdown option:selected").text(); | |
2077 | - }); | |
2078 | - | |
2079 | - $('#laxiconLangAdd').click(function () { | |
2080 | - if ($rootScope.isLexiconLanguageClicked == true) { | |
2081 | - $rootScope.isLexiconLanguageClicked = false; | |
2082 | - $("#lexiconLangDropdown :selected").remove(); | |
2083 | - $('#secondLax').append('<option val="' + $rootScope.selectedId + '">' + $rootScope.selectedText + '</option>'); | |
2084 | - $rootScope.lexiconLanguageArray.push({ id: $rootScope.selectedId, language: $rootScope.selectedText }); | |
2085 | - $rootScope.islaxicanlanguageChange=true; | |
2086 | - } | |
2087 | - }); | |
2088 | - | |
2089 | - $('#secondLax').change(function () { | |
2090 | - $rootScope.isActiveLexiconLanguageClicked = true; | |
2091 | - $rootScope.secondlaxdid = $("#secondLax option:selected").attr('val'); | |
2092 | - $rootScope.secondlaxtext = $("#secondLax option:selected").text(); | |
2093 | - | |
2094 | - }); | |
2095 | - | |
2096 | - $("#laxiconLangRemove").click(function () { | |
2097 | - if ($rootScope.isActiveLexiconLanguageClicked == true) { | |
2098 | - $rootScope.isActiveLexiconLanguageClicked = false; | |
2099 | - $("#secondLax :selected").remove(); | |
2100 | - $('#lexiconLangDropdown').append('<option val="' + $rootScope.secondlaxdid + '">' + $rootScope.secondlaxtext + '</option>'); | |
2101 | - // $rootScope.lexiconLanguageArray.splice($rootScope.secondlaxtext, 1); | |
2102 | - $rootScope.lexiconLanguageArray = []; | |
2103 | - $("#secondLax > option").each(function () { | |
2104 | - $rootScope.lexiconLanguageArray.push({ id: $(this).attr("val"), language: this.value }); | |
2105 | - }); | |
2106 | - $rootScope.lexiconLanguageArray.unshift({ id: $("#primarylaxican").attr("name"), language: $("#primarylaxican").val() }); | |
2107 | - $rootScope.islaxicanlanguageChange=true; | |
2108 | - } | |
2109 | - }); | |
2110 | - | |
2111 | - $("#laxicanlanguageChagne").click(function () { | |
2112 | - if ($rootScope.isLexiconLanguageClicked == true) { | |
2113 | - $rootScope.isLexiconLanguageClicked = false; | |
2114 | - var primarylaxiid = $("#lexiconLangDropdown option:selected").attr('val'); | |
2115 | - var primarylaxicantext = $("#lexiconLangDropdown option:selected").text(); | |
2116 | - $("#lexiconLangDropdown :selected").remove(); | |
2117 | - $('#lexiconLangDropdown').append('<option val="' + $('#primarylaxican').attr("name") + '">' + $('#primarylaxican').val() + '</option>'); | |
2118 | - $('#primarylaxican').val(primarylaxicantext); | |
2119 | - $('#primarylaxican').attr("name", primarylaxiid); | |
2120 | - $rootScope.lexiconLanguageArray[0].id = primarylaxiid; | |
2121 | - $rootScope.lexiconLanguageArray[0].language = primarylaxicantext; | |
2122 | - | |
2123 | - $rootScope.islaxicanlanguageChange=true; | |
2124 | - } | |
2125 | - }); | |
2126 | - } | |
2127 | - | |
2128 | 2232 | $(function () { |
2129 | 2233 | var colpick = $('.demo').each(function () { |
2130 | 2234 | |
... | ... | @@ -3243,8 +3347,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3243 | 3347 | $('#modal-settings').css("display", "none"); |
3244 | 3348 | $("#modelsettingsbackground").css("display", "none"); |
3245 | 3349 | } |
3246 | - else { | |
3247 | - | |
3350 | + else | |
3351 | + { | |
3352 | + $('#modelsettingsbackground').css('z-index', '12000000'); | |
3248 | 3353 | $('#modal-settings').css("display", "block"); |
3249 | 3354 | $("#modelsettingsbackground").css("display", "block"); |
3250 | 3355 | } |
... | ... | @@ -7752,7 +7857,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
7752 | 7857 | $('#AABodySystems').empty(); |
7753 | 7858 | $('#bodySystems').empty(); |
7754 | 7859 | $('#termList').empty(); |
7755 | - $('#viewName').empty(); | |
7860 | + $('#viewName').empty(); | |
7861 | + $("#langaugeDivLm").css("display", "none"); | |
7756 | 7862 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='picImagePanel']").not("div[id*='vidImagePanel']"); |
7757 | 7863 | if (modulePanel != undefined && modulePanel.length>0) { |
7758 | 7864 | for (var i = 0 ; i < modulePanel.length; i++) { |
... | ... | @@ -7779,6 +7885,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
7779 | 7885 | $('#bodySystems').empty(); |
7780 | 7886 | $('#termList').empty(); |
7781 | 7887 | $('#viewName').empty(); |
7888 | + $("#langaugeDivLm").css("display", "none"); | |
7782 | 7889 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']").not("div[id*='picImagePanel']").not("div[id*='vidImagePanel']"); |
7783 | 7890 | if (modulePanel != undefined && modulePanel.length>0) { |
7784 | 7891 | for (var index = 0 ; index < modulePanel.length; index++) { |
... | ... | @@ -7867,16 +7974,16 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
7867 | 7974 | $("#annotationpaintbrushsize").css('pointer-events', 'none'); |
7868 | 7975 | $("#annotationpainteraser").css('pointer-events', 'none'); |
7869 | 7976 | |
7870 | - $rootScope.islistManagerEventAlredayDispachted = true; | |
7871 | - | |
7872 | 7977 | if(selectedPanel.match("daImagePanel")) |
7873 | 7978 | { |
7979 | + $("#langaugeDivLm").css("display", "block"); | |
7874 | 7980 | $rootScope.dalistManagerEvent(windowviewid); |
7875 | 7981 | |
7876 | 7982 | $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)"); |
7877 | 7983 | } |
7878 | 7984 | else if(selectedPanel.match("AAImagePanel")) |
7879 | 7985 | { |
7986 | + $("#langaugeDivLm").css("display", "none"); | |
7880 | 7987 | $rootScope.aalistManagerEvent(windowviewid); |
7881 | 7988 | |
7882 | 7989 | $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onSearchItemSelection(this.options[this.selectedIndex].id)"); |
... | ... | @@ -7941,6 +8048,27 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
7941 | 8048 | |
7942 | 8049 | } |
7943 | 8050 | |
8051 | + $rootScope.changeLanguageLmList = function () { | |
8052 | + var selectedPanel = $("#viewName option:selected").val(); | |
8053 | + | |
8054 | + if(selectedPanel.match("daImagePanel")) | |
8055 | + { | |
8056 | + var windowviewid=selectedPanel.split('_')[1]; | |
8057 | + $rootScope.changeLanguageLmEvent(windowviewid); | |
8058 | + } | |
8059 | + } | |
8060 | + | |
8061 | + $rootScope.LoadMoreLm = function () { | |
8062 | + var selectedPanel = $("#viewName option:selected").val(); | |
8063 | + | |
8064 | + if(selectedPanel.match("daImagePanel")) | |
8065 | + { | |
8066 | + var windowviewid=selectedPanel.split('_')[1]; | |
8067 | + $rootScope.LoadMoreLmEvent(windowviewid); | |
8068 | + } | |
8069 | + } | |
8070 | + | |
8071 | + | |
7944 | 8072 | function fillListManagerTerms() { |
7945 | 8073 | |
7946 | 8074 | var len = $rootScope.openModules.length; |
... | ... | @@ -8061,85 +8189,94 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8061 | 8189 | $rootScope.aiaModesty = $rootScope.formsetting.modesty; |
8062 | 8190 | |
8063 | 8191 | } |
8064 | - $rootScope.isApplyBtnClicked = false; | |
8192 | + | |
8065 | 8193 | $rootScope.CancelSetting = function () { |
8066 | 8194 | $rootScope.isCloseSettingClicked = true; |
8195 | + $rootScope.islaxicanlanguageChange=false; | |
8067 | 8196 | $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity); |
8068 | 8197 | $rootScope.setModestySettings($rootScope.globalSetting.modesty); |
8069 | 8198 | |
8070 | - $rootScope.islaxicanlanguageChange=false; | |
8071 | - if ($rootScope.isApplyBtnClicked == false) { | |
8072 | - | |
8073 | - $rootScope.deSelectLanguageOptions(); | |
8074 | - } | |
8075 | - else { | |
8076 | - | |
8077 | - $rootScope.isApplyBtnClicked = false; | |
8078 | - } | |
8199 | + $rootScope.deSelectLanguageOptions(); | |
8200 | + | |
8079 | 8201 | $('#modal-settings').css("display", "none"); |
8080 | 8202 | $("#modelsettingsbackground").css("display", "none"); |
8081 | 8203 | } |
8082 | - $rootScope.CloseSetting = function () { | |
8083 | - if($rootScope.isApplyBtnClicked) | |
8084 | - { | |
8085 | - $("#saveSettingsMessageModal").modal('show'); | |
8086 | - $("#saveSettingsMessageModal").css('zIndex', 80000000000); | |
8087 | - } | |
8088 | - else | |
8089 | - { | |
8090 | - $rootScope.CancelSetting (); | |
8091 | - } | |
8092 | - } | |
8093 | - | |
8094 | - $rootScope.saveSettings = function () { | |
8095 | 8204 | |
8096 | - var currentSkintone = $rootScope.globalSetting.ethnicity; | |
8097 | - var currentModesty = $rootScope.globalSetting.modesty; | |
8205 | + $rootScope.UpdateAndCloseSetting = function (Formatsetting) { | |
8206 | + | |
8207 | + $timeout(function () { | |
8208 | + $('#setting-spinner').css('visibility', 'visible'); | |
8209 | + $('#modelsettingsbackground').css('z-index', '12000005'); | |
8210 | + | |
8211 | + }, 100); | |
8212 | + | |
8213 | + $rootScope.lexiconLanguageArrayLength = $rootScope.lexiconLanguageArray.length; | |
8098 | 8214 | var setting={}; |
8099 | - setting.modesty =currentModesty ; | |
8100 | - setting.skintone = currentSkintone; | |
8215 | + setting.modesty =Formatsetting.modesty ; | |
8216 | + setting.skintone = Formatsetting.ethnicity; | |
8101 | 8217 | setting.userId = $rootScope.userData.Id; |
8102 | - AuthenticationService.saveSetings(setting) | |
8103 | - .then( | |
8218 | + | |
8219 | + var secondLan=[] | |
8220 | + | |
8221 | + $("#secondLax > option").each(function () { | |
8222 | + secondLan.push($(this).attr("val")); | |
8223 | + | |
8224 | + }); | |
8104 | 8225 | |
8226 | + setting.primaryid = $('#primarylaxican').attr("name"); | |
8227 | + setting.secondryids = secondLan.join(","); | |
8228 | + | |
8229 | + if($rootScope.userData.Id!=0) | |
8230 | + { | |
8231 | + AuthenticationService.saveSetings(setting) | |
8232 | + .then( | |
8105 | 8233 | function (result) { |
8106 | - var k= result; | |
8107 | - if(result==1){ | |
8108 | - $('#modal-settings').css("display", "none"); | |
8109 | - $("#modelsettingsbackground").css("display", "none"); | |
8110 | - //hide saveSettingsMessageModal | |
8111 | - $("#saveSettingsMessageModal").modal('hide'); | |
8112 | - $rootScope.sucessMessage = AIAConstants.SETTINGS_SAVED | |
8113 | - $("#successMessageModal").modal('show'); | |
8114 | - | |
8234 | + if(result==1) | |
8235 | + { | |
8236 | + $timeout(function () { | |
8237 | + $('#setting-spinner').css('visibility', 'hidden'); | |
8238 | + $('#modal-settings').css("display", "none"); | |
8239 | + $('#modelsettingsbackground').css('z-index', '12000000'); | |
8240 | + $("#modelsettingsbackground").css("display", "none"); | |
8241 | + $rootScope.UpdateSetting(Formatsetting); | |
8242 | + | |
8243 | + }, 500); | |
8244 | + | |
8115 | 8245 | } |
8116 | 8246 | else |
8117 | 8247 | { |
8118 | 8248 | $rootScope.errorMessage =AIAConstants.SETTING_SAVE_ERROR; |
8119 | 8249 | $("#messageModal").modal('show'); |
8120 | - | |
8121 | 8250 | } |
8122 | 8251 | |
8123 | - | |
8124 | 8252 | }), |
8125 | - function (error) { | |
8126 | - console.log(' Error in Saving settings = ' + error.statusText); | |
8127 | - $rootScope.isVisibleLogin = true; | |
8128 | - $rootScope.errorMessage = error; | |
8129 | - $("#messageModal").modal('show'); | |
8253 | + function (error) { | |
8254 | + console.log(' Error in Saving settings = ' + error.statusText); | |
8255 | + $rootScope.isVisibleLogin = true; | |
8256 | + $('#setting-spinner').css('visibility', 'hidden'); | |
8257 | + $('#modal-settings').css("display", "none"); | |
8258 | + $('#modelsettingsbackground').css('zIndex', '12000000'); | |
8259 | + $("#modelsettingsbackground").css("display", "none"); | |
8260 | + $rootScope.errorMessage = error; | |
8261 | + $("#messageModal").modal('show'); | |
8262 | + } | |
8263 | + | |
8264 | + } | |
8265 | + else | |
8266 | + { | |
8267 | + // for site user. no user id for site license | |
8268 | + $('#setting-spinner').css('visibility', 'hidden'); | |
8269 | + $('#modal-settings').css("display", "none"); | |
8270 | + $('#modelsettingsbackground').css('zIndex', '12000000'); | |
8271 | + $("#modelsettingsbackground").css("display", "none"); | |
8272 | + $rootScope.UpdateSetting(setting); | |
8273 | + | |
8130 | 8274 | } |
8131 | - } | |
8132 | - $rootScope.UpdateAndCloseSetting = function (setting) { | |
8133 | - $rootScope.UpdateSetting(setting); | |
8134 | - $rootScope.isApplyBtnClicked = false; | |
8135 | - $('#modal-settings').css("display", "none"); | |
8136 | - $("#modelsettingsbackground").css("display", "none"); | |
8137 | 8275 | |
8138 | - $rootScope.lexiconLanguageArrayLength = $rootScope.lexiconLanguageArray.length; | |
8276 | + | |
8139 | 8277 | }; |
8140 | 8278 | |
8141 | 8279 | |
8142 | - | |
8143 | 8280 | $rootScope.deSelectLanguageOptions = function () { |
8144 | 8281 | |
8145 | 8282 | var languageDifference = ($rootScope.lexiconLanguageArrayLength) - ($rootScope.lexiconLanguageArray.length); |
... | ... | @@ -8169,9 +8306,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8169 | 8306 | }); |
8170 | 8307 | } |
8171 | 8308 | |
8172 | - //$("#primarylaxican").val($rootScope.lexiconPrimaryLanguage); | |
8173 | - //$('#primarylaxican').attr("name", $rootScope.primaryLangID); | |
8174 | - | |
8175 | 8309 | } |
8176 | 8310 | } |
8177 | 8311 | else if (languageDifference < 0) { |
... | ... | @@ -8228,11 +8362,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8228 | 8362 | })); |
8229 | 8363 | } |
8230 | 8364 | |
8231 | - | |
8232 | 8365 | $rootScope.UpdateSetting = function (setting) { |
8233 | 8366 | |
8234 | 8367 | $rootScope.isCallFromOtherModule = undefined; |
8235 | - $rootScope.isApplyBtnClicked = true; | |
8236 | 8368 | var isReloadingViewRequired = false; |
8237 | 8369 | //1. |
8238 | 8370 | if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
... | ... | @@ -385,12 +385,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
385 | 385 | $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5); |
386 | 386 | var canvas = document.getElementById("canvasPIC_" + windowviewid); |
387 | 387 | var canvasPaint = document.getElementById("canvasPaintPIC_" + windowviewid); |
388 | - | |
388 | + | |
389 | 389 | canvas.height = canvasDIvHeight; |
390 | 390 | canvasPaint.height = canvasDIvHeight |
391 | - canvas.width = screen.width; | |
392 | - canvasPaint.width = screen.width; | |
393 | - | |
391 | + var $ua = navigator.userAgent; | |
392 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
393 | + canvas.width = screen.width-20; | |
394 | + canvasPaint.width = screen.width-20; | |
395 | + } | |
396 | + else | |
397 | + { | |
398 | + canvas.width = screen.width-40; | |
399 | + canvasPaint.width = screen.width-40; | |
400 | + } | |
401 | + | |
394 | 402 | var openedImage = document.getElementById('mypic_' + windowviewid ); |
395 | 403 | openedImage.src = selectedpicture; |
396 | 404 | openedImage.onload = function () { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -2720,6 +2720,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2720 | 2720 | |
2721 | 2721 | $("#AABodySystems").empty(); |
2722 | 2722 | $("#bodySystems").css("display", "none"); |
2723 | + $("#langaugeDivLm").css("display", "none"); | |
2723 | 2724 | $("#AABodySystems").css("display", "block"); |
2724 | 2725 | $("#bodySystemList_" + windowviewid + " li a").each(function (key, value) { |
2725 | 2726 | var sysid= $(this).attr('id') + '_' +windowviewid; |
... | ... | @@ -2769,8 +2770,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2769 | 2770 | $rootScope.aaloadSearchData(windowviewid); |
2770 | 2771 | |
2771 | 2772 | $timeout(function () { |
2772 | - $("#totalTerms").empty(); | |
2773 | - $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
2773 | + $("#totalTermsLm").empty(); | |
2774 | + $("#totalTermsLm").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
2774 | 2775 | $scope.EnableUI(); |
2775 | 2776 | }, 1000); |
2776 | 2777 | |
... | ... | @@ -2790,8 +2791,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2790 | 2791 | |
2791 | 2792 | $compile($selectedOptions)($scope); |
2792 | 2793 | } |
2793 | - $("#totalTerms").empty(); | |
2794 | - $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
2794 | + $("#totalTermsLm").empty(); | |
2795 | + $("#totalTermsLm").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
2795 | 2796 | } |
2796 | 2797 | else { |
2797 | 2798 | var imageId = $scope.GetAAwindowStoreData(windowviewid,'imageId'); |
... | ... | @@ -2861,8 +2862,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2861 | 2862 | } |
2862 | 2863 | } |
2863 | 2864 | }); |
2864 | - $("#totalTerms").empty(); | |
2865 | - $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
2865 | + $("#totalTermsLm").empty(); | |
2866 | + $("#totalTermsLm").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
2866 | 2867 | } |
2867 | 2868 | } |
2868 | 2869 | $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo,windowviewid) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
... | ... | @@ -101,6 +101,10 @@ |
101 | 101 | }).error(function (data, status, headers, config) { |
102 | 102 | console.log('error') |
103 | 103 | deferred.reject(data); |
104 | + $('#setting-spinner').css('visibility', 'hidden'); | |
105 | + $('#modal-settings').css("display", "none"); | |
106 | + $('#modelsettingsbackground').css('zIndex', '12000000'); | |
107 | + $("#modelsettingsbackground").css("display", "none"); | |
104 | 108 | $rootScope.errorMessage = data; |
105 | 109 | $("#messageModal").modal('show'); |
106 | 110 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -234,7 +234,7 @@ |
234 | 234 | <div class="stickey-area" style="margin-left:7px"> |
235 | 235 | <div class="breadcrumb " style="margin-bottom:0px"> |
236 | 236 | <div class=""> |
237 | - <div class="input-group col-sm-8 col-xs-7 col-md-8 pull-left" id="da-input"> | |
237 | + <div class="input-group col-sm-6 col-xs-7 col-md-7 pull-left" id="da-input"> | |
238 | 238 | |
239 | 239 | <div id="backdrop"> |
240 | 240 | <div id="searchListDiv" class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left"> |
... | ... | @@ -244,8 +244,12 @@ |
244 | 244 | </div> |
245 | 245 | |
246 | 246 | </div> |
247 | + <div id="searchlangaugeDiv"> | |
248 | + | |
249 | + </div> | |
250 | + | |
247 | 251 | <div class="btn-group" style="vertical-align:top;"> |
248 | - | |
252 | + | |
249 | 253 | <button type="button" id="btnDATermSearch" style="padding: 5px 10px 4px 10px !important;border: none;" class="btn btn-success btn-sm" onclick="OnSearch(event)"> |
250 | 254 | <!--<img src="~/../content/images/DA/go-to.png" style="height: 30px;width:50px">--> |
251 | 255 | <i class="fa fa-caret-down" style="font-size:20px;"></i> |
... | ... | @@ -253,7 +257,7 @@ |
253 | 257 | </div> |
254 | 258 | <div class="btn-group" style="vertical-align:top;"> |
255 | 259 | <!-- <h6 class="text-center text-primary txt-white f11 col-xs-12">Search</h6>--> |
256 | - <button type="button" id="btnSearchList" class="btn btn-primary btn-sm col-xs-12" ng-click="ApplySearch($event)" style="margin-right:2px;"> | |
260 | + <button type="button" id="btnSearchList" class="btn btn-primary btn-sm col-xs-12" onclick="ApplySearch(event)" style="margin-right:2px;"> | |
257 | 261 | <!-- <i class="fa fa-search"></i>--> |
258 | 262 | Search |
259 | 263 | </button> |
... | ... | @@ -312,16 +316,20 @@ |
312 | 316 | |
313 | 317 | <div id="searchedTermListPopUp" style="display:none"> |
314 | 318 | <div class="modal-header annotation-modal-header"> |
315 | - <button type="button" class="close" aria-label="Close" ng-click="closeSerachTermListPopUp()"><span aria-hidden="true">×</span></button> | |
319 | + <button type="button" id="closeTermList" class="close" aria-label="Close" onclick="closeSerachTermListPopUp(event)"><span aria-hidden="true">×</span></button> | |
316 | 320 | <h4 class="modal-title" id="myModalLabel">Search List</h4> |
317 | 321 | </div> |
318 | 322 | <div class="modal-body"> |
319 | 323 | <div class="row paddingTopBtm10"> |
320 | 324 | <div class="col-sm-12" style="top:3px"> |
321 | - <div style=""> | |
325 | + <div class="form-group" id="languageDiv"> | |
326 | + <select class="form-control" id="selectLanguage" onchange="changeLanguageList(event)" style="width:95%;font-size:14px"> | |
327 | + </select> | |
328 | + </div> | |
329 | + <div> | |
322 | 330 | <!--DA > List Manager > Multiple structure selection should not be available.--> |
323 | 331 | <div class="form-group"> |
324 | - <select id="searchTermListUl" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') selectTerm(event)" ></select> | |
332 | + <select id="searchTermListUl" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, false)" ></select> | |
325 | 333 | </div> |
326 | 334 | |
327 | 335 | </div> |
... | ... | @@ -331,6 +339,7 @@ |
331 | 339 | |
332 | 340 | </div> |
333 | 341 | <div class="modal-footer" id="totalTerms"> |
342 | + | |
334 | 343 | </div> |
335 | 344 | </div> |
336 | 345 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.aspx
... | ... | @@ -481,143 +481,144 @@ |
481 | 481 | </div> |
482 | 482 | |
483 | 483 | <!--Settings modal--> |
484 | - <div id="modelsettingsbackground" style="background-color: black; bottom: 0; display: none; height: 100%; left: 0; opacity: 0.5; position: fixed; right: 0; top: 0; width: 100%; z-index: 12000000;"></div> | |
485 | - <div id="modal-settings" style="display:none;z-index: 1000000000;height:auto;width: 300px;position:fixed;right:100px;top:70px;"> | |
486 | - <div role="document"> | |
487 | - <form> | |
488 | - <div ng-init="loadsettings()" class="modal-content" id="setting-modal-dark"> | |
489 | - <div class="modal-header annotation-modal-header"> | |
490 | - <button type="button" class="close" data-dismiss="modal" ng-click="CloseSetting()" aria-label="Close"><span aria-hidden="true">×</span></button> | |
491 | - <h4 class="modal-title" id="myModalLabel2">Settings</h4> | |
492 | - </div> | |
493 | - <div class="modal-body"> | |
494 | - <div class="paddTop15"> | |
495 | - <!-- Nav tabs --> | |
496 | - <ul class="nav nav-tabs" role="tablist"> | |
497 | - <li role="presentation" ng-class="{'active':SettingsTab==1}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(1)">Appearance</a></li> | |
498 | - <li role="presentation" ng-class="{'active':SettingsTab==2}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(2);lexiconData()">Lexicons</a></li> | |
499 | - <li role="presentation" ng-class="{'active':SettingsTab==3}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(3)">Dissectible</a></li> | |
500 | - | |
501 | - </ul> | |
502 | - <!-- Tab panes --> | |
503 | - <div class="tab-content"> | |
504 | - <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 1,'tab-pane' : SettingsTab !==1 }" id="appearance"> | |
505 | - <div class="row"> | |
506 | - <div class="col-sm-12"> | |
507 | - <div class="well well-sm no-margin-btm"> | |
508 | - <h5>System Font</h5> | |
509 | - <div class="form-group"> | |
510 | - <label for="SystemFont" class="font13">Sample</label> | |
511 | - <input type="text" class="form-control" id="SystemFont" value="AaBbYyZz" disabled> | |
484 | + <div id="modelsettingsbackground" style="bottom: 0; display: none; height: 100%; left: 0; opacity: 0.5; position: fixed; right: 0; top: 0; width: 100%; z-index: 12000000;"></div> | |
485 | + <div id="modal-settings" style="display:none;z-index: 12000001;height:auto;width: 300px;position:fixed;right:100px;top:70px;"> | |
486 | + <div role="document"> | |
487 | + <form> | |
488 | + <div ng-init="loadsettings()" class="modal-content" id="setting-modal-dark"> | |
489 | + <div class="modal-header annotation-modal-header"> | |
490 | + <button type="button" class="close" data-dismiss="modal" ng-click="CancelSetting()" aria-label="Close"><span aria-hidden="true">×</span></button> | |
491 | + <h4 class="modal-title" id="myModalLabel2">Settings</h4> | |
492 | + </div> | |
493 | + <div class="modal-body"> | |
494 | + <div class="paddTop15"> | |
495 | + <!-- Nav tabs --> | |
496 | + <ul class="nav nav-tabs" role="tablist"> | |
497 | + <li role="presentation" ng-class="{'active':SettingsTab==1}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(1)" style="cursor: pointer;">Appearance</a></li> | |
498 | + <li role="presentation" ng-class="{'active':SettingsTab==2}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(2)" style="cursor: pointer;">Lexicons</a></li> | |
499 | + <li role="presentation" ng-class="{'active':SettingsTab==3}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(3)" style="cursor: pointer;">Dissectible</a></li> | |
500 | + | |
501 | + </ul> | |
502 | + <!-- Tab panes --> | |
503 | + <div class="tab-content"> | |
504 | + <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 1,'tab-pane' : SettingsTab !==1 }" id="appearance"> | |
505 | + <div class="row"> | |
506 | + <div class="col-sm-12"> | |
507 | + <div class="well well-sm no-margin-btm"> | |
508 | + <h5>System Font</h5> | |
509 | + <div class="form-group"> | |
510 | + <label for="SystemFont" class="font13">Sample</label> | |
511 | + <input type="text" class="form-control" id="SystemFont" value="AaBbYyZz" disabled> | |
512 | + </div> | |
513 | + <button class="btn btn-success btn-sm" data-toggle="modal" data-target="#modal-change">Change</button> | |
514 | + <button class="btn btn-success btn-sm">Default</button> | |
512 | 515 | </div> |
513 | - <button class="btn btn-success btn-sm" data-toggle="modal" data-target="#modal-change">Change</button> | |
514 | - <button class="btn btn-success btn-sm">Default</button> | |
515 | 516 | </div> |
516 | 517 | </div> |
517 | 518 | </div> |
518 | - </div> | |
519 | - <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 2,'tab-pane' : SettingsTab !==2 }" id="lexicons"> | |
520 | - <div class="row paddingTopBtm10"> | |
521 | - <div class="col-sm-6"> | |
522 | - <div class="form-group"> | |
523 | - <label for="SystemFont" class="font13">Primary Lexicon</label> | |
524 | - <input type="text" id="primarylaxican" class="form-control" value="English" name="1" disabled> | |
525 | - <button class="btn btn-sm btn-success btn-block marginTop5" id="laxicanlanguageChagne" disabled>Change</button> | |
526 | - </div> | |
519 | + <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 2,'tab-pane' : SettingsTab !==2 }" id="lexicons"> | |
520 | + <div class="row paddingTopBtm10"> | |
521 | + <div class="col-sm-6"> | |
522 | + <div class="form-group"> | |
523 | + <label for="SystemFont" class="font13">Primary Lexicon</label> | |
524 | + <input type="text" id="primarylaxican" class="form-control" value="" name="" disabled> | |
525 | + <button class="btn btn-sm btn-success btn-block marginTop5" id="laxicanlanguageChagne" disabled>Change</button> | |
526 | + </div> | |
527 | 527 | |
528 | - <div class="form-group"> | |
529 | - <label for="SystemFont" class="font13">Secondary Lexicons</label> | |
530 | - <!--<textarea class="form-control" rows="3">--> | |
531 | - <select class="form-control" size="5" id="secondLax"></select> | |
532 | - <!--</textarea>--> | |
533 | - </div> | |
534 | - <div class="form-group"> | |
535 | - <button class="btn btn-sm btn-success" id="laxiconLangAdd" disabled>Add</button> | |
536 | - <button class="btn btn-sm btn-success" id="laxiconLangRemove">Remove</button> | |
528 | + <div class="form-group"> | |
529 | + <label for="SystemFont" class="font13">Secondary Lexicons</label> | |
530 | + <!--<textarea class="form-control" rows="3">--> | |
531 | + <select class="form-control" size="5" id="secondLax"></select> | |
532 | + <!--</textarea>--> | |
533 | + </div> | |
534 | + <div class="form-group"> | |
535 | + <button class="btn btn-sm btn-success" id="laxiconLangAdd" disabled>Add</button> | |
536 | + <button class="btn btn-sm btn-success" id="laxiconLangRemove" disabled>Remove</button> | |
537 | + </div> | |
537 | 538 | </div> |
538 | - </div> | |
539 | - <div class="col-sm-6" style="padding-left:13px;padding-right:13px;"> | |
540 | - <div class=" form-group"> | |
541 | - <label for="SystemFont" class="font13">Available Lexicons</label> | |
542 | - <select class="form-control" size="8" id="lexiconLangDropdown"></select> | |
539 | + <div class="col-sm-6" style="padding-left:13px;padding-right:13px;"> | |
540 | + <div class=" form-group"> | |
541 | + <label for="SystemFont" class="font13">Available Lexicons</label> | |
542 | + <select class="form-control" size="8" id="lexiconLangDropdown" style="overflow: scroll;"></select> | |
543 | + </div> | |
544 | + <p class="font11"><strong>Note :</strong> Some languages require special system fonts to display correctly</p> | |
543 | 545 | </div> |
544 | - <p class="font11"><strong>Note :</strong> Some languages require special system fonts to display correctly</p> | |
546 | + <div class="clearfix"></div> | |
545 | 547 | </div> |
546 | - <div class="clearfix"></div> | |
547 | 548 | </div> |
548 | - </div> | |
549 | - <div role="tabpanel" id="dissectible" ng-class="{'tab-pane active' : SettingsTab === 3,'tab-pane' : SettingsTab !==3 }"> | |
550 | - <div class=""> | |
551 | - <div class="col-sm-12"> | |
552 | - <h5 class="bolder font13 no-margin-top">Skin Tones</h5> | |
553 | - <div class="skin-tones"> | |
554 | - <div align="center"> | |
555 | - <div class="col-sm-5"> | |
556 | - <button id="btnEthnicW" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'W')"> | |
557 | - <img src="~/../content/images/common/skin1.jpg" alt=""> | |
558 | - </button> | |
559 | - </div> | |
560 | - <div class="col-sm-5"> | |
561 | - <button id="btnEthnicB" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'B')"> | |
562 | - <img src="~/../content/images/common/skin2.jpg" alt=""> | |
563 | - </button> | |
564 | - </div> | |
565 | - <div class="col-sm-5"> | |
566 | - <button id="btnEthnicL" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'A')"> | |
567 | - <img src="~/../content/images/common/skin3.jpg" alt=""> | |
568 | - </button> | |
569 | - </div> | |
570 | - <div class="col-sm-5"> | |
571 | - <button id="btnEthnicA" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'L')"> | |
572 | - <img src="~/../content/images/common/skin4.jpg" alt=""> | |
573 | - </button> | |
549 | + <div role="tabpanel" id="dissectible" ng-class="{'tab-pane active' : SettingsTab === 3,'tab-pane' : SettingsTab !==3 }"> | |
550 | + <div class=""> | |
551 | + <div class="col-sm-12"> | |
552 | + <h5 class="bolder font13 no-margin-top">Skin Tones</h5> | |
553 | + <div class="skin-tones"> | |
554 | + <div align="center"> | |
555 | + <div class="col-sm-5"> | |
556 | + <button id="btnEthnicW" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'W')"> | |
557 | + <img src="~/../content/images/common/skin1.jpg" alt=""> | |
558 | + </button> | |
559 | + </div> | |
560 | + <div class="col-sm-5"> | |
561 | + <button id="btnEthnicB" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'B')"> | |
562 | + <img src="~/../content/images/common/skin2.jpg" alt=""> | |
563 | + </button> | |
564 | + </div> | |
565 | + <div class="col-sm-5"> | |
566 | + <button id="btnEthnicL" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'A')"> | |
567 | + <img src="~/../content/images/common/skin3.jpg" alt=""> | |
568 | + </button> | |
569 | + </div> | |
570 | + <div class="col-sm-5"> | |
571 | + <button id="btnEthnicA" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'L')"> | |
572 | + <img src="~/../content/images/common/skin4.jpg" alt=""> | |
573 | + </button> | |
574 | + </div> | |
574 | 575 | </div> |
575 | 576 | </div> |
576 | - </div> | |
577 | 577 | |
578 | - </div> | |
579 | - </div> | |
580 | - <div class=""> | |
581 | - <div class="col-sm-6" id="modestyDiv" > | |
582 | - <h5 class="font13 bolder">Modesty Settings</h5> | |
583 | - <img src="~/../content/images/common/adam-leaf.png" alt="" class="pull-left marginR5"> | |
584 | - <div class="radio"> | |
585 | - <label> | |
586 | - <input type="radio" value="Y" ng-model="aiaModesty" name="modestyRadios" id="modon" ng-click="ChangeModesty('Y')"> | |
587 | - <span class="">On</span> | |
588 | - </label> | |
589 | - </div> | |
590 | - <div class="radio"> | |
591 | - <label> | |
592 | - <input type="radio" value="N" ng-model="aiaModesty" name="modestyRadios" id="modoff" ng-click="ChangeModesty('N')"> | |
593 | - <span class="">Off</span> | |
594 | - </label> | |
595 | 578 | </div> |
596 | 579 | </div> |
597 | - <div class="col-sm-6"> | |
598 | - <h5 class="font13 bolder">Annotation</h5> | |
599 | - <div class="checkbox no-margin"> | |
600 | - <!--Settings > The entire highlighted part should be active--> | |
601 | - <label class="font11 no-margin-btm"> | |
602 | - <input type="checkbox" value="" checked> | |
603 | - Erase Annotations when changing layers | |
604 | - </label> | |
580 | + <div class=""> | |
581 | + <div class="col-sm-6" id="modestyDiv" > | |
582 | + <h5 class="font13 bolder">Modesty Settings</h5> | |
583 | + <img src="~/../content/images/common/adam-leaf.png" alt="" class="pull-left marginR5"> | |
584 | + <div class="radio"> | |
585 | + <label> | |
586 | + <input type="radio" value="Y" ng-model="aiaModesty" name="modestyRadios" id="modon" ng-click="ChangeModesty('Y')"> | |
587 | + <span class="">On</span> | |
588 | + </label> | |
589 | + </div> | |
590 | + <div class="radio"> | |
591 | + <label> | |
592 | + <input type="radio" value="N" ng-model="aiaModesty" name="modestyRadios" id="modoff" ng-click="ChangeModesty('N')"> | |
593 | + <span class="">Off</span> | |
594 | + </label> | |
595 | + </div> | |
596 | + </div> | |
597 | + <div class="col-sm-6"> | |
598 | + <h5 class="font13 bolder">Annotation</h5> | |
599 | + <div class="checkbox no-margin"> | |
600 | + <!--Settings > The entire highlighted part should be active--> | |
601 | + <label class="font11 no-margin-btm"> | |
602 | + <input type="checkbox" value="" checked> | |
603 | + Erase Annotations when changing layers | |
604 | + </label> | |
605 | + </div> | |
605 | 606 | </div> |
606 | 607 | </div> |
607 | 608 | </div> |
608 | 609 | </div> |
609 | 610 | </div> |
610 | 611 | </div> |
612 | + <div class="modal-footer"> | |
613 | + <button type="button" class="btn btn-primary" ng-click="CancelSetting()">Cancel</button> | |
614 | + <button type="button" class="btn btn-primary" ng-click="UpdateAndCloseSetting(formsetting)">Apply</button> | |
615 | + </div> | |
611 | 616 | </div> |
612 | - <div class="modal-footer"> | |
613 | - <button type="button" class="btn btn-primary" ng-click="CancelSetting()">Cancel</button> | |
614 | - <button type="button" class="btn btn-primary" ng-click="UpdateSetting(formsetting)">Apply</button> | |
615 | - </div> | |
616 | - </div> | |
617 | - </form> | |
617 | + </form> | |
618 | + </div> | |
618 | 619 | </div> |
619 | - </div> | |
620 | - <div id="setting-spinner" style="display:none;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 15000; overflow: auto; width: 100px;"> | |
620 | + | |
621 | + <div id="setting-spinner" style="visibility:hidden;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 12000002; overflow: auto; width: 100px;"> | |
621 | 622 | <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading"> |
622 | 623 | </div> |
623 | 624 | <!--Annotation Modal--> |
... | ... | @@ -891,6 +892,10 @@ |
891 | 892 | |
892 | 893 | |
893 | 894 | </div> |
895 | + <div class="form-group" id="langaugeDivLm"> | |
896 | + <select class="form-control" id="selectLanguageLm" onchange="changeLanguageLmList(event)" style="width:95%;font-size:14px"> | |
897 | + </select> | |
898 | + </div> | |
894 | 899 | |
895 | 900 | <!--DA > List Manager > Multiple structure selection should not be available.--> |
896 | 901 | <div class="form-group"> |
... | ... | @@ -899,17 +904,12 @@ |
899 | 904 | |
900 | 905 | </div> |
901 | 906 | <div style="clear:both;"></div> |
902 | - | |
903 | - | |
904 | - | |
905 | - | |
906 | 907 | </div> |
907 | 908 | </div> |
908 | 909 | |
909 | 910 | </div> |
910 | - <div class="modal-footer" id="totalTerms"> | |
911 | - <!--<span class="pull-left marginTop5">424 Structures</span>--> | |
912 | - <!--<button data-dismiss="modal" class="btn btn-primary" type="button"><i class="fa fa-arrow-circle-right"></i></button>--> | |
911 | + <div class="modal-footer" id="totalTermsLm"> | |
912 | + | |
913 | 913 | </div> |
914 | 914 | </div> |
915 | 915 | |
... | ... | @@ -1060,34 +1060,6 @@ |
1060 | 1060 | </div> |
1061 | 1061 | </div> |
1062 | 1062 | |
1063 | - <!-- Update Setting confirm modal--> | |
1064 | - <div class="modal fade notfoundSystem" id="saveSettingsMessageModal" role="dialog" aria-labelledby="myModalLabel" | |
1065 | - style="z-index: 1200002; top:10%"> | |
1066 | - | |
1067 | - <div class="modal-dialog modal-sm"> | |
1068 | - | |
1069 | - <div class="modal-content"> | |
1070 | - | |
1071 | - <div class="modal-header"> | |
1072 | - | |
1073 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
1074 | - | |
1075 | - </div> | |
1076 | - | |
1077 | - <div class="modal-title"></div> | |
1078 | - | |
1079 | - <div class="modal-header"><p style="font-size:15px;">Do you want to save current settings?</p></div> | |
1080 | - <div class="modal-footer"> | |
1081 | - <button type="button" class="btn btn-primary" ng-click="saveSettings()">Yes</button> | |
1082 | - <button type="button" data-dismiss="modal" class="btn btn-primary" ng-click="CancelSetting()">No</button> | |
1083 | - </div> | |
1084 | - | |
1085 | - </div> | |
1086 | - | |
1087 | - </div> | |
1088 | - | |
1089 | - </div> | |
1090 | - | |
1091 | 1063 | <!--Profile not updated modal--> |
1092 | 1064 | <div class=" fade ui-draggable in" data-keyboard="false" data-backdrop="static" id="profileUpdateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="padding-left: 17px; display: none; z-index: 1200002; position: fixed; top: 0; overflow-x: hidden; overflow-y: auto; width:100% ;height:100%"> |
1093 | 1065 | <div class="modal-dialog" role="document" style="width:400px"> |
... | ... | @@ -1605,6 +1577,7 @@ |
1605 | 1577 | <script src="libs/jcanvas/jcanvas.handle.min.js"></script> |
1606 | 1578 | |
1607 | 1579 | <script src="libs/jinqJs.js"></script> |
1580 | + | |
1608 | 1581 | <script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js?v=1.0.0"></script> |
1609 | 1582 | <script src="libs/video_4_12_11/video_4_12_11.js"></script> |
1610 | 1583 | <script src="libs/jquery/jquery_plugin/SpeechBubble/bubble.js"></script> |
... | ... | @@ -2166,6 +2139,18 @@ |
2166 | 2139 | angular.element(document.querySelector('[ng-controller="HomeController"]')).scope().changeListManager(); |
2167 | 2140 | } |
2168 | 2141 | |
2142 | + function changeLanguageLmList() { | |
2143 | + | |
2144 | + angular.element(document.querySelector('[ng-controller="HomeController"]')).scope().changeLanguageLmList(); | |
2145 | + } | |
2146 | + | |
2147 | + //this event of button bind from da module to load more data | |
2148 | + function LoadMoreLm() { | |
2149 | + | |
2150 | + angular.element(document.querySelector('[ng-controller="HomeController"]')).scope().LoadMoreLm(); | |
2151 | + } | |
2152 | + | |
2153 | + | |
2169 | 2154 | </script> |
2170 | 2155 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.1.0/jquery.browser.min.js"></script> |
2171 | 2156 | </body> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index1.html deleted
1 | -<!DOCTYPE html> | |
2 | -<html lang="en" ng-cloak ng-app="AIA"> | |
3 | -<head> | |
4 | - <!--<base href="/AIAHTML5/" />--> | |
5 | - <!--<base href="/AIA/" />--> | |
6 | - <base href="/" /> | |
7 | - <meta charset="utf-8"> | |
8 | - <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
9 | - <!--<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">--> | |
10 | - <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0 maximum-scale=1.0" /> | |
11 | - <title>A.D.A.M. Interactive Anatomy</title> | |
12 | - | |
13 | - <link href="themes/default/css/bootstrap/3.3.6/bootstrap.css" rel="stylesheet" /> | |
14 | - | |
15 | - | |
16 | - | |
17 | - | |
18 | - <link href="themes/default/css/bootstrap/3.3.6/main.css" rel="stylesheet" /> | |
19 | - | |
20 | - <link href="themes/default/css/bootstrap/3.3.6/secondeffect.css" rel="stylesheet" /> | |
21 | - | |
22 | - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> | |
23 | - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,400italic"> | |
24 | - | |
25 | - <!--<link rel="styleSheet" href="themes/default/css/uigrid/ui-grid.min.css" />--> | |
26 | - <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |
27 | - <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | |
28 | - <!--[if lt IE 9]> | |
29 | - <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
30 | - <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
31 | - <![endif]--> | |
32 | - <link href="themes/default/css/bootstrap/3.3.6/jquery.mCustomScrollbar.css" rel="stylesheet" /> | |
33 | - | |
34 | - <link href="themes/default/css/bootstrap/3.3.6/jquery-ui.css" rel="stylesheet" /> | |
35 | - | |
36 | - <link href="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.css" rel="stylesheet" /> | |
37 | - <link href="libs/video_4_12_11/css/video-js_4_12_11.css" rel="stylesheet" /> | |
38 | - <link href="libs/jquery/jquery_plugin/SpeechBubble/css/bubble.css" rel="stylesheet" /> | |
39 | - <link href="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.css" rel="stylesheet" /> | |
40 | - <link href="themes/default/css/bootstrap/3.3.6/jquery.minicolors.css" rel="stylesheet" /> | |
41 | - <link href="content/css/print-main.css" rel="stylesheet" /> | |
42 | - | |
43 | - <!--Annotation Toolbar: Jcanvas--> | |
44 | - <style> | |
45 | - /*.ActiveDefaultColorAnnotation { | |
46 | - background-color: #000000!important; | |
47 | - }*/ | |
48 | - | |
49 | - | |
50 | - #termList option:hover { | |
51 | - background-color: #3399FF !important; | |
52 | - color: #fff !important; | |
53 | - } | |
54 | - | |
55 | - | |
56 | - .ActiveFormattingButtonClass { | |
57 | - background-color: #1B92D0 !important; | |
58 | - } | |
59 | - | |
60 | - .Edittext-btn-css { | |
61 | - background: #4B4B4B; | |
62 | - padding: 4px; | |
63 | - cursor: pointer; | |
64 | - margin-right: 2px; | |
65 | - } | |
66 | - | |
67 | - /*.italic-btn-css { | |
68 | - background: #4B4B4B; | |
69 | - padding: 4px; | |
70 | - cursor: pointer; | |
71 | - margin-right: 2px; | |
72 | - }*/ | |
73 | - | |
74 | - .underline-btn-css { | |
75 | - background: #4B4B4B; | |
76 | - padding: 4px; | |
77 | - cursor: pointer; | |
78 | - margin-right: 5px; | |
79 | - } | |
80 | - | |
81 | - | |
82 | - | |
83 | - .activebtncolor { | |
84 | - background-color: #1B92D0 !important; | |
85 | - border-color: #1B92D0 !important; | |
86 | - color: #ffffff !important; | |
87 | - } | |
88 | - | |
89 | - .btn-black-annotation { | |
90 | - background-color: #4b4b4b; | |
91 | - border-color: #3f3f3f; | |
92 | - color: #ffffff; | |
93 | - } | |
94 | - | |
95 | - /*.btn-black-annotation:hover { | |
96 | - background-color: #1B92D0 !important; | |
97 | - border-color: #1B92D0 !important; | |
98 | - color: #ffffff !important; | |
99 | - }*/ | |
100 | - | |
101 | - .custom-tooltip-annotation { | |
102 | - background-color: #fff; | |
103 | - border: 0 none; | |
104 | - color: #000; | |
105 | - left: -52px; | |
106 | - opacity: 0.9; | |
107 | - padding: 3px 0; | |
108 | - position: absolute; | |
109 | - text-align: center; | |
110 | - top: 41px; | |
111 | - width: 120px; | |
112 | - display: none; | |
113 | - z-index: 10000; | |
114 | - border: 1px solid #000; | |
115 | - color: #000; | |
116 | - border-radius: 0; | |
117 | - } | |
118 | - | |
119 | - /*7931*/ | |
120 | - .custom-tooltip-annotation-edit { | |
121 | - background-color: #fff; | |
122 | - border: 0 none; | |
123 | - color: #000; | |
124 | - left: 80px; | |
125 | - opacity: 0.9; | |
126 | - padding: 3px 0; | |
127 | - position: absolute; | |
128 | - text-align: center; | |
129 | - bottom: 50px; | |
130 | - width: 120px; | |
131 | - display: none; | |
132 | - z-index: 10000; | |
133 | - border: 1px solid #000; | |
134 | - color: #000; | |
135 | - border-radius: 0; | |
136 | - } | |
137 | - | |
138 | - .custom-tooltip-annotation-toolbar { | |
139 | - background-color: #fff; | |
140 | - border: 0 none; | |
141 | - color: #000; | |
142 | - opacity: 0.9; | |
143 | - padding: 3px 0; | |
144 | - position: absolute; | |
145 | - text-align: center; | |
146 | - display: none; | |
147 | - z-index: 10000; | |
148 | - border: 1px solid #000; | |
149 | - color: #000; | |
150 | - border-radius: 0; | |
151 | - } | |
152 | - | |
153 | - .restrict-carret-icon { | |
154 | - font-size: 18px; | |
155 | - position: relative; | |
156 | - top: 1px; | |
157 | - } | |
158 | - | |
159 | - #refreshBtn { | |
160 | - color: #ffffff; | |
161 | - } | |
162 | - </style> | |
163 | - | |
164 | - | |
165 | - | |
166 | -</head> | |
167 | -<body ng-controller="HomeController" id="bo" ng-init="initializeAIA()" ng-keydown="CheckRefresh($event)"> | |
168 | - <div ng-hide="isVisibleResetPass"> | |
169 | - <div id="login" ng-show="isVisibleLogin"> | |
170 | - | |
171 | - <div class="container-fluid loginBg"> | |
172 | - <div class="row"> | |
173 | - <div class="col-xs-12 text-center"> | |
174 | - <a href="index.html" class="loginLogo"><img src="content/images/common/logo-large.png" class="img-responsive" alt=""></a> | |
175 | - <div class="headerBand row"> | |
176 | - <div class="col-xs-12"> | |
177 | - <h1>A.D.A.M. Interactive Anatomy</h1> | |
178 | - <p>The most comprehensive online interactive anatomy learning resource</p> | |
179 | - </div> | |
180 | - </div> | |
181 | - </div> | |
182 | - <!--LOGIN PANEL--> | |
183 | - <div class="col-xs-12 loginPanel"> | |
184 | - <div class="loginBox clearfix"> | |
185 | - <div class="col-xs-12"> | |
186 | - <!--<strong>Login</strong>--> | |
187 | - <form> | |
188 | - <div class="form-group"> | |
189 | - <!--<label for="">User ID</label>--> | |
190 | - <!--input type="email" class="form-control" placeholder="User ID"> | |
191 | - <span class="help-block text-right small"><a href="#" class="color-white">Forgot User ID?</a></span>--> | |
192 | - | |
193 | - | |
194 | - <div class="input-group"> | |
195 | - <span class="input-group-addon"><i class="fa fa-user"></i></span> | |
196 | - <input type="text" class="form-control" placeholder="Username" ng-model="userInfo.username"> | |
197 | - </div> | |
198 | - <span class="help-block text-right small"><a href="#" class="color-white" id="forgotUserIdAnchor" data-toggle="modal" ng-click="forgotUserModalShow()" data-target=".forgot-sm">Forgot User ID?</a></span> | |
199 | - | |
200 | - | |
201 | - </div> | |
202 | - <div class="form-group"> | |
203 | - <!--<label for="">Password</label>--> | |
204 | - <!--<input type="password" class="form-control" placeholder="Password"> | |
205 | - <span class="help-block text-right small "><a href="#" class="color-white">Forgot Password?</a></span>--> | |
206 | - <div class="input-group"> | |
207 | - <span class="input-group-addon"><i class="fa fa-key"></i></span> | |
208 | - <input type="password" id="UserPassword" class="form-control" placeholder="Password" ng-model="userInfo.password"> | |
209 | - </div> | |
210 | - <span class="help-block text-right small "><a class="color-white" style="cursor: pointer;" id="forgotPasswordAnchor" data-toggle="modal" ng-click="forgotPwdModalShow();" data-target=".forgot-sm1">Forgot Password?</a></span> <!--#resetpass" href="/app/views/Home/resetPwd.html"--> | |
211 | - <div class="checkbox"> | |
212 | - <label style="font-size: 85%;color:#fff !important;"><input type="checkbox" ng-model="userInfo.rememberChk" ng-click="RememberMe(this.userInfo.rememberChk)">Remember me</label> | |
213 | - </div> | |
214 | - </div> | |
215 | - <div class="form-group"> | |
216 | - <button class="btn btn-primary pull-right" ng-click="AuthenticateUser(userInfo)">Log In</button> | |
217 | - </div> | |
218 | - </form> | |
219 | - </div> | |
220 | - </div> | |
221 | - <div class="loginExBtn"> | |
222 | - <a href="https://store.adameducation.com/" target="_blank" class="btn btn-primary">Subscribe Now</a> | |
223 | - <a href="http://adameducation.com/aiaonline" target="_blank" class="btn btn-primary pull-right">Learn More</a> | |
224 | - </div> | |
225 | - </div> | |
226 | - </div> | |
227 | - </div> | |
228 | - | |
229 | - <!-- Footer --> | |
230 | - <footer class="dark"> | |
231 | - <div class="container-fluid text-center"> | |
232 | - <img class="browserIcons" src="content/images/common/chrome-icon.png" /> | |
233 | - <img class="browserIcons" src="content/images/common/ie-icon.png" /> | |
234 | - <img class="browserIcons" src="content/images/common/mozilla-icon.png" /> | |
235 | - <img class="browserIcons" src="content/images/common/safari-icon.png" /> | |
236 | - </div> | |
237 | - <div class="container-fluid text-center">Copyright © {{current_year}} Ebix Inc. All rights reserved.</div> | |
238 | - </footer> | |
239 | - </div> | |
240 | - <!-- Forgot User ID (Small modal) --> | |
241 | - <div class="modal fade" id="forgotUserModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm"> | |
242 | - <div class="modal-dialog modal-small" role="document"> | |
243 | - <div class="modal-content"> | |
244 | - <div class="modal-header"> | |
245 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
246 | - <h5 class="modal-title" id="exampleModalLabel">Enter your email id to recover User id</h5> | |
247 | - </div> | |
248 | - <div class="modal-body"> | |
249 | - <form id="forgetUSerIdForm"> | |
250 | - <div class="form-group"> | |
251 | - <div class="input-group"> | |
252 | - <span class="input-group-addon"><i class="fa fa-envelope"></i></span> | |
253 | - <input id="btnEmail" class="form-control" placeholder="Email" type="email" ng-model="userInfo.emailId"> | |
254 | - </div> | |
255 | - </div> | |
256 | - </form> | |
257 | - </div> | |
258 | - <div class="modal-footer" style="padding-bottom:10px;"> | |
259 | - <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, false)">Send Mail</button> | |
260 | - </div> | |
261 | - <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>--> | |
262 | - </div> | |
263 | - </div> | |
264 | - </div> | |
265 | - <!-- Forgot Password (Small modal) --> | |
266 | - <div class="modal fade" id="forgotPwdModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm1"> | |
267 | - <div class="modal-dialog modal-small" role="document"> | |
268 | - <div class="modal-content"> | |
269 | - <div class="modal-header"> | |
270 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
271 | - <h5 class="modal-title" id="exampleModalLabel">Enter your email id to unblock/ recover Password</h5> | |
272 | - </div> | |
273 | - <div class="modal-body" style="padding: 15px;"> | |
274 | - <form id="forgetPwdForm" class="ng-pristine ng-valid ng-valid-email"> | |
275 | - <div class="form-group"> | |
276 | - <div class=""> | |
277 | - <label class="radio-inline"> | |
278 | - <input name="inlineRadioOptions" id="inlineRadio1" value="unblock" type="radio"> Unblock | |
279 | - </label> | |
280 | - <label class="radio-inline"> | |
281 | - <input name="inlineRadioOptions" id="inlineRadio2" value="forgotpwd" type="radio"> Forgot Password | |
282 | - </label> | |
283 | - </div> | |
284 | - </div> | |
285 | - | |
286 | - | |
287 | - <div class="form-group"> | |
288 | - <div class="input-group" style="margin-top: 8px;"> | |
289 | - <span class="input-group-addon"><i class="fa fa-envelope"></i></span> | |
290 | - <input id="btnEmail2" class="form-control ng-pristine ng-untouched ng-valid ng-valid-email" placeholder="Email" ng-model="userInfo.emailId" type="email"> | |
291 | - </div> | |
292 | - </div> | |
293 | - </form> | |
294 | - </div> | |
295 | - <div class="modal-footer modal-footer-forgot-password" style="padding-bottom:10px;"> | |
296 | - <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, true)">Send Mail</button> | |
297 | - </div> | |
298 | - <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>--> | |
299 | - </div> | |
300 | - </div> | |
301 | - </div> | |
302 | - <div id="index" ng-hide="isVisibleLogin"> | |
303 | - <div class="container-fluid "> | |
304 | - <!--Header--> | |
305 | - | |
306 | - <nav class="navbar navbar-inverse navbar-fixed-top"> | |
307 | - <div class="container-fluid"> | |
308 | - <!-- Brand and toggle get grouped for better mobile display --> | |
309 | - <div class="navbar-header"> | |
310 | - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#topFixedNavbar1" aria-expanded="false"> | |
311 | - <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span> | |
312 | - </button> | |
313 | - <a class="frameLogo navbar-brand"><img src="content/images/logo-main.png" class="img-responsive" alt=""></a> | |
314 | - </div> | |
315 | - <div ng-include="'app/widget/TopMenu.html'"></div> | |
316 | - </div> | |
317 | - </nav> | |
318 | - <div class="bodyWrap row container-fluid"> | |
319 | - | |
320 | - <div id="spinner" class="spinner" ng-show="isLoading" style="visibility:hidden"> | |
321 | - <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading" /> | |
322 | - </div> | |
323 | - <div ng-view></div> | |
324 | - | |
325 | - </div> | |
326 | - </div> | |
327 | - | |
328 | - | |
329 | - | |
330 | - <div class="modal fade" id="ShowListManager" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" ng-init="tab = 1" style="width:27%;left:50%;overflow:hidden;height:500px;top:100px"> | |
331 | - <div class="modal-dialog" role="document" style="width:400px;"> | |
332 | - <div class="modal-content" style="width:100%;max-width:400px;"> | |
333 | - <div class="modal-header setting-modal-header" style="padding: 5px 10px; border-bottom: 1px solid #e5e5e5;"> | |
334 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
335 | - <h4 class="modal-title" id="myModalLabel">Setting</h4> | |
336 | - </div> | |
337 | - <div class="modal-body"> | |
338 | - <div class="row" style="padding-top:20px;"> | |
339 | - <div class="col-sm-12"> | |
340 | - | |
341 | - <div aria-label="..." role="group" class="btn-group btn-group-justified"> | |
342 | - <div role="group" class="btn-group"> | |
343 | - <button class="btn btn-sm btn-success" type="button" ng-click="tab = 1">Appearance</button> | |
344 | - </div> | |
345 | - <div role="group" class="btn-group"> | |
346 | - <button class="btn btn-sm btn-success" type="button" ng-click="tab = 2">Lexicons</button> | |
347 | - </div> | |
348 | - <div role="group" class="btn-group"> | |
349 | - <button class="btn btn-sm btn-success" type="button" ng-click="tab = 3">Dissectible</button> | |
350 | - </div> | |
351 | - </div> | |
352 | - | |
353 | - </div> | |
354 | - | |
355 | - | |
356 | - <div class="col-sm-12" ng-show="tab === 1"> | |
357 | - | |
358 | - | |
359 | - <div class="row"> | |
360 | - <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;"> | |
361 | - <div class="row" style="padding-top: 22px;"> | |
362 | - <div class="center-block col-md-10" style="float: none; "> | |
363 | - <h5><strong>System Font</strong></h5> | |
364 | - | |
365 | - <div style="border:2px solid #ACACAC;float:left;padding:15px;background-color:#CCCCCC;"> | |
366 | - <div class="col-md-3" style="padding-left:0px;"> | |
367 | - Sample | |
368 | - </div> | |
369 | - <div class="col-md-6" style="padding-right:0px;"> | |
370 | - <input type="text" value="" style="width:85%;"> | |
371 | - </div> | |
372 | - <div class="col-md-3" style="padding-left:0px;"> | |
373 | - <button class="btn btn-primary" style="margin-bottom:5px;">Change</button> | |
374 | - <button class="btn btn-primary" style="margin-bottom:5px;">Default</button> | |
375 | - </div> | |
376 | - | |
377 | - </div> | |
378 | - </div> | |
379 | - </div> | |
380 | - | |
381 | - </div> | |
382 | - </div> | |
383 | - | |
384 | - </div> | |
385 | - <div class="col-sm-12" ng-show="tab === 2"> | |
386 | - | |
387 | - | |
388 | - <div class="row"> | |
389 | - <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;"> | |
390 | - <div class="col-md-6"> | |
391 | - <h6><strong>Primary Lexicon</strong></h6> | |
392 | - <input type="text" value="English" style="width:90%;"> | |
393 | - <button class="btn btn-primary" style="float:right;margin-bottom:5px;margin-top:5px;">Change</button> | |
394 | - <h6>Secondry Lexicon</h6> | |
395 | - <textarea style="width:90%;"></textarea> | |
396 | - <button>Change</button> | |
397 | - <button>Change</button> | |
398 | - </div> | |
399 | - <div class="col-md-6"> | |
400 | - <h6>Available Lexicon</h6> | |
401 | - <select multiple class="form-control" id="sel2"> | |
402 | - <option>1</option> | |
403 | - <option>2</option> | |
404 | - <option>3</option> | |
405 | - <option>4</option> | |
406 | - <option>5</option> | |
407 | - </select> | |
408 | - | |
409 | - <p>Note: Some languages require special system fonts to display correctly</p> | |
410 | - </div> | |
411 | - | |
412 | - </div> | |
413 | - </div> | |
414 | - | |
415 | - </div> | |
416 | - <div class="col-sm-12" ng-show="tab === 3"> | |
417 | - | |
418 | - <div class="row"> | |
419 | - <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;"> | |
420 | - <h6>Skin Tones</h6> | |
421 | - <div class="center-block col-md-8" style="float: none;"> | |
422 | - <div class="col-md-6"> | |
423 | - <img class="img-responsive" alt="" src="http://placehold.it/400x300"> | |
424 | - </div> | |
425 | - <div class="col-md-6"> | |
426 | - <img class="img-responsive" alt="" src="http://placehold.it/400x300"> | |
427 | - </div> | |
428 | - <div class="col-md-6"> | |
429 | - <img class="img-responsive" alt="" src="http://placehold.it/400x300"> | |
430 | - </div> | |
431 | - <div class="col-md-6"> | |
432 | - <img class="img-responsive" alt="" src="http://placehold.it/400x300"> | |
433 | - </div> | |
434 | - | |
435 | - </div> | |
436 | - <h6>Modesty Setting</h6> | |
437 | - <div class="col-md-6"> | |
438 | - <div class="col-md-4"> | |
439 | - <img class="img-responsive" alt="" src="http://placehold.it/400x300"> | |
440 | - </div> | |
441 | - <div class="col-md-8"> | |
442 | - | |
443 | - <div class="radio"> | |
444 | - <label><input type="radio" name="optradio" checked>On</label> | |
445 | - </div> | |
446 | - <div class="radio"> | |
447 | - <label><input type="radio" name="optradio">Off</label> | |
448 | - </div> | |
449 | - | |
450 | - </div> | |
451 | - </div> | |
452 | - <div class="col-md-6"> | |
453 | - <h6>Annotaion</h6> | |
454 | - <div class="checkbox"> | |
455 | - <label><input type="checkbox" value="" checked>Erase Annotations when changeing layers</label> | |
456 | - </div> | |
457 | - </div> | |
458 | - </div> | |
459 | - | |
460 | - </div> | |
461 | - | |
462 | - | |
463 | - | |
464 | - </div> | |
465 | - </div> | |
466 | - <div class="modal-footer"> | |
467 | - <button type="button" class="btn btn-primary">Ok</button> | |
468 | - <button type="button" class="btn btn-primary" data-dismiss="modal">Cancle</button> | |
469 | - <button type="button" class="btn btn-primary">Apply</button> | |
470 | - </div> | |
471 | - </div> | |
472 | - </div> | |
473 | - </div> | |
474 | - </div> | |
475 | - | |
476 | - <!--Settings modal--> | |
477 | - <!--<div id="modal-settings" style="z-index: 1000000000; background: white;width: 302px;position:absolute;left:40%;right:0;top:70px;">--> | |
478 | - <div id="modelsettingsbackground" style="background-color: black; bottom: 0; display: none; height: 100%; left: 0; opacity: 0.5; position: fixed; right: 0; top: 0; width: 100%; z-index: 12000000;"></div> | |
479 | - <div id="modal-settings" style="display:none;z-index: 1000000000;height:auto;width: 300px;position:absolute;left:40%;right:0;top:70px;"> | |
480 | - <div role="document"> | |
481 | - <form> | |
482 | - <div ng-init="loadsettings()" class="modal-content" id="setting-modal-dark"> | |
483 | - <div class="modal-header annotation-modal-header"> | |
484 | - <button type="button" class="close" data-dismiss="modal" ng-click="CloseSetting()" aria-label="Close"><span aria-hidden="true">×</span></button> | |
485 | - <h4 class="modal-title" id="myModalLabel2">Settings</h4> | |
486 | - </div> | |
487 | - <div class="modal-body"> | |
488 | - <div class="paddTop15"> | |
489 | - <!-- Nav tabs --> | |
490 | - <ul class="nav nav-tabs" role="tablist"> | |
491 | - <li role="presentation" ng-class="{'active':SettingsTab==1}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(1)">Appearance</a></li> | |
492 | - <li role="presentation" ng-class="{'active':SettingsTab==2}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(2);lexiconData()">Lexicons</a></li> | |
493 | - <li role="presentation" ng-class="{'active':SettingsTab==3}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(3)">Dissectible</a></li> | |
494 | - | |
495 | - </ul> | |
496 | - <!-- Tab panes --> | |
497 | - <div class="tab-content"> | |
498 | - <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 1,'tab-pane' : SettingsTab !==1 }" id="appearance"> | |
499 | - <div class="row"> | |
500 | - <div class="col-sm-12"> | |
501 | - <div class="well well-sm no-margin-btm"> | |
502 | - <h5>System Font</h5> | |
503 | - <div class="form-group"> | |
504 | - <label for="SystemFont" class="font13">Sample</label> | |
505 | - <input type="text" class="form-control" id="SystemFont" value="AaBbYyZz" disabled> | |
506 | - </div> | |
507 | - <button class="btn btn-success btn-sm" data-toggle="modal" data-target="#modal-change">Change</button> | |
508 | - <button class="btn btn-success btn-sm">Default</button> | |
509 | - </div> | |
510 | - </div> | |
511 | - </div> | |
512 | - </div> | |
513 | - <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 2,'tab-pane' : SettingsTab !==2 }" id="lexicons"> | |
514 | - <div class="row paddingTopBtm10"> | |
515 | - <div class="col-sm-6"> | |
516 | - <div class="form-group"> | |
517 | - <label for="SystemFont" class="font13">Primary Lexicon</label> | |
518 | - <input type="text" id="primarylaxican" class="form-control" value="English" name="1" disabled> | |
519 | - <button class="btn btn-sm btn-success btn-block marginTop5" id="laxicanlanguageChagne" disabled>Change</button> | |
520 | - </div> | |
521 | - | |
522 | - <div class="form-group"> | |
523 | - <label for="SystemFont" class="font13">Secondary Lexicons</label> | |
524 | - <!--<textarea class="form-control" rows="3">--> | |
525 | - <select class="form-control" size="5" id="secondLax"></select> | |
526 | - <!--</textarea>--> | |
527 | - </div> | |
528 | - <div class="form-group"> | |
529 | - <button class="btn btn-sm btn-success" id="laxiconLangAdd" disabled>Add</button> | |
530 | - <button class="btn btn-sm btn-success" id="laxiconLangRemove">Remove</button> | |
531 | - </div> | |
532 | - </div> | |
533 | - <div class="col-sm-6" style="padding-left:13px;padding-right:13px;"> | |
534 | - <div class=" form-group"> | |
535 | - <label for="SystemFont" class="font13">Available Lexicons</label> | |
536 | - <select class="form-control" size="8" id="lexiconLangDropdown"></select> | |
537 | - </div> | |
538 | - <p class="font11"><strong>Note :</strong> Some languages require special system fonts to display correctly</p> | |
539 | - </div> | |
540 | - <div class="clearfix"></div> | |
541 | - </div> | |
542 | - </div> | |
543 | - <div role="tabpanel" id="dissectible" ng-class="{'tab-pane active' : SettingsTab === 3,'tab-pane' : SettingsTab !==3 }"> | |
544 | - <div class=""> | |
545 | - <div class="col-sm-12"> | |
546 | - <h5 class="bolder font13 no-margin-top">Skin Tones</h5> | |
547 | - <div class="skin-tones"> | |
548 | - <div align="center"> | |
549 | - <div class="col-sm-5"> | |
550 | - <button id="btnEthnicW" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'W')"> | |
551 | - <img src="~/../content/images/common/skin1.jpg" alt=""> | |
552 | - </button> | |
553 | - </div> | |
554 | - <div class="col-sm-5"> | |
555 | - <button id="btnEthnicB" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'B')"> | |
556 | - <img src="~/../content/images/common/skin2.jpg" alt=""> | |
557 | - </button> | |
558 | - </div> | |
559 | - <div class="col-sm-5"> | |
560 | - <button id="btnEthnicL" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'A')"> | |
561 | - <img src="~/../content/images/common/skin3.jpg" alt=""> | |
562 | - </button> | |
563 | - </div> | |
564 | - <div class="col-sm-5"> | |
565 | - <button id="btnEthnicA" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'L')"> | |
566 | - <img src="~/../content/images/common/skin4.jpg" alt=""> | |
567 | - </button> | |
568 | - </div> | |
569 | - </div> | |
570 | - </div> | |
571 | - | |
572 | - </div> | |
573 | - </div> | |
574 | - <div class=""> | |
575 | - <div class="col-sm-6"> | |
576 | - <h5 class="font13 bolder">Modesty Settings</h5> | |
577 | - <img src="~/../content/images/common/adam-leaf.png" alt="" class="pull-left marginR5"> | |
578 | - <div class="radio"> | |
579 | - <label> | |
580 | - <input type="radio" ng-checked="isModestyOn" ng-model="formsetting.modesty" value="Y" name="modestyRadios" id="modon" ng-click="ChangeModesty(formsetting,'Y')"> | |
581 | - <span class="">On</span> | |
582 | - </label> | |
583 | - </div> | |
584 | - <div class="radio"> | |
585 | - <label> | |
586 | - <input type="radio" ng-checked="isModestyOff" ng-model="formsetting.modesty" value="N" name="modestyRadios" id="modoff" ng-click="ChangeModesty(formsetting,'N')"> | |
587 | - <span class="">Off</span> | |
588 | - </label> | |
589 | - </div> | |
590 | - </div> | |
591 | - <div class="col-sm-6"> | |
592 | - <h5 class="font13 bolder">Annotation</h5> | |
593 | - <div class="checkbox no-margin"> | |
594 | - <!--Settings > The entire highlighted part should be active--> | |
595 | - <label class="font11 no-margin-btm"> | |
596 | - <input type="checkbox" value="" checked> | |
597 | - Erase Annotations when changing layers | |
598 | - </label> | |
599 | - </div> | |
600 | - </div> | |
601 | - </div> | |
602 | - </div> | |
603 | - </div> | |
604 | - </div> | |
605 | - </div> | |
606 | - <div class="modal-footer"> | |
607 | - <button type="button" class="btn btn-primary" ng-click="UpdateAndCloseSetting(formsetting)">OK</button> | |
608 | - | |
609 | - <!--<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>--> | |
610 | - <button type="button" class="btn btn-primary" ng-click="CloseSetting()">Cancel</button> | |
611 | - <button type="button" class="btn btn-primary" ng-click="UpdateSetting(formsetting)">Apply</button> | |
612 | - </div> | |
613 | - </div> | |
614 | - </form> | |
615 | - </div> | |
616 | - </div> | |
617 | - <div id="setting-spinner" style="display:none;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 15000; overflow: auto; width: 100px;"> | |
618 | - <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading"> | |
619 | - </div> | |
620 | - <!--Annotation Modal--> | |
621 | - <div class="annotationTollbar" style="width: 300px;position: fixed; top: 80px; right: 20px; display: none; z-index: 1200000;"> | |
622 | - <div class="annotationbar"> | |
623 | - <div class="modal-content"> | |
624 | - <div class="modal-header annotation-modal-header"> | |
625 | - <button type="button" class="close" aria-label="Close" ng-click="CloseAnnotationTool()"><span aria-hidden="true">×</span></button> | |
626 | - <h4 class="modal-title" id="myModalLabel">Annotation</h4> | |
627 | - </div> | |
628 | - <div class="modal-body" id="AnnotaionPopupDiv"> | |
629 | - <div class="row"> | |
630 | - <div class="col-sm-12"> | |
631 | - <h5>Mode</h5> | |
632 | - | |
633 | - <div class="btn-group btn-group-justified" role="group" aria-label="..."> | |
634 | - <div class="btn-group" role="group" tooltip> | |
635 | - <div id="identify-block" style="display: none; font-size:13px;">Identify Mode</div> | |
636 | - <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button> | |
637 | - </div> | |
638 | - <div class="btn-group" role="group"> | |
639 | - <div id="draw-block" style="display: none; font-size: 13px;">Draw Mode</div> | |
640 | - <button id="DrawMode" type="button" ng-click="DrawingMode()" class="btn btn-sm btn-success">Draw</button> | |
641 | - </div> | |
642 | - </div> | |
643 | - | |
644 | - </div> | |
645 | - <div class="col-sm-12"> | |
646 | - <h5>Tools</h5> | |
647 | - <div class="well well-popup"> | |
648 | - <div class="" aria-label="..."> | |
649 | - <div class="" role="group" align="center"> | |
650 | - <div id="cursor-block" style="display: none; font-size:13px;"></div> | |
651 | - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" ng-mouseover="addToolTip(75, 60, 120, 'Select Cursor(s)')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button> | |
652 | - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" ng-mouseover="addToolTip(75, 100, 120, 'Draw Pin')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> | |
653 | - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" ng-mouseover="addToolTip(75, 120, 120, 'Draw Arrow')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button> | |
654 | - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" ng-mouseover="addToolTip(75, 140, 120, 'Draw Text')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button> | |
655 | - </div> | |
656 | - <div class="" role="group" align="center"> | |
657 | - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" ng-mouseover="addToolTip(95, 60, 120, 'Draw Line')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> | |
658 | - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" ng-mouseover="addToolTip(95, 100, 120, 'Draw Rectangle')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button> | |
659 | - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" ng-mouseover="addToolTip(95, 120, 120, 'Draw Circle')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button> | |
660 | - <!--<button type="button" class="btn btn-black-annotation btn-xs btn-annotation" ng-mouseover="addToolTip(95, 140, 120, 'Draw Polygon')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button>--> | |
661 | - <button type="button" class="btn btn-black-annotation" id="resetBtn" style="padding:1px 7px;display:none;" ng-click="resetDrawing()" ng-mouseover="addToolTip(95, 140, 120, 'Reset')" ng-mouseleave="removeToolTipOnMouseOut()"><i class="fa fa-refresh"></i></button> | |
662 | - </div> | |
663 | - </div> | |
664 | - </div> | |
665 | - <div class="well-popup well blankshapediv" ng-mouseover="addToolTip(200, 170, 120, 'Edit Style')" ng-mouseleave="removeToolTipOnMouseOut()"> | |
666 | - <!--#7931--> | |
667 | - | |
668 | - <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div> | |
669 | - <div id="previewBorder" class="outlinediv" ng-mouseover="addToolTip(170, 170, 120, 'Edit Style')" ng-mouseleave="removeToolTipOnMouseOut()"> | |
670 | - <div id="shapeStyleDiv" style="background-color: #ffffff;" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()"> | |
671 | - | |
672 | - </div> | |
673 | - | |
674 | - </div> | |
675 | - </div> | |
676 | - <div class="well well-popup"> | |
677 | - <div class="" role="group" aria-label="..."> | |
678 | - <div> | |
679 | - <a href="#canvasPaint" data-tool="marker" data-size="1" data-color="#fff" id="annotationpaintbrushsize" ng-mouseover="addToolTip(270, 50, 120, 'Paint')" ng-mouseleave="removeToolTipOnMouseOut()" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-brush" role="button" data-placement="top" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></a> | |
680 | - <a href="#canvasPaint" data-tool="eraser" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-erase" data-placement="top" data-size=" 1" id="annotationpainteraser" ng-click="EraseDrawing()" ng-mouseover="addToolTip(270, 70, 120, 'Erase')" ng-mouseleave="removeToolTipOnMouseOut()" role="button"><i class=" fa fa-eraser"></i></a> | |
681 | - | |
682 | - <!--<button type="button" id="annotationpainteraser" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-erase" data-placement="top" ng-click="EraseDrawing()" ng-mouseover="addToolTip(270, 70, 120, 'Erase')" ng-mouseleave="removeToolTipOnMouseOut()"><i class="fa fa-eraser"></i></button>--> | |
683 | - <div style="width: 80px; margin: 0px 0px 0px 4px; display: inline-block;float:left;"> | |
684 | - <div style="width: 58px; float: left;" ng-mouseover="addToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()"> | |
685 | - <input type="text" id="btnBrushSize" class="form-control" value="1" style="height:32px;border-radius:0;" oninput="Brushsize(this)"> | |
686 | - </div> | |
687 | - <div style="width: 22px; float: left;"> | |
688 | - <div style="width: 100%; float: left; height: 16px;"> | |
689 | - <button type="button" id="btnBrushSizeIncrement" ng-mouseover="addToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;"> | |
690 | - | |
691 | - <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png"> | |
692 | - </button> | |
693 | - </div> | |
694 | - <div style="width: 100%; float: left; height: 16px;"> | |
695 | - <button type="button" id="btnBrushSizeDecrease" ng-mouseover="addToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;"> | |
696 | - <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png"> | |
697 | - </button> | |
698 | - </div> | |
699 | - </div> | |
700 | - | |
701 | - </div> | |
702 | - | |
703 | - | |
704 | - <div class="pull-left pl-12" style="width:45%; margin-left:2%;margin-top:5px;"> | |
705 | - <div id="slider-range-min-2" ng-mouseover="addToolTip(270, 170, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()"></div> | |
706 | - </div> | |
707 | - <div class="clearfix"></div> | |
708 | - </div> | |
709 | - | |
710 | - </div> | |
711 | - | |
712 | - | |
713 | - </div> | |
714 | - | |
715 | - </div> | |
716 | - </div> | |
717 | - </div> | |
718 | - | |
719 | - </div> | |
720 | - </div> | |
721 | - </div> | |
722 | - | |
723 | - <!--Modal For Annotation Text Box--> | |
724 | - <div id="annotationTextModal" style="display:none;z-index: 1000000000;width:500px;height:241px;padding-right:0!important;position:fixed;left:0;right:0;top:0px;bottom:0;margin:auto;"> | |
725 | - | |
726 | - <div class="modal-content"> | |
727 | - <div class="modal-header" style="background-color: #808D43;padding:10px;border-bottom:0;"> | |
728 | - <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>--> | |
729 | - <h4 class="modal-title" id="myModalLabel" style="font-weight:bold;">Enter Text to be put in a box</h4> | |
730 | - </div> | |
731 | - <div class="modal-body"> | |
732 | - <div class="col-xs-12" style="padding:20px 0;"> | |
733 | - <div class="form-inline"> | |
734 | - <!--Annotation: Text in different font style is same.--> | |
735 | - <select class="form-control" id="selected-font-family"></select> | |
736 | - <select class="form-control" id="selected-font-size"> | |
737 | - <option>14</option> | |
738 | - <option>16</option> | |
739 | - <option>18</option> | |
740 | - <option>20</option> | |
741 | - <option>22</option> | |
742 | - <option>24</option> | |
743 | - <option>26</option> | |
744 | - <option>28</option> | |
745 | - <option>36</option> | |
746 | - <option>48</option> | |
747 | - <option>72</option> | |
748 | - </select> | |
749 | - <span style="vertical-align:middle;"> | |
750 | - <span id="text-bold" class="Edittext-btn-css"> | |
751 | - <i aria-hidden="true" class="fa fa-bold" style="color: #fff"></i> | |
752 | - </span> | |
753 | - <span id="text-italic" class="Edittext-btn-css"> | |
754 | - <i class="fa fa-italic" aria-hidden="true" style="color: #fff"></i> | |
755 | - | |
756 | - </span> | |
757 | - <span id="text-underline" class="underline-btn-css"> | |
758 | - <i class="fa fa-underline" aria-hidden="true" style="color: #fff"></i> | |
759 | - </span> | |
760 | - </span> | |
761 | - | |
762 | - <div class="form-group" id="font-color" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;"> | |
763 | - | |
764 | - <input type="text" id="saturation-demo" class="form-control demo" data-control="saturation" style="display:none;" value="#0088cc"> | |
765 | - </div> | |
766 | - <div class="form-group" id="drawTextBGColorpicker" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;"> | |
767 | - <input type="text" id="saturation-demo-background" class="form-control drawTextBG" data-control="saturation" style="display:none;" value="#0088cc"> | |
768 | - </div> | |
769 | - | |
770 | - <span style="vertical-align:middle;"> | |
771 | - <span id="text-left" class="Edittext-btn-css"> | |
772 | - <i aria-hidden="true" class="fa fa-align-left" style="color: #fff"></i> | |
773 | - </span> | |
774 | - <span id="text-center" class="Edittext-btn-css"> | |
775 | - <i class="fa fa-align-center" aria-hidden="true" style="color: #fff"></i> | |
776 | - | |
777 | - | |
778 | - </span> | |
779 | - <span id="text-right" class="underline-btn-css"> | |
780 | - <i class="fa fa-align-right" aria-hidden="true" style="color: #fff"></i> | |
781 | - | |
782 | - | |
783 | - </span> | |
784 | - </span> | |
785 | - | |
786 | - | |
787 | - </div> | |
788 | - </div> | |
789 | - <textarea class="form-control" id="text_area" rows="3" style="font-family: 'Verdana, sans-serif';font-size:14px; font-weight: normal; font-style: normal; color: #000; text-align: left; text-decoration: none;"></textarea> | |
790 | - | |
791 | - <!--code for horizonatl text going out--> | |
792 | - <div id="atTextDiv" style="float:left;"> | |
793 | - <span id="duptextspan" style="float: left; display: none;"></span> | |
794 | - <span id="textspan" style="display:none;"></span> | |
795 | - </div> | |
796 | - <!--code for horizonatl text going out--> | |
797 | - | |
798 | - </div> | |
799 | - <div class="modal-footer"> | |
800 | - <!--<button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">Close</button>--> | |
801 | - <button type="button" class="btn btn-default" ng-click="closeModal()" id="closeEditText" data-dismiss="modal">Close</button> | |
802 | - <button type="button" id="saveBtn" class="btn btn-primary" data-dismiss="modal" ng-click="saveText()">Save</button> | |
803 | - </div> | |
804 | - </div> | |
805 | - | |
806 | - </div> | |
807 | - | |
808 | - | |
809 | - | |
810 | - | |
811 | - <!--List manager--> | |
812 | - <!--List manager--> | |
813 | - <style> | |
814 | - #listManager { | |
815 | - background: #fff; | |
816 | - border-radius: 3px; | |
817 | - border: 1px solid #ededed; | |
818 | - -webkit-box-shadow: 0px 0px 2px 1px rgba(173,173,173,1); | |
819 | - -moz-box-shadow: 0px 0px 2px 1px rgba(173,173,173,1); | |
820 | - box-shadow: 0px 0px 2px 1px rgba(173,173,173,1); | |
821 | - width: 350px; | |
822 | - position: absolute; | |
823 | - top: 170px; | |
824 | - left: 140px; | |
825 | - display: none; | |
826 | - z-index: 780000; | |
827 | - height: auto !important; | |
828 | - } | |
829 | - | |
830 | - #listManager .annotation-modal-header { | |
831 | - background: #818f44; | |
832 | - padding: 2px 10px; | |
833 | - } | |
834 | - | |
835 | - #listManager .annotation-modal-header h4 { | |
836 | - color: #fff; | |
837 | - font-size: 15px; | |
838 | - line-height: 20px; | |
839 | - } | |
840 | - | |
841 | - #listManager .modal-header .close { | |
842 | - color: #fff; | |
843 | - margin: 0; | |
844 | - opacity: 10; | |
845 | - text-shadow: none; | |
846 | - } | |
847 | - | |
848 | - #listManager .modal-footer { | |
849 | - padding: 5px 10px; | |
850 | - } | |
851 | - </style> | |
852 | - <div id="listManager" style=""> | |
853 | - <div class="modal-header annotation-modal-header"> | |
854 | - <button type="button" class="close" aria-label="Close" ng-click="CloseListManager()"><span aria-hidden="true">×</span></button> | |
855 | - <h4 class="modal-title" id="myModalLabel">List Manager</h4> | |
856 | - </div> | |
857 | - <div class="modal-body"> | |
858 | - <div class="row paddingTopBtm10"> | |
859 | - <div class="col-sm-12" ng-init="FillListManager()"> | |
860 | - | |
861 | - <div class="form-group"> | |
862 | - <label for="sel1">Window</label> | |
863 | - <select class="form-control" id="viewName" disabled> | |
864 | - <!--<option>Male Lateral</option>--> | |
865 | - | |
866 | - </select> | |
867 | - </div> | |
868 | - <div style=""> | |
869 | - <div class="form-group"> | |
870 | - <div ng-click="restrictBodySystemList()" class="btn btn-success btn-block" style="padding:3px 12px;"> | |
871 | - <i class=" fa fa-caret-right restrict-carret-icon"></i> <span>Restrict List to</span> | |
872 | - </div> | |
873 | - </div> | |
874 | - | |
875 | - <div id="restrictListDiv" style="display:none;"> | |
876 | - <div class="well well-sm marginTopBtm10"> | |
877 | - <div class="form-horizontal"> | |
878 | - <div class="form-group"> | |
879 | - <label class="col-sm-4 control-label" for="System">System</label> | |
880 | - <div class="col-sm-8"> | |
881 | - <select id="bodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystem(this.options[this.selectedIndex].id)"></select> | |
882 | - <select id="AABodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystemSel(this.options[this.selectedIndex].id)" style="display:none;"></select> | |
883 | - </div> | |
884 | - </div> | |
885 | - <div class="form-group"> | |
886 | - <label class="col-sm-4 control-label" for="inputPassword3">Area</label> | |
887 | - <div class="col-sm-8"> | |
888 | - <select class="form-control" disabled> | |
889 | - <option value="1" selected="">Entire View</option> | |
890 | - </select> | |
891 | - </div> | |
892 | - </div> | |
893 | - </div> | |
894 | - </div> | |
895 | - | |
896 | - | |
897 | - </div> | |
898 | - | |
899 | - <!--DA > List Manager > Multiple structure selection should not be available.--> | |
900 | - <div class="form-group"> | |
901 | - <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)"></select> | |
902 | - </div> | |
903 | - | |
904 | - </div> | |
905 | - <div style="clear:both;"></div> | |
906 | - | |
907 | - | |
908 | - | |
909 | - | |
910 | - </div> | |
911 | - </div> | |
912 | - | |
913 | - </div> | |
914 | - <div class="modal-footer" id="totalTerms"> | |
915 | - <!--<span class="pull-left marginTop5">424 Structures</span>--> | |
916 | - <!--<button data-dismiss="modal" class="btn btn-primary" type="button"><i class="fa fa-arrow-circle-right"></i></button>--> | |
917 | - </div> | |
918 | - </div> | |
919 | - | |
920 | - <!--background disable div--> | |
921 | - | |
922 | - <div id="modelbackground"></div> | |
923 | - | |
924 | - | |
925 | - <!--Edit Shape Modal--> | |
926 | - | |
927 | - | |
928 | - <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white;width: 302px;position:absolute;left:40%;right:0;top:70px;"> | |
929 | - <div class="modal-content"> | |
930 | - <div class="modal-header annotation-modal-header"> | |
931 | - <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> | |
932 | - </div> | |
933 | - <form id="editStyleForm"> | |
934 | - <div class="modal-body"> | |
935 | - <div class="marginTopBtm10"> | |
936 | - <div class="well well-sm no-margin-btm"> | |
937 | - <div class="row"> | |
938 | - <div class="col-sm-12"> | |
939 | - <div class="checkbox no-margin"> | |
940 | - <label> | |
941 | - <input id="fill-option" type="checkbox" checked onclick="enableDisableFillOption()"> Fill Option | |
942 | - </label> | |
943 | - </div> | |
944 | - </div> | |
945 | - <div class="col-sm-6 enableDisableOpacity"> | |
946 | - <!--<div class="radio"> | |
947 | - <label> | |
948 | - <input type="radio" name="filloption" id="filloption1" value="filloption1"> | |
949 | - <span class="">Texture</span> | |
950 | - <img id="editstyleTexture" src="~/../content/images/common/annotation-tool-bar/pattern-picker.png" alt="" class="pattern-picker" data-toggle="modal" data-target="#pattern"> | |
951 | - </label> | |
952 | - </div>--> | |
953 | - <div class="radio"> | |
954 | - <label> | |
955 | - <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;"> | |
956 | - | |
957 | - | |
958 | - <div id="editstylebackgroundcolor" class="form-group" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;"> | |
959 | - <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span> | |
960 | - <input type="text" class="form-control outerBackgroundColor" data-control="saturation" style="display:none;" value="#0088cc"> | |
961 | - </div> | |
962 | - | |
963 | - | |
964 | - </label> | |
965 | - </div> | |
966 | - </div> | |
967 | - <div class="col-sm-6 no-padding marginTop10 enableDisableOpacity"> | |
968 | - <div class="row"> | |
969 | - <label class="pull-left" style="font-weight:normal;">Scale</label> | |
970 | - <div id="edit-slider-3" class="pull-left pl-12" style="width:62%; margin-left:3%; margin-top:2%;"> | |
971 | - <div id="slider-range-min-3"></div> | |
972 | - </div> | |
973 | - </div> | |
974 | - | |
975 | - <div class="row"> | |
976 | - <label class="pull-left" style="font-weight:normal;">Opacity</label> | |
977 | - <div id="edit-slider-4" class="pull-left pl-12" style="width:53%; margin-left:3%; margin-top:2%;"> | |
978 | - <div id="slider-range-min-4"></div> | |
979 | - </div> | |
980 | - </div> | |
981 | - | |
982 | - <div class="clearfix"></div> | |
983 | - | |
984 | - | |
985 | - </div> | |
986 | - </div> | |
987 | - | |
988 | - </div> | |
989 | - </div> | |
990 | - <div class="marginTopBtm10"> | |
991 | - <div class="well well-sm no-margin-btm"> | |
992 | - <div class="row"> | |
993 | - <div class="col-sm-12"> | |
994 | - <div class="checkbox no-margin"> | |
995 | - <label> | |
996 | - <input id="Outline-Option" onclick="enableDisableOutline()" type="checkbox" checked> Outline Option | |
997 | - </label> | |
998 | - </div> | |
999 | - </div> | |
1000 | - <div class="col-sm-6 setEnableDisableForEditShapeStyle"> | |
1001 | - <label class="marginTop5"> | |
1002 | - <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span> | |
1003 | - <div class="form-group" id="outlineColor" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;"> | |
1004 | - | |
1005 | - <input type="text" class="form-control borderColorCanvasPreview" data-control="saturation" style="display:none;" value="#0088cc"> | |
1006 | - </div> | |
1007 | - | |
1008 | - | |
1009 | - </label> | |
1010 | - </div> | |
1011 | - | |
1012 | - <div class="col-sm-6 setEnableDisableForEditShapeStyle"> | |
1013 | - <div class="form-horizontal"> | |
1014 | - <div class="form-group"> | |
1015 | - <label class="col-sm-3 control-label" style=" font-weight:normal; padding-top:9px;">Size</label> | |
1016 | - <div class="col-sm-9 marginTop5"> | |
1017 | - <select id="borderWidthCanvasElement" class="form-control input-sm"> | |
1018 | - <option value="1">1</option> | |
1019 | - <option value="2">2</option> | |
1020 | - <option value="3">3</option> | |
1021 | - <option value="4">4</option> | |
1022 | - <option value="5">5</option> | |
1023 | - </select> | |
1024 | - </div> | |
1025 | - </div> | |
1026 | - </div> | |
1027 | - </div> | |
1028 | - | |
1029 | - </div> | |
1030 | - </div> | |
1031 | - </div> | |
1032 | - | |
1033 | - <div class="marginTopBtm10"> | |
1034 | - | |
1035 | - <div class="well well-sm no-margin-btm blankshapediv"> | |
1036 | - <div class="outlinediv" id="outlinedivId" style="border: 1px solid #000000;"> | |
1037 | - <div id="imgOpacity" style="background-color: #ffffff" class="fullcolordiv imgopacity"> | |
1038 | - </div> | |
1039 | - </div> | |
1040 | - </div> | |
1041 | - | |
1042 | - </div> | |
1043 | - </div> | |
1044 | - <div class="modal-footer"> | |
1045 | - <button id="btnShapeStyle" type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')"> | |
1046 | - OK | |
1047 | - </button> | |
1048 | - <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> | |
1049 | - </div> | |
1050 | - </form> | |
1051 | - </div> | |
1052 | - </div> | |
1053 | - | |
1054 | - <!--Export Image Modal--> | |
1055 | - <div class="modal fade export-image ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" | |
1056 | - style="z-index: 1200002;"> | |
1057 | - <div class="modal-dialog modal-sm" role="document"> | |
1058 | - <div class="modal-content"> | |
1059 | - <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
1060 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
1061 | - <h4 class="modal-title" id="">Save As</h4> | |
1062 | - </div> | |
1063 | - <div class="modal-body"> | |
1064 | - <div class="row paddTopbtm15"> | |
1065 | - <div class="col-sm-12"> | |
1066 | - <div class="form-group"> | |
1067 | - <label for="filename">Filename:</label> | |
1068 | - <div class="input-group"> | |
1069 | - <input type="text" class="form-control" id="filename" placeholder="" ng-model="filename"> | |
1070 | - <div class="input-group-addon">.jpg</div> | |
1071 | - </div> | |
1072 | - </div> | |
1073 | - </div> | |
1074 | - </div> | |
1075 | - | |
1076 | - </div> | |
1077 | - <div class="modal-footer"> | |
1078 | - <div class="row"> | |
1079 | - <input type="file" id="file1" style="display:none"> | |
1080 | - <!--<a href="data:application/xml;charset=utf-8,your code here" download="filename.html">Save</a--> | |
1081 | - <div class="col-sm-12"><button id="btnSaveEI" class="btn btn-primary" data-dismiss="modal" type="button">Ok</button></div> <!--onclick="makeScreenshot();"--><!--ng-click="dialogs.saveAs()"--><!--ng-click="ShowAlert()"--> | |
1082 | - </div> | |
1083 | - </div> | |
1084 | - | |
1085 | - </div> | |
1086 | - </div> | |
1087 | - </div> | |
1088 | - <div class="modal fade export-image-ipad ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" | |
1089 | - style="z-index: 1200002;"> | |
1090 | - <div class="modal-dialog modal-sm" role="document"> | |
1091 | - <div class="modal-content"> | |
1092 | - <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
1093 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
1094 | - <h4 class="modal-title" id="">Download Export Image</h4> | |
1095 | - </div> | |
1096 | - <div class="modal-body"> | |
1097 | - <div class="row paddTopbtm15"> | |
1098 | - <div class="col-sm-12"> | |
1099 | - <div class="form-group"> | |
1100 | - <label for="filename">Exported image open in next Teb. Please download it</label> | |
1101 | - | |
1102 | - </div> | |
1103 | - </div> | |
1104 | - </div> | |
1105 | - | |
1106 | - </div> | |
1107 | - <div class="modal-footer"> | |
1108 | - <div class="row"> | |
1109 | - <input type="file" id="file1" style="display:none"> | |
1110 | - <!--<a href="data:application/xml;charset=utf-8,your code here" download="filename.html">Save</a--> | |
1111 | - <div class="col-sm-12"><button id="btnPrintPreview" class="btn btn-primary" data-dismiss="modal" type="button">Ok</button></div> <!--onclick="makeScreenshot();"--><!--ng-click="dialogs.saveAs()"--><!--ng-click="ShowAlert()"--> | |
1112 | - </div> | |
1113 | - </div> | |
1114 | - | |
1115 | - </div> | |
1116 | - </div> | |
1117 | - </div> | |
1118 | - <!--Print Active Viewer--> | |
1119 | - <div class="print-box-active portrait-box-active" id="printBox" style="display: none;"> | |
1120 | - <div id="printDivContent"> | |
1121 | - <div class=""> | |
1122 | - <div class="print-col-sm-4" style="top: 10px; position: absolute; left: 10px;"> | |
1123 | - <span class="pull-left font12 print-span-font" id="spnModule"></span> | |
1124 | - </div> | |
1125 | - <div class="print-col-sm-4" style="top: 10px; position: absolute; right: 10px;"> | |
1126 | - <span class="pull-right font12 print-span-font" id="spnBodyViewTitle"></span> | |
1127 | - </div> | |
1128 | - </div> | |
1129 | - <div class=" mar-top-25" align="center" id="dvPortrait" style="text-align: center;"> | |
1130 | - <img src="" alt="" class="logo-image" id="snipImage" style="width: 100%;" /> | |
1131 | - </div> | |
1132 | - <div> | |
1133 | - <div class="print-col-sm-4" style="position: absolute; bottom: 20px;"> | |
1134 | - <span class="pull-left marginTop10 font12 print-span-font">Copyright {{current_year}} A.D.A.M., Inc. All Rights Reserved</span> | |
1135 | - </div> | |
1136 | - <div class="print-col-sm-4" style="position: absolute; bottom: 20px; right: 10px;"> | |
1137 | - <span class="pull-right print-marginTop10 bgnone no-margin"> | |
1138 | - <img class="logo-image" src="content/images/adam-logo-small.png" alt=""> | |
1139 | - </span> | |
1140 | - </div> | |
1141 | - </div> | |
1142 | - <div class="clearfix"></div> | |
1143 | - </div> | |
1144 | - </div> | |
1145 | - | |
1146 | - <!--Print Preview Modal--> | |
1147 | - <div id="dvPrintPreview" style="display: none;"></div> | |
1148 | - </div> | |
1149 | - </div> | |
1150 | - <!--RESET PASSWORD FORM--> | |
1151 | - <div id="passwordReset" ng-show="isVisibleResetPass"> | |
1152 | - <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> | |
1153 | - <tbody> | |
1154 | - <tr> | |
1155 | - <td align="center" valign="middle" bgcolor="#393939 " style="padding:30px 0 20px 0;"><a href="#"><img src="../content/images/logo.png" alt="AIA" title="AIA" /></a></td> | |
1156 | - </tr> | |
1157 | - <tr> | |
1158 | - <td align="center" valign="top" bgcolor="#808d43" style="padding:20px; overflow:hidden;"> | |
1159 | - <form name="resetPasswordForm" novalidate> | |
1160 | - <table width="100%" border="0" cellspacing="0" cellpadding="0" ng-controller="HomeController"> | |
1161 | - <tbody> | |
1162 | - | |
1163 | - <tr> | |
1164 | - <td style=" font-size:26px; font-weight:bold; color:#fff; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif"><strong>Reset Password</strong></td> | |
1165 | - </tr> | |
1166 | - <tr> | |
1167 | - <td> </td> | |
1168 | - </tr> | |
1169 | - <tr> | |
1170 | - <td style="font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#fff;">New Password </td> | |
1171 | - </tr> | |
1172 | - <tr> | |
1173 | - <td> | |
1174 | - <input class="form-control" name="newPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.newPassword" ng-minlength="8" ng-maxlength="20" required> | |
1175 | - <span style="color: maroon; font-weight:bold" ng-show="resetPasswordForm.newPassword.$touched && resetPasswordForm.newPassword.$invalid && resetPasswordForm.newPassword.$pristine">The password is required.</span> | |
1176 | - <p ng-show="resetPasswordForm.newPassword.$error.minlength" style="font-weight: bold; color: maroon;">Password length must be between 8 - 20 characters.</p> | |
1177 | - <p ng-show="resetPasswordForm.newPassword.$error.maxlength" style="font-weight: bold; color: maroon;">Password length must be between 8 - 20 characters.</p> | |
1178 | - </td> | |
1179 | - </tr> | |
1180 | - <tr> | |
1181 | - <td> </td> | |
1182 | - </tr> | |
1183 | - <tr> | |
1184 | - <td style="font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#fff;">Confirm Password </td> | |
1185 | - </tr> | |
1186 | - | |
1187 | - <tr> | |
1188 | - <td> | |
1189 | - <input class="form-control" name="confirmPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.confirmPassword" required> | |
1190 | - <span style="color: maroon; font-weight: bold; " ng-show="resetPasswordForm.confirmPassword.$touched && resetPasswordForm.confirmPassword.$invalid">Confirm password is required.</span> | |
1191 | - <span style="color: maroon; font-weight: bold; " ng-if="resetPasswordForm.newPassword !== resetPasswordForm.confirmPassword">{{passwordMismatchMessage}}</span> | |
1192 | - </td> | |
1193 | - </tr> | |
1194 | - <tr> | |
1195 | - <td> </td> | |
1196 | - </tr> | |
1197 | - <tr> | |
1198 | - <td> | |
1199 | - <button type="submit" ng-disabled="resetPasswordForm.$invalid" ng-click="ResetUserPassword(userInfo)" style="background: #0072a7; border: 1px solid #005076; cursor: pointer; color: #fff; padding: 5px 10px; font-size: 16px; text-transform: uppercase; text-align: center; text-decoration: none; font-family: gotham, 'Helvetica Neue', helvetica, arial, sans-serif; " id="btnUpdatePassword">Submit</button> <!--ng-submit="submitForm(resetPwdForm.$valid)"--> <!--ng-click="ResetUserPassword(userInfo)"--> | |
1200 | - </td> | |
1201 | - </tr> | |
1202 | - </tbody> | |
1203 | - </table> | |
1204 | - </form> | |
1205 | - </tr> | |
1206 | - | |
1207 | - | |
1208 | - </tbody> | |
1209 | - </table> | |
1210 | - </div> | |
1211 | - | |
1212 | - <div class="modal fade" id="messageModal" role="dialog"> | |
1213 | - <div class="modal-dialog"> | |
1214 | - | |
1215 | - <div class="modal-content"> | |
1216 | - <div class="modal-header"> | |
1217 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
1218 | - </div> | |
1219 | - <div class="modal-title"></div> | |
1220 | - <div class="modal-body">{{errorMessage}}</div> | |
1221 | - <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></div> | |
1222 | - </div> | |
1223 | - </div> | |
1224 | - </div> | |
1225 | - | |
1226 | - <!--Admin Form (Under Process)--> | |
1227 | - | |
1228 | - | |
1229 | - <!--Available modules list modal after login--> | |
1230 | - <div class=" fade ui-draggable in" id="dvUserModulesInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="padding-left: 17px; display: none; left: 0px !important; z-index: 111111; position: fixed; top: 0; overflow-x: hidden; overflow-y: auto; right: 0px; bottom: 0px; "> | |
1231 | - <div class="modal-dialog" role="document"> | |
1232 | - <div class="modal-content"> | |
1233 | - <div class="modal-header ui-draggable-handle " style="color: #ffffff; background-color: #0095da; border-color: #007ab3;cursor:default;"> | |
1234 | - <!--color: #e5e5e5;--> | |
1235 | - <!--bg-primary--> | |
1236 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
1237 | - <h4 class="text-left lhgt19 padd5" style="color:#fff; text-align:left;">Coming Soon...</h4> | |
1238 | - </div> | |
1239 | - | |
1240 | - <div class="modal-body"> | |
1241 | - <div class="panel-body"> | |
1242 | - <!-- form --> | |
1243 | - <form class="form-horizontal"> | |
1244 | - | |
1245 | - <!--<hr style="border: 1px solid;"/>--> | |
1246 | - <!--<hr style="border: 1px solid;" />--> | |
1247 | - <div> | |
1248 | - <div class="form-group" id="moduleDiv7"> | |
1249 | - <div class="col-sm-12"><i>• Curriculum Builder</i></div> <!--(To be available by 09/25/2017)--> | |
1250 | - </div> | |
1251 | - <div class="form-group" id="moduleDiv8"> | |
1252 | - <div class="col-sm-8"><i>• Anatomy Test</i></div> <!--(To be available by 08/28/2017)--> | |
1253 | - </div> | |
1254 | - <div class="form-group" id="moduleDiv13"> | |
1255 | - <div class="col-sm-8">• A.D.A.M Images</div> | |
1256 | - </div> | |
1257 | - </div> | |
1258 | - <div class="form-group"> | |
1259 | - <div style="text-align: center"> | |
1260 | - <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" data-dismiss="modal"><i class="fa fa-check"></i> OK</button> | |
1261 | - </div> | |
1262 | - </div> | |
1263 | - </form> | |
1264 | - </div> | |
1265 | - </div> | |
1266 | - | |
1267 | - </div> | |
1268 | - </div> | |
1269 | - </div> | |
1270 | - | |
1271 | - <!-- Terms & Condition Modal --> | |
1272 | - <div class=" fade ui-draggable in" id="dvTermCondition" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="padding-left: 17px; display: none; left: 0px !important; z-index: 111111; position: fixed; top: 0; overflow-x: hidden; overflow-y: auto; right: 0px; bottom: 0px; "> | |
1273 | - <div class="modal-dialog" role="document"> | |
1274 | - <div class="modal-content"> | |
1275 | - <div class="modal-header ui-draggable-handle " style="color: #ffffff; background-color: #0095da; border-color: #007ab3;cursor:default;"> | |
1276 | - <!--color: #e5e5e5;--> | |
1277 | - <h6 class="text-left lhgt19 padd5" style="color:#fff; text-align:left;">Terms and Conditions</h6> | |
1278 | - </div> | |
1279 | - | |
1280 | - <div class="modal-body" style="width: 597px; height: 400px; overflow-x: auto;"> | |
1281 | - <div class="panel-body"> | |
1282 | - <div id="dvTerms" style="font-size: 13px;"></div> | |
1283 | - </div> | |
1284 | - </div> | |
1285 | - <div class="modal-footer ui-draggable-handle " style="color: #ffffff; cursor:default;"> | |
1286 | - <!--background-color: #0095da; border-color: #007ab3;--> | |
1287 | - <!-- form --> | |
1288 | - <form class="form-horizontal"> | |
1289 | - <!--<div class="form-group">--> | |
1290 | - <div style="clear: left; float: left; color: #000;"><input type="checkbox" id="chkAccept" ng-model="checked" style="vertical-align: top;" /> I accept</div> | |
1291 | - <div style="float: right;"><button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" ng-disabled="!checked" data-dismiss="modal" ng-click="UpdateLicenseTermStatus()"><i class="fa fa-check"></i> Next</button></div> | |
1292 | - <!--</div>--> | |
1293 | - </form> | |
1294 | - </div> | |
1295 | - </div> | |
1296 | - </div> | |
1297 | - </div> | |
1298 | - <script> | |
1299 | - function enableDisableFillOption() { | |
1300 | - if (document.getElementById('fill-option').checked) { | |
1301 | - // $('#imgOpacity').attr("background-color"); | |
1302 | - //$('#imgOpacity').css({"background-color"}) | |
1303 | - //$("#filloption1").css({ "pointer-events": "auto" }); | |
1304 | - //$("#filloption12").css({ "pointer-events": "auto" }); | |
1305 | - | |
1306 | - var x = $("#editstylebackgroundcolor span.minicolors-swatch-color").css('background-color'); | |
1307 | - $("#imgOpacity").css("background-color", x); | |
1308 | - $("#edit-slider-3").css({ "pointer-events": "auto" }); | |
1309 | - $("#edit-slider-4").css({ "pointer-events": "auto" }); | |
1310 | - $("#editstylebackgroundcolor").css({ "pointer-events": "auto" }); | |
1311 | - $("#editstyleTexture").css({ "pointer-events": "auto" }); | |
1312 | - $(".enableDisableOpacity label").css({ "cursor": "pointer" }); | |
1313 | - $(".enableDisableOpacity").css({ "opacity": "1" }) | |
1314 | - document.getElementById("filloption1").disabled = false; | |
1315 | - document.getElementById("filloption2").disabled = false; | |
1316 | - document.getElementById("filloption1").style.cursor = "default"; | |
1317 | - document.getElementById("filloption2").style.cursor = "default"; | |
1318 | - | |
1319 | - | |
1320 | - | |
1321 | - } | |
1322 | - else { | |
1323 | - $('#imgOpacity').css("background-color", "transparent"); | |
1324 | - //$("#filloption1").css({ "pointer-events": "none" }); | |
1325 | - //$("#filloption2").css({ "pointer-events": "none" }); | |
1326 | - $("#edit-slider-3").css({ "pointer-events": "none" }); | |
1327 | - $("#edit-slider-4").css({ "pointer-events": "none" }); | |
1328 | - $("#editstylebackgroundcolor").css({ "pointer-events": "none" }); | |
1329 | - $("#editstyleTexture").css({ "pointer-events": "none" }); | |
1330 | - $(".enableDisableOpacity label").css({ "cursor": "default" }); | |
1331 | - $(".enableDisableOpacity").css({ "opacity": ".5" }) | |
1332 | - document.getElementById("filloption1").disabled = true; | |
1333 | - document.getElementById("filloption2").disabled = true; | |
1334 | - document.getElementById("filloption1").style.cursor = "default"; | |
1335 | - document.getElementById("filloption2").style.cursor = "default"; | |
1336 | - | |
1337 | - | |
1338 | - | |
1339 | - } | |
1340 | - | |
1341 | - } | |
1342 | - function enableDisableOutline() { | |
1343 | - | |
1344 | - if (document.getElementById('Outline-Option').checked) { | |
1345 | - var x = $("#outlineColor span.minicolors-swatch-color").css('background-color'); | |
1346 | - $(".marginTopBtm10 div.outlinediv").css("border-color", x); | |
1347 | - // var borderWidth = $("#outlineColor span.minicolors-swatch-color").css('border-width'); | |
1348 | - // $("#imgOpacity").css("border-width", borderWidth); | |
1349 | - | |
1350 | - $("#borderWidthCanvasElement").css({ "pointer-events": "auto" }); | |
1351 | - $("#outlineColor").css({ "pointer-events": "auto" }); | |
1352 | - $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" }) | |
1353 | - } | |
1354 | - else { | |
1355 | - $('.marginTopBtm10 div.outlinediv').css("border-color", "transparent"); | |
1356 | - $("#borderWidthCanvasElement").css({ "pointer-events": "none" }); | |
1357 | - $("#outlineColor").css({ "pointer-events": "none" }); | |
1358 | - $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" }) | |
1359 | - } | |
1360 | - } | |
1361 | - | |
1362 | - </script> | |
1363 | - | |
1364 | - <script> | |
1365 | - function Brushsize(object) { | |
1366 | - | |
1367 | - object.value = object.value.replace(/[^0-9]/g, ''); | |
1368 | - if (parseInt(object.value) <= 0) { | |
1369 | - object.value = 1; | |
1370 | - } | |
1371 | - if (parseInt(object.value) >= 1 && parseInt(object.value) <= 60) { | |
1372 | - object.value = object.value; | |
1373 | - } | |
1374 | - if (parseInt(object.value) > 60) { | |
1375 | - object.value = object.value.slice(0, 1); | |
1376 | - | |
1377 | - } | |
1378 | - | |
1379 | - } | |
1380 | - </script> | |
1381 | - | |
1382 | - | |
1383 | - <!--<script src="libs/jquery/1.11.3/jquery.min.js"></script>--> | |
1384 | - <script src="libs/jquery/2.1.3/jquery.min.js"></script> | |
1385 | - <script src="libs/jquery/1.11.4/jquery-ui.js"></script> | |
1386 | - | |
1387 | - <script src="libs/jquery/jquery_plugin/jquery.mCustomScrollbar.concat.min.js"></script> | |
1388 | - <script src="themes/default/scripts/bootstrap/3.3.5/bootstrap.js"></script> | |
1389 | - <script src="libs/angular/1.4.9/angular.min.js"></script> | |
1390 | - <script src="libs/angular/1.4.9/angular-route.min.js"></script> | |
1391 | - <script src="libs/angular/1.4.9/angular-sanitize.min.js"></script> | |
1392 | - <script src="libs/angular/1.4.9/ngStorage.js"></script> | |
1393 | - <script src="content/js/custom/custom.js"></script> | |
1394 | - <!--Annotation Toolbar : jcanvas Library--> | |
1395 | - | |
1396 | - <script src="libs/jcanvas/jcanvas.min.js"></script> | |
1397 | - <script src="libs/jcanvas/jcanvas.handle.min.js"></script> | |
1398 | - | |
1399 | - <script src="libs/jinqJs.js"></script> | |
1400 | - <script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js"></script> | |
1401 | - <script src="libs/video_4_12_11/video_4_12_11.js"></script> | |
1402 | - <script src="libs/jquery/jquery_plugin/SpeechBubble/bubble.js"></script> | |
1403 | - <!--<script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.min.js"></script>--> | |
1404 | - <script src="app/main/AIA.js"></script> | |
1405 | - <script src="app/main/Link.js"></script> | |
1406 | - <script src="content/scripts/js/custom/custom.js"></script> | |
1407 | - <script src="app/filters/ColorMatrixFilter.js"></script> | |
1408 | - <script src="app/utility/Matrix.js"></script> | |
1409 | - <script src="app/utility/Point.js"></script> | |
1410 | - <script src="app/utility/Rectangle.js"></script> | |
1411 | - <script src="app/utility/BitmapData.js"></script> | |
1412 | - <script src="app/utility/Paint.js"></script> | |
1413 | - <script src="app/controllers/DAController.js"></script> | |
1414 | - <script src="app/controllers/CIController.js"></script> | |
1415 | - <script src="app/controllers/CAController.js"></script> | |
1416 | - <script src="app/controllers/3dAController.js"></script> | |
1417 | - <script src="app/controllers/CurrBuildController.js"></script> | |
1418 | - <script src="app/controllers/AnatTestController.js"></script> | |
1419 | - <script src="app/controllers/LabExercController.js"></script> | |
1420 | - <script src="app/controllers/ADAMImgController.js"></script> | |
1421 | - <script src="app/controllers/AODController.js"></script> | |
1422 | - <script src="app/controllers/HomeController.js"></script> | |
1423 | - <script src="app/controllers/LinkController.js"></script> | |
1424 | - <script src="app/services/AuthenticationService.js"></script> | |
1425 | - <script src="app/services/ConfigurationService.js"></script> | |
1426 | - <script src="app/services/AdminService.js"></script> | |
1427 | - <script src="app/controllers/TileViewListController.js"></script> | |
1428 | - | |
1429 | - <script src="app/services/ModuleService.js"></script> | |
1430 | - | |
1431 | - <script src="app/services/DataService.js"></script> | |
1432 | - <script src="app/services/TermService.js"></script> | |
1433 | - <script src="libs/jquery/jquery_plugin/jqueryui.js"></script> | |
1434 | - <script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script> | |
1435 | - <script src="../app/services/LabExerciseService.js"></script> | |
1436 | - <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script> | |
1437 | - | |
1438 | - <script src="libs/jquery/jquery_plugin/color-picker/jquery.minicolors.min.js"></script> | |
1439 | - <!--<script src="libs/colorpicker/jquery.minicolors.min.js"></script>--> | |
1440 | - <!--<script src="libs/color-picker/jquery.minicolors.min.js"></script>--> | |
1441 | - | |
1442 | - <script src="libs/sketch.js"></script> | |
1443 | - | |
1444 | - <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>--> | |
1445 | - <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script> | |
1446 | - <script src="libs/html2canvas.js"></script> | |
1447 | - <script src="libs/FileSaver.js"></script> | |
1448 | - <script src="app/services/LabExerciseService.js"></script> | |
1449 | - <!--<script type="text/javascript"> | |
1450 | - $(function () { | |
1451 | - $('#canvas').sketch(); | |
1452 | - }); | |
1453 | - </script>--> | |
1454 | - | |
1455 | - <script> | |
1456 | - | |
1457 | - $(function () { | |
1458 | - $('[data-toggle="tooltip"]').tooltip(); | |
1459 | - }) | |
1460 | - | |
1461 | - </script> | |
1462 | - <script> | |
1463 | - (function ($) { | |
1464 | - $(window).load(function () { | |
1465 | - $(".sidebar").mCustomScrollbar({ | |
1466 | - autoHideScrollbar: true, | |
1467 | - //theme:"rounded" | |
1468 | - }); | |
1469 | - | |
1470 | - }); | |
1471 | - })(jQuery); | |
1472 | - </script> | |
1473 | - <script> | |
1474 | - $(function () { | |
1475 | - $(".modal").draggable(); | |
1476 | - $(".annotationTollbar").draggable(); | |
1477 | - $(".modeleditstyle").draggable(); | |
1478 | - $("#annotationTextModal").draggable(); | |
1479 | - $("#modal-settings").draggable(); | |
1480 | - }); | |
1481 | - </script> | |
1482 | - | |
1483 | - | |
1484 | - | |
1485 | - | |
1486 | - <script type="text/javascript"> | |
1487 | - $(function () { | |
1488 | - | |
1489 | - $("#text-left").on('click', function () { | |
1490 | - | |
1491 | - //Annotation: Formatting buttons color is not change when select. | |
1492 | - | |
1493 | - $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
1494 | - $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
1495 | - $("#text-left").addClass("ActiveFormattingButtonClass"); | |
1496 | - $("#text_area").css("text-align", "left"); | |
1497 | - | |
1498 | - | |
1499 | - }); | |
1500 | - | |
1501 | - | |
1502 | - $("#text-center").on('click', function () { | |
1503 | - | |
1504 | - //Annotation: Formatting buttons color is not change when select. | |
1505 | - | |
1506 | - $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
1507 | - $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
1508 | - $("#text-center").addClass("ActiveFormattingButtonClass"); | |
1509 | - $("#text_area").css("text-align", "center"); | |
1510 | - | |
1511 | - | |
1512 | - }); | |
1513 | - | |
1514 | - | |
1515 | - $("#text-right").on('click', function () { | |
1516 | - | |
1517 | - //Annotation: Formatting buttons color is not change when select. | |
1518 | - | |
1519 | - $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
1520 | - $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
1521 | - $("#text-right").addClass("ActiveFormattingButtonClass"); | |
1522 | - $("#text_area").css("text-align", "right"); | |
1523 | - }); | |
1524 | - | |
1525 | - | |
1526 | - $("#text-bold").on('click', function () { | |
1527 | - | |
1528 | - //Annotation: Formatting buttons color is not change when select. | |
1529 | - $("#text-bold").toggleClass("ActiveFormattingButtonClass"); | |
1530 | - | |
1531 | - if ($("#text-bold").hasClass("ActiveFormattingButtonClass")) { | |
1532 | - $("#text_area").css("font-weight", "bold"); | |
1533 | - } | |
1534 | - else { | |
1535 | - $("#text_area").css("font-weight", "normal"); | |
1536 | - } | |
1537 | - | |
1538 | - | |
1539 | - }); | |
1540 | - | |
1541 | - $("#text-italic").on('click', function () { | |
1542 | - | |
1543 | - //Annotation: Formatting buttons color is not change when select. | |
1544 | - $("#text-italic").toggleClass("ActiveFormattingButtonClass"); | |
1545 | - if ($("#text-italic").hasClass("ActiveFormattingButtonClass")) { | |
1546 | - $("#text_area").css("font-style", "italic"); | |
1547 | - } | |
1548 | - else { | |
1549 | - $("#text_area").css("font-style", "normal"); | |
1550 | - } | |
1551 | - }); | |
1552 | - | |
1553 | - $("#text-underline").on('click', function () { | |
1554 | - | |
1555 | - //Annotation: Formatting buttons color is not change when select. | |
1556 | - $("#text-underline").toggleClass("ActiveFormattingButtonClass"); | |
1557 | - | |
1558 | - if ($("#text-underline").hasClass("ActiveFormattingButtonClass")) { | |
1559 | - $("#text_area").css("text-decoration", "underline"); | |
1560 | - } | |
1561 | - else { | |
1562 | - $("#text_area").css("text-decoration", "none"); | |
1563 | - } | |
1564 | - | |
1565 | - | |
1566 | - }); | |
1567 | - | |
1568 | - | |
1569 | - $("#selected-font-size").change(function () { | |
1570 | - | |
1571 | - $("#text_area").css("font-size", $(this).val() + "px"); | |
1572 | - }); | |
1573 | - | |
1574 | - $("#selected-font-family").change(function () { | |
1575 | - | |
1576 | - $("#text_area").css("font-family", $(this).val()); | |
1577 | - | |
1578 | - }); | |
1579 | - | |
1580 | - | |
1581 | - }); | |
1582 | - | |
1583 | - | |
1584 | - | |
1585 | - </script> | |
1586 | - | |
1587 | - | |
1588 | - <script> | |
1589 | - $(document).ready(function () { | |
1590 | - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
1591 | - | |
1592 | - var borderWidth = 1; | |
1593 | - var borderColor = "#000"; | |
1594 | - $("#borderWidthCanvasElement").change(function () { | |
1595 | - borderWidth = $(this).val(); | |
1596 | - borderColor = $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color"); | |
1597 | - | |
1598 | - if (borderColor != null) { | |
1599 | - document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; | |
1600 | - //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); | |
1601 | - } else { | |
1602 | - | |
1603 | - // $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid"); | |
1604 | - document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; | |
1605 | - | |
1606 | - } | |
1607 | - }); | |
1608 | - | |
1609 | - | |
1610 | - | |
1611 | - $('.borderColorCanvasPreview').each(function () { | |
1612 | - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
1613 | - $(this).minicolors({ | |
1614 | - control: $(this).attr('data-control') || 'hue', | |
1615 | - defaultValue: $(this).attr('data-defaultValue') || '', | |
1616 | - format: $(this).attr('data-format') || 'hex', | |
1617 | - keywords: $(this).attr('data-keywords') || '', | |
1618 | - inline: $(this).attr('data-inline') === 'true', | |
1619 | - letterCase: $(this).attr('data-letterCase') || 'lowercase', | |
1620 | - opacity: $(this).attr('data-opacity'), | |
1621 | - position: $(this).attr('data-position') || 'bottom left', | |
1622 | - swatches: $(this).attr('data-swatches') ? $(this).attr('data-swatches').split('|') : [], | |
1623 | - change: function (value, opacity) { | |
1624 | - if (!value) return; | |
1625 | - if (opacity) value += ', ' + opacity; | |
1626 | - if (typeof console === 'object') { | |
1627 | - console.log(value); | |
1628 | - | |
1629 | - borderColor = value; | |
1630 | - //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); | |
1631 | - document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; | |
1632 | - | |
1633 | - | |
1634 | - } | |
1635 | - }, | |
1636 | - theme: 'bootstrap' | |
1637 | - }); | |
1638 | - | |
1639 | - | |
1640 | - }); | |
1641 | - | |
1642 | - | |
1643 | - $('.outerBackgroundColor').each(function () { | |
1644 | - | |
1645 | - $(this).minicolors({ | |
1646 | - control: $(this).attr('data-control') || 'hue', | |
1647 | - defaultValue: $(this).attr('data-defaultValue') || '', | |
1648 | - format: $(this).attr('data-format') || 'hex', | |
1649 | - keywords: $(this).attr('data-keywords') || '', | |
1650 | - inline: $(this).attr('data-inline') === 'true', | |
1651 | - letterCase: $(this).attr('data-letterCase') || 'lowercase', | |
1652 | - opacity: $(this).attr('data-opacity'), | |
1653 | - position: $(this).attr('data-position') || 'bottom left', | |
1654 | - swatches: $(this).attr('data-swatches') ? $(this).attr('data-swatches').split('|') : [], | |
1655 | - change: function (value, opacity) { | |
1656 | - if (!value) return; | |
1657 | - if (opacity) value += ', ' + opacity; | |
1658 | - if (typeof console === 'object') { | |
1659 | - console.log(value); | |
1660 | - $("#imgOpacity").css("background-color", value); | |
1661 | - | |
1662 | - } | |
1663 | - }, | |
1664 | - theme: 'bootstrap' | |
1665 | - }); | |
1666 | - | |
1667 | - }); | |
1668 | - | |
1669 | - | |
1670 | - }); | |
1671 | - </script> | |
1672 | - <script> | |
1673 | - $(function () { | |
1674 | - function onBrushSizeChange() { | |
1675 | - $('.btnCursor').addClass('activebtncolor'); | |
1676 | - $(".btn-annotation").removeClass("activebtncolor"); | |
1677 | - $(".btn-annotation-erase").removeClass("activebtncolor"); | |
1678 | - $(".btn-annotation-erase").removeClass("activebtncolor"); | |
1679 | - $(".annotationpaintbrushsize").removeClass("activebtncolor"); | |
1680 | - var x = $('#canvasPaint').css("z-index"); | |
1681 | - | |
1682 | - var y = $('#canvas').css("z-index"); | |
1683 | - if (x > y) { | |
1684 | - y = parseInt(x) + 1; | |
1685 | - } else { | |
1686 | - y = parseInt(y) + 1; | |
1687 | - } | |
1688 | - $('#canvas').css("z-index", y); | |
1689 | - } | |
1690 | - | |
1691 | - $("#slider-range-min-2").slider({ | |
1692 | - range: "min", | |
1693 | - min: 1, | |
1694 | - max: 60, | |
1695 | - value: 1, | |
1696 | - slide: function (event, ui) { | |
1697 | - | |
1698 | - onBrushSizeChange(); | |
1699 | - | |
1700 | - | |
1701 | - | |
1702 | - $("#btnBrushSize").val(ui.value); | |
1703 | - | |
1704 | - $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" }); | |
1705 | - $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" }); | |
1706 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1707 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1708 | - | |
1709 | - }, | |
1710 | - stop: function (event, ui) { | |
1711 | - | |
1712 | - $("#paintLine").attr("data-size", ui.value); | |
1713 | - | |
1714 | - } | |
1715 | - | |
1716 | - }); | |
1717 | - | |
1718 | - | |
1719 | - $("#btnBrushSize").keydown(function () { | |
1720 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1721 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1722 | - onBrushSizeChange(); | |
1723 | - var brushSizevalue = this.value; | |
1724 | - | |
1725 | - $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); | |
1726 | - }); | |
1727 | - $("#btnBrushSize").keyup(function () { | |
1728 | - onBrushSizeChange(); | |
1729 | - var brushSizevalue = this.value; | |
1730 | - if (brushSizevalue == "") { | |
1731 | - | |
1732 | - $("#slider-range-min-2").slider("value", 0); | |
1733 | - | |
1734 | - $("#annotationpaintbrushsize").css({ "pointer-events": "none", "opacity": ".5" }); | |
1735 | - $("#annotationpainteraser").css({ "pointer-events": "none", "opacity": ".5" }); | |
1736 | - } | |
1737 | - else { | |
1738 | - $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); | |
1739 | - $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" }); | |
1740 | - $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" }); | |
1741 | - } | |
1742 | - // $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); | |
1743 | - }); | |
1744 | - $("#btnBrushSizeIncrement").click(function () { | |
1745 | - if ($("#annotationpaintbrushsize").css('pointer-events') == 'none') { | |
1746 | - $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" }); | |
1747 | - $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" }); | |
1748 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1749 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1750 | - } | |
1751 | - | |
1752 | - onBrushSizeChange(); | |
1753 | - var brushIncrementVar = $("#btnBrushSize").val(); | |
1754 | - if (brushIncrementVar >= 60) { | |
1755 | - $("#slider-range-min-2").slider("value", 60); | |
1756 | - } | |
1757 | - else if (brushIncrementVar == "") { | |
1758 | - var brushIncrementedValue = 1; | |
1759 | - $("#btnBrushSize").val(brushIncrementedValue); | |
1760 | - $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue)); | |
1761 | - } | |
1762 | - else { | |
1763 | - | |
1764 | - var brushIncrementedValue = parseInt(brushIncrementVar) + 1; | |
1765 | - | |
1766 | - $("#btnBrushSize").val(brushIncrementedValue); | |
1767 | - $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue)); | |
1768 | - } | |
1769 | - }); | |
1770 | - $("#btnBrushSizeDecrease").click(function () { | |
1771 | - | |
1772 | - onBrushSizeChange(); | |
1773 | - var brushDecreaseVar = $("#btnBrushSize").val(); | |
1774 | - if (brushDecreaseVar == "") { | |
1775 | - | |
1776 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "none", "opacity": ".5" }); | |
1777 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "none", "opacity": ".5" }); | |
1778 | - | |
1779 | - } | |
1780 | - else if (brushDecreaseVar <= 1) { | |
1781 | - $("#slider-range-min-2").slider("value", 1); | |
1782 | - if ($("#annotationpaintbrushsize").css('pointer-events') == 'none') { | |
1783 | - $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" }); | |
1784 | - $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" }); | |
1785 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": ".5" }); | |
1786 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": ".5" }); | |
1787 | - } | |
1788 | - | |
1789 | - } | |
1790 | - else { | |
1791 | - var brushDecrementedValue = parseInt(brushDecreaseVar) - 1; | |
1792 | - if ($("#annotationpaintbrushsize").css('pointer-events') == 'none') { | |
1793 | - $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" }); | |
1794 | - $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" }); | |
1795 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1796 | - $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" }); | |
1797 | - } | |
1798 | - $("#btnBrushSize").val(brushDecrementedValue); | |
1799 | - $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue)); | |
1800 | - } | |
1801 | - }); | |
1802 | - | |
1803 | - $("#btnBrushSize").val($("#slider-range-min-2").slider("value")); | |
1804 | - }); | |
1805 | - </script> | |
1806 | - | |
1807 | - <script> | |
1808 | - $(function () { | |
1809 | - $("#slider-range-min-3").slider({ | |
1810 | - range: "min", | |
1811 | - min: 0, | |
1812 | - max: 100, | |
1813 | - value: 20, | |
1814 | - change: function (event, ui) { | |
1815 | - | |
1816 | - | |
1817 | - } | |
1818 | - }); | |
1819 | - | |
1820 | - | |
1821 | - | |
1822 | - }); | |
1823 | - </script> | |
1824 | - | |
1825 | - <script> | |
1826 | - $(function () { | |
1827 | - | |
1828 | - | |
1829 | - | |
1830 | - $("#slider-range-min-4").slider( | |
1831 | - { | |
1832 | - range: "min", | |
1833 | - value: .5, | |
1834 | - min: 0, | |
1835 | - max: 1, | |
1836 | - step: .1, | |
1837 | - slide: function (event, ui) { | |
1838 | - | |
1839 | - $(".marginTopBtm10 .imgopacity").css("opacity", ui.value); | |
1840 | - $(".marginTopBtm10 div.outlinediv").css("opacity", ui.value); | |
1841 | - } | |
1842 | - | |
1843 | - } | |
1844 | - | |
1845 | -); | |
1846 | - | |
1847 | - }); | |
1848 | - | |
1849 | - | |
1850 | - | |
1851 | - </script> | |
1852 | - | |
1853 | - | |
1854 | - | |
1855 | - <script> | |
1856 | - $(function () { | |
1857 | - | |
1858 | - | |
1859 | - $("#OnIdentify").on('mouseover', function () { | |
1860 | - $("#identify-block").addClass("custom-tooltip-annotation"); | |
1861 | - $(".custom-tooltip-annotation").css('display', 'block'); | |
1862 | - }).on('mouseout', function () { | |
1863 | - // $("#identify-block").removeClass("custom-tooltip-annotation"); | |
1864 | - $(".custom-tooltip-annotation").css('display', 'none'); | |
1865 | - $("#identify-block").removeClass("custom-tooltip-annotation"); | |
1866 | - }); | |
1867 | - | |
1868 | - | |
1869 | - $("#DrawMode").on('mouseover', function () { | |
1870 | - $("#draw-block").addClass("custom-tooltip-annotation"); | |
1871 | - $(".custom-tooltip-annotation").css('display', 'block'); | |
1872 | - | |
1873 | - }).on('mouseout', function () { | |
1874 | - | |
1875 | - $(".custom-tooltip-annotation").css('display', 'none'); | |
1876 | - $("#draw-block").removeClass("custom-tooltip-annotation"); | |
1877 | - }); | |
1878 | - | |
1879 | - //#7931 | |
1880 | - $("#OnEdtShape").on('mouseover', function () { | |
1881 | - $("#edit-block").addClass("custom-tooltip-annotation-edit"); | |
1882 | - $(".custom-tooltip-annotation-edit").css('display', 'block'); | |
1883 | - | |
1884 | - }).on('mouseout', function () { | |
1885 | - | |
1886 | - $(".custom-tooltip-annotation-edit").css('display', 'none'); | |
1887 | - $("#edit-block").removeClass("custom-tooltip-annotation-edit"); | |
1888 | - }); | |
1889 | - | |
1890 | - }); | |
1891 | - </script> | |
1892 | - <!-- Export Image Save Click--> | |
1893 | - <script> | |
1894 | - $(function () { | |
1895 | - $("#btnPrintPreview").click(function () { | |
1896 | - $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>"); | |
1897 | - html2canvas($("#canvasDiv"), { | |
1898 | - onrendered: function (canvas) { | |
1899 | - var imgsrc = canvas.toDataURL("image/png"); | |
1900 | - console.log(imgsrc); | |
1901 | - var html = '<div id="img"><img src="' + imgsrc + '" id="newimg" style="margin:auto;top:0px;left:0px;right:0px;position:absolute;border:1px solid #ccc;" /></div>'; | |
1902 | - var w = window.open(); | |
1903 | - $(w.document.body).html(html); | |
1904 | - $("#filename").val(""); | |
1905 | - $("#exportlogo").remove(); | |
1906 | - } | |
1907 | - }); | |
1908 | - | |
1909 | - }); | |
1910 | - $("#btnSaveEI").click(function () { | |
1911 | - $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>"); | |
1912 | - html2canvas($("#canvasDiv"), { | |
1913 | - onrendered: function (canvas) { | |
1914 | - theCanvas = canvas; | |
1915 | - var fileName = document.getElementById("filename").value + '.jpg'; | |
1916 | - if (typeof (fileName) == "undefined" || fileName == ".jpg") | |
1917 | - fileName = "Untitled.jpg" | |
1918 | - var dataURL = canvas.toDataURL("image/jpeg"); | |
1919 | - var blob = dataURItoBlob(dataURL); | |
1920 | - console.log(blob); | |
1921 | - saveAs(blob, fileName); | |
1922 | - $("#exportlogo").remove(); | |
1923 | - $("#filename").val(""); | |
1924 | - } | |
1925 | - }); | |
1926 | - $(".export-image").css("display", "none"); | |
1927 | - | |
1928 | - }); | |
1929 | - }); | |
1930 | - function dataURItoBlob(dataURI) { | |
1931 | - var byteString = atob(dataURI.split(',')[1]); | |
1932 | - var ab = new ArrayBuffer(byteString.length); | |
1933 | - var ia = new Uint8Array(ab); | |
1934 | - for (var i = 0; i < byteString.length; i++) { | |
1935 | - ia[i] = byteString.charCodeAt(i); | |
1936 | - } | |
1937 | - return new Blob([ab], { type: 'image/jpeg' }); | |
1938 | - } | |
1939 | - </script> | |
1940 | - <script> | |
1941 | - if (navigator.userAgent.match(/Android/i)) { | |
1942 | - | |
1943 | - $("#bodySystems").click(function () { | |
1944 | - | |
1945 | - $("#listManager").draggable('disable'); | |
1946 | - | |
1947 | - }).blur(function () { | |
1948 | - | |
1949 | - $("#listManager").draggable('enable'); | |
1950 | - | |
1951 | - }); | |
1952 | - | |
1953 | - | |
1954 | - | |
1955 | - $("#termList").click(function () { | |
1956 | - | |
1957 | - $("#listManager").draggable('disable'); | |
1958 | - | |
1959 | - }).blur(function () { | |
1960 | - | |
1961 | - $("#listManager").draggable('enable'); | |
1962 | - | |
1963 | - }); | |
1964 | - | |
1965 | - $("#borderWidthCanvasElement").click(function () { | |
1966 | - | |
1967 | - $("#modeleditstyle").draggable('disable'); | |
1968 | - }).blur(function () { | |
1969 | - $("#modeleditstyle").draggable('enable'); | |
1970 | - }); | |
1971 | - } | |
1972 | - function ResizeImage(sizePercent) { | |
1973 | - var autoWidth = 427; | |
1974 | - var autoHeight = 547; | |
1975 | - var dvAutoSpnFontSize = 12; | |
1976 | - var imgLogoW = 77; | |
1977 | - var fullWidth = 620; //$('#canvasDiv').width(); | |
1978 | - var fullHeight = 876; //$('#canvasDiv').height(); | |
1979 | - | |
1980 | - if (sizePercent == 0) { | |
1981 | - $('#printBoxPor').width(autoWidth).height(autoHeight);//.height(dvPrintBoxPorH * sizePercent); | |
1982 | - $('#printBoxLan').width(autoHeight).height(autoWidth); | |
1983 | - $('#dvPortrait').width(autoWidth); | |
1984 | - $('#dvLandscape').width(autoHeight); | |
1985 | - $('.span-font').attr('style', 'font-size: ' + (dvAutoSpnFontSize * .65).toFixed() + 'px'); | |
1986 | - $(".logo-image").attr('width', imgLogoW * .65); | |
1987 | - } | |
1988 | - | |
1989 | - else if (sizePercent == 1) { | |
1990 | - $('#dvPortrait').width(fullWidth * sizePercent); | |
1991 | - $('#dvLandscape').width(fullHeight * sizePercent); | |
1992 | - $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent); | |
1993 | - $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent); | |
1994 | - $('.span-font').attr('style', 'font-size: ' + dvAutoSpnFontSize + 'px'); | |
1995 | - $(".logo-image").attr('width', imgLogoW); | |
1996 | - } | |
1997 | - | |
1998 | - else { | |
1999 | - $('#dvPortrait').width(fullWidth * sizePercent); | |
2000 | - $('#dvLandscape').width(fullHeight * sizePercent); | |
2001 | - $('.span-font').attr('style', 'font-size: ' + (dvAutoSpnFontSize * sizePercent).toFixed() + 'px !important'); | |
2002 | - $(".logo-image").attr('width', (imgLogoW * sizePercent).toFixed()); | |
2003 | - if (sizePercent > 1) { | |
2004 | - $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent); | |
2005 | - $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent); | |
2006 | - } | |
2007 | - else { | |
2008 | - $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent); | |
2009 | - $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent); | |
2010 | - } | |
2011 | - } | |
2012 | - } | |
2013 | - </script> | |
2014 | - <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.1.0/jquery.browser.min.js"></script> | |
2015 | -</body> | |
2016 | - | |
2017 | -</html> | |
2018 | 0 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/match-pixel-wp1.js deleted
1 | -previousGrayImageDataList = []; | |
2 | - | |
3 | -function updateGrayCanvasDataOnMatcghedLocation(termList, maskCanvasData, coloreImageData, | |
4 | - grayImageData, grayImageMRDataList, bodyRegionId, canvasId) | |
5 | -{ | |
6 | - | |
7 | - | |
8 | - var n = maskCanvasData.data.length; | |
9 | - var maskData = maskCanvasData.data; | |
10 | - for (var z = 0; z < termList.length; z++) { | |
11 | - | |
12 | - if (previousGrayImageDataList[parseInt(bodyRegionId - 1)] != null) { | |
13 | - grayImageData = previousGrayImageDataList[parseInt(bodyRegionId - 1)]; | |
14 | - | |
15 | - } | |
16 | - | |
17 | - var grayImageDataVar = grayImageData.data; | |
18 | - var coloredImageDataVar = coloreImageData.data; | |
19 | - | |
20 | - | |
21 | - for (var i = 0; i < n; i += 4) { | |
22 | - | |
23 | - | |
24 | - var RED = maskData[i] - 9; | |
25 | - var GREEN = maskData[i + 1] - 9; | |
26 | - var BLUE = maskData[i + 2] - 9; | |
27 | - | |
28 | - var Red; | |
29 | - var Green; | |
30 | - var Blue; | |
31 | - var zero = "0"; | |
32 | - | |
33 | - if ((RED).toString().length != 2) { | |
34 | - Red = zero.concat((RED).toString()) | |
35 | - } | |
36 | - else { | |
37 | - Red = (RED).toString() | |
38 | - } | |
39 | - if ((GREEN).toString().length != 2) { | |
40 | - Green = zero.concat((GREEN).toString()) | |
41 | - } | |
42 | - else { | |
43 | - Green = (GREEN).toString() | |
44 | - | |
45 | - } | |
46 | - if ((BLUE).toString().length != 2) { | |
47 | - Blue = zero.concat((BLUE).toString()) | |
48 | - } | |
49 | - else { | |
50 | - Blue = (BLUE).toString() | |
51 | - | |
52 | - } | |
53 | - | |
54 | - var Icolor = (Red + Green + Blue); | |
55 | - | |
56 | - if (parseInt(termList[z]._TermNumber) == parseInt(Icolor)) { | |
57 | - | |
58 | - | |
59 | - | |
60 | - var RED_coloredImage = coloredImageDataVar[i]; | |
61 | - | |
62 | - grayImageDataVar[i] = RED_coloredImage; | |
63 | - | |
64 | - | |
65 | - var GREEN_coloredImage = coloredImageDataVar[i + 1]; | |
66 | - grayImageDataVar[i + 1] = GREEN_coloredImage; | |
67 | - | |
68 | - var BLUE_coloredImage = coloredImageDataVar[i + 2]; | |
69 | - grayImageDataVar[i + 2] = BLUE_coloredImage; | |
70 | - | |
71 | - | |
72 | - var ALPHA_coloredImage = coloredImageDataVar[i + 3]; | |
73 | - grayImageDataVar[i + 3] = ALPHA_coloredImage; | |
74 | - | |
75 | - } | |
76 | - | |
77 | - | |
78 | - } | |
79 | - | |
80 | - previousGrayImageDataList[parseInt(bodyRegionId - 1)] = grayImageData; | |
81 | - | |
82 | - | |
83 | -} | |
84 | - self.postMessage({ | |
85 | - 'bodyRegionId': bodyRegionId, | |
86 | - 'value': grayImageData, | |
87 | - 'canvasId': canvasId | |
88 | - | |
89 | - | |
90 | - }); | |
91 | -} | |
92 | - | |
93 | -self.onmessage = function (e) { | |
94 | - | |
95 | - updateGrayCanvasDataOnMatcghedLocation(e.data.termList, e.data.maskCanvasData, e.data.coloreImageData, | |
96 | - e.data.grayImageData, e.data.grayImageMRDataList, e.data.bodyRegionId, e.data.canvasId); | |
97 | - | |
98 | -} | |
99 | - |
400-SOURCECODE/AIAHTML5.Web/search-wp.js
1 | 1 | |
2 | 2 | |
3 | -loadTermData = function (currentBodyViewId, languageName, languageID) { | |
3 | +loadTermData = function (currentBodyViewId, languageName, languageID,windowid) { | |
4 | 4 | |
5 | 5 | // console.log('search-wp, loadTermData, time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); |
6 | 6 | var termNoJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json'; |
... | ... | @@ -15,7 +15,7 @@ loadTermData = function (currentBodyViewId, languageName, languageID) { |
15 | 15 | TermNumberData = JSON.parse(AJAX_req.responseText); |
16 | 16 | // console.log("data returned: " + TermNumberData); |
17 | 17 | |
18 | - loadTermTextData(TermNumberData, languageName, languageID, currentBodyViewId); | |
18 | + loadTermTextData(TermNumberData, languageName, languageID, currentBodyViewId,windowid); | |
19 | 19 | |
20 | 20 | } |
21 | 21 | } |
... | ... | @@ -25,7 +25,7 @@ loadTermData = function (currentBodyViewId, languageName, languageID) { |
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | -loadTermTextData = function (TermNumberData, languageName, languageID, currentBodyViewId) { | |
28 | +loadTermTextData = function (TermNumberData, languageName, languageID, currentBodyViewId,windowid) { | |
29 | 29 | |
30 | 30 | var languageFileName; |
31 | 31 | if(languageName == "English (Undergraduate)") |
... | ... | @@ -56,25 +56,40 @@ loadTermTextData = function (TermNumberData, languageName, languageID, currentBo |
56 | 56 | |
57 | 57 | VocabTermData = JSON.parse(AJAX_req.responseText); |
58 | 58 | var vocabTermTxt = []; |
59 | - TermNumberData.TermData.Term.forEach(function (value1, key1) { | |
60 | - VocabTermData.VocabTerms.Term.forEach(function (value2, key2) { | |
61 | - if (value1._ActualTermNumber === value2._ActualTermNumber) { | |
59 | + var vocabData=VocabTermData.VocabTerms.Term; | |
60 | + TermNumberData.TermData.Term.forEach(function (value1, key1) { | |
61 | + for (var i = 0; i < vocabData.length; i ++) { | |
62 | + if (value1._ActualTermNumber === vocabData[i]._ActualTermNumber) { | |
62 | 63 | vocabTermTxt.push( |
63 | 64 | { |
64 | - "_ActualTermNumber": value2._ActualTermNumber, | |
65 | - "_TermText": value2._TermText, | |
66 | - "_cdId": value2._cdId | |
67 | - } | |
68 | - ); | |
65 | + "_ActualTermNumber": vocabData[i]._ActualTermNumber, | |
66 | + "_TermText": vocabData[i]._TermText | |
67 | + // "_cdId": vocabData[i]._cdId | |
68 | + }); | |
69 | + break; | |
69 | 70 | } |
70 | - }) | |
71 | + } | |
72 | + // VocabTermData.VocabTerms.Term.forEach(function (value2, key2) { | |
73 | + // if (value1._ActualTermNumber === value2._ActualTermNumber) { | |
74 | + // debugger | |
75 | + // vocabTermTxt.push( | |
76 | + // { | |
77 | + // "_ActualTermNumber": value2._ActualTermNumber, | |
78 | + // "_TermText": value2._TermText, | |
79 | + // "_cdId": value2._cdId | |
80 | + // } | |
81 | + // ); | |
82 | + // break; | |
83 | + // } | |
84 | + // }) | |
71 | 85 | }) |
72 | 86 | self.postMessage({ |
73 | 87 | 'vocabTermTxt': vocabTermTxt, |
74 | 88 | 'TermNumberData': TermNumberData, |
75 | 89 | 'VocabTermData': VocabTermData, |
76 | 90 | 'language': languageName, |
77 | - "bodyViewID": currentBodyViewId | |
91 | + "bodyViewID": currentBodyViewId, | |
92 | + "winId": windowid, | |
78 | 93 | |
79 | 94 | }); |
80 | 95 | } |
... | ... | @@ -85,7 +100,7 @@ loadTermTextData = function (TermNumberData, languageName, languageID, currentBo |
85 | 100 | |
86 | 101 | self.onmessage = function (e) { |
87 | 102 | // console.log("search"); |
88 | - loadTermData(e.data.currentBodyViewId, e.data.languageName, e.data.languageID); | |
103 | + loadTermData(e.data.currentBodyViewId, e.data.languageName, e.data.languageID,e.data.windowid); | |
89 | 104 | |
90 | 105 | |
91 | 106 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/term-number-wp1.js deleted
1 | -var UpdatedGrayImageDataList = []; | |
2 | -var doneBRID = []; | |
3 | -var abc = 'hello'; | |
4 | - | |
5 | -getLocationForMatchedTermsInWholeBody = function (termList, maskCanvasData, coloredImageCanvasList, coloredImageMRCanvasList, grayImageDataList, grayImageMRDataList) { | |
6 | - var matchedRGBLocationInBodyRegion = []; | |
7 | - var matched; | |
8 | - | |
9 | - for (var x = 0; x < maskCanvasData.length; x++) | |
10 | - { | |
11 | - | |
12 | - matched = false; | |
13 | - var bodyRegionId = maskCanvasData[x].bodyRegionId; | |
14 | - var canvasId = maskCanvasData[x].canvasId; | |
15 | - var maskData = maskCanvasData[x].maskData; | |
16 | - | |
17 | - var coloredImageDataVar//= coloredImageCanvasList[bodyRegionId - 1]; | |
18 | - var grayImageDataVar// = grayImageDataList[bodyRegionId - 1]; | |
19 | - | |
20 | - console.log('canvasId =' + canvasId) | |
21 | - //if (canvasId.match('_MR')) { | |
22 | - // coloredImageDataVar = coloredImageMRCanvasList[bodyRegionId]; | |
23 | - // grayImageDataVar = grayImageMRDataList[bodyRegionId]; | |
24 | - //} | |
25 | - //else { | |
26 | - coloredImageDataVar = coloredImageCanvasList[bodyRegionId - 1]; | |
27 | - grayImageDataVar = grayImageDataList[bodyRegionId-1]; | |
28 | - //} | |
29 | - console.log('grayImageDataVar= ' + grayImageDataVar) | |
30 | - | |
31 | - var counter = 0; | |
32 | - | |
33 | - var imageDataVar = maskData.data; | |
34 | - | |
35 | - var machLocationWP = new Worker('match-pixel-wp.js'); | |
36 | - | |
37 | - | |
38 | - machLocationWP.postMessage({ | |
39 | - | |
40 | - 'termList': termList, | |
41 | - 'maskCanvasData': maskData, | |
42 | - 'coloreImageData': coloredImageDataVar, | |
43 | - 'grayImageData': grayImageDataVar, | |
44 | - 'grayImageMRDataList': grayImageMRDataList, | |
45 | - 'bodyRegionId': bodyRegionId, | |
46 | - 'canvasId': canvasId | |
47 | - | |
48 | - }); | |
49 | - | |
50 | - machLocationWP.onmessage = function (e) { | |
51 | - | |
52 | - | |
53 | - | |
54 | - doneBRID.push(e.data.bodyRegionId); | |
55 | - var canvasID = (e.data.canvasId).replace('_mci', ''); | |
56 | - | |
57 | - UpdatedGrayImageDataList.push({ 'canvasID': canvasID, 'imageData': e.data.value }); | |
58 | - | |
59 | - //UpdatedGrayImageDataList[e.data.bodyRegionId] = e.data.value | |
60 | - | |
61 | - | |
62 | - if (doneBRID.length==9) { | |
63 | - | |
64 | - self.postMessage({ | |
65 | - 'value': UpdatedGrayImageDataList, | |
66 | - | |
67 | - }) | |
68 | - } | |
69 | - | |
70 | - }; | |
71 | - machLocationWP.onerror = function (e) { | |
72 | - console.log('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message); | |
73 | - }; | |
74 | - | |
75 | - | |
76 | - } | |
77 | - | |
78 | - | |
79 | - | |
80 | - | |
81 | -} | |
82 | - | |
83 | -self.onmessage = function (e) { | |
84 | - getLocationForMatchedTermsInWholeBody(e.data.termList, e.data.maskCanvasData, e.data.coloredImageCanvasList, | |
85 | - e.data.coloredImageMRCanvasList, e.data.grayImageDataList, e.data.grayImageMRDataList); | |
86 | - | |
87 | -} | |
88 | - | |
89 | - |