diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js index 63cba73..ce4cbf3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js @@ -290,41 +290,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.setActiveTab(1, inderectCall); $scope.reRunSearchOnLoad(); } - - //setTimeout(function () { - // $scope.setImgPosition(); - //}, 100); - - //setTimeout(function () { - // if ($('#grid-view').css("display") == "block") { - // if ($rootScope.getLocalStorageValue('AIGridViewHighlightThumbnail') !== null) { - // $('#' + $rootScope.getLocalStorageValue("AIGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); - // } - // if ($rootScope.getLocalStorageValue('AIGridViewScroll') !== null && $location.url() == "/tile-view-list") { - - // $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AIGridViewScroll') }, 'slow'); - - // } - // } - // if ($('#list-view').css("display") == "block") { - // var AIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll"); - // if (typeof (AIListViewScroll) !== "undefined" && AIListViewScroll !== null && AIListViewScroll !== '' && $location.url() == "/tile-view-list") { - // if (typeof InstallTrigger !== 'undefined') { - - // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScroll') }, 'slow'); - // } - // else { - - // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScroll') }, 'slow'); - // } - // $("#list-view table tbody tr").removeClass("active"); - // $("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active"); - // } - // } - //}, 100); - - //$('#list-view').css('display', 'none'); } $scope.reRunSearchOnLoad = function () { @@ -612,12 +578,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, 10); $rootScope.isLoading = false; - $('#aiSpinner').css('visibility', 'hidden'); - - //Added code by sandeep for fixed bug-40273 - //setTimeout(function () { - // $scope.setImgPosition(); - //}, 10); + $('#aiSpinner').css('visibility', 'hidden'); }, @@ -630,10 +591,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout //Added method by sandeep for fixed Bug-57978 to selected Image $scope.setImgPosition = function () { - var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); + var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); + var aISelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId"); if (_currentImgId != "null" && _currentImgId != null) { - $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail'); - //$('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100); + $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail'); $scope.hiderow = true; } if ($('#grid-view').css("display") == "block") { @@ -651,11 +612,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if (AIListViewScroll !== null && $location.url() == "/ADAM-images" && AIListViewScroll != "0") { $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow'); } - else if (_currentImgId != "null" && _currentImgId != null) { - $('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100); - } - //$("#list-view table tbody tr").removeClass("active"); - //$("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active"); + else if (aISelectedRowId != "null" && aISelectedRowId != null) { + $('html, body').animate({ scrollTop: $('#' + aISelectedRowId).position().top }, 100); + } } } @@ -758,11 +717,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, 10); $rootScope.isLoading = false; - $('#aiSpinner').css('visibility', 'hidden'); - //Added code by sandeep for fixed bug-40273 - //setTimeout(function () { - // $scope.setImgPosition(); - //}, 10); + $('#aiSpinner').css('visibility', 'hidden'); }, function (error) { console.log(' $scope.IllustrationData = ' + error.statusText); @@ -810,122 +765,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout localStorage.setItem("AIGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); var u = $location.url(); $location.url('/adam-images-detail'); - } - - //$scope.OpenAdamImageView = function () { - - // // $rootScope.currentActiveModuleTitle = "A.D.A.M. Images"; - - // if ($rootScope.refreshcheck == null) { - // $location.path('/'); - // } - // $rootScope.isLoading = true; - // $('#aiSpinner').css('visibility', 'visible'); - // //$scope.DisableUI(); - // $scope.voId = $rootScope.getLocalStorageValue("currentAIImageId"); - - // var counter = 1; - // var tittle = $rootScope.getLocalStorageValue("currentImageTitleFromJson"); - // localStorage.setItem("currentViewTitle", tittle); - - // var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') - // promise.then( - // function (result) { - // $scope.AIllustrationData = result; - // $scope.AIlistViewData = $scope.AIllustrationData.root.AIData; - - // var clickedAIImage = []; - // clickedAIImage = new jinqJs() - // .from($scope.AIlistViewData) - // .where('_id == ' + $scope.voId) - // .select('_contentImage'); - - // $scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage; - - // // store image for export - // var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); - // $rootScope.StoreTitleName(tittle); - // $rootScope.StoreOrgImageName(clickedAIImage[0]._contentImage); - - // if (clickedAIImage.length > 0) { - - // $.jsPanel({ - // id: 'aiImagePanel', - // selector: '.aiView', - // theme: 'success', - // currentController: 'AIController', - // parentSlug: 'ADAM-images', - // content: '
' + - - // '' + - // '
' + - // '
', - // //ajax: { - // // url: 'app/views/ci/ci-view-detail.html' - // //}, - // title: $rootScope.getLocalStorageValue("currentViewTitle"), - // position: { - // top: 70, - // left: 15, - // }, - - // size: { width: $(window).outerWidth() - 30, height: $(window).outerHeight() - 125 }, - - // }); - - // $('#canvasDiv img').load(function () { - - // $rootScope.isLoading = false; - // $('#aiSpinner').css('visibility', 'hidden'); - // var canvas = document.getElementById("canvas"); - // var canvasPaint = document.getElementById("canvasPaint"); - - // var imageheight = $("#aimage").height(); - // var canvasDivheight = $(window).outerHeight() - 150; - - // if (canvasDivheight > imageheight) - // { - // canvas.height = canvasDivheight; - // canvasPaint.height = canvasDivheight; - // } - // else - // { - // canvas.height = imageheight; - // canvasPaint.height = imageheight; - // } - - // canvas.width = $(window).outerWidth() - 81; - // canvasPaint.width = $(window).outerWidth() - 81; - - // }); - // $rootScope.currentSlug = 'adam-images-detail'; - // $rootScope.openViews.push( - // { - // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentAIImageId, - // "slug": $rootScope.currentSlug - // }); - - // $("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height()); - // $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important') - // var jspContentHeight = $('.jsPanel-content').height(); - - // // console.log($rootScope.OpenAdamImages); - // $('#AIView').css("height", $(window).outerHeight() - 65); - - // $('#AIView').css("width", $(window).outerWidth() - 15); - - // var canvasDIvHeight = parseInt($('#aiImagePanel').outerHeight()) - 90; - - // $('#canvasDiv').css('height', canvasDIvHeight); - // } - // }, - // function (error) { - // // handle errors here - // console.log(' $scope.AIllustrationData = ' + error.statusText); - // } - // ); - - //} + } $scope.OpenAdamImageView = function () { @@ -1090,21 +930,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SelectedAITitle = SelectedAIthumbImage[0]._Title; } else { $scope.hiderow = false; } - //Set the scroll position of the tablebody to show selected row. - - //var curAIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScrollPosition"); - ////var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); - //if (typeof (curAIListViewScroll) !== "undefined" && curAIListViewScroll !== null && curAIListViewScroll !== "null") { - - // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow'); - // //$('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100); - //} - //else { - // //$('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("currentImageTitleFromJson")); - // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow'); - //} - $scope.setImgPosition(); - + //Set the scroll position of the tablebody to show selected row + + $scope.setImgPosition(); $rootScope.isLoading = false; $('#aiSpinner').css('visibility', 'hidden'); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index c99690a..793eaa0 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -1386,12 +1386,21 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A } else if ($location.url() == "/adam-images-detail") { + //Modified code by sandeep for fixed bug-57956 $rootScope.disableMenuannotation = " "; $rootScope.disableMenuoption = " "; + $("#optiontSetting").addClass("disableSubMenu"); $rootScope.disableSubMenu = "disableSubMenu"; $("#annotationToolBarOptions").removeClass("disableSubMenu"); - $("#optionsListManagerTab").addClass("disableSubMenu"); $rootScope.disableFileMenu = " "; + $rootScope.openResources = "openResources"; + $rootScope.OpenPitures = "OpenPitures"; + $rootScope.newCurriculum = "newCurriculum"; + $rootScope.openCurriculum = "openCurriculum"; + $rootScope.saveCurriculam = "saveCurriculam"; + $rootScope.PrintPreview = ""; + $rootScope.exportImage = ""; + $rootScope.PrintViewer = ""; } else { $("#annotationToolBarOptions").removeClass("disableSubMenu");