From 32cc4b1ae8ffd20d098f6fff47622728dc9e8922 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Date: Fri, 14 Feb 2020 18:17:24 +0530 Subject: [PATCH] Changes for CI CA 3D module panel activity to Save CB --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 5 files changed, 540 insertions(+), 86 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js index 1415ea3..41afb06 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js @@ -22,7 +22,13 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location 'currentViewTitle': '', 'parentSlugName': '', 'currentSlug': '', - 'imageId': '' + 'imageId': '', + 'top': 0, + 'left': 0, + 'width': 0, + 'height': 0, + 'minimised': false, + 'maximised': false }); @@ -46,7 +52,13 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location 'currentViewTitle': '', 'parentSlugName': '', 'currentSlug': '', - 'imageId': '' + 'imageId': '', + 'top': 0, + 'left': 0, + 'width': 0, + 'height': 0, + 'minimised': false, + 'maximised': false }); @@ -368,7 +380,8 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location if (Selected3DImagePath.length > 0) { - $.jsPanel({ + $scope.jsPanel3D = + $.jsPanel({ id: $scope.jsPanelID, selector: '.threeDView', theme: 'success', @@ -388,7 +401,29 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location height: $scope.jsPanelHeight }, - }); + }); + //$scope.jsPanel3D.status = "minimized"; + var max = $scope.Get3DwindowStoreData(windowviewid, 'maximised'); + var min = $scope.Get3DwindowStoreData(windowviewid, 'minimised'); + if ($scope.jsPanel3D.status === "maximized" && max) { + $scope.jsPanel3D.maximize(); + $scope.Set3DwindowStoreData(windowviewid, 'maximised', true); + $scope.Set3DwindowStoreData(windowviewid, 'minimised', false); + } + else if ($scope.jsPanel3D.status === "minimized" && min) { + $scope.jsPanel3D.minimize(); + $scope.Set3DwindowStoreData(windowviewid, 'minimised', true); + $scope.Set3DwindowStoreData(windowviewid, 'maximised', false); + } + else { + $scope.jsPanel3D.normalize(); + $scope.Set3DwindowStoreData(windowviewid, 'maximised', false); + $scope.Set3DwindowStoreData(windowviewid, 'minimised', false); + } + $scope.Set3DwindowStoreData(windowviewid, 'top', $scope.jsPanelTop); + $scope.Set3DwindowStoreData(windowviewid, 'left', $scope.jsPanelLeft); + $scope.Set3DwindowStoreData(windowviewid, 'width', $scope.jsPanelWidth); + $scope.Set3DwindowStoreData(windowviewid, 'height', $scope.jsPanelHeight); $rootScope.currentSlug = '3d-anatomy-details'; $scope.Set3DwindowStoreData(windowviewid, 'currentSlug', '3d-anatomy-details'); @@ -408,8 +443,8 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $('#ThreeDView').css("width", $(window).outerWidth()-20); } - - + //Calling methode for save Js Panel Activity for SaveCB + $scope.PanelActivity(); } $scope.AnimationOnLoad = function (windowviewid) { @@ -437,7 +472,75 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location }); - } + } + + //Created method by Sandeep for Save JSPanel Activity on the CB module + $scope.PanelActivity = function () { + + $("#" + $scope.jsPanelID).resizable({ + stop: function (event, ui) { + var len = (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + //var w = (this).offsetWidth; var h = (this).offsetHeight; + $scope.Set3DwindowStoreData(windowviewid, 'width', ui.size.width); + $scope.Set3DwindowStoreData(windowviewid, 'height', ui.size.height); + } + }); + + $("#" + $scope.jsPanelID).draggable({ + stop: function (event, ui) { + //var jsPanelID = $(this).attr("id"); + var len = (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + //var offSets = $(this).offset(); var postions = (this).position(); (this).offsetTop (this).offsetLeft + $scope.Set3DwindowStoreData(windowviewid, 'top', ui.position.top); + $scope.Set3DwindowStoreData(windowviewid, 'left', ui.position.left); + } + }); + + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function (event) { + var currentPanelId = $(event.target).parent().parent().parent().parent().attr('id'); + var len = (currentPanelId).split("_").length; + var windowviewid = (currentPanelId).split("_")[len - 1]; + for (var i in $rootScope.TheeDWindowData) { + if ($rootScope.TheeDWindowData[i] !== null && typeof ($rootScope.TheeDWindowData[i]) == "object") { + if ($rootScope.TheeDWindowData[i].multiwinid == windowviewid) { + $rootScope.TheeDWindowData.splice(i, 1); + } + } + } + //$(".tools").css("z-index", "15000"); + }); + + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-max .jsglyph-maximize", function (event) { + var currentPanelId = $(event.target).parent().parent().parent().parent().attr('id'); + var len = (currentPanelId).split("_").length; + var windowviewid = (currentPanelId).split("_")[len - 1]; + $scope.Set3DwindowStoreData(windowviewid, 'maximised', true); + $scope.Set3DwindowStoreData(windowviewid, 'minimised', false); + + }); + + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-min #minSpan", function (event) { + var currentPanelId = $(event.target).parent().parent().parent().parent().attr('id'); + var len = (currentPanelId).split("_").length; + var windowviewid = (currentPanelId).split("_")[len - 1]; + $scope.Set3DwindowStoreData(windowviewid, 'maximised', false); + $scope.Set3DwindowStoreData(windowviewid, 'minimised', true); + + }); + + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-norm .jsglyph-normalize", function (event) { + var currentPanelId = $(event.target).parent().parent().parent().parent().attr('id'); + var len = (currentPanelId).split("_").length; + var windowviewid = (currentPanelId).split("_")[len - 1]; + $scope.Set3DwindowStoreData(windowviewid, 'maximised', false); + $scope.Set3DwindowStoreData(windowviewid, 'minimised', false); + + }); + + } + }]); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index e735ca1..e1124d8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -50,7 +50,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout 'clickedCAVideo': '', 'clickedCASummary': '', 'hostedFolderId': '', - 'isTextVisible': true + 'isTextVisible': true, + 'top': 0, + 'left': 0, + 'width': 0, + 'height': 0, + 'minimised': false, + 'maximised': false }); } @@ -79,7 +85,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout 'clickedCAVideo': '', 'clickedCASummary': '', 'hostedFolderId': '', - 'isTextVisible': true + 'isTextVisible': true, + 'top': 0, + 'left': 0, + 'width': 0, + 'height': 0, + 'minimised': false, + 'maximised': false }); } @@ -829,13 +841,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); - $.jsPanel({ + $scope.jsPanelCA = $.jsPanel({ id: $scope.jsPanelID, selector: '.caView', theme: 'success', currentController: 'CAController', parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'), - content: '' + + content: '' + '