Commit 5ae995e8bbeed5e8df413b9788e5397c72bfe754
Merge branch 'Bug-11539' into Develop
Showing
4 changed files
with
82 additions
and
36 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -89,7 +89,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -89,7 +89,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
89 | 89 | ||
90 | //navigator man functionality | 90 | //navigator man functionality |
91 | $scope.navigatorImage; | 91 | $scope.navigatorImage; |
92 | - $scope.NavigatorData; | 92 | + $rootScope.NavigatorData; |
93 | $scope.navimgsrc; | 93 | $scope.navimgsrc; |
94 | 94 | ||
95 | $scope.dragdivleft = 0; | 95 | $scope.dragdivleft = 0; |
@@ -666,12 +666,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -666,12 +666,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
666 | 666 | ||
667 | $http({ method: 'GET', url: NavigatorManJsonPath }) | 667 | $http({ method: 'GET', url: NavigatorManJsonPath }) |
668 | .success(function (data) { | 668 | .success(function (data) { |
669 | - $scope.NavigatorData = data; | 669 | + $rootScope.NavigatorData = data; |
670 | 670 | ||
671 | $scope.skinTone = $rootScope.globalSetting.ethnicity; | 671 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
672 | 672 | ||
673 | var navigatorManData = new jinqJs() | 673 | var navigatorManData = new jinqJs() |
674 | - .from($scope.NavigatorData.Navigtor.ViewOrientation) | 674 | + .from($rootScope.NavigatorData.Navigtor.ViewOrientation) |
675 | .where("_ViewOrientationId == " + $rootScope.currentBodyViewId) | 675 | .where("_ViewOrientationId == " + $rootScope.currentBodyViewId) |
676 | .select(); | 676 | .select(); |
677 | 677 | ||
@@ -706,7 +706,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -706,7 +706,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
706 | navImageModesty = $scope.navigatorImage[0]._ImageName; | 706 | navImageModesty = $scope.navigatorImage[0]._ImageName; |
707 | } | 707 | } |
708 | 708 | ||
709 | - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; | 709 | + // $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; |
710 | + document.getElementById('navimg').src = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; | ||
710 | 711 | ||
711 | $('#navigatorDiv').css('visibility', 'visible'); | 712 | $('#navigatorDiv').css('visibility', 'visible'); |
712 | 713 | ||
@@ -6758,20 +6759,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6758,20 +6759,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6758 | 6759 | ||
6759 | }) | 6760 | }) |
6760 | 6761 | ||
6762 | + $scope.$on('changeNavigatorModestyEvent', function (event, data) { | ||
6763 | + console.log('changeNavigatorModestyEvent'); | ||
6764 | + | ||
6765 | + $scope.loadSelectedBodyViewNavigator(data.bodyViewId); | ||
6766 | + | ||
6767 | + }) | ||
6761 | //Reload DA controller Body View after setting Change | 6768 | //Reload DA controller Body View after setting Change |
6762 | $scope.$on('reloadDABodyViewEvent', function (event, data) { | 6769 | $scope.$on('reloadDABodyViewEvent', function (event, data) { |
6763 | //console.log('reloadDABodyViewEvent'); | 6770 | //console.log('reloadDABodyViewEvent'); |
6764 | - $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | ||
6765 | - //alert('mouseUp'); | 6771 | + if ($rootScope.isSettingEventAlredayDispachted == true) { |
6772 | + $rootScope.isSettingEventAlredayDispachted = false; | ||
6773 | + $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | ||
6774 | + //alert('mouseUp'); | ||
6766 | 6775 | ||
6767 | 6776 | ||
6768 | - if ($scope.layerNumber == 0) { | ||
6769 | - $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6770 | - } | ||
6771 | - // $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6772 | - | ||
6773 | - $scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId); | 6777 | + if ($scope.layerNumber == 0) { |
6778 | + $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6779 | + } | ||
6780 | + // $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6774 | 6781 | ||
6782 | + $scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId); | ||
6783 | + } | ||
6775 | // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | 6784 | // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); |
6776 | 6785 | ||
6777 | //$rootScope.isSettingEventAlredayDispachted = false; | 6786 | //$rootScope.isSettingEventAlredayDispachted = false; |
@@ -6779,17 +6788,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6779,17 +6788,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6779 | 6788 | ||
6780 | }) | 6789 | }) |
6781 | 6790 | ||
6782 | - | ||
6783 | - | ||
6784 | $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { | 6791 | $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { |
6785 | 6792 | ||
6786 | //$rootScope.voId = currentBodyViewId; | 6793 | //$rootScope.voId = currentBodyViewId; |
6787 | 6794 | ||
6788 | //$scope.skinTone = $rootScope.globalSetting.ethnicity; | 6795 | //$scope.skinTone = $rootScope.globalSetting.ethnicity; |
6789 | 6796 | ||
6790 | - if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) { | 6797 | + if ($rootScope.NavigatorData != null || $rootScope.NavigatorData != undefined) { |
6791 | var navdtlOrient = new jinqJs() | 6798 | var navdtlOrient = new jinqJs() |
6792 | - .from($scope.NavigatorData.Navigtor.ViewOrientation) | 6799 | + .from($rootScope.NavigatorData.Navigtor.ViewOrientation) |
6793 | .where("_ViewOrientationId == " + currentBodyViewId) | 6800 | .where("_ViewOrientationId == " + currentBodyViewId) |
6794 | .select(); | 6801 | .select(); |
6795 | 6802 | ||
@@ -6819,7 +6826,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6819,7 +6826,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6819 | 6826 | ||
6820 | } | 6827 | } |
6821 | 6828 | ||
6822 | - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty; | 6829 | + // $scope.navimgsrc = 'http://localhost/AIAHTML5/content/images/DA/ethnicity/body-views/' + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;//"~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty; |
6830 | + document.getElementById('navimg').src = '~/../content/images/DA/ethnicity/body-views/' + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;//"~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty; | ||
6823 | } | 6831 | } |
6824 | } | 6832 | } |
6825 | 6833 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -1953,7 +1953,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1953,7 +1953,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1953 | } | 1953 | } |
1954 | } | 1954 | } |
1955 | 1955 | ||
1956 | - | 1956 | + $rootScope.prevId = ""; |
1957 | } | 1957 | } |
1958 | 1958 | ||
1959 | function fillListManagerTerms() { | 1959 | function fillListManagerTerms() { |
@@ -2073,30 +2073,63 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2073,30 +2073,63 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2073 | }; | 2073 | }; |
2074 | 2074 | ||
2075 | $rootScope.UpdateSetting = function (setting) { | 2075 | $rootScope.UpdateSetting = function (setting) { |
2076 | - | 2076 | + var isReloadingViewRequired = false; |
2077 | //1. | 2077 | //1. |
2078 | if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) { | 2078 | if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) { |
2079 | $rootScope.ChangeEthnicity(setting, setting.ethnicity); | 2079 | $rootScope.ChangeEthnicity(setting, setting.ethnicity); |
2080 | - $rootScope.globalSetting.ethnicity = setting.ethnicity; | ||
2081 | - localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | ||
2082 | - $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity); | ||
2083 | - } | 2080 | + } |
2084 | if (typeof (setting.modesty) !== "undefined" && setting.modesty !== null) { | 2081 | if (typeof (setting.modesty) !== "undefined" && setting.modesty !== null) { |
2085 | $rootScope.ChangeModesty(setting, setting.modesty); | 2082 | $rootScope.ChangeModesty(setting, setting.modesty); |
2086 | - $rootScope.globalSetting.modesty = setting.modesty; | ||
2087 | - localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); | ||
2088 | - $rootScope.setModestySettings($rootScope.globalSetting.modesty); | ||
2089 | } | 2083 | } |
2090 | 2084 | ||
2091 | //2. | 2085 | //2. |
2092 | - | ||
2093 | - var len = $rootScope.openModules.length; | ||
2094 | - if (len > 0) { | ||
2095 | - $rootScope.reloadChildController(); | 2086 | + if((setting.ethnicity!=null && setting.ethnicity!= $rootScope.globalSetting.ethnicity) && (setting.modesty!=null && setting.modesty != $rootScope.globalSetting.modesty) ){ |
2087 | + $rootScope.globalSetting.ethnicity = setting.ethnicity; | ||
2088 | + localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | ||
2089 | + | ||
2090 | + $rootScope.globalSetting.modesty = setting.modesty; | ||
2091 | + localStorage.setItem("globalModesty", setting.modesty); | ||
2092 | + | ||
2093 | + isReloadingViewRequired = true; | ||
2094 | + | ||
2096 | } | 2095 | } |
2097 | - else { | ||
2098 | - $('#modal-settings').modal('hide'); | 2096 | + |
2097 | + else if (setting.ethnicity!=null && setting.ethnicity != $rootScope.globalSetting.ethnicity) { | ||
2098 | + | ||
2099 | + $rootScope.globalSetting.ethnicity = setting.ethnicity; | ||
2100 | + localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | ||
2101 | + | ||
2102 | + $rootScope.globalSetting.modesty = localStorage.getItem("globalModesty"); | ||
2103 | + | ||
2104 | + isReloadingViewRequired = true; | ||
2099 | } | 2105 | } |
2106 | + else if (setting.modesty!= null && setting.modesty != $rootScope.globalSetting.modesty) { | ||
2107 | + $rootScope.globalSetting.modesty = setting.modesty; | ||
2108 | + localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); | ||
2109 | + | ||
2110 | + $rootScope.globalSetting.ethnicity = localStorage.getItem("globalEthnicity"); | ||
2111 | + | ||
2112 | + if ($('.modestyImg') != null) { | ||
2113 | + if (($rootScope.globalSetting.modesty == 'Y')) { | ||
2114 | + $('.modestyImg').css('visibility', 'visible'); | ||
2115 | + } | ||
2116 | + | ||
2117 | + else { | ||
2118 | + $('.modestyImg').css('visibility', 'hidden'); | ||
2119 | + } | ||
2120 | + } | ||
2121 | + $rootScope.changeNavigatorModesty(); | ||
2122 | + } | ||
2123 | + | ||
2124 | + var len = $rootScope.openModules.length; | ||
2125 | + if (len > 0) { | ||
2126 | + if (isReloadingViewRequired == true) { | ||
2127 | + $rootScope.reloadChildController(); | ||
2128 | + } | ||
2129 | + } | ||
2130 | + else { | ||
2131 | + $('#modal-settings').modal('hide'); | ||
2132 | + } | ||
2100 | 2133 | ||
2101 | }; | 2134 | }; |
2102 | 2135 | ||
@@ -2171,8 +2204,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2171,8 +2204,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2171 | //Check that what current bodyview is open | 2204 | //Check that what current bodyview is open |
2172 | if ($rootScope.openViews.length > 0) { | 2205 | if ($rootScope.openViews.length > 0) { |
2173 | var openViewLen = $rootScope.openViews.length; | 2206 | var openViewLen = $rootScope.openViews.length; |
2174 | - var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId; | ||
2175 | - //$rootScope.isSettingEventAlredayDispachted = true; | 2207 | + var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; |
2208 | + $rootScope.isSettingEventAlredayDispachted = true; | ||
2176 | $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true); | 2209 | $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true); |
2177 | } | 2210 | } |
2178 | else { | 2211 | else { |
@@ -2182,6 +2215,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2182,6 +2215,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2182 | } | 2215 | } |
2183 | }; | 2216 | }; |
2184 | 2217 | ||
2218 | + $rootScope.changeNavigatorModesty = function () { | ||
2219 | + var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; | ||
2185 | 2220 | ||
2221 | + $rootScope.$broadcast('changeNavigatorModestyEvent', { bodyViewId: currentOpenViewId }, true); | ||
2222 | + | ||
2223 | + }; | ||
2186 | }] | 2224 | }] |
2187 | ); | 2225 | ); |
2188 | \ No newline at end of file | 2226 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -313,7 +313,7 @@ | @@ -313,7 +313,7 @@ | ||
313 | 313 | ||
314 | <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; "> | 314 | <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; "> |
315 | <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; "> | 315 | <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; "> |
316 | - <img id="navimg" ng-src="{{navimgsrc}}" alt=""></img> | 316 | + <img id="navimg" alt=""></img> |
317 | <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition"> | 317 | <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition"> |
318 | </div> | 318 | </div> |
319 | </div> | 319 | </div> |
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <li><a href="#">Open Existing Curriculum</a></li> | 15 | <li><a href="#">Open Existing Curriculum</a></li> |
16 | <li><a href="#">Save Curriculum As</a></li> | 16 | <li><a href="#">Save Curriculum As</a></li> |
17 | <li role="separator" class="divider"></li> | 17 | <li role="separator" class="divider"></li> |
18 | - <li><a href="#" data-toggle="modal">Export Image</a></li> | 18 | + <li><a href="#" data-toggle="modal">Export Image</a></l |
19 | <li role="separator" class="divider"></li> | 19 | <li role="separator" class="divider"></li> |
20 | <li><a href="#">Print Active Viewer</a></li> | 20 | <li><a href="#">Print Active Viewer</a></li> |
21 | <li><a href="#">Print All Open Viewers</a></li> | 21 | <li><a href="#">Print All Open Viewers</a></li> |