From 69bd43a84e113836af0f779a7dcc9189c986877e Mon Sep 17 00:00:00 2001 From: Birendra Date: Thu, 26 Aug 2021 10:30:22 +0530 Subject: [PATCH] mutiple bug fixed in DA and Curriculum builder --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js | 39 +++++++++++++++++++++++++++++++-------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 48 +++++++++++++++++++++++++++++++++--------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 47 +++++++++++++++++++++++++++++++++-------------- 400-SOURCECODE/AIAHTML5.Web/index.aspx | 2 +- 4 files changed, 98 insertions(+), 38 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 69abb95..5fd8a8d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -273,6 +273,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $("#CurBuilderbackground").css("display", "block"); $http({ method: 'GET', url: 'content/data/json/cb/SlideShow/json/' + $scope.fileName + '.json' }).success(function (data) { + + if(data.slideshow.presentation.structure._startSlideId==undefined) + { + data.slideshow.presentation.structure._startSlideId=""; + } localStorage.setItem("cbJsonDataObject", JSON.stringify(data)); $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject")); $rootScope.cbDynamicJsonData = data; @@ -384,6 +389,10 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $scope.jsonReceivedFile = function (jsonData) { + if(jsonData.slideshow.presentation.structure._startSlideId==undefined) + { + jsonData.slideshow.presentation.structure._startSlideId=""; + } localStorage.setItem("cbJsonDataObject", JSON.stringify(jsonData)); $rootScope.cbJsonData = ""; $rootScope.cbDynamicJsonData = ""; @@ -603,7 +612,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ "_id": sectionid, "_isRoot": "true", "_isBranch": "true", - "_isLocked": "false" + "_isLocked": "false", + "_startSlideId":slideid }, "_anchor": "true", "_window_position": "6,10", @@ -754,13 +764,23 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.loadNotesById = function () { $("#cbSelect").empty(); - traverseForLoadDropDown($rootScope.stru); + var entryPointId=$rootScope.stru.structure._startSlideId; + var isRoot=$rootScope.stru.structure._isRoot; + traverseForLoadDropDown($rootScope.stru); + setTimeout(function () { - var nodeid = document.getElementById('cbSelect').value; - $('#jstree').jstree('select_node', nodeid); - }, 200); - + if(entryPointId!="" && isRoot) + { + $('#jstree').jstree('select_node', entryPointId); + } + else + { + var nodeid = document.getElementById('cbSelect').value; + $('#jstree').jstree('select_node', nodeid); + } + }, 200); + } $scope.openTinyMCE = function (nodeid) { @@ -1633,6 +1653,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var strFromParent=$scope.selectedNodeSingleObj['structure']; var parentLevel=$scope.selectedNodeSingleObj._label; var parentId=$scope.selectedNodeSingleObj._id ; + var cbCurrentId = document.getElementById('cbSelect').value; var rootNoteSummary = new jinqJs() .from($rootScope.contentNotesForSaveCB) @@ -1684,7 +1705,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ "_id": parentId, "_isRoot": "true", "_isBranch": "true", - "_isLocked": "false" + "_isLocked": "false", + "_startSlideId":cbCurrentId }, "_anchor": "true", "_window_position": "6,10", @@ -2235,7 +2257,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ "_id": $rootScope.cbTreeFirstID, "_isRoot": "true", "_isBranch": "true", - "_isLocked": "false" + "_isLocked": "false", + "_startSlideId":cbCurrentId }, "_anchor": "true", "_window_position": "6,10", diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 7b5db64..ec1efec 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2118,7 +2118,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l "transparentTermNumber": $scope.daOpenInOtherModules.callOuts[i].transparentTermNumber.toString(), "termNumber": $scope.daOpenInOtherModules.callOuts[i].termNumber.toString(), "istpboxTerm":$scope.daOpenInOtherModules.callOuts[i].istpboxTerm==undefined?0:$scope.daOpenInOtherModules.callOuts[i].istpboxTerm, - 'relatedTerm':$scope.daOpenInOtherModules.callOuts[i].relatedTerm.toString() + 'relatedTerm':$scope.daOpenInOtherModules.callOuts[i].relatedTerm==undefined?'':$scope.daOpenInOtherModules.callOuts[i].relatedTerm.toString() }); } @@ -2256,7 +2256,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //history code - if ($("#canvasDivDA_" + windowviewid).find("canvas[id='canvasPaintDA']").length == 0) { + if ($("#canvasDivDA_" + windowviewid).find("canvas[id*='canvasPaintDA']").length == 0) { var canvasPaintID = "canvasPaintDA_" + windowviewid; var canvasID = "canvasDA_" + windowviewid; @@ -4335,7 +4335,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if (viewOrientationId == '1' || viewOrientationId == '4') { - $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' +windowviewid).width() / 2) + // $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' +windowviewid).width() / 2) $('#canvasDivDA_' + windowviewid).scrollTop($scope.imageVerticalScrollPosition); } @@ -4991,7 +4991,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }) } - else { + else + { //1. Dated:13-07-2016 Issue #4965 : The layer number should not extend beyond its level through layer text box. var dataLength = $scope.GetwindowStoreData(windowviewid,'BodyLayerData').Layers.DataLayer.length-1; if (parseInt($('#txtLayerNumberDA_' + windowviewid).val()) > (dataLength)) { @@ -5006,17 +5007,26 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.DisableUI(); var canDiv = document.getElementById('canvasDivDA_' + windowviewid); - var canDivChildCount = canDiv.childElementCount; - if (canDivChildCount > 0) { - canDiv.innerHTML = ''; + if($rootScope.globalSetting.onLayerChange) + { + var canDivChildCount = canDiv.childElementCount; + if (canDivChildCount > 0) { + canDiv.innerHTML = ''; + } + + //canvas is clear in search term,layer change,viewchange here. so annotationdata should also clear + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); + + } + else + { + //remove all canvas except pait and drawing + $('#'+'canvasDivDA_' + windowviewid+' canvas').not('#canvasDA_'+windowviewid).not('#canvasPaintDA_'+windowviewid).remove(); } - //2. - //canvas is clear in search term,layer change,viewchange here. so annotationdata should also clear $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); - $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); - + $scope.CalculateImageCordinates(viewOrientationId,windowviewid); //3. @@ -10250,6 +10260,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if (canDivChildCount > 0) { canDiv.innerHTML = ''; } + //canvas is clear in search term,layer change,viewchange here. so annotationData should also clear + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); $scope.SetwindowStoreData(windowviewid,'isGenderChnage',true); @@ -10264,10 +10277,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); if (previousHighlightList.length > 0) { - $("#btnNormalMode_" + windowviewid).addClass("btn-black"); + //$("#btnNormalMode_" + windowviewid).addClass("btn-black"); $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]); - $("#btnHighLight_" + windowviewid).removeClass("btn-black"); - $("#btnHighLight_" + windowviewid).addClass("btn-primary"); + // $("#btnHighLight_" + windowviewid).removeClass("btn-black"); + // $("#btnHighLight_" + windowviewid).addClass("btn-primary"); } var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.GetwindowStoreData(windowviewid,'voId')]; @@ -10509,7 +10522,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { - $scope.SetwindowStoreData(windowviewid,'layerNumber',0); + var isGenderChange = $scope.GetwindowStoreData(windowviewid,'isGenderChnage'); + if(!isGenderChange) + { + $scope.SetwindowStoreData(windowviewid,'layerNumber',0); + } + } var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); $('#txtLayerNumberDA_' + windowviewid).val( $scope.GetwindowStoreData(windowviewid,'layerNumber')); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index ed0be48..ac82c70 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -712,6 +712,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data if ($scope.currentUserDetails != undefined) { $rootScope.isVisibleLogin = false; $location.url('/'); + var loggedInUser = JSON.parse($scope.currentUserDetails); + if(loggedInUser.mType!=undefined) + { + $rootScope.isCAlink=true; + $('.navbar-fixed-top').css('display','none'); + } + ConfigurationService.getCofigValue() .then( function (configresult) { @@ -722,8 +729,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.aiaAnimationPath = configresult.serverPath; $rootScope.MaxOneFileSize = configresult.fileSize; $rootScope.aodDomainName = configresult.aodSiteUrl; - - var loggedInUser = JSON.parse($scope.currentUserDetails); + //incase site user login userid is 0 so then using license id //logout site user while reload url without parameter var userId=loggedInUser.Id==0?loggedInUser.LicenseId:loggedInUser.Id; @@ -1051,7 +1057,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data localStorage.setItem("globalModesty", "Y"); $rootScope.formsetting = { ethnicity: "W", - modesty: "Y" + modesty: "Y", + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting) @@ -1062,7 +1069,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data localStorage.setItem("globalModesty", "N"); $rootScope.formsetting = { ethnicity: "W", - modesty: "N" + modesty: "N", + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting) @@ -1075,7 +1083,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.formsetting = { ethnicity: result.userSelectedSkintone, - modesty: result.userselectedModesty + modesty: result.userselectedModesty, + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting); @@ -1110,7 +1119,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data localStorage.setItem("globalModesty", "Y"); $rootScope.formsetting = { ethnicity: "W", - modesty: "Y" + modesty: "Y", + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting); } @@ -1121,7 +1131,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.formsetting = { ethnicity: result.userSelectedSkintone, - modesty: result.userselectedModesty + modesty: result.userselectedModesty, + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting) @@ -1678,7 +1689,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data localStorage.setItem("globalModesty", "Y"); $rootScope.formsetting = { ethnicity: "W", - modesty: "Y" + modesty: "Y", + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting) @@ -1689,7 +1701,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data localStorage.setItem("globalModesty", "N"); $rootScope.formsetting = { ethnicity: "W", - modesty: "N" + modesty: "N", + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting) @@ -1702,7 +1715,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.formsetting = { ethnicity: result.userSelectedSkintone, - modesty: result.userselectedModesty + modesty: result.userselectedModesty, + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting); @@ -1739,7 +1753,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data localStorage.setItem("globalModesty", "Y"); $rootScope.formsetting = { ethnicity: "W", - modesty: "Y" + modesty: "Y", + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting); } @@ -1750,7 +1765,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.formsetting = { ethnicity: result.userSelectedSkintone, - modesty: result.userselectedModesty + modesty: result.userselectedModesty, + onLayerChange: true } $rootScope.UpdateSetting($rootScope.formsetting) @@ -8550,10 +8566,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.globalSetting = { ethnicity: 'W', modesty: 'Y', + onLayerChange: true }; $rootScope.formsetting = { ethnicity: null, - modesty: null + modesty: null, + onLayerChange: true }; $rootScope.lexicons = { primaryid:1, @@ -8663,7 +8681,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.islaxicanlanguageChange=false; $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity); $rootScope.setModestySettings($rootScope.globalSetting.modesty); - + $rootScope.formsetting.onLayerChange=$rootScope.globalSetting.onLayerChange; $rootScope.deSelectLanguageOptions(); $('#modal-settings').css("display", "none"); @@ -8831,6 +8849,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.UpdateSetting = function (setting) { $rootScope.isCallFromOtherModule = undefined; + $rootScope.globalSetting.onLayerChange=setting.onLayerChange; var isReloadingViewRequired = false; //1. if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) { diff --git a/400-SOURCECODE/AIAHTML5.Web/index.aspx b/400-SOURCECODE/AIAHTML5.Web/index.aspx index 80133c1..6218000 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.aspx +++ b/400-SOURCECODE/AIAHTML5.Web/index.aspx @@ -599,7 +599,7 @@
-- libgit2 0.21.4