Commit 672a1e70bb4936f9fda78e819b64137aa49d5f2f

Authored by Sandeep Kumar
1 parent 5a3b7d45

Fixed bugs of ADAM Images

400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... ... @@ -125,6 +125,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
125 125 $scope.showItem(selectedImageId);
126 126 $scope.filterstring = true;
127 127 }
  128 + //$scope.ReloadListViewImageDiv(curSelectedRowId, ImageCount);
128 129 }
129 130 }
130 131 else if (SearchByAlphabet != "" && SearchByAlphabet != null && SearchByAlphabet != undefined) {
... ... @@ -139,6 +140,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
139 140 $scope.showItem(selectedImageId);
140 141 $scope.filterstring = true;
141 142 }
  143 + //$scope.ReloadListViewImageDiv(curSelectedRowId, ImageCount);
142 144 }
143 145 }
144 146 else {
... ... @@ -155,9 +157,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
155 157 $scope.filterstring = false;
156 158 $scope.showItem(selectedImageId);
157 159 }
  160 + //$scope.ReloadListViewImageDiv(curSelectedRowId, ImageCount);
158 161 }
159 162 }
160 163 $scope.query.SelectedDiv = tabToSet;
  164 + //Method call for set position for selected title Bug-57978
  165 + //$scope.ReloadListViewImageDiv(curSelectedRowId, ImageCount);
  166 + $('#grid-view').css("display", "none");
  167 + $('#list-view').css("display", "block");
161 168 }
162 169 else {
163 170 $('#' + $rootScope.getLocalStorageValue("currentAIImageId")).find('.thumbnail').addClass('HightLightThumbnail');
... ... @@ -175,12 +182,69 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
175 182 $scope.loadAllAI(ImageCount);
176 183 }
177 184  
  185 + $('#grid-view').css("display", "block");
  186 + $('#list-view').css("display", "none");
178 187 }
  188 +
  189 + setTimeout(function () {
  190 + $scope.setImgPosition();
  191 + }, 100);
  192 +
179 193 };
180 194  
181 195  
182   - $scope.loadAIModuleById = function (moduleId) {
  196 + //$scope.loadAIModuleById = function (moduleId) {
183 197  
  198 + // var ImageCount = $rootScope.getLocalStorageValue("ImageCount");
  199 +
  200 + // if ($rootScope.refreshcheck == null) {
  201 + // $location.path('/');
  202 + // }
  203 +
  204 + // // code that will be executed ...
  205 + // // every time this view is loaded
  206 +
  207 + // //get current path
  208 + // var currentURL = $location.path();
  209 + // var selectedModuleName = '';
  210 + // //set module title
  211 + // angular.forEach($rootScope.userModules, function (value, key) {
  212 + // if (value.slug === currentURL.replace('/', '')) {
  213 + // selectedModuleName = value.name;
  214 + // }
  215 + // $rootScope.currentActiveModuleTitle = selectedModuleName;
  216 + // })
  217 +
  218 + // $scope.LoadAIJsonData(ImageCount);
  219 + // $scope.scroll();
  220 + // //push the details of open module in array $rootScope.openModules
  221 + // $rootScope.openModules.push({ "ModuleId": 13 });
  222 +
  223 + // //set the local storage
  224 + // var curtab = $rootScope.getLocalStorageValue("currentAITabView");
  225 + // var inderectCall = true;
  226 + // if (curtab == 2) {
  227 + // $scope.setActiveTab(2, inderectCall);
  228 + // var curSelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId");
  229 + // if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') {
  230 + // $scope.reRunSearchOnLoad();
  231 + // $scope.idSelected = curSelectedRowId;
  232 + // $scope.ReloadListViewImageDiv($scope.idSelected, ImageCount);
  233 + // }
  234 + // else {
  235 + // $scope.reRunSearchOnLoad()
  236 + // $scope.idSelected = '';
  237 + // }
  238 + // }
  239 + // else {
  240 + // $scope.setActiveTab(1, inderectCall);
  241 + // $scope.reRunSearchOnLoad();
  242 +
  243 + // }
  244 + //}
  245 +
  246 + $scope.loadAIModuleById = function (moduleId) {
  247 +
184 248 var ImageCount = $rootScope.getLocalStorageValue("ImageCount");
185 249  
186 250 if ($rootScope.refreshcheck == null) {
... ... @@ -207,7 +271,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
207 271 $rootScope.openModules.push({ "ModuleId": 13 });
208 272  
209 273 //set the local storage
210   - var curtab = $rootScope.getLocalStorageValue("currentAITabView");
  274 + var curtab = $rootScope.getLocalStorageValue("currentAITabView");
211 275 var inderectCall = true;
212 276 if (curtab == 2) {
213 277 $scope.setActiveTab(2, inderectCall);
... ... @@ -220,13 +284,47 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
220 284 else {
221 285 $scope.reRunSearchOnLoad()
222 286 $scope.idSelected = '';
223   - }
  287 + }
224 288 }
225 289 else {
226 290 $scope.setActiveTab(1, inderectCall);
227 291 $scope.reRunSearchOnLoad();
228   -
229 292 }
  293 +
  294 + //setTimeout(function () {
  295 + // $scope.setImgPosition();
  296 + //}, 100);
  297 +
  298 +
  299 + //setTimeout(function () {
  300 + // if ($('#grid-view').css("display") == "block") {
  301 + // if ($rootScope.getLocalStorageValue('AIGridViewHighlightThumbnail') !== null) {
  302 + // $('#' + $rootScope.getLocalStorageValue("AIGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail');
  303 + // }
  304 + // if ($rootScope.getLocalStorageValue('AIGridViewScroll') !== null && $location.url() == "/tile-view-list") {
  305 +
  306 + // $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AIGridViewScroll') }, 'slow');
  307 +
  308 + // }
  309 + // }
  310 + // if ($('#list-view').css("display") == "block") {
  311 + // var AIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll");
  312 + // if (typeof (AIListViewScroll) !== "undefined" && AIListViewScroll !== null && AIListViewScroll !== '' && $location.url() == "/tile-view-list") {
  313 + // if (typeof InstallTrigger !== 'undefined') {
  314 +
  315 + // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScroll') }, 'slow');
  316 + // }
  317 + // else {
  318 +
  319 + // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScroll') }, 'slow');
  320 + // }
  321 + // $("#list-view table tbody tr").removeClass("active");
  322 + // $("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active");
  323 + // }
  324 + // }
  325 + //}, 100);
  326 +
  327 + //$('#list-view').css('display', 'none');
230 328 }
231 329  
232 330 $scope.reRunSearchOnLoad = function () {
... ... @@ -307,6 +405,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
307 405 if ($rootScope.getLocalStorageValue('AIGridViewScroll') !== null && $location.url() == "/ADAM-images" && $scope.query.SelectedDiv == 1) {
308 406 $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AIGridViewScroll') });
309 407 }
  408 +
310 409 }, 100);
311 410  
312 411 $rootScope.isLoading = false;
... ... @@ -507,6 +606,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
507 606 }
508 607  
509 608 setTimeout(function () {
  609 + //$scope.setImgPosition();
510 610 $scope.EnableUI();
511 611  
512 612 }, 10);
... ... @@ -514,14 +614,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
514 614 $rootScope.isLoading = false;
515 615 $('#aiSpinner').css('visibility', 'hidden');
516 616  
517   - //Added code by sandeep for fixed bug-40273
518   - var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId");
519   - $rootScope.getLocalStorageValue("currentAIImageId")
520   - if (_currentImgId != "null" && _currentImgId != null) {
521   - $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail');
522   - $('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100);
523   - $scope.hiderow = true;
524   - }
  617 + //Added code by sandeep for fixed bug-40273
  618 + //setTimeout(function () {
  619 + // $scope.setImgPosition();
  620 + //}, 10);
  621 +
525 622 },
526 623  
527 624 function (error) {
... ... @@ -530,6 +627,38 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
530 627 }
531 628 );
532 629 }
  630 +
  631 + //Added method by sandeep for fixed Bug-57978 to selected Image
  632 + $scope.setImgPosition = function () {
  633 + var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId");
  634 + if (_currentImgId != "null" && _currentImgId != null) {
  635 + $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail');
  636 + //$('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100);
  637 + $scope.hiderow = true;
  638 + }
  639 + if ($('#grid-view').css("display") == "block") {
  640 + var aiGridViewScroll = $rootScope.getLocalStorageValue('AIGridViewScroll');
  641 + if (aiGridViewScroll !== null && $location.url() == "/ADAM-images" && aiGridViewScroll != "0") {
  642 +
  643 + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AIGridViewScroll') }, 'slow');
  644 + }
  645 + else if (_currentImgId != "null" && _currentImgId != null) {
  646 + $('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100);
  647 + }
  648 + }
  649 + if ($('#list-view').css("display") == "block") {
  650 + var AIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScrollPosition");
  651 + if (AIListViewScroll !== null && $location.url() == "/ADAM-images" && AIListViewScroll != "0") {
  652 + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow');
  653 + }
  654 + else if (_currentImgId != "null" && _currentImgId != null) {
  655 + $('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100);
  656 + }
  657 + //$("#list-view table tbody tr").removeClass("active");
  658 + //$("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active");
  659 + }
  660 + }
  661 +
533 662 $scope.DisableUI = function () {
534 663  
535 664 $('#imgParent').css('z-index', '1');
... ... @@ -624,18 +753,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
624 753 }
625 754  
626 755 setTimeout(function () {
  756 + //$scope.setImgPosition();
627 757 $scope.EnableUI();
628 758 }, 10);
629 759  
630 760 $rootScope.isLoading = false;
631 761 $('#aiSpinner').css('visibility', 'hidden');
632 762 //Added code by sandeep for fixed bug-40273
633   - var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId");
634   - if (_currentImgId != "null" && _currentImgId != null) {
635   - $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail');
636   - $('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100);
637   - hiderow = true;
638   - }
  763 + //setTimeout(function () {
  764 + // $scope.setImgPosition();
  765 + //}, 10);
639 766 },
640 767 function (error) {
641 768 console.log(' $scope.IllustrationData = ' + error.statusText);
... ... @@ -671,13 +798,135 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
671 798 localStorage.setItem("currentImageTitleFromJson", $rootScope.ViewTitle);
672 799 localStorage.setItem("currentAIImageId", $event.currentTarget.id);
673 800  
  801 + var moduleItemDataToBeSavedID = $event.currentTarget.id;
  802 + $("#list-view table tbody tr").removeClass("active");
  803 + localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID);
  804 + $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active");
  805 + localStorage.setItem("AIListViewScrollPosition", $("#list-view table tbody").scrollTop());
  806 +
674 807 //Set the vertical scroll value of the Grid-View.
675 808 var y = $($window).scrollTop();
676 809 localStorage.setItem("AIGridViewScroll", y);
  810 + localStorage.setItem("AIGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id'));
677 811 var u = $location.url();
678 812 $location.url('/adam-images-detail');
679 813 }
680 814  
  815 + //$scope.OpenAdamImageView = function () {
  816 +
  817 + // // $rootScope.currentActiveModuleTitle = "A.D.A.M. Images";
  818 +
  819 + // if ($rootScope.refreshcheck == null) {
  820 + // $location.path('/');
  821 + // }
  822 + // $rootScope.isLoading = true;
  823 + // $('#aiSpinner').css('visibility', 'visible');
  824 + // //$scope.DisableUI();
  825 + // $scope.voId = $rootScope.getLocalStorageValue("currentAIImageId");
  826 +
  827 + // var counter = 1;
  828 + // var tittle = $rootScope.getLocalStorageValue("currentImageTitleFromJson");
  829 + // localStorage.setItem("currentViewTitle", tittle);
  830 +
  831 + // var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json')
  832 + // promise.then(
  833 + // function (result) {
  834 + // $scope.AIllustrationData = result;
  835 + // $scope.AIlistViewData = $scope.AIllustrationData.root.AIData;
  836 +
  837 + // var clickedAIImage = [];
  838 + // clickedAIImage = new jinqJs()
  839 + // .from($scope.AIlistViewData)
  840 + // .where('_id == ' + $scope.voId)
  841 + // .select('_contentImage');
  842 +
  843 + // $scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage;
  844 +
  845 + // // store image for export
  846 + // var tittle = $rootScope.getLocalStorageValue("currentViewTitle");
  847 + // $rootScope.StoreTitleName(tittle);
  848 + // $rootScope.StoreOrgImageName(clickedAIImage[0]._contentImage);
  849 +
  850 + // if (clickedAIImage.length > 0) {
  851 +
  852 + // $.jsPanel({
  853 + // id: 'aiImagePanel',
  854 + // selector: '.aiView',
  855 + // theme: 'success',
  856 + // currentController: 'AIController',
  857 + // parentSlug: 'ADAM-images',
  858 + // content: '<div class="col-sm-12"><div class="container-fluid"><div class="row"><div class=" col-sm-12 img-thumbnail canvasDivClass" id="canvasDiv" style="overflow: scroll;" align="center"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1340" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1; left: 0px;"></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1340" class="canvas-annotationStyle1" style="position: absolute;z-index:0; left: 0px;"></canvas>' +
  859 +
  860 + // '<img src="' + $scope.clickedAIImage + '" alt="" title="" id="aimage" class="img-responsive ">' +
  861 + // '</div>' +
  862 + // '</div></div></div></div>',
  863 + // //ajax: {
  864 + // // url: 'app/views/ci/ci-view-detail.html'
  865 + // //},
  866 + // title: $rootScope.getLocalStorageValue("currentViewTitle"),
  867 + // position: {
  868 + // top: 70,
  869 + // left: 15,
  870 + // },
  871 +
  872 + // size: { width: $(window).outerWidth() - 30, height: $(window).outerHeight() - 125 },
  873 +
  874 + // });
  875 +
  876 + // $('#canvasDiv img').load(function () {
  877 +
  878 + // $rootScope.isLoading = false;
  879 + // $('#aiSpinner').css('visibility', 'hidden');
  880 + // var canvas = document.getElementById("canvas");
  881 + // var canvasPaint = document.getElementById("canvasPaint");
  882 +
  883 + // var imageheight = $("#aimage").height();
  884 + // var canvasDivheight = $(window).outerHeight() - 150;
  885 +
  886 + // if (canvasDivheight > imageheight)
  887 + // {
  888 + // canvas.height = canvasDivheight;
  889 + // canvasPaint.height = canvasDivheight;
  890 + // }
  891 + // else
  892 + // {
  893 + // canvas.height = imageheight;
  894 + // canvasPaint.height = imageheight;
  895 + // }
  896 +
  897 + // canvas.width = $(window).outerWidth() - 81;
  898 + // canvasPaint.width = $(window).outerWidth() - 81;
  899 +
  900 + // });
  901 + // $rootScope.currentSlug = 'adam-images-detail';
  902 + // $rootScope.openViews.push(
  903 + // {
  904 + // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentAIImageId,
  905 + // "slug": $rootScope.currentSlug
  906 + // });
  907 +
  908 + // $("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height());
  909 + // $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
  910 + // var jspContentHeight = $('.jsPanel-content').height();
  911 +
  912 + // // console.log($rootScope.OpenAdamImages);
  913 + // $('#AIView').css("height", $(window).outerHeight() - 65);
  914 +
  915 + // $('#AIView').css("width", $(window).outerWidth() - 15);
  916 +
  917 + // var canvasDIvHeight = parseInt($('#aiImagePanel').outerHeight()) - 90;
  918 +
  919 + // $('#canvasDiv').css('height', canvasDIvHeight);
  920 + // }
  921 + // },
  922 + // function (error) {
  923 + // // handle errors here
  924 + // console.log(' $scope.AIllustrationData = ' + error.statusText);
  925 + // }
  926 + // );
  927 +
  928 + //}
  929 +
681 930 $scope.OpenAdamImageView = function () {
682 931  
683 932 // $rootScope.currentActiveModuleTitle = "A.D.A.M. Images";
... ... @@ -721,11 +970,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
721 970 theme: 'success',
722 971 currentController: 'AIController',
723 972 parentSlug: 'ADAM-images',
724   - content: '<div class="col-sm-12"><div class="container-fluid"><div class="row"><div class=" col-sm-12 img-thumbnail canvasDivClass" id="canvasDiv" style="overflow: scroll;" align="center"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1340" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1; left: 0px;"></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1340" class="canvas-annotationStyle1" style="position: absolute;z-index:0; left: 0px;"></canvas>' +
725   -
726   - '<img src="' + $scope.clickedAIImage + '" alt="" title="" id="aimage" class="img-responsive ">' +
727   - '</div>' +
728   - '</div></div></div></div>',
  973 + content: '<div class="row" id="canvasDiv"><div style="align:left;"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1340" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1340" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas></div>' +
  974 + '<div class="col-sm-12 img-thumbnail" align="center">' +
  975 + '<img src="' + $scope.clickedAIImage + '" id="aimage" alt="" title="" class="img-responsive " style="height:400px;">' +
  976 +
  977 + '</div></div>',
729 978 //ajax: {
730 979 // url: 'app/views/ci/ci-view-detail.html'
731 980 //},
... ... @@ -739,30 +988,37 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
739 988  
740 989 });
741 990  
742   - $('#canvasDiv img').load(function () {
  991 + //$('#canvasDiv img').load(function () {
743 992  
744   - $rootScope.isLoading = false;
745   - $('#aiSpinner').css('visibility', 'hidden');
746   - var canvas = document.getElementById("canvas");
747   - var canvasPaint = document.getElementById("canvasPaint");
  993 + // $rootScope.isLoading = false;
  994 + // $('#aiSpinner').css('visibility', 'hidden');
  995 + // var canvas = document.getElementById("canvas");
  996 + // var canvasPaint = document.getElementById("canvasPaint");
748 997  
749   - var imageheight = $("#aimage").height();
750   - var canvasDivheight = $(window).outerHeight() - 150;
751   -
752   - if (canvasDivheight > imageheight)
753   - {
754   - canvas.height = canvasDivheight;
755   - canvasPaint.height = canvasDivheight;
756   - }
757   - else
758   - {
759   - canvas.height = imageheight;
760   - canvasPaint.height = imageheight;
761   - }
  998 + // var imageheight = $("#aimage").height();
  999 + // var canvasDivheight = $(window).outerHeight() - 150;
762 1000  
763   - canvas.width = $(window).outerWidth() - 81;
764   - canvasPaint.width = $(window).outerWidth() - 81;
765   -
  1001 + // if (canvasDivheight > imageheight) {
  1002 + // canvas.height = canvasDivheight;
  1003 + // canvasPaint.height = canvasDivheight;
  1004 + // }
  1005 + // else {
  1006 + // canvas.height = imageheight;
  1007 + // canvasPaint.height = imageheight;
  1008 + // }
  1009 +
  1010 + // canvas.width = $(window).outerWidth() - 81;
  1011 + // canvasPaint.width = $(window).outerWidth() - 81;
  1012 +
  1013 + //});
  1014 + $('#canvasDiv img').load(function () {
  1015 + $rootScope.isLoading = false;
  1016 + $('#aiSpinner').css('visibility', 'hidden');
  1017 + var canvas = document.getElementById("canvas");
  1018 + var canvasPaint = document.getElementById("canvasPaint");
  1019 +
  1020 + canvas.height = $("#aiImagePanel .jsPanel-content").height();
  1021 + canvasPaint.height = $("#aiImagePanel .jsPanel-content").height();
766 1022 });
767 1023 $rootScope.currentSlug = 'adam-images-detail';
768 1024 $rootScope.openViews.push(
... ... @@ -780,7 +1036,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
780 1036  
781 1037 $('#AIView').css("width", $(window).outerWidth() - 15);
782 1038  
783   - var canvasDIvHeight = parseInt($('#aiImagePanel').outerHeight()) - 90;
  1039 + //var canvasDIvHeight = parseInt($('#aiImagePanel').outerHeight()) - 30;
  1040 + var canvasDIvHeight = $("#aiImagePanel .jsPanel-content").height();
784 1041  
785 1042 $('#canvasDiv').css('height', canvasDIvHeight);
786 1043 }
... ... @@ -835,15 +1092,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
835 1092  
836 1093 //Set the scroll position of the tablebody to show selected row.
837 1094  
838   - var curAIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll");
839   - if (typeof (curAIListViewScroll) !== "undefined" && curAIListViewScroll !== null && curAIListViewScroll !== '') {
840   - if (typeof InstallTrigger !== 'undefined') {
841   - $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("AIListViewScroll") });
842   - }
843   - else {
844   - $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("AIListViewScroll"));
845   - }
846   - }
  1095 + //var curAIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScrollPosition");
  1096 + ////var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId");
  1097 + //if (typeof (curAIListViewScroll) !== "undefined" && curAIListViewScroll !== null && curAIListViewScroll !== "null") {
  1098 +
  1099 + // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow');
  1100 + // //$('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100);
  1101 + //}
  1102 + //else {
  1103 + // //$('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("currentImageTitleFromJson"));
  1104 + // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow');
  1105 + //}
  1106 + $scope.setImgPosition();
  1107 +
  1108 +
847 1109 $rootScope.isLoading = false;
848 1110 $('#aiSpinner').css('visibility', 'hidden');
849 1111  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -45,9 +45,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
45 45 $('#' + id).remove();
46 46  
47 47 // remove panel name from dropdown
48   - $('#viwerSelect option[value="'+id+'"]').remove();
  48 + $('#viwerSelect option[value="' + id + '"]').remove();
  49 +
  50 + }
  51 + //Added code by sandeep for fixed Bug-58066
  52 + var ddlViewerLen = $("#viwerSelect option").length;
  53 + if (ddlViewerLen == 1) {
  54 + $('#viwerSelect').hide();
49 55 }
50   -
51 56 });
52 57  
53 58  
... ... @@ -599,7 +604,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
599 604 $('#CBSourceImagePanel').remove();
600 605  
601 606 $("#viwerSelect").empty();
602   -
  607 + $("#viwerSelect").hide();
603 608 if ($('#parentcustomDiv').html() != "") {
604 609 $('#parentcustomDiv').empty();
605 610 }
... ... @@ -1329,6 +1334,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1329 1334 var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']");
1330 1335 if (modulePanel != undefined && modulePanel != null) {
1331 1336 $('#viwerSelect').append('<option selected value="' + 0 + '">' + "Select Viewer" + '</option>');
  1337 + //Added code by sandeep for fixed Bug-58066
  1338 + if (modulePanel.length > 0) {
  1339 + $('#viwerSelect').show();
  1340 + }
  1341 + }
  1342 + else {
  1343 + $('#viwerSelect').hide();
1332 1344 }
1333 1345 for (var i = 0 ; i < modulePanel.length; i++) {
1334 1346 var paneld = modulePanel[i].id;
... ...