Commit 69bd43a84e113836af0f779a7dcc9189c986877e
1 parent
3e67cc40
mutiple bug fixed in DA and Curriculum builder
Showing
4 changed files
with
98 additions
and
38 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -273,6 +273,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
273 | 273 | $("#CurBuilderbackground").css("display", "block"); |
274 | 274 | |
275 | 275 | $http({ method: 'GET', url: 'content/data/json/cb/SlideShow/json/' + $scope.fileName + '.json' }).success(function (data) { |
276 | + | |
277 | + if(data.slideshow.presentation.structure._startSlideId==undefined) | |
278 | + { | |
279 | + data.slideshow.presentation.structure._startSlideId=""; | |
280 | + } | |
276 | 281 | localStorage.setItem("cbJsonDataObject", JSON.stringify(data)); |
277 | 282 | $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject")); |
278 | 283 | $rootScope.cbDynamicJsonData = data; |
... | ... | @@ -384,6 +389,10 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
384 | 389 | } |
385 | 390 | |
386 | 391 | $scope.jsonReceivedFile = function (jsonData) { |
392 | + if(jsonData.slideshow.presentation.structure._startSlideId==undefined) | |
393 | + { | |
394 | + jsonData.slideshow.presentation.structure._startSlideId=""; | |
395 | + } | |
387 | 396 | localStorage.setItem("cbJsonDataObject", JSON.stringify(jsonData)); |
388 | 397 | $rootScope.cbJsonData = ""; |
389 | 398 | $rootScope.cbDynamicJsonData = ""; |
... | ... | @@ -603,7 +612,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
603 | 612 | "_id": sectionid, |
604 | 613 | "_isRoot": "true", |
605 | 614 | "_isBranch": "true", |
606 | - "_isLocked": "false" | |
615 | + "_isLocked": "false", | |
616 | + "_startSlideId":slideid | |
607 | 617 | }, |
608 | 618 | "_anchor": "true", |
609 | 619 | "_window_position": "6,10", |
... | ... | @@ -754,13 +764,23 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
754 | 764 | $scope.loadNotesById = function () { |
755 | 765 | |
756 | 766 | $("#cbSelect").empty(); |
757 | - traverseForLoadDropDown($rootScope.stru); | |
767 | + var entryPointId=$rootScope.stru.structure._startSlideId; | |
768 | + var isRoot=$rootScope.stru.structure._isRoot; | |
758 | 769 | |
770 | + traverseForLoadDropDown($rootScope.stru); | |
771 | + | |
759 | 772 | setTimeout(function () { |
760 | - var nodeid = document.getElementById('cbSelect').value; | |
761 | - $('#jstree').jstree('select_node', nodeid); | |
762 | - }, 200); | |
763 | - | |
773 | + if(entryPointId!="" && isRoot) | |
774 | + { | |
775 | + $('#jstree').jstree('select_node', entryPointId); | |
776 | + } | |
777 | + else | |
778 | + { | |
779 | + var nodeid = document.getElementById('cbSelect').value; | |
780 | + $('#jstree').jstree('select_node', nodeid); | |
781 | + } | |
782 | + }, 200); | |
783 | + | |
764 | 784 | } |
765 | 785 | |
766 | 786 | $scope.openTinyMCE = function (nodeid) { |
... | ... | @@ -1633,6 +1653,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1633 | 1653 | var strFromParent=$scope.selectedNodeSingleObj['structure']; |
1634 | 1654 | var parentLevel=$scope.selectedNodeSingleObj._label; |
1635 | 1655 | var parentId=$scope.selectedNodeSingleObj._id ; |
1656 | + var cbCurrentId = document.getElementById('cbSelect').value; | |
1636 | 1657 | |
1637 | 1658 | var rootNoteSummary = new jinqJs() |
1638 | 1659 | .from($rootScope.contentNotesForSaveCB) |
... | ... | @@ -1684,7 +1705,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1684 | 1705 | "_id": parentId, |
1685 | 1706 | "_isRoot": "true", |
1686 | 1707 | "_isBranch": "true", |
1687 | - "_isLocked": "false" | |
1708 | + "_isLocked": "false", | |
1709 | + "_startSlideId":cbCurrentId | |
1688 | 1710 | }, |
1689 | 1711 | "_anchor": "true", |
1690 | 1712 | "_window_position": "6,10", |
... | ... | @@ -2235,7 +2257,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2235 | 2257 | "_id": $rootScope.cbTreeFirstID, |
2236 | 2258 | "_isRoot": "true", |
2237 | 2259 | "_isBranch": "true", |
2238 | - "_isLocked": "false" | |
2260 | + "_isLocked": "false", | |
2261 | + "_startSlideId":cbCurrentId | |
2239 | 2262 | }, |
2240 | 2263 | "_anchor": "true", |
2241 | 2264 | "_window_position": "6,10", | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2118,7 +2118,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2118 | 2118 | "transparentTermNumber": $scope.daOpenInOtherModules.callOuts[i].transparentTermNumber.toString(), |
2119 | 2119 | "termNumber": $scope.daOpenInOtherModules.callOuts[i].termNumber.toString(), |
2120 | 2120 | "istpboxTerm":$scope.daOpenInOtherModules.callOuts[i].istpboxTerm==undefined?0:$scope.daOpenInOtherModules.callOuts[i].istpboxTerm, |
2121 | - 'relatedTerm':$scope.daOpenInOtherModules.callOuts[i].relatedTerm.toString() | |
2121 | + 'relatedTerm':$scope.daOpenInOtherModules.callOuts[i].relatedTerm==undefined?'':$scope.daOpenInOtherModules.callOuts[i].relatedTerm.toString() | |
2122 | 2122 | }); |
2123 | 2123 | |
2124 | 2124 | } |
... | ... | @@ -2256,7 +2256,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2256 | 2256 | |
2257 | 2257 | //history code |
2258 | 2258 | |
2259 | - if ($("#canvasDivDA_" + windowviewid).find("canvas[id='canvasPaintDA']").length == 0) { | |
2259 | + if ($("#canvasDivDA_" + windowviewid).find("canvas[id*='canvasPaintDA']").length == 0) { | |
2260 | 2260 | var canvasPaintID = "canvasPaintDA_" + windowviewid; |
2261 | 2261 | var canvasID = "canvasDA_" + windowviewid; |
2262 | 2262 | |
... | ... | @@ -4335,7 +4335,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4335 | 4335 | |
4336 | 4336 | if (viewOrientationId == '1' || viewOrientationId == '4') { |
4337 | 4337 | |
4338 | - $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' +windowviewid).width() / 2) | |
4338 | + // $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' +windowviewid).width() / 2) | |
4339 | 4339 | |
4340 | 4340 | $('#canvasDivDA_' + windowviewid).scrollTop($scope.imageVerticalScrollPosition); |
4341 | 4341 | } |
... | ... | @@ -4991,7 +4991,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4991 | 4991 | }) |
4992 | 4992 | |
4993 | 4993 | } |
4994 | - else { | |
4994 | + else | |
4995 | + { | |
4995 | 4996 | //1. Dated:13-07-2016 Issue #4965 : The layer number should not extend beyond its level through layer text box. |
4996 | 4997 | var dataLength = $scope.GetwindowStoreData(windowviewid,'BodyLayerData').Layers.DataLayer.length-1; |
4997 | 4998 | if (parseInt($('#txtLayerNumberDA_' + windowviewid).val()) > (dataLength)) { |
... | ... | @@ -5006,17 +5007,26 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5006 | 5007 | |
5007 | 5008 | $scope.DisableUI(); |
5008 | 5009 | var canDiv = document.getElementById('canvasDivDA_' + windowviewid); |
5009 | - var canDivChildCount = canDiv.childElementCount; | |
5010 | - if (canDivChildCount > 0) { | |
5011 | - canDiv.innerHTML = ''; | |
5010 | + if($rootScope.globalSetting.onLayerChange) | |
5011 | + { | |
5012 | + var canDivChildCount = canDiv.childElementCount; | |
5013 | + if (canDivChildCount > 0) { | |
5014 | + canDiv.innerHTML = ''; | |
5015 | + } | |
5016 | + | |
5017 | + //canvas is clear in search term,layer change,viewchange here. so annotationdata should also clear | |
5018 | + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
5019 | + | |
5020 | + } | |
5021 | + else | |
5022 | + { | |
5023 | + //remove all canvas except pait and drawing | |
5024 | + $('#'+'canvasDivDA_' + windowviewid+' canvas').not('#canvasDA_'+windowviewid).not('#canvasPaintDA_'+windowviewid).remove(); | |
5012 | 5025 | } |
5013 | 5026 | |
5014 | - //2. | |
5015 | - //canvas is clear in search term,layer change,viewchange here. so annotationdata should also clear | |
5016 | 5027 | $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); |
5017 | - $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
5018 | 5028 | var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); |
5019 | - | |
5029 | + | |
5020 | 5030 | $scope.CalculateImageCordinates(viewOrientationId,windowviewid); |
5021 | 5031 | |
5022 | 5032 | //3. |
... | ... | @@ -10250,6 +10260,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10250 | 10260 | if (canDivChildCount > 0) { |
10251 | 10261 | canDiv.innerHTML = ''; |
10252 | 10262 | } |
10263 | + //canvas is clear in search term,layer change,viewchange here. so annotationData should also clear | |
10264 | + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); | |
10265 | + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
10253 | 10266 | |
10254 | 10267 | $scope.SetwindowStoreData(windowviewid,'isGenderChnage',true); |
10255 | 10268 | |
... | ... | @@ -10264,10 +10277,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10264 | 10277 | } |
10265 | 10278 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
10266 | 10279 | if (previousHighlightList.length > 0) { |
10267 | - $("#btnNormalMode_" + windowviewid).addClass("btn-black"); | |
10280 | + //$("#btnNormalMode_" + windowviewid).addClass("btn-black"); | |
10268 | 10281 | $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]); |
10269 | - $("#btnHighLight_" + windowviewid).removeClass("btn-black"); | |
10270 | - $("#btnHighLight_" + windowviewid).addClass("btn-primary"); | |
10282 | + // $("#btnHighLight_" + windowviewid).removeClass("btn-black"); | |
10283 | + // $("#btnHighLight_" + windowviewid).addClass("btn-primary"); | |
10271 | 10284 | } |
10272 | 10285 | |
10273 | 10286 | var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.GetwindowStoreData(windowviewid,'voId')]; |
... | ... | @@ -10509,7 +10522,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10509 | 10522 | } |
10510 | 10523 | else |
10511 | 10524 | { |
10512 | - $scope.SetwindowStoreData(windowviewid,'layerNumber',0); | |
10525 | + var isGenderChange = $scope.GetwindowStoreData(windowviewid,'isGenderChnage'); | |
10526 | + if(!isGenderChange) | |
10527 | + { | |
10528 | + $scope.SetwindowStoreData(windowviewid,'layerNumber',0); | |
10529 | + } | |
10530 | + | |
10513 | 10531 | } |
10514 | 10532 | var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); |
10515 | 10533 | $('#txtLayerNumberDA_' + windowviewid).val( $scope.GetwindowStoreData(windowviewid,'layerNumber')); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -712,6 +712,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
712 | 712 | if ($scope.currentUserDetails != undefined) { |
713 | 713 | $rootScope.isVisibleLogin = false; |
714 | 714 | $location.url('/'); |
715 | + var loggedInUser = JSON.parse($scope.currentUserDetails); | |
716 | + if(loggedInUser.mType!=undefined) | |
717 | + { | |
718 | + $rootScope.isCAlink=true; | |
719 | + $('.navbar-fixed-top').css('display','none'); | |
720 | + } | |
721 | + | |
715 | 722 | ConfigurationService.getCofigValue() |
716 | 723 | .then( |
717 | 724 | function (configresult) { |
... | ... | @@ -722,8 +729,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
722 | 729 | $rootScope.aiaAnimationPath = configresult.serverPath; |
723 | 730 | $rootScope.MaxOneFileSize = configresult.fileSize; |
724 | 731 | $rootScope.aodDomainName = configresult.aodSiteUrl; |
725 | - | |
726 | - var loggedInUser = JSON.parse($scope.currentUserDetails); | |
732 | + | |
727 | 733 | //incase site user login userid is 0 so then using license id |
728 | 734 | //logout site user while reload url without parameter |
729 | 735 | var userId=loggedInUser.Id==0?loggedInUser.LicenseId:loggedInUser.Id; |
... | ... | @@ -1051,7 +1057,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1051 | 1057 | localStorage.setItem("globalModesty", "Y"); |
1052 | 1058 | $rootScope.formsetting = { |
1053 | 1059 | ethnicity: "W", |
1054 | - modesty: "Y" | |
1060 | + modesty: "Y", | |
1061 | + onLayerChange: true | |
1055 | 1062 | } |
1056 | 1063 | |
1057 | 1064 | $rootScope.UpdateSetting($rootScope.formsetting) |
... | ... | @@ -1062,7 +1069,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1062 | 1069 | localStorage.setItem("globalModesty", "N"); |
1063 | 1070 | $rootScope.formsetting = { |
1064 | 1071 | ethnicity: "W", |
1065 | - modesty: "N" | |
1072 | + modesty: "N", | |
1073 | + onLayerChange: true | |
1066 | 1074 | } |
1067 | 1075 | |
1068 | 1076 | $rootScope.UpdateSetting($rootScope.formsetting) |
... | ... | @@ -1075,7 +1083,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1075 | 1083 | |
1076 | 1084 | $rootScope.formsetting = { |
1077 | 1085 | ethnicity: result.userSelectedSkintone, |
1078 | - modesty: result.userselectedModesty | |
1086 | + modesty: result.userselectedModesty, | |
1087 | + onLayerChange: true | |
1079 | 1088 | } |
1080 | 1089 | |
1081 | 1090 | $rootScope.UpdateSetting($rootScope.formsetting); |
... | ... | @@ -1110,7 +1119,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1110 | 1119 | localStorage.setItem("globalModesty", "Y"); |
1111 | 1120 | $rootScope.formsetting = { |
1112 | 1121 | ethnicity: "W", |
1113 | - modesty: "Y" | |
1122 | + modesty: "Y", | |
1123 | + onLayerChange: true | |
1114 | 1124 | } |
1115 | 1125 | $rootScope.UpdateSetting($rootScope.formsetting); |
1116 | 1126 | } |
... | ... | @@ -1121,7 +1131,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1121 | 1131 | |
1122 | 1132 | $rootScope.formsetting = { |
1123 | 1133 | ethnicity: result.userSelectedSkintone, |
1124 | - modesty: result.userselectedModesty | |
1134 | + modesty: result.userselectedModesty, | |
1135 | + onLayerChange: true | |
1125 | 1136 | } |
1126 | 1137 | $rootScope.UpdateSetting($rootScope.formsetting) |
1127 | 1138 | |
... | ... | @@ -1678,7 +1689,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1678 | 1689 | localStorage.setItem("globalModesty", "Y"); |
1679 | 1690 | $rootScope.formsetting = { |
1680 | 1691 | ethnicity: "W", |
1681 | - modesty: "Y" | |
1692 | + modesty: "Y", | |
1693 | + onLayerChange: true | |
1682 | 1694 | } |
1683 | 1695 | |
1684 | 1696 | $rootScope.UpdateSetting($rootScope.formsetting) |
... | ... | @@ -1689,7 +1701,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1689 | 1701 | localStorage.setItem("globalModesty", "N"); |
1690 | 1702 | $rootScope.formsetting = { |
1691 | 1703 | ethnicity: "W", |
1692 | - modesty: "N" | |
1704 | + modesty: "N", | |
1705 | + onLayerChange: true | |
1693 | 1706 | } |
1694 | 1707 | |
1695 | 1708 | $rootScope.UpdateSetting($rootScope.formsetting) |
... | ... | @@ -1702,7 +1715,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1702 | 1715 | |
1703 | 1716 | $rootScope.formsetting = { |
1704 | 1717 | ethnicity: result.userSelectedSkintone, |
1705 | - modesty: result.userselectedModesty | |
1718 | + modesty: result.userselectedModesty, | |
1719 | + onLayerChange: true | |
1706 | 1720 | } |
1707 | 1721 | |
1708 | 1722 | $rootScope.UpdateSetting($rootScope.formsetting); |
... | ... | @@ -1739,7 +1753,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1739 | 1753 | localStorage.setItem("globalModesty", "Y"); |
1740 | 1754 | $rootScope.formsetting = { |
1741 | 1755 | ethnicity: "W", |
1742 | - modesty: "Y" | |
1756 | + modesty: "Y", | |
1757 | + onLayerChange: true | |
1743 | 1758 | } |
1744 | 1759 | $rootScope.UpdateSetting($rootScope.formsetting); |
1745 | 1760 | } |
... | ... | @@ -1750,7 +1765,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1750 | 1765 | |
1751 | 1766 | $rootScope.formsetting = { |
1752 | 1767 | ethnicity: result.userSelectedSkintone, |
1753 | - modesty: result.userselectedModesty | |
1768 | + modesty: result.userselectedModesty, | |
1769 | + onLayerChange: true | |
1754 | 1770 | } |
1755 | 1771 | $rootScope.UpdateSetting($rootScope.formsetting) |
1756 | 1772 | |
... | ... | @@ -8550,10 +8566,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8550 | 8566 | $rootScope.globalSetting = { |
8551 | 8567 | ethnicity: 'W', |
8552 | 8568 | modesty: 'Y', |
8569 | + onLayerChange: true | |
8553 | 8570 | }; |
8554 | 8571 | $rootScope.formsetting = { |
8555 | 8572 | ethnicity: null, |
8556 | - modesty: null | |
8573 | + modesty: null, | |
8574 | + onLayerChange: true | |
8557 | 8575 | }; |
8558 | 8576 | $rootScope.lexicons = { |
8559 | 8577 | primaryid:1, |
... | ... | @@ -8663,7 +8681,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8663 | 8681 | $rootScope.islaxicanlanguageChange=false; |
8664 | 8682 | $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity); |
8665 | 8683 | $rootScope.setModestySettings($rootScope.globalSetting.modesty); |
8666 | - | |
8684 | + $rootScope.formsetting.onLayerChange=$rootScope.globalSetting.onLayerChange; | |
8667 | 8685 | $rootScope.deSelectLanguageOptions(); |
8668 | 8686 | |
8669 | 8687 | $('#modal-settings').css("display", "none"); |
... | ... | @@ -8831,6 +8849,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8831 | 8849 | $rootScope.UpdateSetting = function (setting) { |
8832 | 8850 | |
8833 | 8851 | $rootScope.isCallFromOtherModule = undefined; |
8852 | + $rootScope.globalSetting.onLayerChange=setting.onLayerChange; | |
8834 | 8853 | var isReloadingViewRequired = false; |
8835 | 8854 | //1. |
8836 | 8855 | if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.aspx
... | ... | @@ -599,7 +599,7 @@ |
599 | 599 | <div class="checkbox no-margin"> |
600 | 600 | <!--Settings > The entire highlighted part should be active--> |
601 | 601 | <label class="font11 no-margin-btm"> |
602 | - <input type="checkbox" value="" checked> | |
602 | + <input type="checkbox" ng-model="formsetting.onLayerChange"> | |
603 | 603 | Erase Annotations when changing layers |
604 | 604 | </label> |
605 | 605 | </div> | ... | ... |