Commit 1d18f0463e9f24304406009aa81c2855d9d43752

Authored by Birendra
2 parents 3f47d7f6 339151d0

Merge branch 'OpenModuleFix' into AIA_Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
1 1 AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile", "$timeout", "ModuleService", "$interval",
2 2 function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile, $timeout, ModuleService, $interval) {
3 3  
4   - $scope.initialize3DWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
5   - if (isOpenWithExistsModule || openPanelNo == 0) {
6   - if ($rootScope.TheeDWindowData != undefined) {
7   - $rootScope.TheeDWindowData.length = 0;
8   - }
9   - else {
10   - $rootScope.TheeDWindowData = [];
11   - }
12   -
13   - $rootScope.TheeDWindowData.push(
14   - {
  4 + $scope.ObjectAttribute=function(windowviewid)
  5 + {
  6 + var windata={
15 7 'multiwinid': windowviewid,
16 8 'threeDAnatomyData': [],
17 9 'ImagePath': '',
... ... @@ -27,7 +19,19 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
27 19 'minimised': false,
28 20 'maximised': false
29 21  
30   - });
  22 + };
  23 + return windata;
  24 + }
  25 + $scope.initialize3DWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
  26 + if (isOpenWithExistsModule || openPanelNo == 0) {
  27 + if ($rootScope.TheeDWindowData != undefined) {
  28 + $rootScope.TheeDWindowData.length = 0;
  29 + }
  30 + else {
  31 + $rootScope.TheeDWindowData = [];
  32 + }
  33 +
  34 + $rootScope.TheeDWindowData.push($scope.ObjectAttribute(windowviewid));
31 35  
32 36 }
33 37 else {
... ... @@ -40,25 +44,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
40 44 }
41 45  
42 46 if (isNewWindow) {
43   - $rootScope.TheeDWindowData.push(
44   - {
45   - 'multiwinid': windowviewid,
46   - 'threeDAnatomyData': [],
47   - 'ImagePath': '',
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   -
60   - });
61   -
  47 + $rootScope.TheeDWindowData.push($scope.ObjectAttribute(windowviewid));
62 48 }
63 49 }
64 50 }
... ... @@ -374,8 +360,13 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
374 360  
375 361 $scope.Set3DwindowStoreData(windowviewid, 'maximised', isMaximize);
376 362 $scope.Set3DwindowStoreData(windowviewid, 'minimised', isMinimize);
377   -
378   - $scope.Set3DwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', ''));
  363 + if($location.url()== "/curriculum-builder-detail") {
  364 + $scope.Set3DwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  365 + }
  366 + else
  367 + {
  368 + $scope.Set3DwindowStoreData(windowviewid,'parentSlugName','3d-anatomy-list');
  369 + }
379 370  
380 371 $scope.load3DAnimation(windowviewid);
381 372  
... ... @@ -502,7 +493,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
502 493 $rootScope.ThreeDWindowLoadComplete = true;
503 494 }
504 495 $scope.JsPanelMouseEnter(windowviewid);
505   - $scope.$emit("cBEnableDisableMenuOption", "");
  496 +
506 497 }
507 498  
508 499 $scope.JsPanelMouseEnter = function (windowviewid) {
... ... @@ -519,8 +510,6 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
519 510  
520 511 $("#ThreeDImagePanel_" + windowviewid).on('mouseenter', function (event) {
521 512 var pnlName = event.currentTarget.id;
522   - //console.log('Mouse enter fired: ' + event.currentTarget.id);
523   - $scope.$emit("cBEnableDisableMenuOption", "");
524 513 $rootScope.resetMenuOptionOnClick(pnlName);
525 514  
526 515 });
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... ... @@ -58,17 +58,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
58 58 var searchTextByAlphabet = $rootScope.getLocalStorageValue("SearchByAlphabet");
59 59 var SelectCurrTab = $rootScope.getLocalStorageValue("currentAITabView");
60 60  
61   - $scope.initializeAIWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
62   - if (isOpenWithExistsModule || openPanelNo == 0) {
63   - if ($rootScope.AIWindowData != undefined) {
64   - $rootScope.AIWindowData.length = 0;
65   - }
66   - else {
67   - $rootScope.AIWindowData = [];
68   - }
69   -
70   - $rootScope.AIWindowData.push(
71   - {
  61 + $scope.ObjectAttribute=function(windowviewid)
  62 + {
  63 + var windata={
72 64 'multiwinid': windowviewid,
73 65 'IllustrationData': [],
74 66 'searchAIListViewData': [],
... ... @@ -81,7 +73,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
81 73 'imageId': '',
82 74 'imageName': '',
83 75 'annotationData':{shapeStates:[],paintCanvasState:[]},
84   - });
  76 + };
  77 + return windata;
  78 + }
  79 +
  80 + $scope.initializeAIWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
  81 + if (isOpenWithExistsModule || openPanelNo == 0) {
  82 + if ($rootScope.AIWindowData != undefined) {
  83 + $rootScope.AIWindowData.length = 0;
  84 + }
  85 + else {
  86 + $rootScope.AIWindowData = [];
  87 + }
  88 +
  89 + $rootScope.AIWindowData.push($scope.ObjectAttribute(windowviewid));
85 90  
86 91 }
87 92 else {
... ... @@ -94,22 +99,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
94 99 }
95 100  
96 101 if (isNewWindow) {
97   - $rootScope.AIWindowData.push(
98   - {
99   - 'multiwinid': windowviewid,
100   - 'IllustrationData': [],
101   - 'searchAIListViewData': [],
102   - 'ImageCount': 200,
103   - 'AIImagePath': '',
104   - 'moduleName': '',
105   - 'currentViewTitle': '',
106   - 'parentSlugName': '',
107   - 'currentSlug': '',
108   - 'imageId': '',
109   - 'imageName': '',
110   - 'annotationData':{shapeStates:[],paintCanvasState:[]},
111   - });
112   -
  102 + $rootScope.AIWindowData.push($scope.ObjectAttribute(windowviewid));
113 103 }
114 104 }
115 105 }
... ... @@ -1094,8 +1084,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1094 1084 // store image for export
1095 1085 $rootScope.StoreTitleName(aiTitle);
1096 1086 $rootScope.StoreOrgImageName(selectedTileData[0]._contentImage);
1097   -
1098   - $scope.SetAIwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', ''));
  1087 +
  1088 + if($location.url()== "/curriculum-builder-detail") {
  1089 + $scope.SetAIwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  1090 + }
  1091 + else
  1092 + {
  1093 + $scope.SetAIwindowStoreData(windowviewid,'parentSlugName','ADAM-images');
  1094 + }
1099 1095  
1100 1096 $scope.loadAIllustration(windowviewid);
1101 1097  
... ... @@ -1175,8 +1171,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1175 1171 $('#canvasDivAI_' + windowviewid + ' img').load(function () {
1176 1172  
1177 1173 $scope.JsPanelclick(windowviewid);
1178   - $scope.$emit("cBEnableDisableMenuOption", $scope.jsPanelID);
1179   -
  1174 +
1180 1175 var canvas = document.getElementById("canvasAI_" + windowviewid);
1181 1176 var canvasPaint = document.getElementById("canvasPaintAI_" + windowviewid);
1182 1177  
... ... @@ -1273,8 +1268,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1273 1268  
1274 1269 var pnlName = event.currentTarget.id;
1275 1270 $rootScope.resetMenuOptionOnClick(pnlName);
1276   - $scope.$emit("cBEnableDisableMenuOption", pnlName);
1277   -
  1271 +
1278 1272 // store image for export while click on panel
1279 1273  
1280 1274 var currentViewTitle = $scope.GetAIwindowStoreData(windowviewid, 'currentViewTitle');
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -26,17 +26,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
26 26 localStorage.setItem("currentCATabView", $scope.activeTab);
27 27 };
28 28  
29   - $scope.initializeCAWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
30   - if (isOpenWithExistsModule || openPanelNo == 0) {
31   - if ($rootScope.CAWindowData != undefined) {
32   - $rootScope.CAWindowData.length = 0;
33   - }
34   - else {
35   - $rootScope.CAWindowData = [];
36   - }
37   -
38   - $rootScope.CAWindowData.push(
39   - {
  29 + $scope.ObjectAttribute=function(windowviewid)
  30 + {
  31 + var windata={
40 32 'multiwinid': windowviewid,
41 33 'AnimationData': [],
42 34 'searchCAListViewData': [],
... ... @@ -57,7 +49,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
57 49 'height': 0,
58 50 'minimised': false,
59 51 'maximised': false
60   - });
  52 +
  53 + };
  54 + return windata;
  55 + }
  56 +
  57 +
  58 + $scope.initializeCAWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
  59 + if (isOpenWithExistsModule || openPanelNo == 0) {
  60 + if ($rootScope.CAWindowData != undefined) {
  61 + $rootScope.CAWindowData.length = 0;
  62 + }
  63 + else {
  64 + $rootScope.CAWindowData = [];
  65 + }
  66 +
  67 + $rootScope.CAWindowData.push($scope.ObjectAttribute(windowviewid));
61 68  
62 69 }
63 70 else {
... ... @@ -70,30 +77,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
70 77 }
71 78  
72 79 if (isNewWindow) {
73   - $rootScope.CAWindowData.push(
74   - {
75   - 'multiwinid': windowviewid,
76   - 'AnimationData': [],
77   - 'searchCAListViewData': [],
78   - 'CAImagePath': '',
79   - 'moduleName': '',
80   - 'currentViewTitle': '',
81   - 'parentSlugName': '',
82   - 'currentSlug': '',
83   - 'imageId': '',
84   - 'imageName': '',
85   - 'clickedCAVideo': '',
86   - 'clickedCASummary': '',
87   - 'hostedFolderId': '',
88   - 'isTextVisible': true,
89   - 'top': 0,
90   - 'left': 0,
91   - 'width': 0,
92   - 'height': 0,
93   - 'minimised': false,
94   - 'maximised': false
95   - });
96   -
  80 + $rootScope.CAWindowData.push($scope.ObjectAttribute(windowviewid));
97 81 }
98 82 }
99 83 }
... ... @@ -766,7 +750,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
766 750 $scope.SetCAwindowStoreData(windowviewid, 'maximised', isMaximize);
767 751 $scope.SetCAwindowStoreData(windowviewid, 'minimised', isMinimize);
768 752  
769   - $scope.SetCAwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', ''));
  753 + if($location.url()== "/curriculum-builder-detail") {
  754 + $scope.SetCAwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  755 + }
  756 + else
  757 + {
  758 + $scope.SetCAwindowStoreData(windowviewid,'parentSlugName','clinical-animations');
  759 + }
770 760  
771 761 $scope.loadCAAnimation(windowviewid);
772 762  
... ... @@ -946,8 +936,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
946 936 $rootScope.CAWindowLoadComplete = true;
947 937 }
948 938 $scope.JsPanelclick(windowviewid);
949   - $scope.$emit("cBEnableDisableMenuOption", "");
950   -
  939 +
951 940 var isTextVisible = $scope.GetCAwindowStoreData(windowviewid, 'isTextVisible');
952 941  
953 942  
... ... @@ -972,8 +961,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
972 961 $("#caImagePanel_" + windowviewid).on('click', function (event) {
973 962 var pnlName = event.currentTarget.id;
974 963 $rootScope.resetMenuOptionOnClick(pnlName);
975   - $scope.$emit("cBEnableDisableMenuOption", "");
976   -
  964 +
977 965 });
978 966 }
979 967  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... ... @@ -36,17 +36,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
36 36 localStorage.setItem("currentCITabView", $scope.activeTab);
37 37 };
38 38  
39   - $scope.initializeCIWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
40   - if (isOpenWithExistsModule || openPanelNo == 0) {
41   - if ($rootScope.CIWindowData != undefined) {
42   - $rootScope.CIWindowData.length = 0;
43   - }
44   - else {
45   - $rootScope.CIWindowData = [];
46   - }
47   -
48   - $rootScope.CIWindowData.push(
49   - {
  39 + $scope.ObjectAttribute=function(windowviewid)
  40 + {
  41 + var windata={
50 42 'multiwinid': windowviewid,
51 43 'IllustrationData': [],
52 44 'searchCIListViewData': [],
... ... @@ -66,7 +58,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
66 58 'minimised': false,
67 59 'maximised': false,
68 60 'annotationData':{shapeStates:[],paintCanvasState:[]},
69   - });
  61 +
  62 + };
  63 + return windata;
  64 + }
  65 +
  66 + $scope.initializeCIWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
  67 + if (isOpenWithExistsModule || openPanelNo == 0) {
  68 + if ($rootScope.CIWindowData != undefined) {
  69 + $rootScope.CIWindowData.length = 0;
  70 + }
  71 + else {
  72 + $rootScope.CIWindowData = [];
  73 + }
  74 +
  75 + $rootScope.CIWindowData.push($scope.ObjectAttribute(windowviewid));
70 76  
71 77 }
72 78 else {
... ... @@ -79,29 +85,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
79 85 }
80 86  
81 87 if (isNewWindow) {
82   - $rootScope.CIWindowData.push(
83   - {
84   - 'multiwinid': windowviewid,
85   - 'IllustrationData': [],
86   - 'searchCIListViewData': [],
87   - 'CIImagePath': '',
88   - 'ImageSummary': '',
89   - 'moduleName': '',
90   - 'currentViewTitle': '',
91   - 'parentSlugName': '',
92   - 'currentSlug': '',
93   - 'imageId': '',
94   - 'imageName': '',
95   - 'isTextVisible': true,
96   - 'top': 0,
97   - 'left': 0,
98   - 'width': 0,
99   - 'height': 0,
100   - 'minimised': false,
101   - 'maximised': false,
102   - 'annotationData':{shapeStates:[],paintCanvasState:[]},
103   - });
104   -
  88 + $rootScope.CIWindowData.push($scope.ObjectAttribute(windowviewid));
105 89 }
106 90 }
107 91 }
... ... @@ -202,8 +186,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
202 186 {
203 187 for(var x=0 ;x < $rootScope.CIWindowData.length;x++){
204 188 var winid=$rootScope.CIWindowData[x].multiwinid;
205   - if ($('#ciImagePanel' + winid).html() != undefined) {
206   - $('#ciImagePanel' + winid).remove();
  189 + if ($('#ciImagePanel_' + winid).html() != undefined) {
  190 + $('#ciImagePanel_' + winid).remove();
207 191 }
208 192 }
209 193 $rootScope.CIWindowData=[];
... ... @@ -832,8 +816,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
832 816 // store image for export
833 817 $rootScope.StoreTitleName(ciTitle);
834 818 $rootScope.StoreOrgImageName(selectedTileData[0]._contentImage);
835   -
836   - $scope.SetCIwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', ''));
  819 + if($location.url()== "/curriculum-builder-detail") {
  820 + $scope.SetCIwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  821 + }
  822 + else
  823 + {
  824 + $scope.SetCIwindowStoreData(windowviewid,'parentSlugName','clinical-illustrations');
  825 + }
837 826  
838 827 $scope.loadCIllustration(windowviewid);
839 828  
... ... @@ -961,8 +950,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
961 950 $('#spinner').css('visibility', 'hidden');
962 951  
963 952 $scope.JsPanelclick(windowviewid);
964   - $scope.$emit("cBEnableDisableMenuOption", $scope.jsPanelID);
965   -
  953 +
966 954 var isTextVisible = $scope.GetCIwindowStoreData(windowviewid, 'isTextVisible');
967 955  
968 956 if (isTextVisible) {
... ... @@ -1063,8 +1051,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1063 1051  
1064 1052 var pnlName = event.currentTarget.id;
1065 1053 $rootScope.resetMenuOptionOnClick(pnlName);
1066   - $scope.$emit("cBEnableDisableMenuOption", pnlName);
1067   -
  1054 +
1068 1055 // store image for export while click on panel
1069 1056  
1070 1057 var currentViewTitle = $scope.GetCIwindowStoreData(windowviewid, 'currentViewTitle');
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -12,6 +12,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
12 12 $rootScope.structureObjForSaveCB = [];
13 13 $rootScope.contentNotesForSaveCB = [];
14 14 $rootScope.dynamicUpdatedJsonForSaveCB = "";
  15 + $scope.isChangeFromDropDown=false;
15 16 //$rootScope.updateSaveDraftCB = [];
16 17 $scope.IsVisible = function () {
17 18 $scope.scroll();
... ... @@ -36,7 +37,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
36 37 $("#sidebar-wrapper").on('click', function (event) {
37 38  
38 39 //4. on click disable menu option
39   - $scope.$emit("cBEnableDisableMenuOption", "");
  40 + $rootScope.resetMenuOptionOnClick("CBTinyMCEPanel");
40 41 });
41 42  
42 43 // close all selected open panel in CB
... ... @@ -398,7 +399,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
398 399 $scope.openCBJsPanel = function () {
399 400 $scope.CBDisableUI();
400 401 var jsContentURL = 'app/views/CBuild/curriculum-builder-TinyMCEjspanel.html';
401   - var jsImageContentURL = 'app/views/CBuild/curriculum-builder-image-jspanel.html';
402 402 $.jsPanel({
403 403 id: 'CBTinyMCEPanel',
404 404 selector: '.CBBodyView',
... ... @@ -420,29 +420,19 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
420 420 });
421 421  
422 422 $timeout(function () {
423   - $scope.TinyMCEPanelclick();
424   - }, 1000);
425   -
426   - }
427   -
428   -
429   - $scope.TinyMCEPanelclick = function () {
430   - $("#CBTinyMCEPanel").on('click', function (event) {
  423 + $rootScope.resetMenuOptionOnClick("CBTinyMCEPanel");
  424 +
  425 + }, 200);
431 426  
432   - //3. on click disable menu option
433   - $scope.$emit("cBEnableDisableMenuOption", "");
434   - });
435 427 }
436 428  
437   -
438 429 $scope.myeditorclick = function () {
439 430  
440 431 //1. disable menu options
441   - $scope.$emit("cBEnableDisableMenuOption", "");
  432 + //$rootScope.resetMenuOptionOnClick("CBTinyMCEPanel");
442 433  
443 434 }
444 435  
445   -
446 436 function traverseTreeForSetIcons(o, current_id) {
447 437  
448 438 for (var i in o) {
... ... @@ -552,7 +542,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
552 542 }
553 543 }
554 544  
555   - $rootScope.cbSelectOnChange = function (obj) {
  545 + $rootScope.cbSelectOnChange = function (obj,prevValue) {
  546 + $scope.isChangeFromDropDown=true;
  547 + $scope.lastSlideValue=prevValue;
556 548 $('#jstree').jstree(true).deselect_all();
557 549 $('#jstree').jstree('select_node', obj.value);
558 550 }
... ... @@ -574,11 +566,25 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
574 566 if ($rootScope.contentNotesForSaveCB.length == 0) {
575 567 $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents
576 568 }
577   - var currentCb_id = document.getElementById('cbSelect').value;
578   - $rootScope.updatedContentFromEditor(currentCb_id);//Calling for Update Note for Save CB
  569 +
  570 + if($scope.isChangeFromDropDown==true)
  571 + {
  572 + // modified by birendra
  573 + // in case of select dropdown current and prev id come same.
  574 + var lastslideid = $scope.lastSlideValue;
  575 + $scope.isChangeFromDropDown=false;
  576 + $scope.lastSlideValue="";
  577 +
  578 + }
  579 + else
  580 + {
  581 + var lastslideid = document.getElementById('cbSelect').value;
  582 + }
  583 +
  584 + $rootScope.updatedContentFromEditor(lastslideid);//Calling for Update Note for Save CB
579 585  
580 586 if (isActive) {
581   - $scope.updateWindowsContentForSaveCB(currentCb_id,true);// Calling for Update Window content for Save Cb
  587 + $scope.updateWindowsContentForSaveCB(lastslideid,true);// Calling for Update Window content for Save Cb
582 588 }
583 589 isActive = true;
584 590 traverseTreeSelectedSingleObj($rootScope.stru, nodeid);
... ... @@ -639,6 +645,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
639 645  
640 646 $rootScope.cbNext = function () {
641 647  
  648 + $scope.isChangeFromDropDown=false;
642 649 var cbCurrentId = document.getElementById('cbSelect').value;
643 650 var counter = 0;
644 651  
... ... @@ -666,6 +673,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
666 673 }
667 674  
668 675 $rootScope.cbBack = function () {
  676 + $scope.isChangeFromDropDown=false;
669 677 var cbCurrentId = document.getElementById('cbSelect').value;
670 678 var counter = 0;
671 679 $("#jstree").jstree("open_all");
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -50,21 +50,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
50 50  
51 51 }
52 52  
53   - $scope.initializeDAWindowData = function(windowviewid,isOpenWithExistsModule,openPanelNo){
54   -
55   - if (isOpenWithExistsModule || openPanelNo == 0)
56   - {
57   - if ($rootScope.DaWindowData != undefined)
58   - {
59   - $rootScope.DaWindowData.length = 0;
60   - }
61   - else
62   - {
63   - $rootScope.DaWindowData = [];
64   - }
65   -
66   - $rootScope.DaWindowData.push(
67   - {
  53 + $scope.ObjectAttribute=function(windowviewid)
  54 + {
  55 + var windata={
68 56 'multiwinid' : windowviewid,
69 57 'layerNumber': 0,
70 58 'voId': 0,
... ... @@ -151,9 +139,25 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
151 139 'mode': '',
152 140 'isCBAnnotationActive':false,
153 141 'annotationData':{shapeStates:[],paintCanvasState:[]},
  142 +
  143 + };
  144 + return windata;
  145 + }
  146 +
  147 + $scope.initializeDAWindowData = function(windowviewid,isOpenWithExistsModule,openPanelNo){
154 148  
155   - });
  149 + if (isOpenWithExistsModule || openPanelNo == 0)
  150 + {
  151 + if ($rootScope.DaWindowData != undefined)
  152 + {
  153 + $rootScope.DaWindowData.length = 0;
  154 + }
  155 + else
  156 + {
  157 + $rootScope.DaWindowData = [];
  158 + }
156 159  
  160 + $rootScope.DaWindowData.push($scope.ObjectAttribute(windowviewid));
157 161 }
158 162 else
159 163 {
... ... @@ -167,100 +171,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
167 171  
168 172 if(isNewWindow)
169 173 {
170   - $rootScope.DaWindowData.push(
171   - {
172   - 'multiwinid' : windowviewid,
173   - 'layerNumber': 0,
174   - 'voId': 0,
175   - 'genderId':0,
176   - 'currentViewTitle':'',
177   - 'parentSlugName': '',
178   - 'currentSlug': '',
179   - 'zoomInOut':75,
180   - 'TermNumberData':null,
181   - 'vocabTermDataArray': null,
182   - 'fullTermlist':[],
183   - 'isHighlightBodyWithCBTermData':false,
184   - 'CurriculumTermData':[],
185   - 'primaryLexiconInd': 0,
186   - 'TermAnnotationText':null,
187   - 'AllTerms':[],
188   - 'actualTermNumber':0,
189   - 'prevId':0,
190   - 'isTransparencyActivated':false,
191   - 'isTransparencyBtnClicked':false,
192   - 'isListManagerSelected':false,
193   - 'isListManagerAlreadySelected':false,
194   - 'multiAnnotationIsON':false,
195   - 'isSearchClicked':false,
196   - 'isNormalMode':true,
197   - 'isExtract':false,
198   - 'isHighLight':false,
199   - 'isZoomed':false,
200   - 'isViewChange':false,
201   - 'isGenderChnage':false,
202   - 'isTBoxModestyVisible':false,
203   - 'speechBubbleCounter':0,
204   - 'TPspeechBubbleCounter':0,
205   - 'speachBubbleArrayAnnotation':[],
206   - 'UIWrapperZIndex':12000,
207   - 'systemNumber':0,
208   - 'NavigatorData':null,
209   - 'transNumber':100,
210   - 'layerInfoForModesty':[],
211   - 'BodySystemData':[],
212   - 'BodyLayerData':[],
213   - 'matchdedDataOnLayer':[],
214   - 'bgartData':[],
215   - 'BodyRegionData':[],
216   - 'BodyRegionCordinatesData':[],
217   - 'totalLayers':0,
218   - 'layerNumberBeforeTBDraw':0,
219   - 'PreviouslayerNumbr':0,
220   - 'currentLayerNumber':0,
221   - 'viewOrientationId':0,
222   - 'CanvasDivTopPosition':0,
223   - 'CanvasDivLeftPosition':0,
224   - 'isGlobalSettingChanged':false,
225   - 'isTBDrawnOnBodyRegion':false,
226   - 'previousHighlightList':[],
227   - 'MaskCanvasData':[],
228   - 'isModestyOn':true,
229   - 'ModestyValue':'Y',
230   - 'curentEthnicity':'W',
231   - 'modestyImageInfo':[],
232   - 'ColoredImageSRC':[],
233   - 'isHighlightBodyByBodySystem':false,
234   - 'isbodySystemHighlight':false,
235   - 'grayedBR':[],
236   - 'coloredImageCanvasList':[],
237   - 'coloredImageMRCanvasList':[],
238   - 'whiteImageDataList':[],
239   - 'whiteImageMRDataList':[],
240   - 'grayImageDataList':[],
241   - 'grayImageMRDataList':[],
242   - 'updatedWhiteImageDataList':[],
243   - 'updatedWhiteImageMRDataList':[],
244   - 'updatedGrayDataList':[],
245   - 'updatedGrayMRDataList': [],
246   - 'SearchTimeStampValue': 0,
247   - 'top': 0,
248   - 'left': 0,
249   - 'width': 0,
250   - 'height': 0,
251   - 'minimised': false,
252   - 'maximised': false,
253   - 'id': 0,
254   - 'moduleName': '',
255   - 'mode': '',
256   - 'isCBAnnotationActive':false,
257   - 'annotationData':{shapeStates:[],paintCanvasState:[]},
258   - });
259   -
  174 + $rootScope.DaWindowData.push($scope.ObjectAttribute(windowviewid));
260 175 }
261 176 }
262 177  
263   -
264 178 }
265 179  
266 180 $scope.GetwindowStoreData=function(windowviewid,keyname)
... ... @@ -801,9 +715,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
801 715  
802 716 }
803 717 }
  718 + if($location.url()== "/curriculum-builder-detail") {
  719 + $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  720 + }
  721 + else
  722 + {
  723 + $scope.SetwindowStoreData(windowviewid,'parentSlugName','da-view-list');
  724 + }
804 725  
805   - $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
806   -
807 726 if ( $rootScope.BodyViewData == null || $rootScope.BodyViewData == undefined) {
808 727 var commondataJsonPath = '~/../content/data/json/da/da_dat_common.json';
809 728  
... ... @@ -1017,8 +936,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1017 936 $scope.setControlIDs();
1018 937  
1019 938 $scope.JsPanelclick(windowviewid);
1020   - $scope.$emit("cBEnableDisableMenuOption", $scope.jsPanelID);
1021   -
  939 +
1022 940 $scope.NavigatorDraggable(windowviewid)
1023 941 $scope.loadbtnNavigator(windowviewid);
1024 942 // set slider control
... ... @@ -1030,11 +948,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1030 948 var viewtitlename=$scope.GetwindowStoreData(windowviewid,'currentViewTitle');
1031 949 $scope.switchGender(windowviewid,viewtitlename);
1032 950  
1033   - $scope.setActiveview(windowviewid,viewtitlename);
1034   -
1035   - //set body system
1036   -
1037   - $scope.highlightBodySystemName(windowviewid);
  951 + $scope.setActiveview(windowviewid,viewtitlename);
1038 952  
1039 953 }, 350);
1040 954 }
... ... @@ -1087,10 +1001,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1087 1001  
1088 1002  
1089 1003 $scope.GetBodySystemData(currentBodyViewId,windowviewid);
1090   - //2. load bodyRegion data
  1004 +
  1005 + //set body system
  1006 +
  1007 + $scope.highlightBodySystemName(windowviewid);
  1008 +
1091 1009 $rootScope.isLoading = true;
1092 1010  
1093   -
1094 1011 }
1095 1012  
1096 1013 $scope.highlightBodySystemName = function (windowviewid) {
... ... @@ -1130,8 +1047,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1130 1047  
1131 1048 var pnlName=event.currentTarget.id;
1132 1049 $rootScope.resetMenuOptionOnClick(pnlName);
1133   - $scope.$emit("cBEnableDisableMenuOption",pnlName);
1134   -
  1050 +
1135 1051 // store image for export while click on panel
1136 1052  
1137 1053 var currentViewTitle = $scope.GetwindowStoreData(windowviewid, 'currentViewTitle');
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -341,7 +341,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
341 341  
342 342 $rootScope.isCallFromOtherModule = true;
343 343  
344   - if ($location.url() != "/curriculum-builder-detail") {
  344 + if ($location.url() == "/curriculum-builder-detail") {
  345 + window.parent.AIAModuleOpenResoureInCB(newWindowData);
  346 + }
  347 + else
  348 + {
345 349 var newwindowNo = 0;
346 350  
347 351 var ExistData = ModuleService.getModuleData(newWindowData.mType);
... ... @@ -355,36 +359,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
355 359 }
356 360  
357 361 ModuleService.setModuleData(newWindowData, newwindowNo);
358   - }
359   -
360   - if ($location.url() == "/curriculum-builder-detail") {
361   -
362   - window.parent.AIAModuleOpenResoureInCB(newWindowData);
363   - }
364   - else if (($location.url() == "/da-body-view")) {
365   -
366   - $scope.loadOpenResourceWindow(newWindowData.mType, '#daBodyview');
367   - }
368   - else if ($location.url() == "/clinical-illustrations-detail") {
369   - $scope.loadOpenResourceWindow(newWindowData.mType, '#CIView');
370   - }
371   - else if ($location.url() == "/module-item-view") {
372   -
373   - $scope.loadOpenResourceWindow(newWindowData.mType, '#aaBodyView');
374   - }
375   - else if ($location.url() == "/clinical-animations-detail") {
376   - $scope.loadOpenResourceWindow(newWindowData.mType, '#CAView');
377   - }
378   - else if ($location.url() == "/adam-images-detail") {
379   - $scope.loadOpenResourceWindow(newWindowData.mType, '#AIView');
380   - }
381   - else if ($location.url() == "/3d-anatomy-details") {
382   -
383   - $scope.loadOpenResourceWindow(newWindowData.mType, '#ThreeDView');
384   - }
385   - else if ($location.url() == "/lab-exercise-view") {
386   -
387   - $scope.loadOpenResourceWindow(newWindowData.mType, '#labBodyview');
  362 + $scope.loadOpenResourceWindow(newWindowData.mType);
388 363 }
389 364  
390 365 }, 500);
... ... @@ -392,15 +367,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
392 367  
393 368 }
394 369  
395   - $scope.loadOpenResourceWindow = function (moduleName,BasemoduleDivId)
  370 + $scope.loadOpenResourceWindow = function (moduleName)
396 371 {
397 372 switch (moduleName) {
398 373 case "DISSECTIBLE_ANATOMY":
399   - var daSectionExist = document.getElementById('daCustomModuleDiv');
  374 + var daSectionExist = document.getElementById('daOpenModuleDiv');
400 375  
401   - if (daSectionExist == null && BasemoduleDivId != "#daBodyview") {
402   - $(BasemoduleDivId).append($('<div id="daCustomModuleDiv"></div>'));
403   - var html = $('#daCustomModuleDiv').append("<da-directive></da-directive>");
  376 + if (daSectionExist == null) {
  377 + $("#HomeContainerDiv").append($('<div id="daOpenModuleDiv"></div>'));
  378 + var html = $('#daOpenModuleDiv').append("<da-directive></da-directive>");
404 379 $compile(html)($scope);
405 380 }
406 381 else {
... ... @@ -409,11 +384,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
409 384 }
410 385 break;
411 386 case "ATLAS_ANATOMY":
412   - var aaSectionExist = document.getElementById('aaCustomModuleDiv');
  387 + var aaSectionExist = document.getElementById('aaOpenModuleDiv');
413 388  
414   - if (aaSectionExist == null && BasemoduleDivId != "#aaBodyView") {
415   - $(BasemoduleDivId).append($('<div id="aaCustomModuleDiv"></div>'));
416   - var html = $('#aaCustomModuleDiv').append("<atlas-anatomy-directive></atlas-anatomy-directive>");
  389 + if (aaSectionExist == null) {
  390 + $("#HomeContainerDiv").append($('<div id="aaOpenModuleDiv"></div>'));
  391 + var html = $('#aaOpenModuleDiv').append("<atlas-anatomy-directive></atlas-anatomy-directive>");
417 392 $compile(html)($scope);
418 393 }
419 394 else {
... ... @@ -422,11 +397,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
422 397 }
423 398 break;
424 399 case "CLINICAL_ILLUSTRATIONS":
425   - var ciSectionExist = document.getElementById('ciCustomModuleDiv');
  400 + var ciSectionExist = document.getElementById('ciOpenModuleDiv');
426 401  
427   - if (ciSectionExist == null && BasemoduleDivId != "#CIView") {
428   - $(BasemoduleDivId).append($('<div id="ciCustomModuleDiv"></div>'));
429   - var html = $('#ciCustomModuleDiv').append("<clinical-illustration-directive></clinical-illustration-directive>");
  402 + if (ciSectionExist == null) {
  403 + $("#HomeContainerDiv").append($('<div id="ciOpenModuleDiv"></div>'));
  404 + var html = $('#ciOpenModuleDiv').append("<clinical-illustration-directive></clinical-illustration-directive>");
430 405 $compile(html)($scope);
431 406 }
432 407 else {
... ... @@ -435,11 +410,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
435 410 }
436 411 break;
437 412 case "ADAM_IMAGES":
438   - var aiSectionExist = document.getElementById('aiCustomModuleDiv');
  413 + var aiSectionExist = document.getElementById('aiOpenModuleDiv');
439 414  
440   - if (aiSectionExist == null && BasemoduleDivId != "#AIView") {
441   - $(BasemoduleDivId).append($('<div id="aiCustomModuleDiv"></div>'));
442   - var html = $('#aiCustomModuleDiv').append("<adam-image-directive></adam-image-directive>");
  415 + if (aiSectionExist == null) {
  416 + $("#HomeContainerDiv").append($('<div id="aiOpenModuleDiv"></div>'));
  417 + var html = $('#aiOpenModuleDiv').append("<adam-image-directive></adam-image-directive>");
443 418 $compile(html)($scope);
444 419 }
445 420 else {
... ... @@ -448,11 +423,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
448 423 }
449 424 break;
450 425 case "CLINICAL_ANIMATIONS":
451   - var caSectionExist = document.getElementById('caCustomModuleDiv');
  426 + var caSectionExist = document.getElementById('caOpenModuleDiv');
452 427  
453   - if (caSectionExist == null && BasemoduleDivId != "#CAView") {
454   - $(BasemoduleDivId).append($('<div id="caCustomModuleDiv"></div>'));
455   - var html = $('#caCustomModuleDiv').append("<clinical-animation-directive></clinical-animation-directive>");
  428 + if (caSectionExist == null) {
  429 + $("#HomeContainerDiv").append($('<div id="caOpenModuleDiv"></div>'));
  430 + var html = $('#caOpenModuleDiv').append("<clinical-animation-directive></clinical-animation-directive>");
456 431 $compile(html)($scope);
457 432 }
458 433 else {
... ... @@ -461,11 +436,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
461 436 }
462 437 break;
463 438 case "THREE_D_ANATOMY":
464   - var threeDSectionExist = document.getElementById('theeDCustomModuleDiv');
  439 + var threeDSectionExist = document.getElementById('theeDOpenModuleDiv');
465 440  
466   - if (threeDSectionExist == null && BasemoduleDivId != "#ThreeDView") {
467   - $(BasemoduleDivId).append($('<div id="theeDCustomModuleDiv"></div>'));
468   - var html = $('#theeDCustomModuleDiv').append("<threed-anatomy-directive></threed-anatomy-directive>");
  441 + if (threeDSectionExist == null) {
  442 + $("#HomeContainerDiv").append($('<div id="theeDOpenModuleDiv"></div>'));
  443 + var html = $('#theeDOpenModuleDiv').append("<threed-anatomy-directive></threed-anatomy-directive>");
469 444 $compile(html)($scope);
470 445 }
471 446 else {
... ... @@ -475,11 +450,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
475 450  
476 451 break;
477 452 case "LAB_EXERCISE":
478   - var labSectionExist = document.getElementById('labCustomModuleDiv');
  453 + var labSectionExist = document.getElementById('labOpenModuleDiv');
479 454  
480   - if (labSectionExist == null && BasemoduleDivId != "#labBodyview") {
481   - $(BasemoduleDivId).append($('<div id="labCustomModuleDiv"></div>'));
482   - var html = $('#labCustomModuleDiv').append("<lab-exercise-directive></lab-exercise-directive>");
  455 + if (labSectionExist == null) {
  456 + $("#HomeContainerDiv").append($('<div id="labOpenModuleDiv"></div>'));
  457 + var html = $('#labOpenModuleDiv').append("<lab-exercise-directive></lab-exercise-directive>");
483 458 $compile(html)($scope);
484 459 }
485 460 else {
... ... @@ -489,11 +464,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
489 464  
490 465 break;
491 466 case "MY_PICTURES":
492   - var picSectionExist = document.getElementById('picCustomModuleDiv');
  467 + var picSectionExist = document.getElementById('picOpenModuleDiv');
493 468  
494   - if (picSectionExist == null ||picSectionExist==undefined) {
495   - $(BasemoduleDivId).append($('<div id="picCustomModuleDiv"></div>'));
496   - var html = $('#picCustomModuleDiv').append("<my-picture-directive></my-picture-directive>");
  469 + if (picSectionExist == null) {
  470 + $("#HomeContainerDiv").append($('<div id="picOpenModuleDiv"></div>'));
  471 + var html = $('#picOpenModuleDiv').append("<my-picture-directive></my-picture-directive>");
497 472 $compile(html)($scope);
498 473 }
499 474 else {
... ... @@ -542,11 +517,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
542 517 //enable export image for instructors edition and for superadmin .disable for demo/test user
543 518 if ((($rootScope.userData.EditionId == 1) || ($rootScope.userData.EditionId == 2) || ($rootScope.userData.EditionId == 0)) && ($rootScope.userData.UserTypeId != 8)) {
544 519  
545   - $('#exportImageAnchor').parent().removeClass('exportImage');
  520 + $('#exportImageAnchor').removeClass('exportImage');
546 521 }
547 522 else
548 523 {
549   - $('#exportImageAnchor').parent().addClass('exportImage');
  524 + $('#exportImageAnchor').addClass('exportImage');
550 525 }
551 526  
552 527 }
... ... @@ -1779,10 +1754,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1779 1754 $rootScope.newCurriculum = "newCurriculum";
1780 1755 $rootScope.openCurriculum = "openCurriculum";
1781 1756 $rootScope.saveCurriculam = "saveCurriculam";
1782   - $rootScope.PrintPreview = "";
1783   - $rootScope.PrintViewer = "";
1784   - //enableDisable export option
1785   - $scope.EnableDisableExportImage();
  1757 + $("#printAVAnchor").removeClass("PrintViewer");
  1758 + $("#printAllAVAnchor").removeClass("PrintViewer");
  1759 + $("#printPreviewAnchor").removeClass("PrintPreview");
  1760 + $("#exportImageAnchor").removeClass("exportImage");
1786 1761  
1787 1762 }
1788 1763 else if ($location.url() == "/clinical-illustrations-detail") {
... ... @@ -1799,10 +1774,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1799 1774 $rootScope.newCurriculum = "newCurriculum";
1800 1775 $rootScope.openCurriculum = "openCurriculum";
1801 1776 $rootScope.saveCurriculam = "saveCurriculam";
1802   - $rootScope.PrintPreview = "";
1803   - $rootScope.PrintViewer = "";
1804   - //enableDisable export option
1805   - $scope.EnableDisableExportImage();
  1777 + $("#printAVAnchor").removeClass("PrintViewer");
  1778 + $("#printAllAVAnchor").removeClass("PrintViewer");
  1779 + $("#printPreviewAnchor").removeClass("PrintPreview");
  1780 + $("#exportImageAnchor").removeClass("exportImage");
1806 1781 }
1807 1782 else if ($location.url() == "/module-item-view") {
1808 1783 $("#annotationButton").removeClass("disableMenuoption");
... ... @@ -1817,10 +1792,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1817 1792 $rootScope.newCurriculum = "newCurriculum";
1818 1793 $rootScope.openCurriculum = "openCurriculum";
1819 1794 $rootScope.saveCurriculam = "saveCurriculam";
1820   - $rootScope.PrintPreview = "";
1821   - $rootScope.PrintViewer = "";
1822   - //enableDisable export option
1823   - $scope.EnableDisableExportImage();
  1795 + $("#printAVAnchor").removeClass("PrintViewer");
  1796 + $("#printAllAVAnchor").removeClass("PrintViewer");
  1797 + $("#printPreviewAnchor").removeClass("PrintPreview");
  1798 + $("#exportImageAnchor").removeClass("exportImage");
1824 1799 }
1825 1800 else if ($location.url() == "/clinical-animations-detail") {
1826 1801 $("#annotationButton").addClass("disableMenuoption");
... ... @@ -1835,18 +1810,16 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1835 1810 $rootScope.newCurriculum = "newCurriculum";
1836 1811 $rootScope.openCurriculum = "openCurriculum";
1837 1812 $rootScope.saveCurriculam = "saveCurriculam";
1838   - $rootScope.PrintPreview = "PrintPreview";
1839   - $rootScope.PrintViewer = "PrintViewer";
1840   - $rootScope.exportImage = "exportImage";
  1813 + $("#printAVAnchor").addClass("PrintViewer");
  1814 + $("#printAllAVAnchor").addClass("PrintViewer");
  1815 + $("#printPreviewAnchor").addClass("PrintPreview");
  1816 + $("#exportImageAnchor").addClass("exportImage");
  1817 +
1841 1818 }
1842 1819 else if ($location.url() == "/curriculum-builder") {
1843   - $("#openResourceId").addClass("openResources");
1844   -
  1820 + $("#openResourceId").addClass("openResources");
1845 1821 $("#annotationButton").addClass("disableMenuoption");
1846   - $("#Menuoptionid").addClass("disableMenuoption");
1847   - $rootScope.PrintPreview = "PrintPreview";
1848   - $rootScope.PrintViewer = "PrintViewer";
1849   -
  1822 + $("#Menuoptionid").addClass("disableMenuoption");
1850 1823 $rootScope.newCurriculum = "newCurriculum";
1851 1824 $rootScope.openCurriculum = "";
1852 1825 $rootScope.saveCurriculam = "saveCurriculam";
... ... @@ -1855,21 +1828,24 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1855 1828 $("#openPictureId").addClass("OpenPitures");
1856 1829 $rootScope.disableMenuoption = "disableMenuoption";
1857 1830 $("#fileMenuAnchor").removeClass("disableFileMenu");
1858   - $rootScope.exportImage = "exportImage";
  1831 + $("#printAVAnchor").addClass("PrintViewer");
  1832 + $("#printAllAVAnchor").addClass("PrintViewer");
  1833 + $("#printPreviewAnchor").addClass("PrintPreview");
  1834 + $("#exportImageAnchor").addClass("exportImage");
1859 1835 }
1860 1836 else if ($location.url() == "/curriculum-builder-detail") {
1861 1837 $("#fileMenuAnchor").removeClass("disableFileMenu");
1862 1838 $("#Menuoptionid").addClass("disableMenuoption");
1863   - $rootScope.PrintPreview = "PrintPreview";
1864   - $rootScope.PrintViewer = "PrintViewer";
1865 1839 $rootScope.newCurriculum = "";
1866 1840 $rootScope.openCurriculum = "";
1867 1841 $rootScope.saveCurriculam = "";
1868 1842 $("#openResourceId").removeClass("openResources");
1869   - $("#openPictureId").removeClass("OpenPitures");
1870   -
  1843 + $("#openPictureId").removeClass("OpenPitures");
1871 1844 $rootScope.disableMenuoption = "disableMenuoption";
1872   - $rootScope.exportImage = "exportImage";
  1845 + $("#printAVAnchor").addClass("PrintViewer");
  1846 + $("#printAllAVAnchor").addClass("PrintViewer");
  1847 + $("#printPreviewAnchor").addClass("PrintPreview");
  1848 + $("#exportImageAnchor").addClass("exportImage");
1873 1849 }
1874 1850 else if ($location.url() == "/adam-images-detail") {
1875 1851 $("#annotationButton").removeClass("disableMenuoption");
... ... @@ -1885,10 +1861,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1885 1861 $rootScope.newCurriculum = "newCurriculum";
1886 1862 $rootScope.openCurriculum = "openCurriculum";
1887 1863 $rootScope.saveCurriculam = "saveCurriculam";
1888   - $rootScope.PrintPreview = "";
1889   - $rootScope.PrintViewer = "";
1890   - //enableDisable export option
1891   - $scope.EnableDisableExportImage();
  1864 + $("#printAVAnchor").removeClass("PrintViewer");
  1865 + $("#printAllAVAnchor").removeClass("PrintViewer");
  1866 + $("#printPreviewAnchor").removeClass("PrintPreview");
  1867 + $("#exportImageAnchor").removeClass("exportImage");
  1868 +
1892 1869 }
1893 1870 else if ($location.url() == "/3d-anatomy-details") {
1894 1871 $("#annotationButton").addClass("disableMenuoption");
... ... @@ -1903,9 +1880,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1903 1880 $rootScope.newCurriculum = "newCurriculum";
1904 1881 $rootScope.openCurriculum = "openCurriculum";
1905 1882 $rootScope.saveCurriculam = "saveCurriculam";
1906   - $rootScope.PrintPreview = "PrintPreview";
1907   - $rootScope.PrintViewer = "PrintViewer";
1908   - $rootScope.exportImage = "exportImage";
  1883 + $("#printAVAnchor").addClass("PrintViewer");
  1884 + $("#printAllAVAnchor").addClass("PrintViewer");
  1885 + $("#printPreviewAnchor").addClass("PrintPreview");
  1886 + $("#exportImageAnchor").addClass("exportImage");
1909 1887 }
1910 1888 else if ($location.url() == "/lab-exercise-view") {
1911 1889 $("#annotationButton").addClass("disableMenuoption");
... ... @@ -1920,9 +1898,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1920 1898 $rootScope.newCurriculum = "newCurriculum";
1921 1899 $rootScope.openCurriculum = "openCurriculum";
1922 1900 $rootScope.saveCurriculam = "saveCurriculam";
1923   - $rootScope.PrintPreview = "PrintPreview";
1924   - $rootScope.PrintViewer = "PrintViewer";
1925   - $rootScope.exportImage = "exportImage";
  1901 + $("#printAVAnchor").addClass("PrintViewer");
  1902 + $("#printAllAVAnchor").addClass("PrintViewer");
  1903 + $("#printPreviewAnchor").addClass("PrintPreview");
  1904 + $("#exportImageAnchor").addClass("exportImage");
1926 1905 }
1927 1906 else {
1928 1907 $("#fileMenuAnchor").addClass("disableFileMenu");
... ... @@ -1989,6 +1968,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1989 1968 $("#optiontSetting").addClass("disableSubMenu");
1990 1969 $("#labExPdfOption").addClass("disableSubMenu");
1991 1970  
  1971 + $("#printAVAnchor").addClass("PrintViewer");
  1972 + $("#printAllAVAnchor").addClass("PrintViewer");
  1973 + $("#printPreviewAnchor").addClass("PrintPreview");
  1974 + $("#exportImageAnchor").addClass("exportImage");
  1975 +
1992 1976 //disble option popup
1993 1977  
1994 1978 $("#listManagerBody *").prop('disabled',true);
... ... @@ -2005,6 +1989,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2005 1989 $("#optiontSetting").removeClass("disableSubMenu");
2006 1990  
2007 1991 $("#listManagerBody *").prop('disabled',false);
  1992 +
  1993 + $("#printAVAnchor").removeClass("PrintViewer");
  1994 + $("#printAllAVAnchor").removeClass("PrintViewer");
  1995 + $("#printPreviewAnchor").removeClass("PrintPreview");
  1996 + $rootScope.panelNameWithCb = paneld;
  1997 + $scope.EnableDisableExportImage();
2008 1998 }
2009 1999 else if(paneld.match('AAImagePanel'))
2010 2000 {
... ... @@ -2014,24 +2004,48 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2014 2004 $("#annotationToolBarOptions").removeClass("disableSubMenu");
2015 2005  
2016 2006 $("#listManagerBody *").prop('disabled',false);
  2007 +
  2008 + $("#printAVAnchor").removeClass("PrintViewer");
  2009 + $("#printAllAVAnchor").removeClass("PrintViewer");
  2010 + $("#printPreviewAnchor").removeClass("PrintPreview");
  2011 + $rootScope.panelNameWithCb = paneld;
  2012 + $scope.EnableDisableExportImage();
2017 2013 }
2018 2014 else if(paneld.match('aiImagePanel'))
2019 2015 {
2020 2016 $("#annotationButton").removeClass("disableMenuoption");
2021 2017 $("#Menuoptionid").removeClass("disableMenuoption");
2022 2018 $("#annotationToolBarOptions").removeClass("disableSubMenu");
  2019 +
  2020 + $("#printAVAnchor").removeClass("PrintViewer");
  2021 + $("#printAllAVAnchor").removeClass("PrintViewer");
  2022 + $("#printPreviewAnchor").removeClass("PrintPreview");
  2023 + $rootScope.panelNameWithCb = paneld;
  2024 + $scope.EnableDisableExportImage();
2023 2025 }
2024 2026 else if(paneld.match('picImagePanel'))
2025 2027 {
2026 2028 $("#annotationButton").removeClass("disableMenuoption");
2027 2029 $("#Menuoptionid").removeClass("disableMenuoption");
2028 2030 $("#annotationToolBarOptions").removeClass("disableSubMenu");
  2031 +
  2032 + $("#printAVAnchor").removeClass("PrintViewer");
  2033 + $("#printAllAVAnchor").removeClass("PrintViewer");
  2034 + $("#printPreviewAnchor").removeClass("PrintPreview");
  2035 + $rootScope.panelNameWithCb = paneld;
  2036 + $scope.EnableDisableExportImage();
2029 2037 }
2030 2038 else if(paneld.match('ciImagePanel'))
2031 2039 {
2032 2040 $("#annotationButton").removeClass("disableMenuoption");
2033 2041 $("#Menuoptionid").removeClass("disableMenuoption");
2034 2042 $("#annotationToolBarOptions").removeClass("disableSubMenu");
  2043 +
  2044 + $("#printAVAnchor").removeClass("PrintViewer");
  2045 + $("#printAllAVAnchor").removeClass("PrintViewer");
  2046 + $("#printPreviewAnchor").removeClass("PrintPreview");
  2047 + $rootScope.panelNameWithCb = paneld;
  2048 + $scope.EnableDisableExportImage();
2035 2049 }
2036 2050 else if(paneld.match('caImagePanel'))
2037 2051 {
... ... @@ -2052,12 +2066,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2052 2066 //reset option when load
2053 2067 $rootScope.resetMenuOption = function () {
2054 2068 $timeout(function () {
  2069 + $rootScope.panelNameWithCb="";
2055 2070 $rootScope.disableTopMenuOption();
2056 2071 var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']");
2057 2072 if (modulePanel != undefined && modulePanel.length>0) {
2058 2073 for (var index = 0 ; index < modulePanel.length; index++) {
2059 2074 var paneld = modulePanel[index].id;
2060 2075 $rootScope.enableTopMenuOption(paneld);
  2076 +
2061 2077 }
2062 2078 }
2063 2079  
... ... @@ -2065,9 +2081,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2065 2081 }
2066 2082  
2067 2083 // enable/disable option Panel click
2068   - $rootScope.resetMenuOptionOnClick = function (moduleName) {
  2084 + $rootScope.resetMenuOptionOnClick = function (moduleName) {
  2085 + $rootScope.panelNameWithCb="";
2069 2086 $rootScope.disableTopMenuOption();
2070   - $rootScope.enableTopMenuOption(moduleName);
  2087 + $rootScope.enableTopMenuOption(moduleName);
  2088 +
  2089 + $rootScope.panelNameWithCb = moduleName;
2071 2090  
2072 2091 }
2073 2092  
... ... @@ -2109,46 +2128,16 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2109 2128 }
2110 2129  
2111 2130 // list manger already open then refresh it or close
2112   - $scope.updateListManagerView(panelName);
  2131 + if($('#listManager').css('display') == 'block')
  2132 + {
  2133 + $scope.updateListManagerView(panelName);
  2134 + }
  2135 +
2113 2136  
2114 2137 }, 500);
2115 2138  
2116 2139 }
2117   - //file menu option
2118   - $scope.$on("cBEnableDisableMenuOption", function (evt, name) {
2119   -
2120   -
2121   - $rootScope.panelNameWithCb = name;
2122   -
2123   - //enable export image for instructors edition and for superadmin .disable for demo/test user
2124   - if ((($rootScope.userData.EditionId == 1) || ($rootScope.userData.EditionId == 2) || ($rootScope.userData.EditionId == 0)) && ($rootScope.userData.UserTypeId != 8)) {
2125   -
2126   - if (name != "") {
2127   - $('#exportImageAnchor').parent().removeClass('exportImage');
2128   - }
2129   - else {
2130   - $('#exportImageAnchor').parent().addClass('exportImage');
2131   - }
2132   - }
2133   - else
2134   - {
2135   - $('#exportImageAnchor').parent().addClass('exportImage');
2136   - }
2137   -
2138   - if (name != "") {
2139   - $('#printAVAnchor').parent().removeClass('PrintViewer');
2140   - $('#printAllAVAnchor').parent().removeClass('PrintViewer');
2141   - $('#printPreviewAnchor').parent().removeClass('PrintPreview');
2142   - }
2143   - else {
2144   - $('#printAVAnchor').parent().addClass('PrintViewer');
2145   - $('#printAllAVAnchor').parent().addClass('PrintViewer');
2146   - $('#printPreviewAnchor').parent().addClass('PrintPreview');
2147   - }
2148   -
2149   - });
2150   -
2151   -
  2140 +
2152 2141 $rootScope.openParent = function (slug) {
2153 2142 if ($('#jsPanel-1').length > 0) {
2154 2143  
... ... @@ -2182,11 +2171,22 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2182 2171  
2183 2172 if ($('#ImagePanel').length > 0)
2184 2173 $('#ImagePanel').remove();
  2174 +
  2175 + if ($location.url() == "/curriculum-builder-detail") {
  2176 + $location.url('/' + slug);
  2177 + }
  2178 + else
  2179 + {
  2180 + // find all panel in HomeContainerDiv and outside(while minimize);
  2181 + var modulePanel = $(document).find("div[id*='ImagePanel']");
  2182 + if (modulePanel != undefined && modulePanel.length>0) {
  2183 + //if only one module left
  2184 + if(modulePanel.length==1) $location.url('/' + slug);
  2185 + }
  2186 + }
2185 2187  
2186 2188  
2187   - $location.url('/' + slug);
2188   -
2189   - // $rootScope.$broadcast('jsPanelCloseEvent', true);
  2189 +
2190 2190 }
2191 2191 }
2192 2192  
... ... @@ -6038,8 +6038,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6038 6038 var selectedPanel = $("#viewName option:selected").val();
6039 6039  
6040 6040 if(selectedPanel!="0" && selectedPanel!=undefined)
6041   - {
6042   - $rootScope.loadViewListManager(selectedPanel);
  6041 + {
  6042 + $rootScope.loadViewListManager(selectedPanel);
  6043 +
6043 6044 }
6044 6045 },100);
6045 6046 }
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
1 1 AIA.controller("LabExercController", ["$scope", "$rootScope", "pages", "$log", '$http', '$timeout', 'DataService', '$filter', '$location', '$document', '$sce', "$compile", "$location", "LabExerciseService", "AIAConstants", "LoginConstants", "$parse", "ModuleService", "$interval",
2 2 function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $location, $document, $sce, $compile, $location, LabExerciseService, AIAConstants, LoginConstants, $parse, ModuleService, $interval) {
3 3 $scope.$sce = $sce;
4   - $scope.initializeLEWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
5   - if (isOpenWithExistsModule || openPanelNo == 0) {
6   - if ($rootScope.LEWindowData != undefined) {
7   - $rootScope.LEWindowData.length = 0;
8   - }
9   - else {
10   - $rootScope.LEWindowData = [];
11   - }
12 4  
13   - $rootScope.LEWindowData.push(
14   - {
  5 + $scope.ObjectAttribute=function(windowviewid)
  6 + {
  7 + var windata={
15 8 'multiwinid': windowviewid,
16 9 'LabExerciseModulesList': [],
17 10 'LabExerciseData': [],
... ... @@ -42,7 +35,20 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
42 35 'userloginid': 0,
43 36 'correctResonseKeyValue': [],
44 37 'correctResponseForSavingDatabase':''
45   - });
  38 +
  39 + };
  40 + return windata;
  41 + }
  42 + $scope.initializeLEWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
  43 + if (isOpenWithExistsModule || openPanelNo == 0) {
  44 + if ($rootScope.LEWindowData != undefined) {
  45 + $rootScope.LEWindowData.length = 0;
  46 + }
  47 + else {
  48 + $rootScope.LEWindowData = [];
  49 + }
  50 +
  51 + $rootScope.LEWindowData.push($scope.ObjectAttribute(windowviewid));
46 52  
47 53 }
48 54 else {
... ... @@ -55,41 +61,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
55 61 }
56 62  
57 63 if (isNewWindow) {
58   - $rootScope.LEWindowData.push(
59   - {
60   - 'multiwinid': windowviewid,
61   - 'LabExerciseModulesList': [],
62   - 'LabExerciseData': [],
63   - 'moduleName': '',
64   - 'currentViewTitle': '',
65   - 'parentSlugName': '',
66   - 'keywords': '',
67   - 'SavedLabExercise': [],
68   - 'quiznumber': 1,
69   - 'initialQuestioNo': 1,
70   - 'TextDropId': '',
71   - 'draggableAttribute': '',
72   - 'droppableAttribute': '',
73   - 'UserAttempt': [],
74   - 'labExeIdentifier': '',
75   - 'activityTitle': '',
76   - 'TotalNumberofQuiz': 0,
77   - 'LabExerciseUserData': [],
78   - 'isResetClicked': false,
79   - 'isResultVisible': false,
80   - 'usersCorrectQuestData': [],
81   - 'MaxScore': 0,
82   - 'Score': 0,
83   - 'DragItems': '',
84   - 'isReviewBtnSelected': false,
85   - 'LastQuestion': 0,
86   - 'commaSeperatedUserAnswers': '',
87   - 'userloginid': 0,
88   - 'correctResonseKeyValue': [],
89   - 'correctResponseForSavingDatabase': ''
90   -
91   - });
92   -
  64 + $rootScope.LEWindowData.push($scope.ObjectAttribute(windowviewid));
93 65 }
94 66 }
95 67 }
... ... @@ -338,7 +310,13 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
338 310  
339 311 $scope.SetLEwindowStoreData(windowviewid, 'LabExerciseUserData', []);
340 312  
341   - $scope.SetLEwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', ''));
  313 + if($location.url()== "/curriculum-builder-detail") {
  314 + $scope.SetLEwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  315 + }
  316 + else
  317 + {
  318 + $scope.SetLEwindowStoreData(windowviewid,'parentSlugName','lab-exercises');
  319 + }
342 320  
343 321 $scope.loadLabExecise(windowviewid, keywords);
344 322 }
... ... @@ -439,8 +417,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
439 417 $('#LabView_' + windowviewid).css('height', canvasDIvHeight);
440 418  
441 419 $scope.JsPanelclick(windowviewid);
442   - $scope.$emit("cBEnableDisableMenuOption", "");
443   -
  420 +
444 421 if (labResult != undefined && labResult.lastQuestion > 0 && labResult != AIAConstants.SAVED_LAB_EXERCISE_NOT_FOUND) {
445 422  
446 423 $scope.SetLEwindowStoreData(windowviewid, 'SavedLabExercise', labResult);
... ... @@ -473,8 +450,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
473 450 $("#labImagePanel_" + windowviewid).on('click', function (event) {
474 451 var pnlName = event.currentTarget.id;
475 452 $rootScope.resetMenuOptionOnClick(pnlName);
476   - $scope.$emit("cBEnableDisableMenuOption", "");
477   -
  453 +
478 454 });
479 455 }
480 456  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
... ... @@ -3,17 +3,9 @@
3 3 AIA.controller("MyPictureController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout","ModuleService", "$interval",
4 4 function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, ModuleService, $interval) {
5 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   - {
  6 + $scope.ObjectAttribute=function(windowviewid)
  7 + {
  8 + var windata={
17 9 'multiwinid': windowviewid,
18 10 'imageSource': [],
19 11 'moduleName': '',
... ... @@ -28,7 +20,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
28 20 'minimised': false,
29 21 'maximised': false,
30 22 'annotationData':{shapeStates:[],paintCanvasState:[]},
31   - });
  23 +
  24 + };
  25 + return windata;
  26 + }
  27 +
  28 + $scope.initializePICWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) {
  29 + if (isOpenWithExistsModule || openPanelNo == 0) {
  30 + if ($rootScope.PICWindowData != undefined) {
  31 + $rootScope.PICWindowData.length = 0;
  32 + }
  33 + else {
  34 + $rootScope.PICWindowData = [];
  35 + }
  36 +
  37 + $rootScope.PICWindowData.push($scope.ObjectAttribute(windowviewid));
32 38  
33 39 }
34 40 else {
... ... @@ -41,24 +47,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
41 47 }
42 48  
43 49 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   -
  50 + $rootScope.PICWindowData.push($scope.ObjectAttribute(windowviewid));
62 51 }
63 52 }
64 53 }
... ... @@ -229,7 +218,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
229 218 $rootScope.StoreTitleName(aiTitle);
230 219 $rootScope.StoreOrgImageName(aiTitle);
231 220  
232   - $scope.SetPICwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', ''));
  221 + if($location.url()== "/curriculum-builder-detail") {
  222 + $scope.SetPICwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  223 + }
  224 + else
  225 + {
  226 + $scope.SetPICwindowStoreData(windowviewid,'parentSlugName','');//back to home screen
  227 + }
233 228  
234 229 $scope.loadMyPicture(windowviewid);
235 230  
... ... @@ -302,8 +297,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
302 297  
303 298  
304 299 $scope.JsPanelclick(windowviewid);
305   - $scope.$emit("cBEnableDisableMenuOption", $scope.jsPanelID);
306   -
  300 +
307 301 var canvas = document.getElementById("canvasPIC_" + windowviewid);
308 302 var canvasPaint = document.getElementById("canvasPaintPIC_" + windowviewid);
309 303  
... ... @@ -362,8 +356,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
362 356  
363 357 var pnlName = event.currentTarget.id;
364 358 $rootScope.resetMenuOptionOnClick(pnlName);
365   - $scope.$emit("cBEnableDisableMenuOption", pnlName);
366   -
  359 +
367 360 // store image for export while click on panel
368 361  
369 362 var currentViewTitle = $scope.GetPICwindowStoreData(windowviewid, 'currentViewTitle');
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -48,19 +48,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
48 48 $('#list-view').css("display", "block");
49 49 }
50 50 };
51   -
52   - $scope.initializeAAWindowData = function(windowviewid,isOpenWithExistsModule,openPanelNo){
53   - if (isOpenWithExistsModule || openPanelNo == 0)
54   - {
55   - if ($rootScope.AAWindowData != undefined) {
56   - $rootScope.AAWindowData.length = 0;
57   - }
58   - else {
59   - $rootScope.AAWindowData = [];
60   - }
61   -
62   - $rootScope.AAWindowData.push(
63   - {
  51 +
  52 + $scope.ObjectAttribute=function(windowviewid)
  53 + {
  54 + var windata={
64 55 'multiwinid' : windowviewid,
65 56 'moduleName':'',
66 57 'currentViewTitle':'',
... ... @@ -107,8 +98,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
107 98 'navigatorImage':"",
108 99 'annotationData':{shapeStates:[],paintCanvasState:[]},
109 100  
110   - });
  101 + };
  102 + return windata;
  103 + }
111 104  
  105 + $scope.initializeAAWindowData = function(windowviewid,isOpenWithExistsModule,openPanelNo){
  106 + if (isOpenWithExistsModule || openPanelNo == 0)
  107 + {
  108 + if ($rootScope.AAWindowData != undefined) {
  109 + $rootScope.AAWindowData.length = 0;
  110 + }
  111 + else {
  112 + $rootScope.AAWindowData = [];
  113 + }
  114 +
  115 + $rootScope.AAWindowData.push($scope.ObjectAttribute(windowviewid));
112 116 }
113 117 else
114 118 {
... ... @@ -122,56 +126,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
122 126  
123 127 if(isNewWindow)
124 128 {
125   - $rootScope.AAWindowData.push(
126   - {
127   - 'multiwinid' : windowviewid,
128   - 'moduleName':'',
129   - 'currentViewTitle':'',
130   - 'parentSlugName':'',
131   - 'sliderPercentValue':1,
132   - 'imageId':'',
133   - 'imageName':'',
134   - 'bodySystemName':'',
135   - 'OpenItemImagePath':'',
136   - 'isBodySystemSelected':false,
137   - 'isSelectedPinBtnClickedAftrSliderCange':false,
138   - 'isHidePinBtnClicked':false,
139   - 'isShowSelectedSystemPinsClicked':false,
140   - 'isSliderChange':false,
141   - 'clickedPins':[],
142   - 'activePinArray':[],
143   - 'typeOfEvent':'',
144   - 'selectedSystemName':null,
145   - 'SelectedSystemID':0,
146   - 'aaPinData':[],
147   - 'allPinDataArray':[],
148   - 'selectedSystemPinData':[],
149   - 'AAPinTermData':[],
150   - 'pinTermData':[],
151   - 'sliderVal':100,
152   - 'speechBubbleDimaensions':[],
153   - 'isShowBodyWithCBPinData':false,
154   - 'CBselectedpinCordinate': [],
155   - 'verticalScroll': 0,
156   - 'horizontalScroll': 0,
157   - 'top': 0,
158   - 'left': 0,
159   - 'width': 0,
160   - 'height': 0,
161   - 'minimised': false,
162   - 'maximised': false,
163   - 'id': 0,
164   - 'selectedPins': [],
165   - 'isShowSelectedPins': false,
166   - 'selectedSearchId': 0,
167   - 'isShowAllPins': false,
168   - 'canvasImageWidth': 0,
169   - 'canvasImageHeight': 0,
170   - 'navigatorImage':"",
171   - 'annotationData':{shapeStates:[],paintCanvasState:[]},
172   -
173   - });
174   -
  129 + $rootScope.AAWindowData.push($scope.ObjectAttribute(windowviewid));
175 130 }
176 131 }
177 132 }
... ... @@ -567,9 +522,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
567 522 var sId = $scope.aaOpenInOtherModules.id;
568 523  
569 524 $scope.SetAAwindowStoreData(windowviewid, 'id', sId);
570   -
571   - $scope.SetAAwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
572   -
  525 +
  526 + if($location.url()== "/curriculum-builder-detail") {
  527 + $scope.SetAAwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
  528 + }
  529 + else
  530 + {
  531 + $scope.SetAAwindowStoreData(windowviewid,'parentSlugName','tile-view-list');
  532 + }
573 533  
574 534 var selectedTileData = new jinqJs()
575 535 .from($scope.moduleLandingData.data.root.Item)
... ... @@ -770,8 +730,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
770 730 //7. Highlight all system body list in left side
771 731 $scope.highlightBodySystemList(windowviewid);
772 732  
773   - $scope.loadbtnNavigator(windowviewid);
774   - $scope.$emit("cBEnableDisableMenuOption", $scope.jsPanelID);
  733 + $scope.loadbtnNavigator(windowviewid);
775 734 $scope.JsPanelclick(windowviewid);
776 735  
777 736 if ($rootScope.isCallFromOtherModule) {
... ... @@ -932,7 +891,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
932 891  
933 892 var pnlName=event.currentTarget.id;
934 893 $rootScope.resetMenuOptionOnClick(pnlName);
935   - $scope.$emit("cBEnableDisableMenuOption", pnlName);
936 894 var titlt = $("#AAImagePanel_" + windowviewid).childNodes;
937 895  
938 896 // store image for export while click on panel
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-TinyMCEjspanel.html
... ... @@ -21,7 +21,7 @@
21 21 <img src="../../../content/images/CB/icon-next.png" alt="">
22 22 </button>
23 23 <div class="form-group">
24   - <select id='cbSelect' onchange="cbSelectOnChange(this)"></select>
  24 + <select id='cbSelect'></select>
25 25  
26 26 <!--<select ng-model="selectedCountry" ng-options="item.countryId as item.name for item in chooseCountries">
27 27 <option value="">Select Account</option>
... ... @@ -94,6 +94,14 @@
94 94  
95 95 });
96 96  
  97 + var previous;
  98 +
  99 + $("#cbSelect").on('focus', function () {
  100 + previous = document.getElementById('cbSelect').value;
  101 + }).change(function() {
  102 + cbSelectOnChange(this,previous);
  103 + previous = this.value;
  104 + });
97 105  
98 106 //Modified code by Sandeep for fixed bug TicketNo: 49226(6)
99 107 function editorHideShow() {
... ... @@ -125,9 +133,9 @@
125 133  
126 134 angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().showDeleteSlideModel();
127 135 }
128   - function cbSelectOnChange(obj) {
  136 + function cbSelectOnChange(obj,prevValue) {
129 137  
130   - angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbSelectOnChange(obj);
  138 + angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbSelectOnChange(obj,prevValue);
131 139 }
132 140 function myeditorclick() {
133 141  
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -15,11 +15,11 @@
15 15 <li ng-class="openCurriculum" ng-click="OpenExistingCurriculum($event)"><a href="#">Open Existing Curriculum</a></li>
16 16 <li ng-class="saveCurriculam" ng-click="saveCurricullam($event)"><a href="curriculum-builder-detail">Save Curriculum As</a></li>
17 17 <li role="separator" class="divider"></li>
18   - <li ng-class="exportImage"><a href="" id="exportImageAnchor" data-toggle="modal" ng-click="ShowExportImageWindow()">Export Image</a></li>
  18 + <li id="exportImageAnchor"><a href="" data-toggle="modal" ng-click="ShowExportImageWindow()">Export Image</a></li>
19 19 <li role="separator" class="divider"></li>
20   - <li ng-class="PrintViewer"><a href="" id="printAVAnchor" data-toggle="modal" ng-click="ShowPrintWindow()">Print Active Viewer</a></li>
21   - <li ng-class="PrintViewer"><a href="#" id="printAllAVAnchor" data-toggle="modal" ng-click="ShowAllPrintWindow()">Print All Open Viewers</a></li>
22   - <li ng-class="PrintPreview"><a href="" id="printPreviewAnchor" data-toggle="modal" ng-click="ShowPrintPreviewWindow()">Print Preview</a></li>
  20 + <li id="printAVAnchor"><a href="" data-toggle="modal" ng-click="ShowPrintWindow()">Print Active Viewer</a></li>
  21 + <li id="printAllAVAnchor"><a href="#" data-toggle="modal" ng-click="ShowAllPrintWindow()">Print All Open Viewers</a></li>
  22 + <li id="printPreviewAnchor"><a href="" data-toggle="modal" ng-click="ShowPrintPreviewWindow()">Print Preview</a></li>
23 23 </ul>
24 24 </li>
25 25 <!--#7904-->
... ...