Commit 04cfd2119ef223f1fe9d5363f13e739412fa3610
1 parent
40f0a355
Save Annotation term of DA panel for Save CB
Showing
2 changed files
with
152 additions
and
60 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -196,7 +196,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
196 | 196 | $rootScope.OpenExistingCurriculum = function (event) { |
197 | 197 | |
198 | 198 | $("#openCBJsonFile").trigger("click"); |
199 | - var fileupload = document.getElementById("openCBJsonFile"); | |
199 | + var fileupload = document.getElementById("openCBJsonFile"); | |
200 | 200 | |
201 | 201 | fileupload.onchange = function () { |
202 | 202 | |
... | ... | @@ -2314,7 +2314,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2314 | 2314 | //hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked, |
2315 | 2315 | //selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate, |
2316 | 2316 | layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1, |
2317 | - isModestyOn: $rootScope.DaWindowData[i].isModestyOn, | |
2317 | + isModestyOn: $rootScope.DaWindowData[i].ModestyValue, | |
2318 | 2318 | isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated, |
2319 | 2319 | isTopToolBarVisible: false, //$rootScope.DaWindowData[i].isTopToolBarVisible, |
2320 | 2320 | clickedTermList: $rootScope.DaWindowData[i].fullTermlist, | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1610,7 +1610,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1610 | 1610 | } |
1611 | 1611 | var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); |
1612 | 1612 | |
1613 | - if(ModestyValue=="Y") | |
1613 | + if (ModestyValue == "Y") | |
1614 | 1614 | { |
1615 | 1615 | $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true); |
1616 | 1616 | } |
... | ... | @@ -2163,7 +2163,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2163 | 2163 | if ((parseInt(dtlOfSktn[0]._lns) <= parseInt(nlayer)) && (parseInt(dtlOfSktn[0]._lne) > parseInt(nlayer)) && (dtlOfSktn[0]._isfr == 'Y')) { |
2164 | 2164 | $rootScope.isLayerLessSeven = true; // using at home |
2165 | 2165 | var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); |
2166 | - if ((ModestyValue == 'Y')) { | |
2166 | + if (ModestyValue == 'Y') { | |
2167 | 2167 | |
2168 | 2168 | $('.modestyImg_'+windowviewid).css('visibility', 'visible'); |
2169 | 2169 | } |
... | ... | @@ -2909,6 +2909,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2909 | 2909 | |
2910 | 2910 | imgCanvas.addEventListener('click', function (evt) { |
2911 | 2911 | |
2912 | + var preTermData; //Use for Remove SpeechBUbble With TermNumber | |
2912 | 2913 | var len= (evt.currentTarget.id).split("_").length; |
2913 | 2914 | var windowviewid = (evt.currentTarget.id).split("_")[len-1]; |
2914 | 2915 | var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid); |
... | ... | @@ -2923,14 +2924,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2923 | 2924 | console.log('CTRL ON') |
2924 | 2925 | } |
2925 | 2926 | else |
2926 | - { | |
2927 | + { | |
2928 | + preTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
2929 | + | |
2927 | 2930 | $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); |
2928 | - $('#typedTermName_' + windowviewid).val(''); | |
2929 | - | |
2931 | + $('#typedTermName_' + windowviewid).val(''); | |
2930 | 2932 | $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []); |
2931 | 2933 | $scope.SetwindowStoreData(windowviewid, 'AllTerms', []); |
2932 | 2934 | $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]); |
2933 | - $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false); | |
2935 | + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false); | |
2934 | 2936 | $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); |
2935 | 2937 | |
2936 | 2938 | console.log('multiAnnotationIsON: ' + false); |
... | ... | @@ -3003,12 +3005,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3003 | 3005 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
3004 | 3006 | |
3005 | 3007 | previousHighlightList.push(RGBColor); |
3008 | + | |
3009 | + //Save Term Number to Showing Annotaion for CB Module | |
3010 | + var AllTerms = $scope.GetwindowStoreData(windowviewid, 'AllTerms'); | |
3011 | + AllTerms.push({ '_TermNumber': RGBColor }); | |
3012 | + var fullTermlist = $scope.GetwindowStoreData(windowviewid, 'fullTermlist'); | |
3013 | + fullTermlist.push(parseInt(RGBColor)); | |
3006 | 3014 | |
3007 | 3015 | var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); |
3008 | 3016 | CurriculumTermData.push({ |
3009 | 3017 | "termNumber": parseInt(RGBColor), |
3010 | - "tips_x": mousePos.x, | |
3011 | - "tips_y": mousePos.y, | |
3018 | + "tips_x": parseInt( evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30, | |
3019 | + "tips_y": parseInt( evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10, | |
3012 | 3020 | "x": evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, |
3013 | 3021 | "y": evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top |
3014 | 3022 | }); |
... | ... | @@ -3081,7 +3089,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3081 | 3089 | $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); |
3082 | 3090 | } |
3083 | 3091 | |
3084 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid); | |
3092 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3085 | 3093 | } |
3086 | 3094 | |
3087 | 3095 | } |
... | ... | @@ -3093,18 +3101,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3093 | 3101 | |
3094 | 3102 | if ($('#dot_'+windowviewid).length > 0) { |
3095 | 3103 | $('#dot_'+windowviewid).remove(); |
3096 | - | |
3104 | + | |
3097 | 3105 | if ($('#sppeachBubble_'+windowviewid).length > 0) { |
3098 | - $('#sppeachBubble_'+windowviewid).remove(); | |
3106 | + $('#sppeachBubble_' + windowviewid).remove(); | |
3099 | 3107 | } |
3100 | 3108 | if ($('.com_'+windowviewid).length > 0) { |
3101 | 3109 | $('.com_'+windowviewid).remove(); |
3102 | 3110 | } |
3103 | 3111 | if ($('#bord_'+windowviewid).length > 0) { |
3104 | 3112 | $('#bord_'+windowviewid).remove(); |
3105 | - } | |
3106 | - | |
3107 | - | |
3113 | + } | |
3108 | 3114 | |
3109 | 3115 | if (TermAnnotationText.length > 0) { |
3110 | 3116 | for (var i = 0; i <= TermAnnotationText.length - 1; i++) { |
... | ... | @@ -3114,7 +3120,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3114 | 3120 | |
3115 | 3121 | console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); |
3116 | 3122 | |
3117 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid); | |
3123 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3124 | + } | |
3125 | + //Remove previous SpeechBubble with termnumber | |
3126 | + if (preTermData != undefined && preTermData.length > 0) { | |
3127 | + for (var i = 0; i < preTermData.length; i++) { | |
3128 | + if ($('#sppeachBubble_' + windowviewid + '-' + preTermData[i].termNumber).length > 0) { | |
3129 | + $('#sppeachBubble_' + windowviewid + '-' + preTermData[i].termNumber).remove(); | |
3130 | + } | |
3131 | + } | |
3118 | 3132 | } |
3119 | 3133 | } |
3120 | 3134 | else { |
... | ... | @@ -3127,7 +3141,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3127 | 3141 | |
3128 | 3142 | console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); |
3129 | 3143 | |
3130 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid); | |
3144 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor); | |
3131 | 3145 | } |
3132 | 3146 | } |
3133 | 3147 | |
... | ... | @@ -3343,7 +3357,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3343 | 3357 | $scope.MultiLanguageAnnationArray.push(TermAnnotationText[j]); |
3344 | 3358 | } |
3345 | 3359 | |
3346 | - $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y,windowviewid); | |
3360 | + $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y, windowviewid, CurriculumTermData[i].termNumber); | |
3347 | 3361 | } |
3348 | 3362 | |
3349 | 3363 | } |
... | ... | @@ -3681,10 +3695,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3681 | 3695 | |
3682 | 3696 | $scope.highlightedBR = []; |
3683 | 3697 | $scope.runningWorkers = []; |
3684 | - | |
3698 | + ; | |
3685 | 3699 | $timeout(function () { |
3686 | 3700 | var MaskCanvasData=$scope.GetwindowStoreData(windowviewid,'MaskCanvasData'); |
3687 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
3701 | + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); | |
3688 | 3702 | var ColoredImageSRC=$scope.GetwindowStoreData(windowviewid,'ColoredImageSRC'); |
3689 | 3703 | var loopLength = 0; |
3690 | 3704 | if (((viewOrientationId == '1') || (viewOrientationId == '4')) && (ColoredImageSRC.length == 9)) { |
... | ... | @@ -4762,7 +4776,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4762 | 4776 | } |
4763 | 4777 | |
4764 | 4778 | |
4765 | - $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationNotForTBox, tipx, tipy,windowviewid) { | |
4779 | + $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationNotForTBox, tipx, tipy,windowviewid, termNumber) { | |
4766 | 4780 | |
4767 | 4781 | if (isAnnotationNotForTBox == true) { |
4768 | 4782 | if ($scope.MultiLanguageAnnationArray.length > 1) { |
... | ... | @@ -4782,8 +4796,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4782 | 4796 | //2.1 create unique speech bubbles |
4783 | 4797 | var speechBubbleCounter=$scope.GetwindowStoreData(windowviewid,'speechBubbleCounter'); |
4784 | 4798 | speechBubbleCounter = speechBubbleCounter + 1; |
4785 | - $scope.SetwindowStoreData(windowviewid,'speechBubbleCounter',speechBubbleCounter); | |
4786 | - var id = "speechBubble" + speechBubbleCounter+'_'+windowviewid; | |
4799 | + $scope.SetwindowStoreData(windowviewid, 'speechBubbleCounter', speechBubbleCounter); | |
4800 | + //if (termNumber == undefined ||) { | |
4801 | + // var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid; | |
4802 | + //} else { | |
4803 | + //var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid + '-' + termNumber;//Add by Sandy for Save Annotation | |
4804 | + //} | |
4805 | + if (termNumber != undefined && termNumber != 0) { | |
4806 | + var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid + '-' + termNumber;//Add by Sandy for Save Annotation | |
4807 | + } | |
4808 | + | |
4787 | 4809 | //2.2 Get clicked locationa and find if it is already clicked earlier too on same location |
4788 | 4810 | var pointClicked = parseInt(x) + parseInt(y); |
4789 | 4811 | var isClickedOnSamePoint = $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked + "]").length; |
... | ... | @@ -4798,8 +4820,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4798 | 4820 | } |
4799 | 4821 | $('.appendDragg').draggable({ |
4800 | 4822 | drag: function (evt) { |
4801 | - var len= (evt.target.id).split("_").length; | |
4802 | - var windid = (evt.target.id).split("_")[len-1]; | |
4823 | + var bubbleId = (evt.target.id).split("-")[0]; | |
4824 | + //var len = (evt.target.id).split("_").length; | |
4825 | + //var windid = (evt.target.id).split("_")[len - 1]; | |
4826 | + var len = (bubbleId).split("_").length; | |
4827 | + var windid = (bubbleId).split("_")[len - 1]; | |
4828 | + | |
4803 | 4829 | $(this).prev('div').css("display", "none"); |
4804 | 4830 | var bor_id = $(this).next('div').attr('id'); |
4805 | 4831 | var sub_id1 = $(this).attr('id'); |
... | ... | @@ -4816,6 +4842,31 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4816 | 4842 | } |
4817 | 4843 | } |
4818 | 4844 | }, |
4845 | + | |
4846 | + //Update Annotation Cordianate in case of show multiple Annotation | |
4847 | + stop: function (evt) { | |
4848 | + var clickedSpeechBubbleId = $(this).attr("id"); | |
4849 | + var bubbleId = (clickedSpeechBubbleId).split("-")[0]; | |
4850 | + var len = (bubbleId).split("_").length; | |
4851 | + var windowviewid = (bubbleId).split("_")[len - 1]; | |
4852 | + var sppechBubbleId = $(this).attr("id").substring(12); | |
4853 | + var termNumber = (clickedSpeechBubbleId).split("-")[1]; | |
4854 | + | |
4855 | + if ($rootScope.isCallFromOtherModule) { | |
4856 | + $timeout(function () { | |
4857 | + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
4858 | + var BubleObj = document.getElementById(clickedSpeechBubbleId); | |
4859 | + var CurriculumTermData = new jinqJs() | |
4860 | + .from(CurriculumTermData) | |
4861 | + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; }) | |
4862 | + .at("termNumber == " + termNumber); | |
4863 | + | |
4864 | + }, 100); | |
4865 | + | |
4866 | + } | |
4867 | + } | |
4868 | + | |
4869 | + | |
4819 | 4870 | }); |
4820 | 4871 | $('.dynCross_'+windowviewid).on('click', function (evt) { |
4821 | 4872 | if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) { |
... | ... | @@ -4827,6 +4878,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4827 | 4878 | } |
4828 | 4879 | } |
4829 | 4880 | } |
4881 | + | |
4882 | + //Delete Annotation in case of show multipule annotation | |
4883 | + var termNumber = removeid.split("-")[1]; | |
4884 | + if ($rootScope.isCallFromOtherModule) { | |
4885 | + var CurriculumTermData = []; | |
4886 | + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
4887 | + CurriculumTermData = new jinqJs() | |
4888 | + .from(CurriculumTermData) | |
4889 | + .delete().at("termNumber == " + termNumber).select(); | |
4890 | + | |
4891 | + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData); | |
4892 | + } | |
4830 | 4893 | $(this).parent().parent().parent().remove(); |
4831 | 4894 | }); |
4832 | 4895 | } |
... | ... | @@ -4839,14 +4902,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4839 | 4902 | } |
4840 | 4903 | $('.com_'+windowviewid).remove(); |
4841 | 4904 | $('#bord_'+windowviewid).remove(); |
4842 | - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y,windowviewid); | |
4843 | - //history maintained issue | |
4844 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { document.getElementById('sppeachBubble_'+windowviewid).style.zIndex = "60000"; } | |
4845 | - $('#sppeachBubble_'+windowviewid).draggable( | |
4905 | + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y, windowviewid, termNumber); | |
4906 | + //history maintained issue | |
4907 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
4908 | + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.zIndex = "60000"; | |
4909 | + } | |
4910 | + $('#sppeachBubble_' + windowviewid + '-' + termNumber).draggable( | |
4846 | 4911 | { |
4847 | 4912 | drag: function (evt) { |
4848 | - var len= (evt.target.id).split("_").length; | |
4849 | - var windid = (evt.target.id).split("_")[len-1]; | |
4913 | + var bubbleId = (evt.target.id).split("-")[0]; | |
4914 | + //var len= (evt.target.id).split("_").length; | |
4915 | + //var windid = (evt.target.id).split("_")[len-1]; | |
4916 | + var len = (bubbleId).split("_").length; | |
4917 | + var windid = (bubbleId).split("_")[len - 1]; | |
4850 | 4918 | $('#dot_'+windid).css("visibility", "hidden"); |
4851 | 4919 | var canvasDiv = document.getElementById('canvasDivDA_' + windid) |
4852 | 4920 | |
... | ... | @@ -4854,21 +4922,22 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4854 | 4922 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
4855 | 4923 | $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid); |
4856 | 4924 | }, |
4857 | - | |
4925 | + //Update Annotation Cordianate in case of show single Annotation | |
4858 | 4926 | stop: function (evt) { |
4859 | 4927 | var clickedSpeechBubbleId = $(this).attr("id"); |
4860 | - var len = (clickedSpeechBubbleId).split("_").length; | |
4861 | - var windowviewid = (clickedSpeechBubbleId).split("_")[len - 1]; | |
4928 | + var bubbleId = (clickedSpeechBubbleId).split("-")[0]; | |
4929 | + var len = (bubbleId).split("_").length; | |
4930 | + var windowviewid = (bubbleId).split("_")[len - 1]; | |
4862 | 4931 | var sppechBubbleId = $(this).attr("id").substring(12); |
4863 | - var termNumber = sppechBubbleId.split("_")[0]; | |
4864 | - | |
4932 | + var termNumber = (clickedSpeechBubbleId).split("-")[1]; | |
4933 | + | |
4865 | 4934 | if ($rootScope.isCallFromOtherModule) { |
4866 | 4935 | $timeout(function () { |
4867 | 4936 | var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); |
4868 | 4937 | var BubleObj = document.getElementById(clickedSpeechBubbleId); |
4869 | 4938 | var CurriculumTermData = new jinqJs() |
4870 | 4939 | .from(CurriculumTermData) |
4871 | - .update(function (coll, index) { coll[index].lx = BubleObj.offsetLeft; coll[index].ly = BubleObj.offsetTop; }) | |
4940 | + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; }) | |
4872 | 4941 | .at("termNumber == " + termNumber); |
4873 | 4942 | |
4874 | 4943 | }, 100); |
... | ... | @@ -4881,7 +4950,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4881 | 4950 | var windid = (evt.target.id).split("_")[len-1]; |
4882 | 4951 | $('#sppeachBubble_'+windid).remove(); |
4883 | 4952 | $('#bord_'+windowviewid).remove(); |
4884 | - $('#dot_'+windid).remove(); | |
4953 | + $('#dot_' + windid).remove(); | |
4954 | + | |
4955 | + //Delete Annotation in case of show multipule annotation | |
4956 | + var removeid = $(this).parent().parent().attr('id'); | |
4957 | + var termNumber = removeid.split("-")[1]; | |
4958 | + if ($rootScope.isCallFromOtherModule) { | |
4959 | + var CurriculumTermData = []; | |
4960 | + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); | |
4961 | + CurriculumTermData = new jinqJs() | |
4962 | + .from(CurriculumTermData) | |
4963 | + .delete().at("termNumber == " + termNumber).select(); | |
4964 | + | |
4965 | + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData); | |
4966 | + } | |
4967 | + $('#' + removeid).remove(); | |
4885 | 4968 | }); |
4886 | 4969 | } |
4887 | 4970 | } |
... | ... | @@ -4960,15 +5043,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4960 | 5043 | } |
4961 | 5044 | |
4962 | 5045 | |
4963 | - if (document.getElementById('btnStrutureBox_'+windowviewid).name == "showAnnotationStructure") { | |
4964 | - $scope.showAnnotation(windowviewid) | |
5046 | + if (document.getElementById('btnStrutureBox_' + windowviewid).name == "showAnnotationStructure") { | |
5047 | + //$scope.showAnnotation(windowviewid); | |
5048 | + $scope.showAnnotation(windowviewid, termNumber); | |
4965 | 5049 | } |
4966 | 5050 | else { |
4967 | 5051 | $scope.hideAnnotation(windowviewid) |
4968 | 5052 | } |
4969 | 5053 | |
4970 | 5054 | if ($rootScope.isTBCompleted == true) { |
4971 | - $('#sppeachBubble_'+windowviewid).remove(); | |
5055 | + $('#sppeachBubble_' + windowviewid + '-' + termNumber).remove(); | |
4972 | 5056 | $('#dot_'+windowviewid).remove(); |
4973 | 5057 | $('#bord_'+windowviewid).remove(); |
4974 | 5058 | $('.com_'+windowviewid).remove(); |
... | ... | @@ -4976,16 +5060,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4976 | 5060 | } |
4977 | 5061 | } |
4978 | 5062 | |
4979 | - $scope.showAnnotation = function (windowviewid) { | |
5063 | + $scope.showAnnotation = function (windowviewid, termNumber) { | |
4980 | 5064 | $('.com_'+windowviewid).show(); |
4981 | 5065 | $('#dot_'+windowviewid).show(); |
4982 | 5066 | $('#bord_'+windowviewid).show(); |
4983 | - $('#sppeachBubble_'+windowviewid).show(); | |
5067 | + //$('#sppeachBubble_' + windowviewid).show(); | |
5068 | + $('#sppeachBubble_' + windowviewid + '-' + termNumber).show(); | |
4984 | 5069 | $('#sppeachBubble_annotation_'+windowviewid).show(); |
4985 | 5070 | |
4986 | 5071 | $('#bord_annotation_'+windowviewid).show(); |
4987 | 5072 | $('#dot_annotation_'+windowviewid).show(); |
4988 | - $('.dynCross_anno_'+windowviewid).parent().parent().parent().show(); | |
5073 | + $('.dynCross_anno_' + windowviewid).parent().parent().parent().show(); | |
5074 | + | |
4989 | 5075 | } |
4990 | 5076 | |
4991 | 5077 | $scope.hideAnnotation = function (windowviewid) { |
... | ... | @@ -5049,12 +5135,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5049 | 5135 | |
5050 | 5136 | } |
5051 | 5137 | } |
5052 | - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y,windowviewid) { | |
5053 | - | |
5138 | + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y, windowviewid, termNumber) { | |
5054 | 5139 | |
5055 | 5140 | |
5056 | 5141 | var sppechBubbleDotHTML = '<div id="dot_'+windowviewid +'" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' |
5057 | - + '<div id="sppeachBubble_'+windowviewid +'" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">' | |
5142 | + + '<div id="sppeachBubble_' + windowviewid + '-' + termNumber +'" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">' | |
5058 | 5143 | + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">' |
5059 | 5144 | + '<img id="crossDiv_'+windowviewid +'" style="width:18px" src=' + $rootScope.path + '></span></div>' |
5060 | 5145 | |
... | ... | @@ -5074,15 +5159,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5074 | 5159 | if ($scope.MultiLanguageAnnationArray.length > 0) { |
5075 | 5160 | for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { |
5076 | 5161 | var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; |
5077 | - $('#sppeachBubble_'+windowviewid).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>"); | |
5162 | + $('#sppeachBubble_' + windowviewid + '-' + termNumber).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>"); | |
5078 | 5163 | } |
5079 | 5164 | } |
5080 | 5165 | else { |
5081 | 5166 | console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) |
5082 | 5167 | } |
5083 | 5168 | if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { |
5084 | - $('#sppeachBubble_'+windowviewid).css("min-width", "auto"); | |
5085 | - $('#sppeachBubble_'+windowviewid).css("white-space", "nowrap"); | |
5169 | + //$('#sppeachBubble_' + windowviewid).css("min-width", "auto"); | |
5170 | + //$('#sppeachBubble_' + windowviewid).css("white-space", "nowrap"); | |
5171 | + | |
5172 | + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("min-width", "auto"); | |
5173 | + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("white-space", "nowrap"); | |
5086 | 5174 | |
5087 | 5175 | } |
5088 | 5176 | } |
... | ... | @@ -5094,13 +5182,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5094 | 5182 | document.getElementById('bord_'+windowviewid).style.display = 'block'; |
5095 | 5183 | document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px'; |
5096 | 5184 | document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px'; |
5097 | - document.getElementById('sppeachBubble_'+windowviewid).style.display = 'block'; | |
5098 | - document.getElementById('sppeachBubble_'+windowviewid).style.left = (Globe[0].currentX) + 'px'; | |
5099 | - document.getElementById('sppeachBubble_'+windowviewid).style.top = (Globe[0].currentY) + 'px'; | |
5100 | - | |
5101 | - | |
5185 | + //document.getElementById('sppeachBubble_'+ windowviewid).style.display = 'block'; | |
5186 | + //document.getElementById('sppeachBubble_'+ windowviewid).style.left = (Globe[0].currentX) + 'px'; | |
5187 | + //document.getElementById('sppeachBubble_'+ windowviewid).style.top = (Globe[0].currentY) + 'px'; | |
5102 | 5188 | |
5189 | + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block'; | |
5190 | + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX) + 'px'; | |
5191 | + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px'; | |
5103 | 5192 | } |
5193 | + | |
5104 | 5194 | $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation,windowviewid,TPspeechBubbleCounter) { |
5105 | 5195 | |
5106 | 5196 | var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div style='z-index:59000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>"; |
... | ... | @@ -5471,7 +5561,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5471 | 5561 | $('.com_'+windowviewid).remove(); |
5472 | 5562 | $('#dot_'+windowviewid).remove(); |
5473 | 5563 | $('#bord_'+windowviewid).remove(); |
5474 | - $('#sppeachBubble_'+windowviewid).remove(); | |
5564 | + $('#sppeachBubble_' + windowviewid).remove(); | |
5475 | 5565 | |
5476 | 5566 | var previewRectangleWidth = $('.rectangle').width(); |
5477 | 5567 | var previewRectangleHeight = $('.rectangle').height() |
... | ... | @@ -7719,7 +7809,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7719 | 7809 | $('#bord_annotation_'+windowviewid).remove(); |
7720 | 7810 | |
7721 | 7811 | $('#dot_'+windowviewid).remove(); |
7722 | - $('#sppeachBubble_'+windowviewid).remove(); | |
7812 | + $('#sppeachBubble_' + windowviewid).remove(); | |
7723 | 7813 | $('.com_'+windowviewid).remove(); |
7724 | 7814 | $('#bord_'+windowviewid).remove(); |
7725 | 7815 | |
... | ... | @@ -8643,7 +8733,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8643 | 8733 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
8644 | 8734 | if (isHighlightBodyWithCBTermData == true) { |
8645 | 8735 | $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false); |
8646 | - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); | |
8736 | + | |
8737 | + //$scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); | |
8738 | + | |
8647 | 8739 | // finish CB window load |
8648 | 8740 | $rootScope.DAWindowLoadComplete = true; |
8649 | 8741 | } |
... | ... | @@ -9524,7 +9616,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9524 | 9616 | } |
9525 | 9617 | var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); |
9526 | 9618 | |
9527 | - if(ModestyValue=="Y") | |
9619 | + if (ModestyValue == "Y") | |
9528 | 9620 | { |
9529 | 9621 | $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true); |
9530 | 9622 | } | ... | ... |