Commit 5e7ce248d724c119b57e05e8b737182785553e78
1 parent
442da07c
Fixed bugs of AI and CB module
Showing
2 changed files
with
22 additions
and
185 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... | ... | @@ -290,41 +290,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
290 | 290 | $scope.setActiveTab(1, inderectCall); |
291 | 291 | $scope.reRunSearchOnLoad(); |
292 | 292 | } |
293 | - | |
294 | - //setTimeout(function () { | |
295 | - // $scope.setImgPosition(); | |
296 | - //}, 100); | |
297 | - | |
298 | 293 | |
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'); | |
328 | 294 | } |
329 | 295 | |
330 | 296 | $scope.reRunSearchOnLoad = function () { |
... | ... | @@ -612,12 +578,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
612 | 578 | }, 10); |
613 | 579 | |
614 | 580 | $rootScope.isLoading = false; |
615 | - $('#aiSpinner').css('visibility', 'hidden'); | |
616 | - | |
617 | - //Added code by sandeep for fixed bug-40273 | |
618 | - //setTimeout(function () { | |
619 | - // $scope.setImgPosition(); | |
620 | - //}, 10); | |
581 | + $('#aiSpinner').css('visibility', 'hidden'); | |
621 | 582 | |
622 | 583 | }, |
623 | 584 | |
... | ... | @@ -630,10 +591,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
630 | 591 | |
631 | 592 | //Added method by sandeep for fixed Bug-57978 to selected Image |
632 | 593 | $scope.setImgPosition = function () { |
633 | - var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); | |
594 | + var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); | |
595 | + var aISelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId"); | |
634 | 596 | if (_currentImgId != "null" && _currentImgId != null) { |
635 | - $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail'); | |
636 | - //$('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100); | |
597 | + $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail'); | |
637 | 598 | $scope.hiderow = true; |
638 | 599 | } |
639 | 600 | if ($('#grid-view').css("display") == "block") { |
... | ... | @@ -651,11 +612,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
651 | 612 | if (AIListViewScroll !== null && $location.url() == "/ADAM-images" && AIListViewScroll != "0") { |
652 | 613 | $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow'); |
653 | 614 | } |
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"); | |
615 | + else if (aISelectedRowId != "null" && aISelectedRowId != null) { | |
616 | + $('html, body').animate({ scrollTop: $('#' + aISelectedRowId).position().top }, 100); | |
617 | + } | |
659 | 618 | } |
660 | 619 | } |
661 | 620 | |
... | ... | @@ -758,11 +717,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
758 | 717 | }, 10); |
759 | 718 | |
760 | 719 | $rootScope.isLoading = false; |
761 | - $('#aiSpinner').css('visibility', 'hidden'); | |
762 | - //Added code by sandeep for fixed bug-40273 | |
763 | - //setTimeout(function () { | |
764 | - // $scope.setImgPosition(); | |
765 | - //}, 10); | |
720 | + $('#aiSpinner').css('visibility', 'hidden'); | |
766 | 721 | }, |
767 | 722 | function (error) { |
768 | 723 | console.log(' $scope.IllustrationData = ' + error.statusText); |
... | ... | @@ -810,122 +765,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
810 | 765 | localStorage.setItem("AIGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); |
811 | 766 | var u = $location.url(); |
812 | 767 | $location.url('/adam-images-detail'); |
813 | - } | |
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 | - //} | |
768 | + } | |
929 | 769 | |
930 | 770 | $scope.OpenAdamImageView = function () { |
931 | 771 | |
... | ... | @@ -1090,21 +930,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1090 | 930 | $scope.SelectedAITitle = SelectedAIthumbImage[0]._Title; |
1091 | 931 | } else { $scope.hiderow = false; } |
1092 | 932 | |
1093 | - //Set the scroll position of the tablebody to show selected row. | |
1094 | - | |
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 | - | |
933 | + //Set the scroll position of the tablebody to show selected row | |
934 | + | |
935 | + $scope.setImgPosition(); | |
1108 | 936 | |
1109 | 937 | $rootScope.isLoading = false; |
1110 | 938 | $('#aiSpinner').css('visibility', 'hidden'); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -1386,12 +1386,21 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1386 | 1386 | |
1387 | 1387 | } |
1388 | 1388 | else if ($location.url() == "/adam-images-detail") { |
1389 | + //Modified code by sandeep for fixed bug-57956 | |
1389 | 1390 | $rootScope.disableMenuannotation = " "; |
1390 | 1391 | $rootScope.disableMenuoption = " "; |
1392 | + $("#optiontSetting").addClass("disableSubMenu"); | |
1391 | 1393 | $rootScope.disableSubMenu = "disableSubMenu"; |
1392 | 1394 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); |
1393 | - $("#optionsListManagerTab").addClass("disableSubMenu"); | |
1394 | 1395 | $rootScope.disableFileMenu = " "; |
1396 | + $rootScope.openResources = "openResources"; | |
1397 | + $rootScope.OpenPitures = "OpenPitures"; | |
1398 | + $rootScope.newCurriculum = "newCurriculum"; | |
1399 | + $rootScope.openCurriculum = "openCurriculum"; | |
1400 | + $rootScope.saveCurriculam = "saveCurriculam"; | |
1401 | + $rootScope.PrintPreview = ""; | |
1402 | + $rootScope.exportImage = ""; | |
1403 | + $rootScope.PrintViewer = ""; | |
1395 | 1404 | } |
1396 | 1405 | else { |
1397 | 1406 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); | ... | ... |