Commit bb3b288ad5f415be1707538fab951428e4507ab8
1 parent
f5018643
add my picture module for open and save in CB
Showing
10 changed files
with
726 additions
and
316 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -303,52 +303,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
303 | 303 | |
304 | 304 | } |
305 | 305 | |
306 | - $scope.openImagePanel = function () { | |
307 | - | |
308 | - var jsImageURL = 'app/views/CBuild/curriculum-builder-image.html'; | |
309 | - $.jsPanel({ | |
310 | - id: 'CBSourceImagePanel', | |
311 | - selector: '.CBBodyView', | |
312 | - theme: 'success', | |
313 | - currentController: 'CurrBuildController', | |
314 | - parentSlug: 'curriculum-builder-detail', | |
315 | - ajax: { | |
316 | - url: jsImageURL | |
317 | - }, | |
318 | - title: $rootScope.windowstitle, | |
319 | - | |
320 | - position: { | |
321 | - top: 600, | |
322 | - left: 10, | |
323 | - }, | |
324 | - controls: { buttons: 'closeonly' }, | |
325 | - size: { width: 850, height: 503 }, | |
326 | - | |
327 | - }); | |
328 | - | |
329 | - setTimeout(function () { | |
330 | - | |
331 | - $scope.ImagePanelclick(); | |
332 | - var imfgEle = document.getElementById("imgtag"); | |
333 | - if (imfgEle!=null) | |
334 | - imfgEle.src = "data:image/png;base64," + $rootScope.windowsimageSource; | |
335 | - | |
336 | - setTimeout(function () { | |
337 | - var cleintht=imfgEle.clientHeight; | |
338 | - if(cleintht>0) | |
339 | - $('#CBSourceImagePanel .jsPanel-content').css('height', cleintht); | |
340 | - $scope.CBEnableUI(); | |
341 | - }, 200) | |
342 | - | |
343 | - }, 200) | |
344 | - } | |
345 | - | |
346 | - $scope.ImagePanelclick = function () { | |
347 | - $("#CBSourceImagePanel").on('click', function (event) { | |
348 | - var pnlName=event.currentTarget.id; | |
349 | - $scope.$emit("cBEnableDisableMenuOption",pnlName); | |
350 | - }); | |
351 | - } | |
352 | 306 | $rootScope.getCBsummary = function () { |
353 | 307 | $rootScope.summary = $rootScope.cbJsonData.slideshow.content.element[0].summary; |
354 | 308 | $rootScope.AutherName = $rootScope.cbJsonData.slideshow.content.element[0].author; |
... | ... | @@ -504,6 +458,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
504 | 458 | $("#AddSlide").addClass("cbAddSection"); |
505 | 459 | $("#AddSection").addClass("cbAddSection"); |
506 | 460 | $("#openResourceId").removeClass("openResources"); |
461 | + $("#openPictureId").removeClass("OpenPitures"); | |
507 | 462 | |
508 | 463 | } |
509 | 464 | if ($scope.selectedNodeSingleObj._isBranch == "true") { |
... | ... | @@ -512,6 +467,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
512 | 467 | $("#AddSlide").removeClass("cbAddSection"); |
513 | 468 | $("#AddSection").removeClass("cbAddSection"); |
514 | 469 | $("#openResourceId").addClass("openResources"); |
470 | + $("#openPictureId").addClass("OpenPitures"); | |
515 | 471 | } |
516 | 472 | $scope.DropDownSelectNodeClick(nodeid); |
517 | 473 | $scope.SelectedNotes = ""; |
... | ... | @@ -522,8 +478,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
522 | 478 | |
523 | 479 | // clear module data |
524 | 480 | ModuleService.ClearWinData(); |
525 | - $('#CBSourceImagePanel').remove(); | |
526 | - | |
481 | + | |
527 | 482 | $("#viwerSelect").empty(); |
528 | 483 | $("#viwerSelect").hide(); |
529 | 484 | if ($('#cbparentcustomDiv').html() != "") { |
... | ... | @@ -587,7 +542,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
587 | 542 | $rootScope.updatedContentFromEditor(currentCb_id);//Calling for Update Note for Save CB |
588 | 543 | |
589 | 544 | if (isActive) { |
590 | - $scope.updateWindowsContentForSaveCB(currentCb_id);// Calling for Update Window content for Save Cb | |
545 | + $scope.updateWindowsContentForSaveCB(currentCb_id,true);// Calling for Update Window content for Save Cb | |
591 | 546 | } |
592 | 547 | isActive = true; |
593 | 548 | traverseTreeSelectedSingleObj($rootScope.stru, nodeid); |
... | ... | @@ -997,9 +952,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
997 | 952 | else { |
998 | 953 | |
999 | 954 | createNodeId = parentid; |
1000 | - | |
1001 | - //open other modules | |
1002 | - // $scope.loadContentOfSelectedSlide(current_id); | |
1003 | 955 | } |
1004 | 956 | |
1005 | 957 | var AddSlideId = ""; |
... | ... | @@ -1226,7 +1178,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1226 | 1178 | } |
1227 | 1179 | $rootScope.updatedContentFromEditor(cbCurrentId); |
1228 | 1180 | |
1229 | - $scope.updateWindowsContentForSaveCB(cbCurrentId); | |
1181 | + $scope.updateWindowsContentForSaveCB(cbCurrentId,false); | |
1230 | 1182 | |
1231 | 1183 | $rootScope.dynamicUpdatedJsonForSaveCB = |
1232 | 1184 | { |
... | ... | @@ -1658,10 +1610,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1658 | 1610 | |
1659 | 1611 | |
1660 | 1612 | $scope.loadContentOfSelectedSlide = function (id) { |
1661 | - // alert("Id" + id); | |
1662 | 1613 | console.log("id= " + id) |
1663 | - //var content = $rootScope.cbJsonData.slideshow.content.element; | |
1664 | - | |
1665 | 1614 | if ($rootScope.contentNotesForSaveCB.length == 0) { |
1666 | 1615 | $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents; |
1667 | 1616 | } |
... | ... | @@ -1673,143 +1622,99 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1673 | 1622 | .select(); |
1674 | 1623 | // console.log('contenctForSelectedSlide' + contenctForSelectedSlide[0].notes) |
1675 | 1624 | var windowsInSelectedSlide = contenctForSelectedSlide[0].windows; |
1625 | + | |
1676 | 1626 | var allwindowData = windowsInSelectedSlide.window; |
1627 | + if(!Array.isArray(allwindowData)) | |
1628 | + { | |
1629 | + allwindowData=[]; | |
1630 | + allwindowData.push(windowsInSelectedSlide.window); | |
1631 | + } | |
1632 | + | |
1677 | 1633 | var windowData; |
1678 | - var imageSourc; | |
1679 | 1634 | var DawindowId = 0; |
1680 | 1635 | var AtlasWindowId = 0; |
1681 | 1636 | var CIWindowId = 0; |
1682 | 1637 | var CAWindowId = 0; |
1683 | 1638 | var ThreeDWindowId = 0; |
1639 | + var ADAMIMGWindowId = 0; | |
1640 | + var LabWindowId = 0; | |
1641 | + var PicWindowId = 0; | |
1684 | 1642 | |
1685 | 1643 | //check for multiple windows, if Array.isArray==true |
1686 | - if (allwindowData != undefined && Array.isArray(allwindowData)) { | |
1644 | + if (allwindowData != undefined) { | |
1687 | 1645 | for (var i = 0; i < allwindowData.length; i++) { |
1688 | - if (allwindowData[i].indexOf('imageSource') != -1) { | |
1689 | - // var subS = allwindowData[i].substring(allwindowData.indexOf('imageSource'), allwindowData[i].length - 1); | |
1690 | - // var subS1 = allwindowData[i].split('imageSource'); | |
1691 | - // windowData = JSON.parse(subS1[0]); | |
1692 | - // imageSourc = subS1[1]; | |
1693 | - | |
1694 | - | |
1695 | - windowData = JSON.parse(allwindowData[i]) | |
1696 | - | |
1697 | - if (windowData.mType == "MY_PICTURES") { | |
1698 | - $rootScope.windowsimageSource = windowData.imageSource; | |
1699 | - $rootScope.windowstitle = windowData.windowTitle; | |
1700 | - $scope.openImagePanel(); | |
1646 | + windowData = JSON.parse(allwindowData[i]); | |
1647 | + if (windowData.mType == "MY_PICTURES") { | |
1648 | + ModuleService.setModuleData(windowData, PicWindowId); | |
1649 | + PicWindowId = PicWindowId + 1; | |
1650 | + | |
1651 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1652 | + if (isFound == -1) { | |
1653 | + $scope.LoadModuleName.push(windowData.mType); | |
1701 | 1654 | } |
1702 | 1655 | } |
1703 | - else { | |
1704 | - | |
1705 | - windowData = JSON.parse(allwindowData[i]) | |
1656 | + else if (windowData.mType == "DISSECTIBLE_ANATOMY") { | |
1657 | + ModuleService.setModuleData(windowData, DawindowId); | |
1658 | + DawindowId = DawindowId + 1; | |
1706 | 1659 | |
1660 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1661 | + if (isFound == -1) { | |
1662 | + $scope.LoadModuleName.push(windowData.mType); | |
1707 | 1663 | |
1708 | - // **** Use this code when all module complted | |
1709 | - // var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1710 | - // if (isFound == -1) { | |
1711 | - // $scope.LoadModuleName.push(windowData.mType); | |
1712 | - // } | |
1713 | - | |
1714 | - if (windowData.mType == "DISSECTIBLE_ANATOMY") { | |
1715 | - ModuleService.setModuleData(windowData, DawindowId); | |
1716 | - DawindowId = DawindowId + 1; | |
1717 | - | |
1718 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1719 | - if (isFound == -1) { | |
1720 | - $scope.LoadModuleName.push(windowData.mType); | |
1721 | - | |
1722 | - } | |
1723 | - | |
1724 | - } | |
1725 | - else if (windowData.mType == "ATLAS_ANATOMY") { | |
1726 | - ModuleService.setModuleData(windowData, AtlasWindowId); | |
1727 | - AtlasWindowId = AtlasWindowId + 1; | |
1728 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1729 | - if (isFound == -1) { | |
1730 | - $scope.LoadModuleName.push(windowData.mType); | |
1731 | - } | |
1732 | - } | |
1733 | - else if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { | |
1734 | - ModuleService.setModuleData(windowData, CIWindowId); | |
1735 | - CIWindowId = CIWindowId + 1; | |
1736 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1737 | - if (isFound == -1) { | |
1738 | - $scope.LoadModuleName.push(windowData.mType); | |
1739 | - } | |
1740 | - } | |
1741 | - else if (windowData.mType == "CLINICAL_ANIMATIONS") { | |
1742 | - ModuleService.setModuleData(windowData, CAWindowId); | |
1743 | - CAWindowId = CAWindowId + 1; | |
1744 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1745 | - if (isFound == -1) { | |
1746 | - $scope.LoadModuleName.push(windowData.mType); | |
1747 | - } | |
1748 | - } | |
1749 | - else if (windowData.mType == "THREE_D_ANATOMY") { | |
1750 | - ModuleService.setModuleData(windowData, ThreeDWindowId); | |
1751 | - ThreeDWindowId = ThreeDWindowId + 1; | |
1752 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1753 | - if (isFound == -1) { | |
1754 | - $scope.LoadModuleName.push(windowData.mType); | |
1755 | - } | |
1756 | 1664 | } |
1757 | 1665 | |
1758 | 1666 | } |
1759 | - } | |
1760 | - } | |
1761 | - else { | |
1762 | - // single window | |
1763 | - windowData = JSON.parse(allwindowData); | |
1764 | - | |
1765 | - if (windowData.mType == "MY_PICTURES") { | |
1766 | - $rootScope.windowsimageSource = windowData.imageSource; | |
1767 | - $rootScope.windowstitle = windowData.windowTitle; | |
1768 | - $scope.openImagePanel(); | |
1769 | - | |
1770 | - } | |
1771 | - else if (windowData.mType == "DISSECTIBLE_ANATOMY") { | |
1772 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1773 | - if (isFound == -1) { | |
1774 | - $scope.LoadModuleName.push(windowData.mType); | |
1667 | + else if (windowData.mType == "ATLAS_ANATOMY") { | |
1668 | + ModuleService.setModuleData(windowData, AtlasWindowId); | |
1669 | + AtlasWindowId = AtlasWindowId + 1; | |
1670 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1671 | + if (isFound == -1) { | |
1672 | + $scope.LoadModuleName.push(windowData.mType); | |
1673 | + } | |
1775 | 1674 | } |
1776 | - | |
1777 | - ModuleService.setModuleData(windowData, DawindowId); | |
1778 | - } | |
1779 | - else if (windowData.mType == "ATLAS_ANATOMY") { | |
1780 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1781 | - if (isFound == -1) { | |
1782 | - $scope.LoadModuleName.push(windowData.mType); | |
1675 | + else if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { | |
1676 | + ModuleService.setModuleData(windowData, CIWindowId); | |
1677 | + CIWindowId = CIWindowId + 1; | |
1678 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1679 | + if (isFound == -1) { | |
1680 | + $scope.LoadModuleName.push(windowData.mType); | |
1681 | + } | |
1783 | 1682 | } |
1784 | - ModuleService.setModuleData(windowData, AtlasWindowId); | |
1785 | - } | |
1786 | - else if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { | |
1787 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1788 | - if (isFound == -1) { | |
1789 | - $scope.LoadModuleName.push(windowData.mType); | |
1683 | + else if (windowData.mType == "CLINICAL_ANIMATIONS") { | |
1684 | + ModuleService.setModuleData(windowData, CAWindowId); | |
1685 | + CAWindowId = CAWindowId + 1; | |
1686 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1687 | + if (isFound == -1) { | |
1688 | + $scope.LoadModuleName.push(windowData.mType); | |
1689 | + } | |
1790 | 1690 | } |
1791 | - ModuleService.setModuleData(windowData, CIWindowId); | |
1792 | - | |
1793 | - } | |
1794 | - else if (windowData.mType == "CLINICAL_ANIMATIONS") { | |
1795 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1796 | - if (isFound == -1) { | |
1797 | - $scope.LoadModuleName.push(windowData.mType); | |
1691 | + else if (windowData.mType == "THREE_D_ANATOMY") { | |
1692 | + ModuleService.setModuleData(windowData, ThreeDWindowId); | |
1693 | + ThreeDWindowId = ThreeDWindowId + 1; | |
1694 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1695 | + if (isFound == -1) { | |
1696 | + $scope.LoadModuleName.push(windowData.mType); | |
1697 | + } | |
1798 | 1698 | } |
1799 | - ModuleService.setModuleData(windowData, CAWindowId); | |
1800 | - | |
1801 | - } | |
1802 | - else if (windowData.mType == "THREE_D_ANATOMY") { | |
1803 | - var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1804 | - if (isFound == -1) { | |
1805 | - $scope.LoadModuleName.push(windowData.mType); | |
1699 | + else if (windowData.mType == "ADAM_IMAGES") { | |
1700 | + ModuleService.setModuleData(windowData, ADAMIMGWindowId); | |
1701 | + ADAMIMGWindowId = ADAMIMGWindowId + 1; | |
1702 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1703 | + if (isFound == -1) { | |
1704 | + $scope.LoadModuleName.push(windowData.mType); | |
1705 | + } | |
1706 | + } | |
1707 | + else if (windowData.mType == "LAB_EXERCISE") { | |
1708 | + ModuleService.setModuleData(windowData, LabWindowId); | |
1709 | + LabWindowId = LabWindowId + 1; | |
1710 | + var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) | |
1711 | + if (isFound == -1) { | |
1712 | + $scope.LoadModuleName.push(windowData.mType); | |
1713 | + } | |
1806 | 1714 | } |
1807 | - ModuleService.setModuleData(windowData, ThreeDWindowId); | |
1808 | - | |
1809 | 1715 | } |
1810 | - | |
1811 | 1716 | } |
1812 | - | |
1717 | + | |
1813 | 1718 | // intially call module at index 0 |
1814 | 1719 | $scope.$emit("LoadModuleComplete", ""); |
1815 | 1720 | |
... | ... | @@ -1890,10 +1795,35 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1890 | 1795 | case "LAB_EXERCISE": |
1891 | 1796 | $scope.loadLabExerciseModule(moduleName); |
1892 | 1797 | break; |
1798 | + case "MY_PICTURES": | |
1799 | + $scope.loadMyPictureModule(moduleName); | |
1800 | + break; | |
1893 | 1801 | } |
1894 | 1802 | |
1895 | 1803 | } |
1896 | 1804 | |
1805 | + $scope.loadMyPictureModule = function (moduleName) { | |
1806 | + | |
1807 | + var picData = ModuleService.getModuleData(moduleName); | |
1808 | + | |
1809 | + if (picData != undefined && picData.length > 0) { | |
1810 | + $rootScope.isCallFromOtherModule = true; | |
1811 | + | |
1812 | + var picSectionExist = document.getElementById('picCustomModuleDiv'); | |
1813 | + | |
1814 | + if (picSectionExist == null) { | |
1815 | + $('#cbparentcustomDiv').append($('<div id="picCustomModuleDiv"></div>')); | |
1816 | + $e = $('#picCustomModuleDiv').append("<my-picture-directive></my-picture-directive>"); | |
1817 | + $compile($e)($scope); | |
1818 | + } | |
1819 | + else { | |
1820 | + // open lab panel on same slide by open resource | |
1821 | + $rootScope.OpenMyPictureViewMain(); | |
1822 | + } | |
1823 | + | |
1824 | + } | |
1825 | + } | |
1826 | + | |
1897 | 1827 | $scope.loadLabExerciseModule = function (moduleName) { |
1898 | 1828 | |
1899 | 1829 | var labData = ModuleService.getModuleData(moduleName); |
... | ... | @@ -2196,7 +2126,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2196 | 2126 | } |
2197 | 2127 | |
2198 | 2128 | //Save DISSECTIBLE_ANATOMY activity for CB |
2199 | - $scope.saveCIWindowActivity = function (currentId) { | |
2129 | + $scope.saveCIWindowActivity = function (isNotSaved) { | |
2200 | 2130 | if ($rootScope.CIWindowData != undefined && $rootScope.CIWindowData.length > 0 ) { |
2201 | 2131 | for (var i = 0; i < $rootScope.CIWindowData.length; i++) { |
2202 | 2132 | $scope.updatedWindowListForSaveCB.push({ |
... | ... | @@ -2224,13 +2154,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2224 | 2154 | }); |
2225 | 2155 | |
2226 | 2156 | } |
2157 | + if(isNotSaved) | |
2227 | 2158 | $rootScope.CIWindowData = []; |
2228 | 2159 | } |
2229 | 2160 | |
2230 | 2161 | } |
2231 | 2162 | |
2232 | 2163 | //Save CLINICAL_ANIMATIONS activity for CB |
2233 | - $scope.saveCAWindowActivity = function (currentId) { | |
2164 | + $scope.saveCAWindowActivity = function (isNotSaved) { | |
2234 | 2165 | if ($rootScope.CAWindowData != undefined && $rootScope.CAWindowData.length > 0) { |
2235 | 2166 | for (var i = 0; i < $rootScope.CAWindowData.length; i++) { |
2236 | 2167 | $scope.updatedWindowListForSaveCB.push({ |
... | ... | @@ -2258,12 +2189,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2258 | 2189 | }); |
2259 | 2190 | |
2260 | 2191 | } |
2192 | + if(isNotSaved) | |
2261 | 2193 | $rootScope.CAWindowData = []; |
2262 | 2194 | } |
2263 | 2195 | } |
2264 | 2196 | |
2265 | 2197 | //Save THREE_D_ANATOMY activity for CB |
2266 | - $scope.save3DWindowActivity = function (currentId) { | |
2198 | + $scope.save3DWindowActivity = function (isNotSaved) { | |
2267 | 2199 | if ($rootScope.TheeDWindowData != undefined && $rootScope.TheeDWindowData.length > 0) { |
2268 | 2200 | for (var i = 0; i < $rootScope.TheeDWindowData.length; i++) { |
2269 | 2201 | $scope.updatedWindowListForSaveCB.push({ |
... | ... | @@ -2293,44 +2225,46 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2293 | 2225 | |
2294 | 2226 | }); |
2295 | 2227 | } |
2228 | + if(isNotSaved) | |
2296 | 2229 | $rootScope.TheeDWindowData = []; |
2297 | 2230 | } |
2298 | 2231 | } |
2299 | 2232 | |
2300 | 2233 | //Save MY_PICTURES activity for CB |
2301 | - $scope.saveMyPictureWindowActivity = function (currentId) { | |
2302 | - // if ($rootScope.TheeDWindowData != undefined && $rootScope.TheeDWindowData.length > 0) { | |
2303 | - for (var i = 0; i < $rootScope.TheeDWindowData.length; i++) { | |
2234 | + $scope.saveMyPictureWindowActivity = function (isNotSaved) { | |
2235 | + for (var i = 0; i < $rootScope.PICWindowData.length; i++) { | |
2304 | 2236 | $scope.updatedWindowListForSaveCB.push({ |
2305 | - | |
2306 | - containsCapturedContent: true,//$rootScope.TheeDWindowData[i] // N | |
2307 | - //annotationData: "",//$rootScope.TheeDWindowData[i] N | |
2237 | + | |
2238 | + containsCapturedContent: true, | |
2239 | + annotationData: $rootScope.PICWindowData[i].annotationData, | |
2308 | 2240 | contextMenu: { lockResize: true, hideTitleBar: true }, |
2309 | 2241 | position: { |
2310 | - top: $rootScope.TheeDWindowData[i].top, | |
2311 | - left: $rootScope.TheeDWindowData[i].left, | |
2242 | + top: $rootScope.PICWindowData[i].top, | |
2243 | + left: $rootScope.PICWindowData[i].left, | |
2312 | 2244 | }, |
2313 | 2245 | size: { |
2314 | - height: $rootScope.TheeDWindowData[i].height, | |
2315 | - width: $rootScope.TheeDWindowData[i].width | |
2246 | + height: $rootScope.PICWindowData[i].height, | |
2247 | + width: $rootScope.PICWindowData[i].width | |
2316 | 2248 | }, |
2317 | - imageId: $rootScope.TheeDWindowData[i].imageId, | |
2318 | - minimised: $rootScope.TheeDWindowData[i].minimised, | |
2319 | - windowTitle: $rootScope.TheeDWindowData[i].currentViewTitle, | |
2320 | - maximised: $rootScope.TheeDWindowData[i].maximised, | |
2321 | - mType: $rootScope.TheeDWindowData[i].moduleName, | |
2322 | - id: $rootScope.TheeDWindowData[i].imageId, | |
2323 | - windowListId: 0, //$rootScope.TheeDWindowData[i] // N | |
2249 | + imageId: $rootScope.PICWindowData[i].imageId, | |
2250 | + minimised: $rootScope.PICWindowData[i].minimised, | |
2251 | + windowTitle: $rootScope.PICWindowData[i].currentViewTitle, | |
2252 | + maximised: $rootScope.PICWindowData[i].maximised, | |
2253 | + mType: $rootScope.PICWindowData[i].moduleName, | |
2254 | + id: $rootScope.PICWindowData[i].imageId, | |
2255 | + windowListId: 0, | |
2324 | 2256 | scrollPosition: { vertical: 0, horizontal: 0 }, |
2325 | - imageSource: "" | |
2257 | + imageSource: $rootScope.PICWindowData[i].imageSource | |
2326 | 2258 | }); |
2259 | + | |
2327 | 2260 | } |
2328 | - //$rootScope.TheeDWindowData = []; | |
2329 | - //} | |
2261 | + if(isNotSaved) | |
2262 | + $rootScope.PICWindowData = []; | |
2263 | + | |
2330 | 2264 | } |
2331 | 2265 | |
2332 | 2266 | //Save ATLAS_ANATOMY activity for CB |
2333 | - $scope.saveAAWindowActivity = function () { | |
2267 | + $scope.saveAAWindowActivity = function (isNotSaved) { | |
2334 | 2268 | |
2335 | 2269 | if ($rootScope.AAWindowData != undefined && $rootScope.AAWindowData.length > 0) { |
2336 | 2270 | for (var i = 0; i < $rootScope.AAWindowData.length; i++) { |
... | ... | @@ -2376,12 +2310,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2376 | 2310 | |
2377 | 2311 | }); |
2378 | 2312 | } |
2313 | + if(isNotSaved) | |
2379 | 2314 | $rootScope.AAWindowData = []; |
2380 | 2315 | } |
2381 | 2316 | } |
2382 | 2317 | |
2383 | 2318 | //Save DISSECTIBLE_ANATOMY activity for CB |
2384 | - $scope.saveDAWindowActivity = function () { | |
2319 | + $scope.saveDAWindowActivity = function (isNotSaved) { | |
2385 | 2320 | |
2386 | 2321 | if ($rootScope.DaWindowData != undefined && $rootScope.DaWindowData.length > 0) { |
2387 | 2322 | for (var i = 0; i < $rootScope.DaWindowData.length; i++) { |
... | ... | @@ -2448,20 +2383,19 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2448 | 2383 | |
2449 | 2384 | }); |
2450 | 2385 | } |
2386 | + if(isNotSaved) | |
2451 | 2387 | $rootScope.DaWindowData = []; |
2452 | 2388 | } |
2453 | 2389 | } |
2454 | 2390 | |
2455 | - $scope.updateWindowsContentForSaveCB = function (currentId) { | |
2456 | - | |
2457 | - $scope.saveDAWindowActivity(currentId); | |
2458 | - $scope.saveAAWindowActivity(currentId); | |
2459 | - $scope.saveCIWindowActivity(currentId); | |
2460 | - $scope.saveCAWindowActivity(currentId); | |
2461 | - $scope.save3DWindowActivity(currentId); | |
2462 | - | |
2463 | - //$scope.savePicWindowActivity($scope.windowDataforCB); | |
2464 | - //if ($scope.updatedWindowListForSaveCB.length > 0) { | |
2391 | + $scope.updateWindowsContentForSaveCB = function (currentId,isNotSaved) { | |
2392 | + $scope.saveMyPictureWindowActivity(isNotSaved); | |
2393 | + $scope.saveDAWindowActivity(isNotSaved); | |
2394 | + $scope.saveAAWindowActivity(isNotSaved); | |
2395 | + $scope.saveCIWindowActivity(isNotSaved); | |
2396 | + $scope.saveCAWindowActivity(isNotSaved); | |
2397 | + $scope.save3DWindowActivity(isNotSaved); | |
2398 | + | |
2465 | 2399 | findKeyForChange($rootScope.contentNotesForSaveCB, currentId); |
2466 | 2400 | $scope.selectedKey.windows.window = []; |
2467 | 2401 | if ($scope.updatedWindowListForSaveCB.length > 0) { |
... | ... | @@ -2473,7 +2407,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2473 | 2407 | |
2474 | 2408 | } |
2475 | 2409 | } |
2476 | - //} | |
2477 | 2410 | $scope.updatedWindowListForSaveCB = []; |
2478 | 2411 | console.log($rootScope.contentNotesForSaveCB); |
2479 | 2412 | } |
... | ... | @@ -2482,6 +2415,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2482 | 2415 | $scope.loadResourceOnCurrentSlide = function (newWindowData) { |
2483 | 2416 | |
2484 | 2417 | var newwindowNo = 0; |
2418 | + $scope.LoadModuleName=[]; | |
2485 | 2419 | |
2486 | 2420 | var ExistData = ModuleService.getModuleData(newWindowData.mType); |
2487 | 2421 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -109,6 +109,74 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
109 | 109 | var isfilloptionChecked = ""; |
110 | 110 | var isOutlineOptionChecked = ""; |
111 | 111 | |
112 | + $rootScope.OpenMyPicture = function () { | |
113 | + $rootScope.CloseListManager(); | |
114 | + $rootScope.CloseAnnotationTool(); | |
115 | + | |
116 | + // close list if opened in DA | |
117 | + var searchedTermListPopUp = $("#HomeContainerDiv").find("div[id*='searchedTermListPopUp']"); | |
118 | + for (var i = 0 ; i < searchedTermListPopUp.length; i++) { | |
119 | + var windowviewid = (searchedTermListPopUp[i].id).split('_')[1]; | |
120 | + $('#searchedTermListPopUp_' + windowviewid).css('display', 'none'); | |
121 | + $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden"); | |
122 | + $('#searchTermListUl_' + windowviewid).empty(); | |
123 | + } | |
124 | + | |
125 | + var fileupload = document.getElementById("myPictureFile"); | |
126 | + $timeout(function () { | |
127 | + $(fileupload).trigger('click'); | |
128 | + }, 300); | |
129 | + | |
130 | + $(fileupload).val('');//old file path | |
131 | + fileupload.onchange = function (e) { | |
132 | + | |
133 | + var fileId, file, objFileRead; | |
134 | + if (typeof window.FileReader !== 'function') { | |
135 | + alert("The file API isn't supported on this browser yet."); | |
136 | + return; | |
137 | + } | |
138 | + fileId = document.getElementById('myPictureFile'); | |
139 | + if (!fileId) { | |
140 | + alert("File couldn't find the element."); | |
141 | + } | |
142 | + else if (!fileId.files) { | |
143 | + alert("This browser doesn't seem to support the `files` property of file inputs."); | |
144 | + } | |
145 | + else if (!fileId.files[0]) { | |
146 | + alert("Please select a file before clicking 'Load'"); | |
147 | + } | |
148 | + else { | |
149 | + file = fileId.files[0]; | |
150 | + var extension = file.name.split(".")[1]; | |
151 | + if (extension == "jpg" || extension == "jpeg" || extension == "png") { | |
152 | + | |
153 | + var reader = new FileReader(); | |
154 | + reader.onloadend = function () { | |
155 | + | |
156 | + //set default module data | |
157 | + var PicOpenData = { | |
158 | + "mType": 'MY_PICTURES', | |
159 | + "imageSource":reader.result, | |
160 | + "windowTitle": file.name.split(".")[0], | |
161 | + "size": { height: 500, width: 800 } | |
162 | + }; | |
163 | + AIAModuleOpenResourceInfo(PicOpenData); | |
164 | + | |
165 | + } | |
166 | + if (file) { | |
167 | + reader.readAsDataURL(file); | |
168 | + } | |
169 | + } | |
170 | + else | |
171 | + { | |
172 | + alert("Please select a file format type jpg/jpeg or png"); | |
173 | + } | |
174 | + | |
175 | + } | |
176 | + }; | |
177 | + | |
178 | + } | |
179 | + | |
112 | 180 | $rootScope.openResource = function () { |
113 | 181 | |
114 | 182 | $rootScope.CloseListManager(); |
... | ... | @@ -261,9 +329,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
261 | 329 | |
262 | 330 | $scope.AIAModuleOpenResourceInfo = function (newWindowData) |
263 | 331 | { |
264 | - $timeout(function () { | |
332 | + $timeout(function () { | |
265 | 333 | if(newWindowData.mType=="cbFileData") |
266 | - { | |
334 | + { // when override exist cb | |
267 | 335 | $rootScope.isCallFromOtherModule = false; |
268 | 336 | sessionStorage.setItem("ExitsCBFileDetail", JSON.stringify(newWindowData)); |
269 | 337 | $location.url('/curriculum-builder'); |
... | ... | @@ -288,12 +356,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
288 | 356 | |
289 | 357 | ModuleService.setModuleData(newWindowData, newwindowNo); |
290 | 358 | } |
291 | - | |
292 | - if ($location.url() == "/curriculum-builder") { | |
293 | - | |
294 | - // open exist cb here | |
295 | - } | |
296 | - else if ($location.url() == "/curriculum-builder-detail") { | |
359 | + | |
360 | + if ($location.url() == "/curriculum-builder-detail") { | |
297 | 361 | |
298 | 362 | window.parent.AIAModuleOpenResoureInCB(newWindowData); |
299 | 363 | } |
... | ... | @@ -424,6 +488,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
424 | 488 | } |
425 | 489 | |
426 | 490 | break; |
491 | + case "MY_PICTURES": | |
492 | + var picSectionExist = document.getElementById('picCustomModuleDiv'); | |
493 | + | |
494 | + if (picSectionExist == null ||picSectionExist==undefined) { | |
495 | + $(BasemoduleDivId).append($('<div id="picCustomModuleDiv"></div>')); | |
496 | + var html = $('#picCustomModuleDiv').append("<my-picture-directive></my-picture-directive>"); | |
497 | + $compile(html)($scope); | |
498 | + } | |
499 | + else { | |
500 | + // open another picture | |
501 | + $rootScope.OpenMyPictureViewMain(); | |
502 | + } | |
503 | + | |
504 | + break; | |
427 | 505 | } |
428 | 506 | } |
429 | 507 | |
... | ... | @@ -1696,7 +1774,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1696 | 1774 | $("#labExPdfOption").addClass("disableSubMenu"); |
1697 | 1775 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1698 | 1776 | $("#openResourceId").removeClass("openResources"); |
1699 | - $rootScope.OpenPitures = "OpenPitures"; | |
1777 | + $("#openPictureId").removeClass("OpenPitures"); | |
1700 | 1778 | $rootScope.disableMenuoption = "disableMenuoption"; |
1701 | 1779 | $rootScope.newCurriculum = "newCurriculum"; |
1702 | 1780 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1716,7 +1794,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1716 | 1794 | $("#optiontSetting").addClass("disableSubMenu"); |
1717 | 1795 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1718 | 1796 | $("#openResourceId").removeClass("openResources"); |
1719 | - $rootScope.OpenPitures = "OpenPitures"; | |
1797 | + $("#openPictureId").removeClass("OpenPitures"); | |
1720 | 1798 | $rootScope.disableMenuoption = "disableMenuoption"; |
1721 | 1799 | $rootScope.newCurriculum = "newCurriculum"; |
1722 | 1800 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1734,7 +1812,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1734 | 1812 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); |
1735 | 1813 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1736 | 1814 | $("#openResourceId").removeClass("openResources"); |
1737 | - $rootScope.OpenPitures = "OpenPitures"; | |
1815 | + $("#openPictureId").removeClass("OpenPitures"); | |
1738 | 1816 | $rootScope.disableMenuoption = "disableMenuoption"; |
1739 | 1817 | $rootScope.newCurriculum = "newCurriculum"; |
1740 | 1818 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1752,7 +1830,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1752 | 1830 | $("#optionsListManagerTab").addClass("disableSubMenu"); |
1753 | 1831 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1754 | 1832 | $("#openResourceId").removeClass("openResources"); |
1755 | - $rootScope.OpenPitures = "OpenPitures"; | |
1833 | + $("#openPictureId").removeClass("OpenPitures"); | |
1756 | 1834 | $rootScope.disableMenuoption = "disableMenuoption"; |
1757 | 1835 | $rootScope.newCurriculum = "newCurriculum"; |
1758 | 1836 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1774,7 +1852,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1774 | 1852 | $rootScope.saveCurriculam = "saveCurriculam"; |
1775 | 1853 | |
1776 | 1854 | $("#labExPdfOption").addClass("disableSubMenu"); |
1777 | - $rootScope.OpenPitures = "OpenPitures"; | |
1855 | + $("#openPictureId").addClass("OpenPitures"); | |
1778 | 1856 | $rootScope.disableMenuoption = "disableMenuoption"; |
1779 | 1857 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1780 | 1858 | $rootScope.exportImage = "exportImage"; |
... | ... | @@ -1788,7 +1866,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1788 | 1866 | $rootScope.openCurriculum = ""; |
1789 | 1867 | $rootScope.saveCurriculam = ""; |
1790 | 1868 | $("#openResourceId").removeClass("openResources"); |
1791 | - $rootScope.OpenPitures = "OpenPitures"; | |
1869 | + $("#openPictureId").removeClass("OpenPitures"); | |
1870 | + | |
1792 | 1871 | $rootScope.disableMenuoption = "disableMenuoption"; |
1793 | 1872 | $rootScope.exportImage = "exportImage"; |
1794 | 1873 | } |
... | ... | @@ -1801,7 +1880,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1801 | 1880 | $("#optiontSetting").addClass("disableSubMenu"); |
1802 | 1881 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1803 | 1882 | $("#openResourceId").removeClass("openResources"); |
1804 | - $rootScope.OpenPitures = "OpenPitures"; | |
1883 | + $("#openPictureId").removeClass("OpenPitures"); | |
1805 | 1884 | $rootScope.disableMenuoption = "disableMenuoption"; |
1806 | 1885 | $rootScope.newCurriculum = "newCurriculum"; |
1807 | 1886 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1819,7 +1898,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1819 | 1898 | $("#optionsListManagerTab").addClass("disableSubMenu"); |
1820 | 1899 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1821 | 1900 | $("#openResourceId").removeClass("openResources"); |
1822 | - $rootScope.OpenPitures = "OpenPitures"; | |
1901 | + $("#openPictureId").removeClass("OpenPitures"); | |
1823 | 1902 | $rootScope.disableMenuoption = "disableMenuoption"; |
1824 | 1903 | $rootScope.newCurriculum = "newCurriculum"; |
1825 | 1904 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1836,7 +1915,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1836 | 1915 | $("#optionsListManagerTab").addClass("disableSubMenu"); |
1837 | 1916 | $("#fileMenuAnchor").removeClass("disableFileMenu"); |
1838 | 1917 | $("#openResourceId").removeClass("openResources"); |
1839 | - $rootScope.OpenPitures = "OpenPitures"; | |
1918 | + $("#openPictureId").removeClass("OpenPitures"); | |
1840 | 1919 | $rootScope.disableMenuoption = "disableMenuoption"; |
1841 | 1920 | $rootScope.newCurriculum = "newCurriculum"; |
1842 | 1921 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1942,6 +2021,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1942 | 2021 | $("#Menuoptionid").removeClass("disableMenuoption"); |
1943 | 2022 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); |
1944 | 2023 | } |
2024 | + else if(paneld.match('picImagePanel')) | |
2025 | + { | |
2026 | + $("#annotationButton").removeClass("disableMenuoption"); | |
2027 | + $("#Menuoptionid").removeClass("disableMenuoption"); | |
2028 | + $("#annotationToolBarOptions").removeClass("disableSubMenu"); | |
2029 | + } | |
1945 | 2030 | else if(paneld.match('ciImagePanel')) |
1946 | 2031 | { |
1947 | 2032 | $("#annotationButton").removeClass("disableMenuoption"); |
... | ... | @@ -1968,7 +2053,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1968 | 2053 | $rootScope.resetMenuOption = function () { |
1969 | 2054 | $timeout(function () { |
1970 | 2055 | $rootScope.disableTopMenuOption(); |
1971 | - //if ($location.url() != "/curriculum-builder-detail") { | |
1972 | 2056 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); |
1973 | 2057 | if (modulePanel != undefined && modulePanel.length>0) { |
1974 | 2058 | for (var index = 0 ; index < modulePanel.length; index++) { |
... | ... | @@ -1976,19 +2060,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1976 | 2060 | $rootScope.enableTopMenuOption(paneld); |
1977 | 2061 | } |
1978 | 2062 | } |
1979 | - | |
1980 | - // } | |
2063 | + | |
1981 | 2064 | }, 500); |
1982 | 2065 | } |
1983 | 2066 | |
1984 | 2067 | // enable/disable option Panel click |
1985 | - $rootScope.resetMenuOptionOnClick = function (moduleName) { | |
1986 | - //if ($location.url() != "/curriculum-builder-detail") { | |
1987 | - $rootScope.disableTopMenuOption(); | |
2068 | + $rootScope.resetMenuOptionOnClick = function (moduleName) { | |
2069 | + $rootScope.disableTopMenuOption(); | |
2070 | + $rootScope.enableTopMenuOption(moduleName); | |
1988 | 2071 | |
1989 | - $rootScope.enableTopMenuOption(moduleName); | |
1990 | - // } | |
1991 | - | |
1992 | 2072 | } |
1993 | 2073 | |
1994 | 2074 | // CB: reset panel top position when if any module closed |
... | ... | @@ -2000,10 +2080,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2000 | 2080 | |
2001 | 2081 | firsttopPosition = 680; |
2002 | 2082 | } |
2003 | - // if ($location.url() != "/curriculum-builder-detail") { | |
2004 | - $rootScope.disableTopMenuOption(); | |
2005 | - // } | |
2006 | - | |
2083 | + $rootScope.disableTopMenuOption(); | |
2084 | + | |
2007 | 2085 | var moduleImagePanel = $("div[id*='ImagePanel']"); |
2008 | 2086 | |
2009 | 2087 | if (moduleImagePanel.length > 0) { |
... | ... | @@ -2024,20 +2102,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2024 | 2102 | } |
2025 | 2103 | |
2026 | 2104 | //Reset menu option like list manager,annotation when close module |
2027 | - | |
2028 | - // if ($location.url() != "/curriculum-builder-detail") { | |
2029 | - var moduleName = moduleImagePanel[index].id; | |
2030 | - $rootScope.enableTopMenuOption(moduleName); | |
2031 | - // } | |
2032 | - | |
2105 | + var moduleName = moduleImagePanel[index].id; | |
2106 | + $rootScope.enableTopMenuOption(moduleName); | |
2107 | + | |
2033 | 2108 | } |
2034 | 2109 | } |
2035 | - | |
2036 | - //if ($location.url() != "/curriculum-builder-detail") { | |
2110 | + | |
2037 | 2111 | // list manger already open then refresh it or close |
2038 | 2112 | $scope.updateListManagerView(panelName); |
2039 | - // } | |
2040 | - | |
2113 | + | |
2041 | 2114 | }, 500); |
2042 | 2115 | |
2043 | 2116 | } |
... | ... | @@ -2172,18 +2245,17 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2172 | 2245 | if (modulePanel != undefined && modulePanel.length>0) { |
2173 | 2246 | for (var index = 0 ; index < modulePanel.length; index++) { |
2174 | 2247 | var paneld = modulePanel[index].id; |
2175 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2248 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2176 | 2249 | { |
2177 | 2250 | var len = (paneld).split("_").length; |
2178 | 2251 | var MultiWinId = (paneld).split("_")[len - 1]; |
2179 | 2252 | var PanelElement= $scope.GetPanelElement(paneld); |
2180 | 2253 | |
2181 | - var canvasPaintElement = PanelElement.canvasPaintElement; | |
2182 | - if (canvasPaintElement == undefined) continue; | |
2254 | + var canvasElement = PanelElement.canvasElement; | |
2255 | + if (canvasElement == undefined) continue; | |
2183 | 2256 | |
2184 | - $scope.onDrawingCanvasOnModule(PanelElement.canvasElement); | |
2257 | + $scope.onDrawingCanvasOnModule(canvasElement); | |
2185 | 2258 | |
2186 | - var canvasPaintId = canvasPaintElement.id; | |
2187 | 2259 | $rootScope.isAnnotatiomToolBarPopupActive = true; |
2188 | 2260 | $rootScope.isAnnotatiomToolBarPopupClosed = false; |
2189 | 2261 | $rootScope.isAnnotaionToolBarDrawingModeActive = false; |
... | ... | @@ -2241,14 +2313,16 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2241 | 2313 | else if(paneld.match("ciImagePanel")) |
2242 | 2314 | { |
2243 | 2315 | $rootScope.ciAnnotationToolEvent(MultiWinId); |
2244 | - // $scope.loadpaintonshow(canvasPaintId); | |
2245 | - | |
2246 | 2316 | |
2247 | 2317 | } |
2248 | 2318 | else if(paneld.match("aiImagePanel")) |
2249 | 2319 | { |
2250 | 2320 | $rootScope.aiAnnotationToolEvent(MultiWinId); |
2251 | 2321 | } |
2322 | + else if(paneld.match("picImagePanel")) | |
2323 | + { | |
2324 | + $rootScope.picAnnotationToolEvent(MultiWinId); | |
2325 | + } | |
2252 | 2326 | |
2253 | 2327 | } |
2254 | 2328 | } |
... | ... | @@ -2299,11 +2373,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2299 | 2373 | if (modulePanel != undefined && modulePanel.length>0) { |
2300 | 2374 | for (var index = 0 ; index < modulePanel.length; index++) { |
2301 | 2375 | var paneld = modulePanel[index].id; |
2302 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2376 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2303 | 2377 | { |
2304 | 2378 | var len = (paneld).split("_").length; |
2305 | 2379 | var MultiWinId = (paneld).split("_")[len - 1]; |
2306 | - | |
2380 | + | |
2307 | 2381 | if (paneld.match("daImagePanel")) { |
2308 | 2382 | if ($("#transparencyScale_" + MultiWinId).css("display") == "block") { |
2309 | 2383 | |
... | ... | @@ -2387,7 +2461,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2387 | 2461 | if (modulePanel != undefined && modulePanel.length>0) { |
2388 | 2462 | for (var index = 0 ; index < modulePanel.length; index++) { |
2389 | 2463 | var paneld = modulePanel[index].id; |
2390 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2464 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2391 | 2465 | { |
2392 | 2466 | var len = (paneld).split("_").length; |
2393 | 2467 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -2561,7 +2635,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2561 | 2635 | if (modulePanel != undefined && modulePanel.length>0) { |
2562 | 2636 | for (var index = 0 ; index < modulePanel.length; index++) { |
2563 | 2637 | var paneld = modulePanel[index].id; |
2564 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2638 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2565 | 2639 | { |
2566 | 2640 | $rootScope.switchCanvas(paneld); |
2567 | 2641 | if(paneld.match("AAImagePanel")) |
... | ... | @@ -2632,7 +2706,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2632 | 2706 | if (modulePanel != undefined && modulePanel.length>0) { |
2633 | 2707 | for (var index = 0 ; index < modulePanel.length; index++) { |
2634 | 2708 | var paneld = modulePanel[index].id; |
2635 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2709 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2636 | 2710 | { |
2637 | 2711 | var len = (paneld).split("_").length; |
2638 | 2712 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -2696,7 +2770,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2696 | 2770 | if (modulePanel != undefined && modulePanel.length>0) { |
2697 | 2771 | for (var index = 0 ; index < modulePanel.length; index++) { |
2698 | 2772 | var paneld = modulePanel[index].id; |
2699 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2773 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2700 | 2774 | { |
2701 | 2775 | var len = (paneld).split("_").length; |
2702 | 2776 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -2740,7 +2814,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2740 | 2814 | if (modulePanel != undefined && modulePanel.length>0) { |
2741 | 2815 | for (var index = 0 ; index < modulePanel.length; index++) { |
2742 | 2816 | var paneld = modulePanel[index].id; |
2743 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2817 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2744 | 2818 | { |
2745 | 2819 | $rootScope.switchCanvas(paneld); |
2746 | 2820 | if(paneld.match("AAImagePanel")) |
... | ... | @@ -2766,7 +2840,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2766 | 2840 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); |
2767 | 2841 | for (var index = 0 ; index < modulePanel.length; index++) { |
2768 | 2842 | var paneld = modulePanel[index].id; |
2769 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2843 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2770 | 2844 | { |
2771 | 2845 | var len = (paneld).split("_").length; |
2772 | 2846 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -2828,7 +2902,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2828 | 2902 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); |
2829 | 2903 | for (var index = 0 ; index < modulePanel.length; index++) { |
2830 | 2904 | var paneld = modulePanel[index].id; |
2831 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2905 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2832 | 2906 | { |
2833 | 2907 | var len = (paneld).split("_").length; |
2834 | 2908 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -2910,7 +2984,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2910 | 2984 | if (modulePanel != undefined && modulePanel.length>0) { |
2911 | 2985 | for (var index = 0 ; index < modulePanel.length; index++) { |
2912 | 2986 | var paneld = modulePanel[index].id; |
2913 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
2987 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
2914 | 2988 | { |
2915 | 2989 | var len = (paneld).split("_").length; |
2916 | 2990 | // var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -3098,7 +3172,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3098 | 3172 | if (modulePanel != undefined && modulePanel.length>0) { |
3099 | 3173 | for (var index = 0 ; index < modulePanel.length; index++) { |
3100 | 3174 | var paneld = modulePanel[index].id; |
3101 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
3175 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
3102 | 3176 | { |
3103 | 3177 | var len = (paneld).split("_").length; |
3104 | 3178 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -3139,7 +3213,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3139 | 3213 | if (modulePanel != undefined && modulePanel.length>0) { |
3140 | 3214 | for (var index = 0 ; index < modulePanel.length; index++) { |
3141 | 3215 | var paneld = modulePanel[index].id; |
3142 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
3216 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
3143 | 3217 | { |
3144 | 3218 | var len = (paneld).split("_").length; |
3145 | 3219 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -3179,7 +3253,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3179 | 3253 | if (modulePanel != undefined && modulePanel.length>0) { |
3180 | 3254 | for (var index = 0 ; index < modulePanel.length; index++) { |
3181 | 3255 | var paneld = modulePanel[index].id; |
3182 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
3256 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
3183 | 3257 | { |
3184 | 3258 | var len = (paneld).split("_").length; |
3185 | 3259 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -3218,7 +3292,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3218 | 3292 | if (modulePanel != undefined && modulePanel.length>0) { |
3219 | 3293 | for (var index = 0 ; index < modulePanel.length; index++) { |
3220 | 3294 | var paneld = modulePanel[index].id; |
3221 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
3295 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
3222 | 3296 | { |
3223 | 3297 | var len = (paneld).split("_").length; |
3224 | 3298 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -3360,11 +3434,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3360 | 3434 | PanelElement.canvasPaintElement = document.getElementById('canvasPaintAI_' + MultiWinId); |
3361 | 3435 | PanelElement.canvasDivElement = document.getElementById('canvasDivAI_' + MultiWinId); |
3362 | 3436 | } |
3363 | - else if (paneld.match("CBSourceImagePanel")) { | |
3364 | - // for my picture | |
3365 | - PanelElement.canvasDivElement = document.getElementById('ImageDiv'); | |
3437 | + else if (paneld.match("picImagePanel")) { | |
3438 | + PanelElement.canvasElement=document.getElementById('canvasPIC_' + MultiWinId); | |
3439 | + PanelElement.canvasPaintElement = document.getElementById('canvasPaintPIC_' + MultiWinId); | |
3440 | + PanelElement.canvasDivElement = document.getElementById('canvasDivPIC_' + MultiWinId); | |
3366 | 3441 | } |
3367 | - | |
3442 | + | |
3368 | 3443 | return PanelElement; |
3369 | 3444 | |
3370 | 3445 | } |
... | ... | @@ -3379,7 +3454,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3379 | 3454 | if (modulePanel != undefined && modulePanel.length>0) { |
3380 | 3455 | for (var index = 0 ; index < modulePanel.length; index++) { |
3381 | 3456 | var paneld = modulePanel[index].id; |
3382 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
3457 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
3383 | 3458 | { |
3384 | 3459 | if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) { |
3385 | 3460 | $("#annotationpaintbrushsize").removeClass('activebtncolor') |
... | ... | @@ -3574,7 +3649,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3574 | 3649 | if (modulePanel != undefined && modulePanel.length>0) { |
3575 | 3650 | for (var index = 0 ; index < modulePanel.length; index++) { |
3576 | 3651 | var paneld = modulePanel[index].id; |
3577 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
3652 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
3578 | 3653 | { |
3579 | 3654 | var len = (paneld).split("_").length; |
3580 | 3655 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -3595,6 +3670,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3595 | 3670 | { |
3596 | 3671 | $rootScope.aiAnnotationToolEvent(MultiWinId); |
3597 | 3672 | } |
3673 | + else if(paneld.match("picImagePanel")) | |
3674 | + { | |
3675 | + $rootScope.picAnnotationToolEvent(MultiWinId); | |
3676 | + } | |
3598 | 3677 | //for paint brush |
3599 | 3678 | $rootScope.switchCanvasToPaintCanvas(paneld); |
3600 | 3679 | |
... | ... | @@ -5331,7 +5410,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
5331 | 5410 | $scope.onDrawingCanvasOnModule = function (annotationCanvas) { |
5332 | 5411 | |
5333 | 5412 | //remove old event listener |
5334 | - //event code modified .work of only DA,AA,CI,AI | |
5413 | + //event code modified .work of only DA,AA,CI,AI,PIC | |
5335 | 5414 | annotationCanvas.removeEventListener("mousedown", $rootScope.OnPaintCanvasMouseDown); |
5336 | 5415 | annotationCanvas.removeEventListener("touchstart", $rootScope.OnPaintCanvasMouseDown); |
5337 | 5416 | annotationCanvas.removeEventListener("mouseup", $rootScope.OnPaintCanvasMouseUp); |
... | ... | @@ -5694,7 +5773,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
5694 | 5773 | if (modulePanel != undefined && modulePanel.length>0) { |
5695 | 5774 | for (var index = 0 ; index < modulePanel.length; index++) { |
5696 | 5775 | var paneld = modulePanel[index].id; |
5697 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
5776 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
5698 | 5777 | { |
5699 | 5778 | var len = (paneld).split("_").length; |
5700 | 5779 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -5928,7 +6007,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
5928 | 6007 | $('#bodySystems').empty(); |
5929 | 6008 | $('#termList').empty(); |
5930 | 6009 | $('#viewName').empty(); |
5931 | - var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']"); | |
6010 | + var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='picImagePanel']"); | |
5932 | 6011 | if (modulePanel != undefined && modulePanel.length>0) { |
5933 | 6012 | for (var i = 0 ; i < modulePanel.length; i++) { |
5934 | 6013 | var paneld = modulePanel[i].id; |
... | ... | @@ -5954,7 +6033,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
5954 | 6033 | $('#bodySystems').empty(); |
5955 | 6034 | $('#termList').empty(); |
5956 | 6035 | $('#viewName').empty(); |
5957 | - var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']"); | |
6036 | + var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']").not("div[id*='picImagePanel']"); | |
5958 | 6037 | if (modulePanel != undefined && modulePanel.length>0) { |
5959 | 6038 | for (var index = 0 ; index < modulePanel.length; index++) { |
5960 | 6039 | var paneld = modulePanel[index].id; |
... | ... | @@ -6079,7 +6158,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
6079 | 6158 | if (modulePanel != undefined && modulePanel.length>0) { |
6080 | 6159 | for (var index = 0 ; index < modulePanel.length; index++) { |
6081 | 6160 | var paneld = modulePanel[index].id; |
6082 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
6161 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
6083 | 6162 | { |
6084 | 6163 | var len = (paneld).split("_").length; |
6085 | 6164 | var MultiWinId = (paneld).split("_")[len - 1]; |
... | ... | @@ -6767,7 +6846,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
6767 | 6846 | imageToPrint.src = dataURL; |
6768 | 6847 | |
6769 | 6848 | |
6770 | - OpenJSPanel(); // open jsPanel here | |
6849 | + OpenJSPanel(panelTitle); // open jsPanel here | |
6771 | 6850 | if ($('#jsPanel-1').length > 0) { |
6772 | 6851 | // $('.jsPanel-btn-norm').attr('style', 'display: block'); |
6773 | 6852 | } |
... | ... | @@ -6900,7 +6979,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
6900 | 6979 | } |
6901 | 6980 | |
6902 | 6981 | |
6903 | - function OpenJSPanel() { | |
6982 | + function OpenJSPanel(panelTitle) { | |
6904 | 6983 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); |
6905 | 6984 | if (modulePanel != undefined && modulePanel.length>0) { |
6906 | 6985 | for (var index = 0 ; index < modulePanel.length; index++) { |
... | ... | @@ -6922,7 +7001,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
6922 | 7001 | ajax: { |
6923 | 7002 | url: 'app/views/home/printPreview.html' |
6924 | 7003 | }, |
6925 | - title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
7004 | + title: panelTitle, | |
6926 | 7005 | position: { |
6927 | 7006 | top: 70, |
6928 | 7007 | left: 1, |
... | ... | @@ -7187,7 +7266,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
7187 | 7266 | if (modulePanel != undefined && modulePanel.length>0) { |
7188 | 7267 | for (var index = 0 ; index < modulePanel.length; index++) { |
7189 | 7268 | var paneld = modulePanel[index].id; |
7190 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")) | |
7269 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
7191 | 7270 | { |
7192 | 7271 | var len = (paneld).split("_").length; |
7193 | 7272 | var MultiWinId = (paneld).split("_")[len - 1]; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
0 → 100644
1 | +'use strict'; | |
2 | + | |
3 | +AIA.controller("MyPictureController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout","ModuleService", "$interval", | |
4 | +function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, ModuleService, $interval) { | |
5 | + | |
6 | + $scope.initializePICWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { | |
7 | + if (isOpenWithExistsModule || openPanelNo == 0) { | |
8 | + if ($rootScope.PICWindowData != undefined) { | |
9 | + $rootScope.PICWindowData.length = 0; | |
10 | + } | |
11 | + else { | |
12 | + $rootScope.PICWindowData = []; | |
13 | + } | |
14 | + | |
15 | + $rootScope.PICWindowData.push( | |
16 | + { | |
17 | + 'multiwinid': windowviewid, | |
18 | + 'imageSource': [], | |
19 | + 'moduleName': '', | |
20 | + 'currentViewTitle': '', | |
21 | + 'parentSlugName': '', | |
22 | + 'currentSlug': '', | |
23 | + 'imageId': '', | |
24 | + 'top': 0, | |
25 | + 'left': 0, | |
26 | + 'width': 0, | |
27 | + 'height': 0, | |
28 | + 'minimised': false, | |
29 | + 'maximised': false, | |
30 | + 'annotationData':{shapeStates:[],paintCanvasState:[]}, | |
31 | + }); | |
32 | + | |
33 | + } | |
34 | + else { | |
35 | + var isNewWindow = true; | |
36 | + for (var k = 0; k < $rootScope.PICWindowData.length; k++) { | |
37 | + if ($rootScope.PICWindowData[k].multiwinid == windowviewid) { | |
38 | + isNewWindow = false; | |
39 | + break; | |
40 | + } | |
41 | + } | |
42 | + | |
43 | + if (isNewWindow) { | |
44 | + $rootScope.PICWindowData.push( | |
45 | + { | |
46 | + 'multiwinid': windowviewid, | |
47 | + 'imageSource': [], | |
48 | + 'moduleName': '', | |
49 | + 'currentViewTitle': '', | |
50 | + 'parentSlugName': '', | |
51 | + 'currentSlug': '', | |
52 | + 'imageId': '', | |
53 | + 'top': 0, | |
54 | + 'left': 0, | |
55 | + 'width': 0, | |
56 | + 'height': 0, | |
57 | + 'minimised': false, | |
58 | + 'maximised': false, | |
59 | + 'annotationData':{shapeStates:[],paintCanvasState:[]}, | |
60 | + }); | |
61 | + | |
62 | + } | |
63 | + } | |
64 | + } | |
65 | + | |
66 | + $scope.GetPICwindowStoreData = function (windowviewid, keyname) { | |
67 | + for (var x = 0 ; x < $rootScope.PICWindowData.length; x++) { | |
68 | + | |
69 | + if ($rootScope.PICWindowData[x].multiwinid == windowviewid) { | |
70 | + return $rootScope.PICWindowData[x][keyname]; | |
71 | + } | |
72 | + } | |
73 | + } | |
74 | + | |
75 | + $scope.SetPICwindowStoreData = function (windowviewid, keyname, value) { | |
76 | + for (var x = 0 ; x < $rootScope.PICWindowData.length; x++) { | |
77 | + | |
78 | + if ($rootScope.PICWindowData[x].multiwinid == windowviewid) { | |
79 | + $rootScope.PICWindowData[x][keyname] = value; | |
80 | + } | |
81 | + } | |
82 | + } | |
83 | + | |
84 | + // access from home controller | |
85 | + $rootScope.GetPICwindowData=function(windowviewid,keyname) | |
86 | + { | |
87 | + for(var x=0 ;x < $rootScope.PICWindowData.length;x++){ | |
88 | + | |
89 | + if($rootScope.PICWindowData[x].multiwinid==windowviewid) | |
90 | + { | |
91 | + return $rootScope.PICWindowData[x][keyname]; | |
92 | + } | |
93 | + } | |
94 | + } | |
95 | + // access from home controller | |
96 | + $rootScope.SetPICwindowData=function(windowviewid,keyname,data) { | |
97 | + for(var x=0 ;x < $rootScope.PICWindowData.length;x++){ | |
98 | + | |
99 | + if($rootScope.PICWindowData[x].multiwinid==windowviewid) | |
100 | + { | |
101 | + $rootScope.PICWindowData[x][keyname]=data; | |
102 | + } | |
103 | + } | |
104 | + } | |
105 | + | |
106 | + $scope.RemoveJSPanel = function (panelid) { | |
107 | + | |
108 | + var len = (panelid).split("_").length; | |
109 | + var windowviewid = (panelid).split("_")[len - 1]; | |
110 | + | |
111 | + // remove old stored data after close panel | |
112 | + for (var index = 0 ; index < $rootScope.PICWindowData.length; index++) { | |
113 | + | |
114 | + if ($rootScope.PICWindowData[index].multiwinid == windowviewid) { | |
115 | + | |
116 | + if (index != -1) { | |
117 | + // remove module which one is loaded | |
118 | + $scope.PICWindowData.splice(index, 1); | |
119 | + if ($('#' + panelid).html() != undefined) { | |
120 | + | |
121 | + $('#' + panelid).remove(); | |
122 | + | |
123 | + } | |
124 | + $rootScope.resetjsPanelTop(panelid); | |
125 | + } | |
126 | + } | |
127 | + } | |
128 | + } | |
129 | + $scope.PanelActivity = function () { | |
130 | + | |
131 | + $("#" + $scope.jsPanelID).resizable({ | |
132 | + stop: function (event, ui) { | |
133 | + var len = (event.currentTarget.id).split("_").length; | |
134 | + var windowviewid = (event.currentTarget.id).split("_")[len - 1]; | |
135 | + $scope.SetPICwindowStoreData(windowviewid, 'width', ui.size.width); | |
136 | + $scope.SetPICwindowStoreData(windowviewid, 'height', ui.size.height); | |
137 | + } | |
138 | + }); | |
139 | + | |
140 | + $("#" + $scope.jsPanelID).draggable({ | |
141 | + stop: function (event, ui) { | |
142 | + var len = (event.currentTarget.id).split("_").length; | |
143 | + var windowviewid = (event.currentTarget.id).split("_")[len - 1]; | |
144 | + //var offSets = $(this).offset(); var postions = (this).position(); (this).offsetTop (this).offsetLeft | |
145 | + $scope.SetPICwindowStoreData(windowviewid, 'top', ui.position.top); | |
146 | + $scope.SetPICwindowStoreData(windowviewid, 'left', ui.position.left); | |
147 | + } | |
148 | + }); | |
149 | + // close panel | |
150 | + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
151 | + | |
152 | + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); | |
153 | + | |
154 | + $scope.RemoveJSPanel(panelid); | |
155 | + | |
156 | + }); | |
157 | + } | |
158 | + | |
159 | + $rootScope.OpenMyPictureViewMain = function () { | |
160 | + if ($rootScope.isCallFromOtherModule) { | |
161 | + $scope.PicModuleData = ModuleService.getModuleData("MY_PICTURES"); | |
162 | + $scope.readyToLoad = true; | |
163 | + $rootScope.PicLoadComplete = false; | |
164 | + $scope.wincount = 1; | |
165 | + var winlen = $scope.PicModuleData.length; | |
166 | + var timeint = null; | |
167 | + timeint = $interval(function () { | |
168 | + | |
169 | + if ($scope.readyToLoad == true) { | |
170 | + var windata = $scope.PicModuleData[$scope.wincount - 1]; | |
171 | + $scope.OpenPictureView(windata); | |
172 | + | |
173 | + } | |
174 | + $scope.readyToLoad = false; | |
175 | + if ($scope.wincount < winlen && $rootScope.PicLoadComplete == true) { | |
176 | + $scope.wincount = $scope.wincount + 1; | |
177 | + $rootScope.PicLoadComplete = false; | |
178 | + $scope.readyToLoad = true; | |
179 | + } | |
180 | + | |
181 | + if ($scope.wincount == winlen && $rootScope.PicLoadComplete == true) { | |
182 | + $scope.stopInterval(); | |
183 | + $scope.$emit("LoadModuleComplete", "MY_PICTURES"); | |
184 | + } | |
185 | + | |
186 | + | |
187 | + }, 100); | |
188 | + | |
189 | + $scope.stopInterval = function () { | |
190 | + if (angular.isDefined(timeint)) { | |
191 | + $interval.cancel(timeint); | |
192 | + timeint = undefined; | |
193 | + } | |
194 | + | |
195 | + }; | |
196 | + | |
197 | + } | |
198 | + | |
199 | + } | |
200 | + | |
201 | + $scope.OpenPictureView = function (picModuleData) { | |
202 | + | |
203 | + $scope.picOpenInOtherModules = picModuleData; | |
204 | + $rootScope.MULTI_VIEW_ID += 1; | |
205 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
206 | + | |
207 | + $scope.initializePICWindowData(windowviewid, false, $scope.picOpenInOtherModules.currentWindowId); | |
208 | + | |
209 | + var moduleName = $scope.picOpenInOtherModules.mType; | |
210 | + $scope.SetPICwindowStoreData(windowviewid, 'moduleName', moduleName); | |
211 | + // serial no of imageid | |
212 | + var imageId = $scope.picOpenInOtherModules.id; | |
213 | + | |
214 | + $scope.SetPICwindowStoreData(windowviewid, 'imageId', imageId); | |
215 | + | |
216 | + var imageSource=$scope.picOpenInOtherModules.imageSource; | |
217 | + | |
218 | + $scope.SetPICwindowStoreData(windowviewid, 'imageSource', imageSource); | |
219 | + | |
220 | + var aiTitle = $scope.picOpenInOtherModules.anatomyTitle; | |
221 | + $scope.SetPICwindowStoreData(windowviewid, 'currentViewTitle', aiTitle); | |
222 | + localStorage.setItem("currentViewTitle", aiTitle); | |
223 | + var isMaximize = $scope.picOpenInOtherModules.maximised; | |
224 | + var isMinimize = $scope.picOpenInOtherModules.minimised; | |
225 | + $scope.SetPICwindowStoreData(windowviewid, 'maximised', isMaximize); | |
226 | + $scope.SetPICwindowStoreData(windowviewid, 'minimised', isMinimize); | |
227 | + | |
228 | + // store image for export | |
229 | + $rootScope.StoreTitleName(aiTitle); | |
230 | + $rootScope.StoreOrgImageName(aiTitle); | |
231 | + | |
232 | + $scope.SetPICwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', '')); | |
233 | + | |
234 | + $scope.loadMyPicture(windowviewid); | |
235 | + | |
236 | + } | |
237 | + | |
238 | + $scope.loadMyPicture = function (windowviewid) { | |
239 | + | |
240 | + $scope.jsPanelID = 'picImagePanel' + '_' + windowviewid; | |
241 | + | |
242 | + var selectedpicture = $scope.GetPICwindowStoreData(windowviewid, 'imageSource'); | |
243 | + | |
244 | + if (selectedpicture.indexOf('base64') == -1) { | |
245 | + selectedpicture="data:image/png;base64,"+selectedpicture; | |
246 | + } | |
247 | + var tittle = $scope.GetPICwindowStoreData(windowviewid, 'currentViewTitle'); | |
248 | + | |
249 | + // open JS panel for curriculum with define cornonate in CB jason | |
250 | + $scope.jsPanelWidth = $scope.picOpenInOtherModules.size.width;//1000; | |
251 | + $scope.jsPanelHeight = $scope.picOpenInOtherModules.size.height; | |
252 | + if ($scope.picOpenInOtherModules.size.height > 540) | |
253 | + $scope.jsPanelHeight = 540; | |
254 | + $scope.jsPanelLeft = 320; | |
255 | + $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); | |
256 | + if($location.url()!= "/curriculum-builder-detail") { | |
257 | + $scope.jsPanelLeft = 1; | |
258 | + } | |
259 | + | |
260 | + $scope.jsPanelPIC = $.jsPanel({ | |
261 | + id: $scope.jsPanelID, | |
262 | + selector: '.picView', | |
263 | + theme: 'success', | |
264 | + currentController: 'MyPictureController', | |
265 | + parentSlug: $scope.GetPICwindowStoreData(windowviewid, 'parentSlugName'), | |
266 | + content: '<div class="row" id="canvasDivPIC_' + windowviewid + '"><canvas id="canvasPaintPIC_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="1340" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasPIC_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="1340" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' + | |
267 | + '<div class="col-sm-12 img-thumbnail" align="center">' + | |
268 | + '<img src="' + selectedpicture + '" id="mypic" alt="" title="" class="img-responsive " style="height:400px;">' + | |
269 | + | |
270 | + '</div></div>', | |
271 | + | |
272 | + title: tittle, | |
273 | + position: { | |
274 | + top: $scope.jsPanelTop, | |
275 | + left: $scope.jsPanelLeft | |
276 | + }, | |
277 | + | |
278 | + size: { | |
279 | + width: $scope.jsPanelWidth, | |
280 | + height: $scope.jsPanelHeight | |
281 | + }, | |
282 | + | |
283 | + }); | |
284 | + | |
285 | + $('#canvasDivPIC_' + windowviewid + ' img').load(function () { | |
286 | + | |
287 | + var isMaximize = $scope.GetPICwindowStoreData(windowviewid, 'maximised'); | |
288 | + var isMinimize = $scope.GetPICwindowStoreData(windowviewid, 'minimised'); | |
289 | + if (isMaximize) { | |
290 | + $scope.jsPanelPIC.maximize(); | |
291 | + } | |
292 | + else if (isMinimize) { | |
293 | + $scope.jsPanelPIC.minimize(); | |
294 | + } | |
295 | + else { | |
296 | + $scope.jsPanelPIC.normalize(); | |
297 | + } | |
298 | + $scope.SetPICwindowStoreData(windowviewid, 'top', $scope.jsPanelTop); | |
299 | + $scope.SetPICwindowStoreData(windowviewid, 'left', $scope.jsPanelLeft); | |
300 | + $scope.SetPICwindowStoreData(windowviewid, 'width', $scope.jsPanelWidth); | |
301 | + $scope.SetPICwindowStoreData(windowviewid, 'height', $scope.jsPanelHeight); | |
302 | + | |
303 | + | |
304 | + $scope.JsPanelclick(windowviewid); | |
305 | + $scope.$emit("cBEnableDisableMenuOption", $scope.jsPanelID); | |
306 | + | |
307 | + var canvas = document.getElementById("canvasPIC_" + windowviewid); | |
308 | + var canvasPaint = document.getElementById("canvasPaintPIC_" + windowviewid); | |
309 | + | |
310 | + canvas.height = $("#" + $scope.jsPanelID + " .jsPanel-content").height(); | |
311 | + canvasPaint.height = $("#" + $scope.jsPanelID + " .jsPanel-content").height(); | |
312 | + | |
313 | + var annotationData= $scope.picOpenInOtherModules.annotationData; | |
314 | + // load annotation | |
315 | + if(annotationData!="" && annotationData!=undefined) | |
316 | + { | |
317 | + if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) | |
318 | + { | |
319 | + //first draw shape and then store in object | |
320 | + $rootScope.LoadCBSavedAnnotation("canvasPIC_"+windowviewid,"canvasPaintPIC_"+windowviewid,annotationData); | |
321 | + } | |
322 | + } | |
323 | + | |
324 | + $rootScope.PicLoadComplete = true; | |
325 | + }); | |
326 | + | |
327 | + $scope.SetPICwindowStoreData(windowviewid, 'currentSlug', 'my-picture'); | |
328 | + | |
329 | + $("#" + $scope.jsPanelID + " .img-thumbnail").css("min-height", $("#" + $scope.jsPanelID + " .jsPanel-content").height()); | |
330 | + $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important') | |
331 | + | |
332 | + $('#PicView').css("height", $(window).outerHeight() - 65); | |
333 | + | |
334 | + $('#PicView').css("width", $(window).outerWidth() - 15); | |
335 | + | |
336 | + var canvasDIvHeight = $("#" + $scope.jsPanelID + " .jsPanel-content").height(); | |
337 | + | |
338 | + $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight); | |
339 | + | |
340 | + $scope.PanelActivity(); | |
341 | + } | |
342 | + $rootScope.picAnnotationToolEvent = function (windowviewid) { | |
343 | + | |
344 | + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)") | |
345 | + $('#editstylebackgroundcolor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | |
346 | + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)") | |
347 | + $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | |
348 | + | |
349 | + $('#canvasPIC_'+windowviewid).css("display", "block"); | |
350 | + $('#canvasPaintPIC_'+windowviewid).css("display", "block"); | |
351 | + | |
352 | + } | |
353 | + | |
354 | + $scope.JsPanelclick = function (windowviewid) { | |
355 | + | |
356 | + //reset option list manager and annotation | |
357 | + //call when module loaded | |
358 | + $rootScope.resetMenuOption(); | |
359 | + | |
360 | + // call from while open module in CB | |
361 | + $("#picImagePanel_" + windowviewid).on('click', function (event) { | |
362 | + | |
363 | + var pnlName = event.currentTarget.id; | |
364 | + $rootScope.resetMenuOptionOnClick(pnlName); | |
365 | + $scope.$emit("cBEnableDisableMenuOption", pnlName); | |
366 | + | |
367 | + // store image for export while click on panel | |
368 | + | |
369 | + var currentViewTitle = $scope.GetPICwindowStoreData(windowviewid, 'currentViewTitle'); | |
370 | + $rootScope.StoreTitleName(currentViewTitle); | |
371 | + $rootScope.StoreOrgImageName(currentViewTitle); | |
372 | + }); | |
373 | + } | |
374 | + | |
375 | + }]) | |
0 | 376 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -3280,41 +3280,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
3280 | 3280 | $scope.SetAAwindowStoreData(windowviewid, 'left', ui.position.left); |
3281 | 3281 | } |
3282 | 3282 | }); |
3283 | - $(document).on("click", "#" + $scope.jsPanelID +" .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
3284 | - | |
3285 | - var panelid = $(event.target).parent().parent().parent().parent().attr('id'); | |
3286 | - | |
3287 | - $scope.RemoveJSPanel(panelid); | |
3288 | - | |
3289 | - $scope.setActiveTab(parseInt($rootScope.getLocalStorageValue("activeTab"))); | |
3290 | - $(".tools").css("z-index", "15000"); | |
3291 | - | |
3292 | - }); | |
3293 | - | |
3294 | - | |
3283 | + | |
3295 | 3284 | $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function (event) { |
3296 | 3285 | var panelid = $(event.target).parent().parent().parent().parent().attr('id'); |
3297 | 3286 | |
3298 | - var len = (panelid).split("_").length; | |
3299 | - var windowviewid = (panelid).split("_")[len - 1]; | |
3300 | - | |
3301 | - // remove old stored data after close panel | |
3302 | - for (var index = 0 ; index < $rootScope.AAWindowData.length; index++) { | |
3303 | - | |
3304 | - if ($rootScope.AAWindowData[index].multiwinid == windowviewid) { | |
3305 | - | |
3306 | - if (index != -1) { | |
3307 | - // remove module which one is loaded | |
3308 | - $scope.AAWindowData.splice(index, 1); | |
3309 | - if ($('#' + panelid).html() != undefined) { | |
3310 | - | |
3311 | - $('#' + panelid).remove(); | |
3312 | - | |
3313 | - } | |
3314 | - $rootScope.resetjsPanelTop(); | |
3315 | - } | |
3316 | - } | |
3317 | - } | |
3287 | + $scope.RemoveJSPanel(panelid); | |
3318 | 3288 | |
3319 | 3289 | $scope.setActiveTab(parseInt($rootScope.getLocalStorageValue("activeTab"))); |
3320 | 3290 | $(".tools").css("z-index", "15000"); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/directives/AIADirectives.js
... | ... | @@ -46,4 +46,11 @@ AIA.directive('labExerciseDirective', function (ModuleService) { |
46 | 46 | templateUrl: 'app/views/LabExerc/lab-exercise-view.html', |
47 | 47 | |
48 | 48 | } |
49 | +}); | |
50 | +AIA.directive('myPictureDirective', function (ModuleService) { | |
51 | + return { | |
52 | + //restrict: 'E', | |
53 | + templateUrl: 'app/views/MyPicture/MyPicture.html', | |
54 | + | |
55 | + } | |
49 | 56 | }); |
50 | 57 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... | ... | @@ -209,6 +209,14 @@ AIA.constant('pages', [ |
209 | 209 | pageController: '3dAController' |
210 | 210 | |
211 | 211 | }, |
212 | + { //added for mypicture | |
213 | + name: 'MyPicture', | |
214 | + pageSlug: 'my-picture', | |
215 | + pageUrl: 'app/views/MyPicture/MyPicture.html', | |
216 | + pageController: 'MyPictureController' | |
217 | + | |
218 | + }, | |
219 | + | |
212 | 220 | ]); |
213 | 221 | |
214 | 222 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... | ... | @@ -15,6 +15,7 @@ moduleDataObj.CAData = []; |
15 | 15 | moduleDataObj.ThreeDData = []; |
16 | 16 | moduleDataObj.AIData = []; |
17 | 17 | moduleDataObj.LabData = []; |
18 | +moduleDataObj.PICData = []; | |
18 | 19 | |
19 | 20 | AIA.service('ModuleService', function ($http, DataService) { |
20 | 21 | return { |
... | ... | @@ -150,12 +151,32 @@ AIA.service('ModuleService', function ($http, DataService) { |
150 | 151 | return moduleDataObj.AIData; |
151 | 152 | else if (moduleName == "LAB_EXERCISE") |
152 | 153 | return moduleDataObj.LabData; |
154 | + else if (moduleName == "MY_PICTURES") | |
155 | + return moduleDataObj.PICData; | |
153 | 156 | |
154 | 157 | }, |
155 | 158 | |
156 | 159 | setModuleData: function (windowData, windowId) { |
157 | 160 | |
158 | - if (windowData.mType == "LAB_EXERCISE") { | |
161 | + if (windowData.mType == "MY_PICTURES") { | |
162 | + moduleDataObj.PICData.push({ | |
163 | + currentWindowId: windowId, | |
164 | + mType: windowData.mType, | |
165 | + containsCapturedContent: windowData.containsCapturedContent, | |
166 | + anatomyTitle: windowData.windowTitle, | |
167 | + scrollPosition: windowData.scrollPosition, | |
168 | + imageId: windowData.imageId, | |
169 | + imageSource: windowData.imageSource, | |
170 | + maximised: windowData.maximised, | |
171 | + minimised: windowData.minimised, | |
172 | + id: windowData.id, | |
173 | + position: windowData.position, | |
174 | + size: windowData.size, | |
175 | + contextMenu: windowData.contextMenu, | |
176 | + annotationData: windowData.annotationData | |
177 | + }); | |
178 | + } | |
179 | + else if (windowData.mType == "LAB_EXERCISE") { | |
159 | 180 | moduleDataObj.LabData.push({ |
160 | 181 | currentWindowId: windowId, |
161 | 182 | mType: windowData.mType, |
... | ... | @@ -324,6 +345,7 @@ AIA.service('ModuleService', function ($http, DataService) { |
324 | 345 | moduleDataObj.ThreeDData = []; |
325 | 346 | moduleDataObj.AIData = []; |
326 | 347 | moduleDataObj.LabData = []; |
348 | + moduleDataObj.PICData = []; | |
327 | 349 | |
328 | 350 | }, |
329 | 351 | ClearWinDataByModule: function (moduleName) { |
... | ... | @@ -353,7 +375,10 @@ AIA.service('ModuleService', function ($http, DataService) { |
353 | 375 | else if (moduleName == "LAB_EXERCISE") { |
354 | 376 | moduleDataObj.LabData = []; |
355 | 377 | } |
356 | - | |
378 | + else if (moduleName == "MY_PICTURES") { | |
379 | + moduleDataObj.PICData = []; | |
380 | + } | |
381 | + | |
357 | 382 | }, |
358 | 383 | |
359 | 384 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/MyPicture/MyPicture.html
0 → 100644
1 | +<div> | |
2 | + <div ng-include="aap/widget/MainMenu.html"></div> | |
3 | + <div ng-init="OpenMyPictureViewMain()" id="PicView" class="picView" ng-controller="MyPictureController" style=" "></div> <!--position: absolute !important;--> | |
4 | + <style> | |
5 | + .jsPanel-content.jsPanel-theme-success { | |
6 | + overflow-y: auto !important; | |
7 | + } | |
8 | + </style> | |
9 | +</div> | |
0 | 10 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">File<span class="caret"></span></a> |
5 | 5 | <ul class="dropdown-menu"> |
6 | 6 | <li id="openResourceId"><a href="#" ng-click="openResource()">Open Resources</a></li> |
7 | - <li ng-class="OpenPitures"><a href="#">Open My Pictures</a></li> | |
7 | + <li id="openPictureId"><a href="#" ng-click="OpenMyPicture()">Open My Pictures</a></li> | |
8 | 8 | <li ng-class="disableMenuoption"><a href="#">Open My Animations</a></li> |
9 | 9 | <li role="separator" class="divider"></li> |
10 | 10 | <li ng-class="disableMenuoption"><a href="#">Test Creator</a></li> |
... | ... | @@ -85,4 +85,6 @@ |
85 | 85 | </div> |
86 | 86 | |
87 | 87 | <input type="file" id="openCBJsonFile" style="display: none" /> |
88 | + <input type="file" id="myPictureFile" style="display: none" /> | |
89 | + | |
88 | 90 | </div> |
89 | 91 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.aspx
... | ... | @@ -1557,6 +1557,7 @@ |
1557 | 1557 | <script src="app/services/ConfigurationService.js?v=1.0.0"></script> |
1558 | 1558 | <script src="app/services/AdminService.js?v=1.0.0"></script> |
1559 | 1559 | <script src="app/controllers/TileViewListController.js?v=1.0.0"></script> |
1560 | + <script src="app/controllers/MyPictureController.js?v=1.0.0"></script> | |
1560 | 1561 | |
1561 | 1562 | <script src="app/services/ModuleService.js?v=1.0.0"></script> |
1562 | 1563 | <script src="../app/filters/AIAFilter.js?v=1.0.0"></script> | ... | ... |