Commit 6f513c1bf274f190a60ea00280df59faf8e1b8f7
1 parent
12519d18
Start Code Chages for Window data to Save CB
Showing
3 changed files
with
341 additions
and
26 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -113,7 +113,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -113,7 +113,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
113 | 113 | ||
114 | if ($rootScope.CIWindowData[x].multiwinid == windowviewid) { | 114 | if ($rootScope.CIWindowData[x].multiwinid == windowviewid) { |
115 | $rootScope.CIWindowData[x][keyname] = value; | 115 | $rootScope.CIWindowData[x][keyname] = value; |
116 | - } | 116 | + } |
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
@@ -833,7 +833,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -833,7 +833,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
833 | '<div class="col-sm-12 img-thumbnail" align="center">' + | 833 | '<div class="col-sm-12 img-thumbnail" align="center">' + |
834 | '<img src="' + selectedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well img-subtitle">' + | 834 | '<img src="' + selectedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well img-subtitle">' + |
835 | '<div align="left" id="sid_' + windowviewid + '"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' + | 835 | '<div align="left" id="sid_' + windowviewid + '"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' + |
836 | - '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");}});});</script></div>' + | 836 | + '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibity(event);});});</script></div>' + |
837 | '</div></div>', | 837 | '</div></div>', |
838 | title: $rootScope.getLocalStorageValue("currentViewTitle"), | 838 | title: $rootScope.getLocalStorageValue("currentViewTitle"), |
839 | position: { | 839 | position: { |
@@ -979,10 +979,35 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -979,10 +979,35 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
979 | $rootScope.StoreTitleName(currentViewTitle); | 979 | $rootScope.StoreTitleName(currentViewTitle); |
980 | $rootScope.StoreOrgImageName(imageName); | 980 | $rootScope.StoreOrgImageName(imageName); |
981 | }); | 981 | }); |
982 | - } | 982 | + } |
983 | + | ||
984 | + $scope.GetTextVisiblity = function (windowviewid, btnTextValue) { | ||
985 | + var isVisible; | ||
986 | + if (btnTextValue == "Text On") { | ||
987 | + isVisible = false; | ||
988 | + $scope.SetCIwindowStoreData(windowviewid, 'isTextVisible', isVisible); | ||
989 | + } else { | ||
990 | + isVisible = true; | ||
991 | + $scope.SetCIwindowStoreData(windowviewid, 'isTextVisible', isVisible); | ||
992 | + } | ||
993 | + $rootScope.saveCIWindowActivity("textVisible", isVisible); | ||
994 | + } | ||
995 | + | ||
996 | + | ||
983 | }] | 997 | }] |
984 | ); | 998 | ); |
985 | 999 | ||
1000 | + function GetTextVisibity(event) { | ||
1001 | + | ||
1002 | + var scope = angular.element(document.getElementById("CIView")).scope(); | ||
1003 | + // var len = (event.target.id).split("_").length; | ||
1004 | + var windowviewid = (event.target.id).split("_")[1]; | ||
1005 | + var btnTextValue = event.target.innerText; | ||
1006 | + scope.$apply(function () { | ||
1007 | + scope.GetTextVisiblity(windowviewid,btnTextValue); | ||
1008 | + }); | ||
1009 | + } | ||
1010 | + | ||
986 | 1011 | ||
987 | 1012 | ||
988 | 1013 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
@@ -35,7 +35,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -35,7 +35,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
35 | 35 | ||
36 | // close in case of Curriculum Builder | 36 | // close in case of Curriculum Builder |
37 | var id = $(event.target).parent().parent().parent().parent().attr('id'); | 37 | var id = $(event.target).parent().parent().parent().parent().attr('id'); |
38 | - | 38 | + //$rootScope.saveCIWindowActivity("", "");//Calling for Save widodow data for Save Cb |
39 | if (id == "CBTinyMCEPanel") { | 39 | if (id == "CBTinyMCEPanel") { |
40 | tinymce.execCommand('mceRemoveControl', true, 'CBTextArea'); | 40 | tinymce.execCommand('mceRemoveControl', true, 'CBTextArea'); |
41 | tinymce.execCommand('mceFocus', true, 'CBTextArea'); | 41 | tinymce.execCommand('mceFocus', true, 'CBTextArea'); |
@@ -59,6 +59,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -59,6 +59,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
59 | if (ddlViewerLen == 0) { | 59 | if (ddlViewerLen == 0) { |
60 | $('#viwerSelect').hide(); | 60 | $('#viwerSelect').hide(); |
61 | } | 61 | } |
62 | + | ||
62 | }); | 63 | }); |
63 | 64 | ||
64 | 65 | ||
@@ -643,19 +644,18 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -643,19 +644,18 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
643 | if ($scope.SelectedNotes != "" && $scope.SelectedNotes != undefined) { | 644 | if ($scope.SelectedNotes != "" && $scope.SelectedNotes != undefined) { |
644 | tinymce.get("CBTextArea").setContent($scope.SelectedNotes); | 645 | tinymce.get("CBTextArea").setContent($scope.SelectedNotes); |
645 | 646 | ||
646 | - //setTimeout(function () { | ||
647 | - // if ($scope.selectedNodeSingleObj.windows != "") { | ||
648 | - // //$scope.loadContentOfSelectedSlide($scope.selectedNodeSingleObj._id) | ||
649 | - | ||
650 | - // } | ||
651 | - // else | ||
652 | - // { | ||
653 | - // $scope.CBEnableUI(); | 647 | + setTimeout(function () { |
648 | + if ($scope.selectedNodeSingleObj.windows != "") { | ||
649 | + $scope.loadContentOfSelectedSlide($scope.selectedNodeSingleObj._id) | ||
654 | 650 | ||
655 | - // } | ||
656 | - //},200); | ||
657 | - $scope.CBEnableUI(); | 651 | + } |
652 | + else | ||
653 | + { | ||
654 | + $scope.CBEnableUI(); | ||
658 | 655 | ||
656 | + } | ||
657 | + },200); | ||
658 | + //$scope.CBEnableUI(); | ||
659 | } | 659 | } |
660 | else | 660 | else |
661 | { | 661 | { |
@@ -716,8 +716,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -716,8 +716,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
716 | $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents | 716 | $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents |
717 | } | 717 | } |
718 | var currentCb_id = document.getElementById('cbSelect').value; | 718 | var currentCb_id = document.getElementById('cbSelect').value; |
719 | - $rootScope.updatedContentFromEditor(currentCb_id); | 719 | + $rootScope.updatedContentFromEditor(currentCb_id);//Calling for Update Note for Save CB |
720 | 720 | ||
721 | + $scope.windowsContentForSelectedSlide(nodeid);// Calling for Update Window content for Save Cb | ||
721 | 722 | ||
722 | traverseTreeSelectedSingleObj($rootScope.stru, nodeid); | 723 | traverseTreeSelectedSingleObj($rootScope.stru, nodeid); |
723 | traverse($rootScope.stru, nodeid); | 724 | traverse($rootScope.stru, nodeid); |
@@ -748,8 +749,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -748,8 +749,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
748 | document.getElementById("slideNumber").innerHTML = "Slide " + 1 + " of " + 1; | 749 | document.getElementById("slideNumber").innerHTML = "Slide " + 1 + " of " + 1; |
749 | } | 750 | } |
750 | else if ($scope.selectedNodeSingleObj._isBranch == "true") { | 751 | else if ($scope.selectedNodeSingleObj._isBranch == "true") { |
751 | - $scope.currentSlideNumber += 1; | ||
752 | - document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; | 752 | + for (var i = 0; i < $scope.selectedNodeSiblingObjs.length; i++) { |
753 | + if ($scope.selectedNodeSiblingObjs[i]._id == nodeid) { | ||
754 | + $scope.currentSlideNumber = i + 1; | ||
755 | + } | ||
756 | + } | ||
757 | + //$scope.currentSlideNumber += 1; | ||
758 | + //document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; | ||
759 | + document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSiblingObjs).length; | ||
753 | } | 760 | } |
754 | else{ | 761 | else{ |
755 | document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; | 762 | document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; |
@@ -1499,11 +1506,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -1499,11 +1506,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
1499 | .where("_id == " + cbCurrentId) | 1506 | .where("_id == " + cbCurrentId) |
1500 | .select(); | 1507 | .select(); |
1501 | if (selectedSlideContent.length > 0) { | 1508 | if (selectedSlideContent.length > 0) { |
1502 | - windowsInSelectedSlide = selectedSlideContent[0].windows; | 1509 | + windowsInSelectedSlide = selectedSlideContent[0].windows; |
1503 | notesForSelectedSlide = tinyMCE.activeEditor.getContent(); | 1510 | notesForSelectedSlide = tinyMCE.activeEditor.getContent(); |
1504 | if (notesForSelectedSlide == "" || notesForSelectedSlide == undefined) { | 1511 | if (notesForSelectedSlide == "" || notesForSelectedSlide == undefined) { |
1505 | notesForSelectedSlide = selectedSlideContent[0].notes; | 1512 | notesForSelectedSlide = selectedSlideContent[0].notes; |
1506 | - } | 1513 | + } |
1514 | + //Calling method for update Windows Data for selected slide | ||
1515 | + //$scope.windowsContentForSelectedSlide(windowsInSelectedSlide); | ||
1507 | } | 1516 | } |
1508 | else { | 1517 | else { |
1509 | windowsInSelectedSlide = ""; | 1518 | windowsInSelectedSlide = ""; |
@@ -1625,7 +1634,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -1625,7 +1634,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
1625 | if (window.navigator && window.navigator.msSaveOrOpenBlob) { | 1634 | if (window.navigator && window.navigator.msSaveOrOpenBlob) { |
1626 | window.navigator.msSaveOrOpenBlob(blob, filename); | 1635 | window.navigator.msSaveOrOpenBlob(blob, filename); |
1627 | } | 1636 | } |
1628 | - else { | 1637 | + else { |
1638 | + //document.execCommand("SaveAs", true, filename); | ||
1639 | + //angular.element(document.execCommand("SaveAs", false, filename)).scope(); | ||
1629 | var e = document.createEvent('MouseEvents'), | 1640 | var e = document.createEvent('MouseEvents'), |
1630 | a = document.createElement('a'); | 1641 | a = document.createElement('a'); |
1631 | a.download = filename; | 1642 | a.download = filename; |
@@ -1633,7 +1644,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -1633,7 +1644,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
1633 | a.dataset.downloadurl = ['text/json', a.download, a.href].join(':'); | 1644 | a.dataset.downloadurl = ['text/json', a.download, a.href].join(':'); |
1634 | e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | 1645 | e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); |
1635 | a.dispatchEvent(e); | 1646 | a.dispatchEvent(e); |
1636 | - // window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource | 1647 | + window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource |
1637 | } | 1648 | } |
1638 | $rootScope.dynamicUpdatedJsonForSaveCB = ""; | 1649 | $rootScope.dynamicUpdatedJsonForSaveCB = ""; |
1639 | //$rootScope.contentNotesForSaveCB = []; | 1650 | //$rootScope.contentNotesForSaveCB = []; |
@@ -1742,10 +1753,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -1742,10 +1753,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
1742 | 1753 | ||
1743 | $scope.addSlide = function (currentid, AddSlideId) { | 1754 | $scope.addSlide = function (currentid, AddSlideId) { |
1744 | if ($rootScope.structureObjForSaveCB.length == 0) { | 1755 | if ($rootScope.structureObjForSaveCB.length == 0) { |
1745 | - //$rootScope.structureObjForSaveCB = $rootScope.structure;// only Tree Array | ||
1746 | - //$rootScope.structureObjForSaveCB = $rootScope.stru.slideshow.presentation.structure.structure; | ||
1747 | $rootScope.structureObjForSaveCB = $rootScope.stru.structure.structure; | 1756 | $rootScope.structureObjForSaveCB = $rootScope.stru.structure.structure; |
1748 | } | 1757 | } |
1758 | + //if ($rootScope.contentNotesForSaveCB.length == 0) { | ||
1759 | + // $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents; | ||
1760 | + //} | ||
1749 | traverseTreeSelectedSingleObj($rootScope.stru, currentid); | 1761 | traverseTreeSelectedSingleObj($rootScope.stru, currentid); |
1750 | // traverse($rootScope.stru, currentid); | 1762 | // traverse($rootScope.stru, currentid); |
1751 | //console.log(JSON.stringify($scope.upDateJsonObj)) | 1763 | //console.log(JSON.stringify($scope.upDateJsonObj)) |
@@ -1774,6 +1786,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -1774,6 +1786,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
1774 | "_isBranch": "false", | 1786 | "_isBranch": "false", |
1775 | "_isLocked": "false" | 1787 | "_isLocked": "false" |
1776 | }); | 1788 | }); |
1789 | + | ||
1790 | + //$rootScope.contentNotesForSaveCB.push({ | ||
1791 | + // "notes": tinyMCE.activeEditor.getContent(), | ||
1792 | + // "windows": "", | ||
1793 | + // "_id": AddSlideId | ||
1794 | + //}); | ||
1795 | + | ||
1777 | //if (currentid == $rootScope.cbTreeFirstID) { | 1796 | //if (currentid == $rootScope.cbTreeFirstID) { |
1778 | // $rootScope.structureObjForSaveCB.push({ | 1797 | // $rootScope.structureObjForSaveCB.push({ |
1779 | // "_label": "New Slide", | 1798 | // "_label": "New Slide", |
@@ -2165,6 +2184,270 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -2165,6 +2184,270 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
2165 | } | 2184 | } |
2166 | } | 2185 | } |
2167 | 2186 | ||
2187 | + //Start Code for Update Windows Content for DA, CA, CI, AA, 3D Module to Save CB | ||
2188 | + $scope.windowsContentForSelectedSlide = function (currentId) { | ||
2189 | + var contentWindowsdata = $rootScope.contentNotesForSaveCB; | ||
2190 | + $scope.setWinDataToArray = []; | ||
2191 | + var selectedSlideContent = new jinqJs() | ||
2192 | + .from(contentWindowsdata) | ||
2193 | + .where("_id == " + currentId) | ||
2194 | + .select(); | ||
2195 | + if (selectedSlideContent[0].windows != "") { | ||
2196 | + if (selectedSlideContent != undefined && Array.isArray(selectedSlideContent[0].windows.window)) { | ||
2197 | + for (var i = 0 ; i < selectedSlideContent[0].windows.window.length; i++) { | ||
2198 | + $scope.windowDataforCB = JSON.parse(selectedSlideContent[0].windows.window[i]) | ||
2199 | + $scope.setWinDataToArray.push($scope.windowDataforCB); | ||
2200 | + } | ||
2201 | + //for (var j = 0; j < $scope.setWinDataToArray.length; j++) { | ||
2202 | + // //$scope.updateWindowsContentForSaveCB($scope.setWinDataToArray[j]); | ||
2203 | + //} | ||
2204 | + } | ||
2205 | + else { | ||
2206 | + $scope.windowDataforCB = JSON.parse(selectedSlideContent[0].windows.window) | ||
2207 | + $scope.setWinDataToArray.push($scope.windowDataforCB); | ||
2208 | + } | ||
2209 | + } | ||
2210 | + } | ||
2211 | + | ||
2212 | + $rootScope.updateWindowsContentForSaveCB = function (mType) { | ||
2213 | + //for (var j = 0; j < $scope.setWinDataToArray.length; j++) { | ||
2214 | + switch (mType) { | ||
2215 | + case "MY_PICTURES": | ||
2216 | + $scope.savePicWindowActivity($scope.windowDataforCB); | ||
2217 | + break; | ||
2218 | + case "DISSECTIBLE_ANATOMY": | ||
2219 | + $scope.saveDAWindowActivity($scope.windowDataforCB); | ||
2220 | + break; | ||
2221 | + case "ATLAS_ANATOMY": | ||
2222 | + //$scope.saveAAWindowActivity(singleWindowObj); | ||
2223 | + for (var i = 0; i < $rootScope.AAWindowData.length;) { | ||
2224 | + $scope.setWinDataToArray[j].windowTitle = $rootScope.AAWindowData[i].currentViewTitle; | ||
2225 | + $scope.setWinDataToArray[j].hideAllPins = $rootScope.AAWindowData[i].isHidePinBtnClicked; | ||
2226 | + | ||
2227 | + } | ||
2228 | + | ||
2229 | + break; | ||
2230 | + case "CLINICAL_ILLUSTRATIONS": | ||
2231 | + $scope.saveCIWindowActivity(keyName, val); | ||
2232 | + break; | ||
2233 | + case "CLINICAL_ANIMATIONS": | ||
2234 | + $scope.saveCAWindowActivity($scope.windowDataforCB); | ||
2235 | + break; | ||
2236 | + case "THREE_D_ANATOMY": | ||
2237 | + $scope.save3DWindowActivity($scope.windowDataforCB); | ||
2238 | + break; | ||
2239 | + default: | ||
2240 | + text = "I have never heard of that fruit..."; | ||
2241 | + } | ||
2242 | + } | ||
2243 | + | ||
2244 | + } | ||
2245 | + | ||
2246 | + function findKeyForChange(o, keyname) { | ||
2247 | + var i; | ||
2248 | + for (i in o) { | ||
2249 | + | ||
2250 | + if (o[i] !== null && typeof (o[i]) == "object") { | ||
2251 | + if (o[i]._id == keyname) { | ||
2252 | + $scope.selectedKey = o[i]; | ||
2253 | + } | ||
2254 | + findKeyForChange(o[i], keyname); | ||
2255 | + } | ||
2256 | + //else { | ||
2257 | + // if (i == keyname) { | ||
2258 | + // $scope.selectedKey = i; | ||
2259 | + // } | ||
2260 | + //} | ||
2261 | + } | ||
2262 | + } | ||
2263 | + | ||
2264 | + $rootScope.saveCIWindowActivity = function (keyName, value) { | ||
2265 | + for (var i = 0; i < $scope.setWinDataToArray.length; i++) { | ||
2266 | + $scope.setWinDataToArray[i][keyName] = value; | ||
2267 | + var current_id; | ||
2268 | + if (($rootScope.getLocalStorageValue("cbSelectId")) != '') { | ||
2269 | + current_id = $rootScope.getLocalStorageValue("cbSelectId"); | ||
2270 | + } | ||
2271 | + else { | ||
2272 | + current_id = document.getElementById('cbSelect').value; | ||
2273 | + } | ||
2274 | + findKeyForChange($rootScope.contentNotesForSaveCB, current_id); | ||
2275 | + //var modifiedWindowObj = JSON.parse($scope.selectedKey.windows.window); | ||
2276 | + //modifiedWindowObj.textVisible = value; | ||
2277 | + //$scope.selectedKey.windows.window = modifiedWindowObj; | ||
2278 | + $scope.selectedKey.windows.window = ""; | ||
2279 | + if (keyName != "") { | ||
2280 | + $scope.selectedKey.windows.window = JSON.stringify($scope.setWinDataToArray[i]); | ||
2281 | + } | ||
2282 | + } | ||
2283 | + console.log($rootScope.contentNotesForSaveCB); | ||
2284 | + | ||
2285 | + //$scope.windowDataforCB = { | ||
2286 | + //slideId: currentId,//SlideNo, | ||
2287 | + //currentWindowId: windowId, | ||
2288 | + //mType: windowData.mType, | ||
2289 | + //containsCapturedContent: windowData.containsCapturedContent, | ||
2290 | + | ||
2291 | + //textVisible: checkVisiblity//windowData.textVisible, | ||
2292 | + //anatomyTitle: windowData.currentViewTitle, | ||
2293 | + //horizontalScroll: windowData.scrollPosition.horizontal + 'px', | ||
2294 | + //verticalScroll: windowData.scrollPosition.vertical + 'px', | ||
2295 | + //imageId: windowData.imageId,//N | ||
2296 | + //maximised: windowData.maximised,//Not Found | ||
2297 | + //minimised: windowData.minimised,//Not Found | ||
2298 | + //id: windowData.id, | ||
2299 | + //size: windowData.size, | ||
2300 | + //position: windowData.position, | ||
2301 | + //position: { | ||
2302 | + // top: $rootScope.jsPanelTop, | ||
2303 | + // left: $rootScope.jsPanelLeft, | ||
2304 | + //}, | ||
2305 | + | ||
2306 | + //size: { | ||
2307 | + // width: $rootScope.jsPanelWidth, | ||
2308 | + // height: $rootScope.jsPanelHeight | ||
2309 | + //}, | ||
2310 | + //contextMenu: windowData.contextMenu, | ||
2311 | + //annotationData: windowData.annotationData | ||
2312 | + | ||
2313 | + //}; | ||
2314 | + | ||
2315 | + } | ||
2316 | + | ||
2317 | + $scope.saveAAWindowActivity = function (singleWindowObj) { | ||
2318 | + findKeyForChange($rootScope.contentNotesForSaveCB, current_id); | ||
2319 | + if ($rootScope.AAWindowData.length > 0) { | ||
2320 | + for (var j = 0; j < $scope.setWinDataToArray.length;) { | ||
2321 | + for (var i = 0; i < $rootScope.AAWindowData.length; i++) { | ||
2322 | + j++; | ||
2323 | + if ($scope.setWinDataToArray[j].mType == $rootScope.AAWindowData[i].currentViewTitle) { | ||
2324 | + | ||
2325 | + $scope.setWinDataToArray[j].windowTitle = $rootScope.AAWindowData[i].currentViewTitle; | ||
2326 | + $scope.setWinDataToArray[j].hideAllPins = $rootScope.AAWindowData[i].isHidePinBtnClicked; | ||
2327 | + //$scope.setWinDataToArray[j].selectedCallouts = $rootScope.AAWindowData[i].currentViewTitle; | ||
2328 | + //$scope.setWinDataToArray[j].annotationData = $rootScope.AAWindowData[i].currentViewTitle; | ||
2329 | + //$scope.setWinDataToArray[j].minimised = $rootScope.AAWindowData[i].currentViewTitle; | ||
2330 | + //$scope.setWinDataToArray[j].scrollPosition = $rootScope.AAWindowData[i].currentViewTitle; | ||
2331 | + //$scope.setWinDataToArray[j].selectedStructureID = $rootScope.AAWindowData[i].currentViewTitle; | ||
2332 | + //$scope.setWinDataToArray[j].maximised = $rootScope.AAWindowData[i].currentViewTitle; | ||
2333 | + //$scope.setWinDataToArray[j].size = $rootScope.AAWindowData[i].currentViewTitle; | ||
2334 | + //$scope.setWinDataToArray[j].id = $rootScope.AAWindowData[i].currentViewTitle; | ||
2335 | + //$scope.setWinDataToArray[j].hideCallOuts = $rootScope.AAWindowData[i].currentViewTitle; | ||
2336 | + //$scope.setWinDataToArray[j].scaleIndex = $rootScope.AAWindowData[i].currentViewTitle; | ||
2337 | + //$scope.setWinDataToArray[j].bodySystemId = $rootScope.AAWindowData[i].currentViewTitle; | ||
2338 | + //$scope.setWinDataToArray[j].windowListId = $rootScope.AAWindowData[i].currentViewTitle; | ||
2339 | + //$scope.setWinDataToArray[j].imageId = $rootScope.AAWindowData[i].imageId; | ||
2340 | + //$scope.setWinDataToArray[j].position = $rootScope.AAWindowData[i].currentViewTitle; | ||
2341 | + //$scope.setWinDataToArray[j].mType = $rootScope.AAWindowData[i].currentViewTitle; | ||
2342 | + //$scope.setWinDataToArray[j].containsCapturedContent = $rootScope.AAWindowData[i].currentViewTitle; | ||
2343 | + //$scope.setWinDataToArray[j].selectedPins = $rootScope.AAWindowData[i].currentViewTitle; | ||
2344 | + //$scope.setWinDataToArray[j].contextMenu = $rootScope.AAWindowData[i].currentViewTitle; | ||
2345 | + } | ||
2346 | + | ||
2347 | + } | ||
2348 | + | ||
2349 | + } | ||
2350 | + } | ||
2351 | + | ||
2352 | + } | ||
2353 | + | ||
2354 | + //$scope.saveAAWindowActivity = function (windowObjForSelectedSlide) { | ||
2355 | + // findKeyForChange($rootScope.contentNotesForSaveCB, current_id); | ||
2356 | + // if (windowObjForSelectedSlide.length > 0) { | ||
2357 | + // for (var i = 0; i < windowObjForSelectedSlide.length; i++) { | ||
2358 | + // if ($scope.selectedKey.length > 0) { | ||
2359 | + // for (var j = 0; j < $scope.selectedKey.windows.window.length; j++) { | ||
2360 | + // if (windowObjForSelectedSlide[i].mType == "ATLAS_ANATOMY") {//$scope.selectedKey[j].mType | ||
2361 | + // $scope.selectedKey.windows.window[j] = ""; | ||
2362 | + // $scope.selectedKey.windows.window[j] = windowObjForSelectedSlide[i]; | ||
2363 | + // } | ||
2364 | + // break; | ||
2365 | + // } | ||
2366 | + // } | ||
2367 | + | ||
2368 | + // } | ||
2369 | + // } | ||
2370 | + // $scope.selectedKey.windows.window = ""; | ||
2371 | + //} | ||
2372 | + | ||
2373 | + //$rootScope.updateWindowsContentForSaveCB = function (windowData) { | ||
2374 | + | ||
2375 | + // //findKeyForChange($scope.windowDataforCB, keyname) | ||
2376 | + // //if ($scope.selectedKey.length > 0) { | ||
2377 | + // // for (var x = 0 ; x < $scope.selectedKey.length; x++) { | ||
2378 | + // // if ($scope.selectedKey[x].keyname == keyname) { | ||
2379 | + // // $scope.selectedKey[x][keyname] = value; | ||
2380 | + // // } | ||
2381 | + // // } | ||
2382 | + // //} | ||
2383 | + // //else if ($scope.selectedKey != undefined && $scope.selectedKey != "") { | ||
2384 | + // // $scope.selectedKey = value; | ||
2385 | + // //} | ||
2386 | + | ||
2387 | + // //var windowContent = $scope.windowDataforCB; | ||
2388 | + // //$scope.windowDataforCB = new jinqJs() | ||
2389 | + // // .from(windowContent) | ||
2390 | + // // .update(function (column, index) { | ||
2391 | + // // column[index].keyname = value; | ||
2392 | + // // }) | ||
2393 | + // // .at(column[index].keyname = keyname); | ||
2394 | + | ||
2395 | + // $scope.windowDataforCB.push({ | ||
2396 | + // //slideId: currentId,//SlideNo, | ||
2397 | + // //currentWindowId: windowId, | ||
2398 | + // mType: windowData.mType, | ||
2399 | + // layerNumber: windowData.layerNumber, | ||
2400 | + // currentBodyViewId: windowData.voId, | ||
2401 | + // windowTitle: windowData.currentViewTitle, | ||
2402 | + // skinId: windowData.genderId, | ||
2403 | + // isModestyOn: windowData.isModestyOn, | ||
2404 | + // //size: windowData.size, | ||
2405 | + // //position: windowData.position, | ||
2406 | + // position: { | ||
2407 | + // top: $rootScope.jsPanelTop, | ||
2408 | + // left: $rootScope.jsPanelLeft, | ||
2409 | + // }, | ||
2410 | + | ||
2411 | + // size: { | ||
2412 | + // width: $rootScope.jsPanelWidth, | ||
2413 | + // height: $rootScope.jsPanelHeight | ||
2414 | + // }, | ||
2415 | + // zoom: windowData.zoomInOut, | ||
2416 | + | ||
2417 | + // maximised:windowData.maximised,//Not Found | ||
2418 | + // minimised:windowData.minimised,//Not Found | ||
2419 | + // highlightOptionsSelectedId: windowData.highlightOptionsSelectedId,//Not Found | ||
2420 | + // selectedStructureId: windowData.selectedStructureId,//Not Found | ||
2421 | + // isModuleLoaded: windowData.isModuleLoaded,//N | ||
2422 | + // isTopToolBarVisible: windowData.isTopToolBarVisible,//N | ||
2423 | + // transparencyValue: windowData.transparencyValue,//N | ||
2424 | + // imageId: windowData.imageId,//N | ||
2425 | + // containsCapturedContent: windowData.containsCapturedContent,//N | ||
2426 | + // layerNumberTransparency: windowData.layerNumberTransparency,//N | ||
2427 | + | ||
2428 | + // isTitleBarVisible: windowData.isTitleBarVisible,//N | ||
2429 | + // clickedTermList: windowData.fullTermlist, | ||
2430 | + // isResizeLock: windowData.isResizeLock,//N | ||
2431 | + // mode: windowData.isNormalMode, | ||
2432 | + // isLeftToolBarVisible: windowData.isLeftToolBarVisible,//N | ||
2433 | + // contentDescriptorId: windowData.contentDescriptorId,//6 | ||
2434 | + // bodySystemTermList: windowData.BodySystemData, | ||
2435 | + // isTransparent: windowData.isTransparencyActivated, | ||
2436 | + // windowListId: windowData.windowListId,//25 | ||
2437 | + // canvasVScrollX: windowData.canvasVScrollX,//N | ||
2438 | + // canvasHScrollX: windowData.canvasHScrollX,//N | ||
2439 | + // callOuts: windowData.CurriculumTermData, | ||
2440 | + | ||
2441 | + // isCallOutVisible: windowData.isCallOutVisible,//22 | ||
2442 | + | ||
2443 | + // annotationData: windowData.annotationData,//24 | ||
2444 | + // transparencyBounds: windowData.transparencyBounds | ||
2445 | + | ||
2446 | + // }); | ||
2447 | + | ||
2448 | + //} | ||
2449 | + | ||
2450 | + | ||
2168 | 2451 | ||
2169 | 2452 | ||
2170 | $scope.addSectionForSaveDraft = function (currentid, AddSecionId, parentid) { | 2453 | $scope.addSectionForSaveDraft = function (currentid, AddSecionId, parentid) { |
@@ -2318,6 +2601,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | @@ -2318,6 +2601,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ | ||
2318 | 2601 | ||
2319 | } | 2602 | } |
2320 | 2603 | ||
2604 | + | ||
2605 | + | ||
2321 | 2606 | ||
2322 | }] | 2607 | }] |
2323 | ); | 2608 | ); |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -2474,7 +2474,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -2474,7 +2474,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
2474 | $('#spinner').css('visibility', 'visible'); | 2474 | $('#spinner').css('visibility', 'visible'); |
2475 | $scope.hideSpeechBubble(windowviewid); | 2475 | $scope.hideSpeechBubble(windowviewid); |
2476 | 2476 | ||
2477 | - $scope.SetAAwindowStoreData(windowviewid,'isHidePinBtnClicked',true); | 2477 | + $scope.SetAAwindowStoreData(windowviewid, 'isHidePinBtnClicked', true); |
2478 | + | ||
2478 | var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); | 2479 | var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); |
2479 | angular.forEach(aaPinData, function (aaPinDataValue, aaPinDataKey) { | 2480 | angular.forEach(aaPinData, function (aaPinDataValue, aaPinDataKey) { |
2480 | 2481 | ||
@@ -2503,7 +2504,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -2503,7 +2504,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
2503 | $rootScope.isLoading = true; | 2504 | $rootScope.isLoading = true; |
2504 | $('#spinner').css('visibility', 'visible'); | 2505 | $('#spinner').css('visibility', 'visible'); |
2505 | $scope.SetAAwindowStoreData(windowviewid,'isHidePinBtnClicked',false); | 2506 | $scope.SetAAwindowStoreData(windowviewid,'isHidePinBtnClicked',false); |
2506 | - | 2507 | + //$scope.updateWindowsContentForSaveCB(); |
2507 | var selectedSystemName=$scope.GetAAwindowStoreData(windowviewid,'selectedSystemName'); | 2508 | var selectedSystemName=$scope.GetAAwindowStoreData(windowviewid,'selectedSystemName'); |
2508 | if (selectedSystemName != null && selectedSystemName != undefined) { | 2509 | if (selectedSystemName != null && selectedSystemName != undefined) { |
2509 | var selectedSystemPinData=$scope.GetAAwindowStoreData(windowviewid,'selectedSystemPinData'); | 2510 | var selectedSystemPinData=$scope.GetAAwindowStoreData(windowviewid,'selectedSystemPinData'); |
@@ -2973,7 +2974,11 @@ function hidePins(event) { | @@ -2973,7 +2974,11 @@ function hidePins(event) { | ||
2973 | var rootScope = angular.element(document.getElementById("aaBodyView")).scope(); | 2974 | var rootScope = angular.element(document.getElementById("aaBodyView")).scope(); |
2974 | rootScope.$apply(function () { | 2975 | rootScope.$apply(function () { |
2975 | rootScope.hidePins(windowviewid); | 2976 | rootScope.hidePins(windowviewid); |
2977 | + //Calling for Save CB Window data | ||
2978 | + rootScope.updateWindowsContentForSaveCB(); | ||
2976 | }); | 2979 | }); |
2980 | + | ||
2981 | + | ||
2977 | } | 2982 | } |
2978 | 2983 | ||
2979 | function showAllPins(event) { | 2984 | function showAllPins(event) { |