Commit 187f4aad282817c1685ba39771caac233692086f
1 parent
152889a0
fix da issue and CA issue and subcription report
Showing
4 changed files
with
140 additions
and
81 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -7,7 +7,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
7 | 7 | $scope.CAAllBodySystem = []; |
8 | 8 | $scope.CAAllSpeciality = []; |
9 | 9 | $scope.selectedCAListViewData = []; |
10 | - // $scope.searchCAListViewData = []; | |
11 | 10 | $scope.SelectedCAthumbImage = []; |
12 | 11 | $scope.SelectedCAImage = []; |
13 | 12 | $scope.SelectedCASummary = []; |
... | ... | @@ -49,12 +48,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
49 | 48 | 'height': 0, |
50 | 49 | 'minimised': false, |
51 | 50 | 'maximised': false |
52 | - | |
53 | 51 | }; |
54 | 52 | return windata; |
55 | 53 | } |
56 | 54 | |
57 | - | |
58 | 55 | $scope.initializeCAWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { |
59 | 56 | if (isOpenWithExistsModule || openPanelNo == 0) { |
60 | 57 | if ($rootScope.CAWindowData != undefined) { |
... | ... | @@ -143,7 +140,74 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
143 | 140 | } |
144 | 141 | |
145 | 142 | $scope.loadAIModuleById = function (moduleId) { |
143 | + //added by birendra | |
144 | + //direct open CA module | |
145 | + if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null) | |
146 | + { | |
147 | + if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="") | |
148 | + { | |
149 | + $rootScope.isCallFromOtherModule = true; | |
150 | + $rootScope.linkToOpenCa=true; | |
151 | + // store exist module in module service | |
152 | + var ExistData = ModuleService.getModuleData("CLINICAL_ANIMATIONS"); | |
153 | + | |
154 | + if (ExistData != undefined && ExistData.length > 0) { | |
155 | + // clear all module data before open new module in cb | |
156 | + ModuleService.ClearWinDataByModule(ExistData.mType); | |
157 | + } | |
146 | 158 | |
159 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | |
160 | + promise.then( | |
161 | + function (result) { | |
162 | + var AnimationTitle = new jinqJs() | |
163 | + .from(result.root.CAData) | |
164 | + .where('_id = ' + $rootScope.siteUrlInfo.id) | |
165 | + .select('_Title'); | |
166 | + | |
167 | + var CAlinkData = { | |
168 | + "id": $rootScope.siteUrlInfo.id, | |
169 | + "mType": 'CLINICAL_ANIMATIONS', | |
170 | + "textVisible": true, | |
171 | + "windowTitle": AnimationTitle[0]._Title, | |
172 | + | |
173 | + }; | |
174 | + ModuleService.setModuleData(CAlinkData, 0); | |
175 | + // close/remove prev panel when in minimised mode | |
176 | + | |
177 | + if($rootScope.CAWindowData!=undefined) | |
178 | + { | |
179 | + if($rootScope.CAWindowData.length>0) | |
180 | + { | |
181 | + for(var x=0 ;x < $rootScope.CAWindowData.length;x++){ | |
182 | + var winid=$rootScope.CAWindowData[x].multiwinid; | |
183 | + if ($('#caImagePanel_' + winid).html() != undefined) { | |
184 | + $('#caImagePanel_' + winid).remove(); | |
185 | + } | |
186 | + } | |
187 | + $rootScope.CAWindowData=[]; | |
188 | + } | |
189 | + } | |
190 | + | |
191 | + $location.url('/clinical-animations-detail'); | |
192 | + | |
193 | + }, | |
194 | + function (error) { | |
195 | + $scope.EnableUI(); | |
196 | + // handle errors here | |
197 | + console.log(' $scope.AnimationData = ' + error.statusText); | |
198 | + }); | |
199 | + } | |
200 | + else | |
201 | + { | |
202 | + $scope.loadCAlist(); | |
203 | + } | |
204 | + } | |
205 | + else | |
206 | + { | |
207 | + $scope.loadCAlist(); | |
208 | + } | |
209 | + }; | |
210 | + $scope.loadCAlist = function () { | |
147 | 211 | $rootScope.isCallFromOtherModule = undefined; |
148 | 212 | |
149 | 213 | $rootScope.MULTI_VIEW_ID += 1 |
... | ... | @@ -195,7 +259,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
195 | 259 | $rootScope.currentActiveModuleTitle = selectedModuleName; |
196 | 260 | }) |
197 | 261 | |
198 | - $scope.SetCAwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "Clinical Illustrations"); | |
262 | + $scope.SetCAwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "CLINICAL_ANIMATIONS"); | |
199 | 263 | |
200 | 264 | $scope.LoadCAJsonData($rootScope.MULTI_VIEW_ID); |
201 | 265 | |
... | ... | @@ -247,9 +311,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
247 | 311 | }; |
248 | 312 | |
249 | 313 | }, 200); |
250 | - | |
251 | - | |
252 | - }; | |
314 | + } | |
253 | 315 | |
254 | 316 | $scope.reRunSearchOnLoad = function (windowviewid) { |
255 | 317 | var curBodyRegion = $rootScope.getLocalStorageValue("CACurBodyRegion"); |
... | ... | @@ -326,7 +388,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
326 | 388 | var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "'+ value._Title + '" data-ng-click="openView($event)">' |
327 | 389 | + '<div class="thumbnail" ><a href="#">' |
328 | 390 | + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + imagePath + '" alt="" title="" >' |
329 | - + '<div class="caption"><p>'+'('+ value._id+')</p><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
391 | + + '<div class="caption" style="padding:0px"><p>'+'('+ value._id+') ' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
330 | 392 | |
331 | 393 | $compile($el)($scope); |
332 | 394 | |
... | ... | @@ -347,21 +409,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
347 | 409 | 200); |
348 | 410 | |
349 | 411 | |
350 | - $timeout(function () { $scope.EnableUI(); | |
351 | - //open default animation | |
352 | - if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null) | |
353 | - { | |
354 | - if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="") | |
355 | - { | |
356 | - $('#'+$rootScope.siteUrlInfo.id).trigger('click'); | |
357 | - //$('div[title="'+$rootScope.siteUrlInfo.title+'"]').trigger('click'); | |
358 | - } | |
359 | - | |
360 | - // clear detail | |
361 | - $rootScope.siteUrlInfo.mtype=null; | |
362 | - $rootScope.siteUrlInfo.id=null; | |
363 | - } | |
364 | - | |
412 | + $timeout(function () { | |
413 | + $scope.EnableUI(); | |
365 | 414 | }, 400); |
366 | 415 | |
367 | 416 | } |
... | ... | @@ -810,7 +859,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
810 | 859 | |
811 | 860 | } |
812 | 861 | |
813 | - | |
814 | 862 | $scope.loadCAAnimation = function (windowviewid) { |
815 | 863 | |
816 | 864 | if ($rootScope.refreshcheck == null) { |
... | ... | @@ -840,20 +888,33 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
840 | 888 | var vtt = "~/../content/data/vtt/" + hostedFolderId + ".vtt"; |
841 | 889 | |
842 | 890 | if ($rootScope.isCallFromOtherModule) { |
843 | - // open JS panel for curriculum with define cornonate in CB jason | |
844 | - $scope.jsPanelWidth = $scope.caOpenInOtherModules.size.width;//1000; | |
845 | - if ($scope.caOpenInOtherModules.size.width < 900) | |
846 | - $scope.jsPanelWidth = 900; | |
847 | - | |
848 | - $scope.jsPanelHeight = $scope.caOpenInOtherModules.size.height; | |
849 | - if ($scope.caOpenInOtherModules.size.height > 510) | |
850 | - $scope.jsPanelHeight = 510; | |
851 | - $scope.jsPanelLeft = 320; | |
852 | - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); | |
853 | - if($location.url()!= "/curriculum-builder-detail") { | |
891 | + if($rootScope.linkToOpenCa==true) | |
892 | + { | |
893 | + $scope.jsPanelWidth = $(window).outerWidth() - 20; | |
894 | + $scope.jsPanelHeight = $(window).outerHeight() - 105; | |
854 | 895 | $scope.jsPanelLeft = 1; |
855 | - } | |
856 | - | |
896 | + $scope.jsPanelTop = 70; | |
897 | + $rootScope.siteUrlInfo.mtype=null; | |
898 | + $rootScope.siteUrlInfo.id=null; | |
899 | + | |
900 | + } | |
901 | + else | |
902 | + { | |
903 | + // open JS panel for curriculum with define cornonate in CB jason | |
904 | + $scope.jsPanelWidth = $scope.caOpenInOtherModules.size.width;//1000; | |
905 | + if ($scope.caOpenInOtherModules.size.width < 900) | |
906 | + $scope.jsPanelWidth = 900; | |
907 | + | |
908 | + $scope.jsPanelHeight = $scope.caOpenInOtherModules.size.height; | |
909 | + if ($scope.caOpenInOtherModules.size.height > 510) | |
910 | + $scope.jsPanelHeight = 510; | |
911 | + $scope.jsPanelLeft = 320; | |
912 | + $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); | |
913 | + if($location.url()!= "/curriculum-builder-detail") { | |
914 | + $scope.jsPanelLeft = 1; | |
915 | + } | |
916 | + } | |
917 | + | |
857 | 918 | } |
858 | 919 | else { |
859 | 920 | $scope.jsPanelWidth = $(window).outerWidth() - 20; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -820,12 +820,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
820 | 820 | |
821 | 821 | $rootScope.BodyViewData = data; |
822 | 822 | |
823 | - $scope.loadBodyView(windowviewid); | |
823 | + $scope.loadTermData(windowviewid); | |
824 | 824 | }) |
825 | 825 | }) |
826 | 826 | } |
827 | 827 | else { |
828 | - $scope.loadBodyView(windowviewid); | |
828 | + $scope.loadTermData(windowviewid); | |
829 | 829 | } |
830 | 830 | |
831 | 831 | } |
... | ... | @@ -840,11 +840,38 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
840 | 840 | $scope.viewID = 'daViewDA' + '_' + windowviewid; |
841 | 841 | $scope.SetwindowStoreData(windowviewid, 'parentSlugName', 'da-view-list'); |
842 | 842 | |
843 | - $scope.loadBodyView(windowviewid); | |
843 | + $scope.loadTermData(windowviewid); | |
844 | 844 | } |
845 | 845 | |
846 | 846 | } |
847 | 847 | |
848 | + $scope.loadTermData = function (windowviewid) { | |
849 | + var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); | |
850 | + // set gender | |
851 | + $scope.setGenderNameById(bodyViewId,windowviewid); | |
852 | + $rootScope.daloadSearchData(windowviewid); | |
853 | + //call time interval function until load Illustration data | |
854 | + var timeintval = null; | |
855 | + timeintval = $interval(function () { | |
856 | + var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); | |
857 | + if (vocabTermDataArray!=null) { | |
858 | + $scope.stopVocab(); | |
859 | + $scope.loadBodyView(windowviewid); | |
860 | + } | |
861 | + else | |
862 | + { | |
863 | + console.log("waiting for search term Data"); | |
864 | + } | |
865 | + }, 100); | |
866 | + | |
867 | + $scope.stopVocab = function () { | |
868 | + if (angular.isDefined(timeintval)) { | |
869 | + $interval.cancel(timeintval); | |
870 | + timeintval = undefined; | |
871 | + } | |
872 | + }; | |
873 | + }, | |
874 | + | |
848 | 875 | $scope.loadBodyView = function (windowviewid) { |
849 | 876 | |
850 | 877 | if (document.getElementById('daBodyview') != null) { |
... | ... | @@ -870,9 +897,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
870 | 897 | } |
871 | 898 | } |
872 | 899 | |
873 | - | |
874 | - //0.1 | |
875 | - | |
876 | 900 | var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); |
877 | 901 | |
878 | 902 | if (bodyViewId == null || bodyViewId == undefined) { |
... | ... | @@ -885,17 +909,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
885 | 909 | $rootScope.isVisibleLogin = false; |
886 | 910 | |
887 | 911 | console.log('currentBodyViewId picked from localStorage: ' + bodyViewId); |
888 | - | |
889 | - // set gender | |
890 | - $scope.setGenderNameById(bodyViewId,windowviewid); | |
912 | + | |
891 | 913 | var currentViewTitle = $scope.GetwindowStoreData(windowviewid,'currentViewTitle'); |
892 | 914 | console.log('current view title: ' + currentViewTitle); |
893 | 915 | |
894 | 916 | // store image title for export image |
895 | 917 | $rootScope.StoreTitleName(currentViewTitle); |
896 | - $rootScope.daloadSearchData(windowviewid); | |
897 | - | |
898 | - | |
899 | 918 | if ($rootScope.isCallFromOtherModule) { |
900 | 919 | if($rootScope.cernerIntegrationActive) |
901 | 920 | { |
... | ... | @@ -1522,6 +1541,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1522 | 1541 | |
1523 | 1542 | $scope.SetwindowStoreData(windowviewid,'TermNumberData',e.data.TermNumberData); |
1524 | 1543 | |
1544 | + // store image for export | |
1545 | + $scope.LoadImageToExport(windowviewid); | |
1546 | + | |
1525 | 1547 | console.log("$rootScope.TermNumberData = " + e.data.TermNumberData.TermData.Term.length); |
1526 | 1548 | |
1527 | 1549 | console.log("$scope.BodyViewIDs" + e.data.bodyViewID); |
... | ... | @@ -1576,10 +1598,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1576 | 1598 | |
1577 | 1599 | } |
1578 | 1600 | |
1579 | - } | |
1580 | - | |
1581 | - // store image for export | |
1582 | - $scope.LoadImageToExport(windowviewid); | |
1601 | + } | |
1583 | 1602 | |
1584 | 1603 | } |
1585 | 1604 | |
... | ... | @@ -1872,27 +1891,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1872 | 1891 | $("#btnNormalMode_" + windowviewid).removeClass("btn-primary"); |
1873 | 1892 | } |
1874 | 1893 | } |
1875 | - //call time interval function until load Illustration data | |
1876 | - var timeintval = null; | |
1877 | - timeintval = $interval(function () { | |
1878 | - var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); | |
1879 | - if (vocabTermDataArray!=null) { | |
1880 | - $scope.stopVocab(); | |
1881 | - $scope.setLayerNumberAndHighlightByTermListforCB(windowviewid); | |
1882 | - } | |
1883 | - else | |
1884 | - { | |
1885 | - console.log("waiting for Illustration Data"); | |
1886 | - } | |
1887 | - }, 100); | |
1888 | - | |
1889 | - $scope.stopVocab = function () { | |
1890 | - if (angular.isDefined(timeintval)) { | |
1891 | - $interval.cancel(timeintval); | |
1892 | - timeintval = undefined; | |
1893 | - } | |
1894 | - }; | |
1895 | - | |
1894 | + $scope.setLayerNumberAndHighlightByTermListforCB(windowviewid); | |
1896 | 1895 | } |
1897 | 1896 | |
1898 | 1897 | $scope.setLayerNumberAndHighlightByTermListforCB = function (windowviewid) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -922,10 +922,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
922 | 922 | $location.path('/'); |
923 | 923 | |
924 | 924 | $timeout(function () { |
925 | - | |
926 | - //currently open CA | |
927 | - $scope.RedirectToModule(); | |
928 | - | |
925 | + $scope.RedirectToModule(); | |
929 | 926 | }, 100); |
930 | 927 | |
931 | 928 | } |
... | ... | @@ -1023,7 +1020,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1023 | 1020 | else { |
1024 | 1021 | $location.path('/'); |
1025 | 1022 | $timeout(function () { |
1026 | - //currently open CA | |
1027 | 1023 | $scope.RedirectToModule(); |
1028 | 1024 | |
1029 | 1025 | }, 100); |
... | ... | @@ -1071,7 +1067,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1071 | 1067 | if($rootScope.siteUrlInfo.mtype!=null) |
1072 | 1068 | { |
1073 | 1069 | if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca') |
1074 | - $('#clinical-animations').trigger('click'); | |
1070 | + { | |
1071 | + $('#clinical-animations').trigger('click'); | |
1072 | + } | |
1073 | + | |
1075 | 1074 | } |
1076 | 1075 | if ((localStorage.getItem("daDataObject")) != '') { |
1077 | 1076 | //$rootScope.cernerIntegrationActive=true; | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts