diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs index 10d65b9..86f130b 100644 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs +++ b/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs @@ -182,7 +182,9 @@ using System.Data.SqlClient;namespace AIAHTML5.API.Controllers private static void GetModulesBasedOnUserType(User userInfo) { - if (userInfo.UserType == AIAHTML5.API.Models.User.SUPER_ADMIN || userInfo.UserType == AIAHTML5.API.Models.User.GENERAL_ADMIN) + //based on old .net code(AIA flex), we get modules based on licenseId if licenseid>0. + //we verified in database that only superadmin has no licenseid so getting all modules for supeadmin + if (userInfo.UserType == AIAHTML5.API.Models.User.SUPER_ADMIN) { userInfo.Modules = AIAHTML5.API.Models.Users.getAllModulesList(); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 7d71207..1d39758 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -119,6 +119,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic if (url.indexOf('?unb:') != -1) { + $rootScope.isVisibleLogin = true; $rootScope.UnblockUser(); } else if (url.indexOf('?em:') != -1) { @@ -219,7 +220,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic } else { - if (result.UserType == UserTypeConstants.SUPER_ADMIN || result.UserType == UserTypeConstants.GENERAL_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) && + if (result.UserType == UserTypeConstants.SUPER_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) && $rootScope.userData = result; $rootScope.userModules = result.Modules; $rootScope.isVisibleLogin = false; @@ -352,29 +353,47 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic var userInfo = JSON.parse(currentUserDetails); if (userInfo.LoginId != undefined || userInfo.LoginId != "" || userInfo.LoginId != null) { - if (userInfo.LicenseInfo.IsTermAccepted) { + + if (userInfo.UserType == UserTypeConstants.SUPER_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) && + $rootScope.userData = userInfo; + $rootScope.userModules = userInfo.Modules; + $rootScope.isVisibleLogin = false; - //$rootScope.haveRoleAdmin = true; - $rootScope.licenseeAccountNumber = userInfo.LicenseInfo.AccountNumber; + if ($rootScope.refreshcheck == null) { + $location.path('/'); + } - } - else { - if ($('#dvTerms').length > 0) { - $('#dvTerms').html(userInfo.TermsOfServiceText); + + else + { + if (userInfo.LicenseInfo.IsTermAccepted) { + $rootScope.userData = userInfo; + $rootScope.userModules = userInfo.Modules; + $rootScope.isVisibleLogin = false; + //$rootScope.haveRoleAdmin = true; + + if ($rootScope.refreshcheck == null) { + $location.path('/'); + } + + } + else { + if ($('#dvTerms').length > 0) { + $('#dvTerms').html(userInfo.TermsAndConditionsText); + } + $rootScope.isVisibleLogin = true; + $('#dvTermCondition').fadeIn(); + $rootScope.userData = userInfo; + $rootScope.userModules = userInfo.Modules; + //$rootScope.haveRoleAdmin = true; + $location.path('/'); } - $rootScope.isVisibleLogin = true; - $('#dvTermCondition').fadeIn(); - $rootScope.userData = userInfo; - $rootScope.userModules = userInfo.Modules; - //$rootScope.haveRoleAdmin = true; - $rootScope.licenseeAccountNumber = userInfo.LicenseInfo.AccountNumber; - $location.path('/'); } } } @@ -580,7 +599,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic } }, function (error) { - console.log(' Error in authentication = ' + error.statusText); + console.log(' Error in UnblockUser = ' + error.statusText); $rootScope.errorMessage = error; $("#messageModal").modal('show'); } @@ -845,6 +864,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic if ($('#caVideoPanel').length > 0) $('#caVideoPanel').remove(); + if ($('#ImagePanel').length > 0) + $('#ImagePanel').remove(); + $location.url('/' + slug); $rootScope.$broadcast('jsPanelCloseEvent', true); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 90b167c..d174efb 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -10,6 +10,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var CLINICAL_ILLUSTRATION = 'Clinical Illustrations'; var CLINICAL_ANIMATION = 'Clinical Animations'; $rootScope.closeBtnImgPath = "~/../content/images/speeachBubbleClose.png"; + $rootScope.listArray = []; //variables to bind Filter by Controls $scope.searchAAListViewData = []; $scope.SelectedAAthumbImage = []; @@ -36,80 +37,25 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.activePinArray = []; $scope.showTabButton = true; $scope.isListViewDataLoaded = true; - + $scope.setActiveTab = function (tabToSet) { - + $scope.activeTab = tabToSet; localStorage.setItem("activeTab", $scope.activeTab); if ($scope.activeTab == 1) { - $('#grid-view').css("display","block"); + $('#grid-view').css("display", "block"); $('#list-view').css("display", "none"); $("#demoView").remove(); } - else - { - + else { $('#grid-view').css("display", "none"); - if ($scope.isListViewDataLoaded == true) { - var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName) - .then( - function (result) { - // alert(JSON.stringify($scope.moduleLandingData)); - $scope.moduleLandingData = result; - $scope.selectedAAListViewData = new jinqJs() - .from($scope.moduleLandingData.data.root.Item) - .orderBy([{ field: '_Title', sort: 'asc' }]) - .select(); - var htm = ''; - htm += ""; - angular.forEach($scope.selectedAAListViewData, function (value, key) { - htm += "" - htm += ''; - htm += "" - }); - htm += "
Title Region SystemView Type
' + value._Title + '' + value._BodyRegion + '' + value._BodySystem + '' + value._ViewOrientation + '' + value._ImageType + '
"; - $("#list-view").html(htm); - $compile(htm)($scope); - }); - $('#list-view').css("display", "block"); - $scope.isListViewDataLoaded = false; - } - else - { - $('#list-view').css("display", "block"); - } - - $timeout(function () { - // if ($rootScope.isListViewRowClicked == true) { - // $rootScope.isListViewRowClicked = false; - $("#demoView").remove(); - $("#viewList").append("
" + $rootScope.listArray[0].text + "
Open
"); - var moduleItemDataToBeSavedID - $("#list-view table tbody tr").removeClass("active"); - var moduleItemDataToBeSavedID = $rootScope.getLocalStorageValue("listViewSelectedID"); - $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active"); - $scope.isListViewButtonClicked = true; - var curAAListViewScroll = $rootScope.getLocalStorageValue("AAListViewScroll"); - - if (typeof (curAAListViewScroll) !== "undefined" && curAAListViewScroll !== null && curAAListViewScroll !== '') { - if (typeof InstallTrigger !== 'undefined') { - - $('#list-view table tbody').animate({ scrollTop: $rootScope.getLocalStorageValue("AAListViewScroll") }); - } - else { - - $('#list-view table tbody').scrollTop($rootScope.getLocalStorageValue("AAListViewScroll")); - } - - } - // } - }, 2000); + $('#list-view').css("display", "block"); } }; - - $scope.loadForModuleById = function (moduleId) { + $scope.loadForModuleById = function (moduleId) { + $rootScope.openModules.push({ "ModuleId": 2 }); if ($rootScope.refreshcheck == null) { $location.path('/'); } @@ -127,18 +73,15 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou function (result) { $scope.moduleLandingData = result; - // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100); - - setTimeout(function () - { - if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) { - $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); - } - if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null) { - $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow'); - } - }, 100); - + // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100); + setTimeout(function () { + if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) { + $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); + } + if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null) { + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow'); + } + }, 100); //console.log(JSON.stringify(result, null, 4)); }, function (error) { @@ -146,7 +89,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou console.log(' error: ' + error.statusText); } ) - + $('#list-view').css('display', 'none'); } //$scope.$on('$viewContentLoaded', function (event) { @@ -156,29 +99,27 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou //}); $scope.isOpenBtnClicked = false; $scope.openModuleItemView = function (event) { - $rootScope.MenuModuleName = "AA"; - localStorage.setItem("activeTab", $scope.activeTab); + localStorage.setItem("activeTab", $scope.activeTab); //0. Get selected Image Id if ($scope.isListViewButtonClicked == true) { if ($scope.isOpenBtnClicked == true) { - - var moduleItemDataToBeSaved = $("#demoText").html(); + + var moduleItemDataToBeSaved = $("#demoText").text().trim(); $scope.isOpenBtnClicked = false; } else { var moduleItemDataToBeSavedID = event.currentTarget.id; localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); - var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text(); + var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); } } - else - { + else { var moduleItemDataToBeSaved = event.target.id; localStorage.setItem("listViewSelectedID", event.currentTarget.id); $scope.isListViewButtonClicked = false; } - + //1.Filter selected module ietem data and get the pushed opened moduile array object $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); @@ -188,29 +129,28 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.bodySystemName = $rootScope.OpenedTileData[2]; $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; $scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; - $rootScope.listArray = []; + //$rootScope.listArray = []; $rootScope.listArray.push({ "imageName": $rootScope.OpenItemImagePath, "text": moduleItemDataToBeSaved }); //3. set opened module item ti localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]); localStorage.setItem("AAGridViewScroll", $($window).scrollTop()); localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); - + //3. Navigate to the Module-item-view var u = $location.url(); $location.url('/module-item-view'); - } $scope.openListViewModuleItem = function (event) { - + $("#demoView").remove(); var moduleItemDataToBeSavedID = event.currentTarget.id; $("#list-view table tbody tr").removeClass("active"); localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active"); localStorage.setItem("AAListViewScroll", $("#list-view table tbody").scrollTop()); - var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text(); + var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; $rootScope.listArray = []; @@ -220,7 +160,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.openModuleItem = function () { - if ($rootScope.refreshcheck == null) { $location.path('/'); } @@ -275,14 +214,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var openedImage = new Image(); openedImage.id = 'modItemImage'; openedImage.name = $rootScope.OpenItemImagePath; - + openedImage.onload = function () { $scope.imageWidth = this.width; $scope.imageHeight = this.height; - //$('#aaBodyView').css("height", $(window).outerHeight()); - //$('#aaBodyView').css("width", $(window).outerWidth()); $timeout(function () { $compile(aaViewElement.contents())($scope); @@ -290,10 +227,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if (document.getElementById('aaBodyView') != null) { //0.4 added some stylesheets - $('#aaBodyView').css("height", $(window).outerHeight()-65); - - $('#aaBodyView').css("width", $(window).outerWidth()-15); - + $('#aaBodyView').css("height", $(window).outerHeight() - 65); + + $('#aaBodyView').css("width", $(window).outerWidth() - 15); + $rootScope.canvasDivHeight = $('.jsPanel-content').height() - $('.main2 .stickey-area').height(); $('.canvasDivClass').css("height", $rootScope.canvasDivHeight); @@ -319,10 +256,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou canvas.style.position = "absolute"; $("#canvasDiv").append(canvas); $scope.context = canvas.getContext("2d") - //6. Show all pins on AA opened item $scope.showAllPins(); - //7. Highlight all system body list in left side $scope.highlightBodySystemList(); } @@ -332,7 +267,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou openedImage.onerror = loadFailure; openedImage.src = $rootScope.OpenItemImagePath; } - + } $scope.highlightBodySystemList = function () { @@ -340,14 +275,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a"); var bodySystemListlength = bodySystemListObj.length; for (var i = 0; i < bodySystemListlength; i++) { - //var boldTag = lis[i]; for (var j = 0; j < $rootScope.bodySystemNames.length; j++) { if ((bodySystemListObj[i].innerHTML) == ($rootScope.bodySystemNames[j])) { $("#" + i).parent().removeClass("disabledSelectedSystem"); - + } - } } @@ -357,7 +290,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou return true; } - + angular.element(document).ready(function (e) { $("#ImagePanel").resize(function () { $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition); @@ -369,14 +302,15 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.selectedBodySystemName = 'All'; $rootScope.selectedBodySystemId = 0; $rootScope.searchSelectedText = ''; - + }); }) $rootScope.aaPinDataArray = []; $scope.showAllPins = function () { - + $scope.allPinDataArray = []; var promise = ModuleService.getPinDataForImage($rootScope.imageName) + .then( function (result) { @@ -399,6 +333,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.allPinDataArray.push(value._PinId); $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY) }) + + + //load search/vocab data $rootScope.loadSearchData(); } @@ -412,17 +349,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $timeout(function () { $scope.activePinOnLayerChange(); }, 1000); - + } } $scope.FilterByImage = function (moduleId, query) { - $scope.moduleId = moduleId; + $scope.filterstring = true; + + console.log('loadForModuleById is called'); - console.log('loadForModuleById is called') $rootScope.moduleName = Modules[moduleId].Name; while ($scope.searchAAListViewData.length) { $scope.searchAAListViewData.pop(); @@ -531,16 +469,15 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if (selectimg === true && count >= filtercount) { - $scope.imagePath = "../content/images/aa/thumbnails/" + value._TileImageName; - - var $el = $('
' - + '
' - + '' - + '

' + value._Title + '

').appendTo('#grid-view'); - + var $el = $('
' + + '
' + + '' + + '

' + value._Title + '

').appendTo('#grid-view'); + + $compile($el)($scope); $(".sidebar").mCustomScrollbar({ @@ -551,7 +488,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.searchAAListViewData.push( { - "_id": value._id, + "_Id": value._Id, "_ImageId": value._ImageId, "_Title": value._Title, "_ImageName": value._contentImage, @@ -563,29 +500,28 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou //"$$hashKey": value._Summary }); - + console.log($scope.searchAAListViewData); + if ($('#searchItem').length > 0) + $('#searchItem').remove(); } - - }); - //Show Error Message in case of gridview if no data is found + //Show Error Message in case of gridview/ ListView [if no data is found] if ($scope.searchAAListViewData.length == 0) { - var $el = $('
No illustration found for the selected search criteria!
').appendTo('#grid-view'); $compile($el)($scope); $('table > #ListViewDiv > #searchItem').remove(); $('#ListViewDiv').append('No illustration found for the selected search criteria!'); } - console.log(JSON.stringify(result, null, 4)); + //console.log(JSON.stringify(result, null, 4)); + console.log('SearchAAListViewData--' + $scope.searchAAListViewData); }, function (error) { // handle errors here console.log(' error: ' + error.statusText); } ) - } $scope.Reset = function (moduleId, query) { @@ -609,6 +545,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#ListViewDiv').scrollTop(0); + if ($('#demoView').length > 0) + $('#demoView').remove(); // $scope.HideListViewDiv(); $scope.filterstring = false; @@ -621,23 +559,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.showSelectedSystemPins = function (event) { - var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a"); var bodySystemListlength = bodySystemListObj.length; - for (var i = 0; i < bodySystemListlength; i++) - { - + for (var i = 0; i < bodySystemListlength; i++) { + $("#" + i).parent().removeClass("activeAASystemSelect"); } $("#" + event.currentTarget.id).parent().addClass("activeAASystemSelect"); - + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); $scope.removeSpeechBubble(); if (event.currentTarget.id == "0") { - + $scope.selectedSystemName = null; if ($scope.isHidePinBtnClicked) { @@ -647,9 +583,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou else { $scope.showAllPins(); } - } + } else { - + $scope.selectedSystemName = event.currentTarget.title; // get termText info var promise = ModuleService.getTermTextDataForPin($scope.moduleName) @@ -682,7 +618,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou angular.forEach($scope.selectedSystemPinData, function (value, key) { - + $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY) }) @@ -966,8 +902,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if ($scope.sliderVal == 25) { document.getElementById('speechBubbleLine' + PinId + '').style.top = ((speechBubbleDims[0].currentY + 5)) + 'px'; } - else - { + else { document.getElementById('speechBubbleLine' + PinId + '').style.top = ((speechBubbleDims[0].currentY)) + 'px'; } document.getElementById('speechBubble' + PinId + '').style.display = 'block'; @@ -1070,7 +1005,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou else { $("#speechBubbleDraggedLine" + id).css({ 'display': 'block', 'width': d + 'px', 'top': (e - 10) + 'px', 'left': (f - 5) + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' }); } - + } else { $("#bord_annotation").css({ 'display': 'block', 'width': d + 'px', 'top': e + 'px', 'left': f + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' }); @@ -1083,118 +1018,118 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) { $scope.clickedPins = []; - // if ($scope.isSliderChange == true) { - console.log('isSliderrChange') - var radial = $('#' + canvasId).createGradient({ - x1: 50, y1: 50, - x2: 50, y2: 50, - r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(216, 216, 216)' - }); - $('#' + canvasId).drawLine({ - layer: true, - name: "Pin_" + PinId, - groups: ["Pin_" + PinId], - strokeStyle: '#565656', - strokeWidth: 2, - visible: true, - x1: offsetX1 * $scope.sliderPercentValue, y1: offsetY1 * $scope.sliderPercentValue, - x2: x * $scope.sliderPercentValue, y2: y * $scope.sliderPercentValue, - - - }).drawArc({ - name: "PinArc_" + PinId, - layer: true, - groups: ["Pin_" + PinId], - strokeStyle: 'grey', - strokeWidth: 2, - visible: true, - fillStyle: radial, - x: x * $scope.sliderPercentValue, y: y * $scope.sliderPercentValue, - radius: 5 * $scope.sliderPercentValue, + // if ($scope.isSliderChange == true) { + console.log('isSliderrChange') + var radial = $('#' + canvasId).createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(216, 216, 216)' + }); + $('#' + canvasId).drawLine({ + layer: true, + name: "Pin_" + PinId, + groups: ["Pin_" + PinId], + strokeStyle: '#565656', + strokeWidth: 2, + visible: true, + x1: offsetX1 * $scope.sliderPercentValue, y1: offsetY1 * $scope.sliderPercentValue, + x2: x * $scope.sliderPercentValue, y2: y * $scope.sliderPercentValue, + + + }).drawArc({ + name: "PinArc_" + PinId, + layer: true, + groups: ["Pin_" + PinId], + strokeStyle: 'grey', + strokeWidth: 2, + visible: true, + fillStyle: radial, + x: x * $scope.sliderPercentValue, y: y * $scope.sliderPercentValue, + radius: 5 * $scope.sliderPercentValue, + + click: function (clickedPin) { + if (clickedPin.event.ctrlKey == false) { + $scope.clickedPins = []; + } + var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); + var pinData = new jinqJs() + .from($scope.aaPinData) + .where("_PinId == " + pinID) + .select(); - click: function (clickedPin) { - if (clickedPin.event.ctrlKey == false) { - $scope.clickedPins = []; - } - var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); - var pinData = new jinqJs() - .from($scope.aaPinData) - .where("_PinId == " + pinID) - .select(); + var pinTermNumber = pinData[0]._TermId; - var pinTermNumber = pinData[0]._TermId; + var pinWithSameTerm = new jinqJs() - var pinWithSameTerm = new jinqJs() + .from($scope.aaPinData) + .where("_TermId == " + pinTermNumber) + .select(); - .from($scope.aaPinData) - .where("_TermId == " + pinTermNumber) - .select(); + if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) { - if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) { + for (var i = 0; i < pinWithSameTerm.length; i++) { - for (var i = 0; i < pinWithSameTerm.length; i++) { + $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId }) + } - $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId }) - } + } + $scope.isSelectedPinBtnClickedAftrSliderCange = false; + var selectedPinData = new jinqJs() + .from($scope.aaPinData) + .where("_PinId == " + pinID) + .select(); + if (clickedPin.event.ctrlKey == true) { + + $scope.activePinArray.push(clickedPin.name); + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' + }); + clickedPin.fillStyle = radialAfterClick; + $scope.showAnnotation(selectedPinData, true, true, false); + } + else { + $scope.activePinArray = []; + $scope.activePinArray.push(clickedPin.name); + var radial = $('#aaDetailViewCanvas').createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(216, 216, 216)' + }); - } - $scope.isSelectedPinBtnClickedAftrSliderCange = false; - var selectedPinData = new jinqJs() - .from($scope.aaPinData) - .where("_PinId == " + pinID) - .select(); - if (clickedPin.event.ctrlKey == true) { - - $scope.activePinArray.push(clickedPin.name); - var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ - x1: 50, y1: 50, - x2: 50, y2: 50, - r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(126, 187, 83)' - }); - clickedPin.fillStyle = radialAfterClick; - $scope.showAnnotation(selectedPinData, true, true, false); - } - else { - $scope.activePinArray = []; - $scope.activePinArray.push(clickedPin.name); - var radial = $('#aaDetailViewCanvas').createGradient({ - x1: 50, y1: 50, - x2: 50, y2: 50, - r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(216, 216, 216)' - }); + $('#aaDetailViewCanvas').setLayers({ + fillStyle: radial, + }).drawLayers(); - $('#aaDetailViewCanvas').setLayers({ - fillStyle: radial, - }).drawLayers(); + //change the head color to green + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' + }); - //change the head color to green - var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ - x1: 50, y1: 50, - x2: 50, y2: 50, - r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(126, 187, 83)' - }); + clickedPin.fillStyle = radialAfterClick; + $scope.showAnnotation(selectedPinData, false, true, false); - clickedPin.fillStyle = radialAfterClick; - $scope.showAnnotation(selectedPinData, false, true, false); + } - } + } - } + }).drawLayers(); - }).drawLayers(); - } @@ -1209,12 +1144,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.removePin = function (canvasId, pinId) { - var pinName = 'Pin_' + pinId; - var pinArcName = 'PinArc_' + pinId; - $('#' + canvasId).removeLayer(pinName).drawLayers(); - $('#' + canvasId).removeLayer(pinArcName).drawLayers(); + var pinName = 'Pin_' + pinId; + var pinArcName = 'PinArc_' + pinId; + $('#' + canvasId).removeLayer(pinName).drawLayers(); + $('#' + canvasId).removeLayer(pinArcName).drawLayers(); - $scope.removeSpeechBubble(); + $scope.removeSpeechBubble(); //$rootScope.isSliderChanged = true; //$('#aaDetailViewCanvas').removeLayers(); @@ -1231,9 +1166,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.onDrawingCanvasClick(); $rootScope.FreeStylePaint(); }); - + $rootScope.loadSearchData = function () { - + //$("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); var imageId = $rootScope.imageId; var promise = ModuleService.getTermTextDataForAAImage(imageId) @@ -1241,23 +1176,22 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou function (response) { $scope.AAPinTermData = response.data.PinTermData.TermData; - + $rootScope.isLoading = false; $('#setting-spinner').css('visibility', 'hidden'); - + $scope.pinTermData = []; var primaryLexicon = $rootScope.lexiconLanguageArray[0].id; $scope.matchedLanguageTermData = new jinqJs() .from($scope.AAPinTermData) .where('_LanguageId == ' + primaryLexicon) .select(); - var sortedTermTextArray = []; + var sortedTermTextArray = []; for (var i = 0; i < $scope.matchedLanguageTermData.length; i++) { sortedTermTextArray.push($scope.matchedLanguageTermData[i]._TermText); sortedTermTextArray.sort(); } - - + for (var i = 0; i <= sortedTermTextArray.length - 1; i++) { for (var j = 0; j <= $scope.matchedLanguageTermData.length - 1; j++) { if ($scope.matchedLanguageTermData[j]._TermText == sortedTermTextArray[i]) { @@ -1267,10 +1201,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } } - + $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) { + if (($('#termlistfilter').html() != "")) - $('#termlistfilter').empty(); + + $('#termlistfilter').empty(); if ($scope.pinTermData.length > 0) { $timeout(function () { console.log('pinTermData= ' + $scope.pinTermData.length); @@ -1281,12 +1217,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou //var $el = $('
  • ' + $scope.pinTermData[j].TermTxt + '
  • ').appendTo('#termlistfilter') $compile($el)($scope); var $selectedOptions = $('').appendTo("#termList") - + $compile($selectedOptions)($scope); - + $("#AABodySystems").empty(); - $("#bodySystems").css("display","none"); - $("#AABodySystems").css("display","block"); + $("#bodySystems").css("display", "none"); + $("#AABodySystems").css("display", "block"); $("#bodySystemList li a").each(function (key, value) { var $systemOptions = $('').appendTo("#AABodySystems") $compile($systemOptions)($scope); @@ -1307,19 +1243,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.$on('listManagerEvent', function (event, data) { - + $("#viewName").empty(); $("#viewName").append(""); $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); - + if ($rootScope.bodySystemSeletedId == null) { - + $rootScope.loadSearchData(); } - else - { - + else { + $rootScope.refreshTermListOnAASystemSelection($rootScope.bodySystemSeletedId); } $timeout(function () { @@ -1331,7 +1266,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.refreshTermListOnAASystemSelection = function (bodySystemId) { - $rootScope.bodySystemSeletedId = bodySystemId; $('#termList').empty(); var bodySystemName = $("#AABodySystems #" + bodySystemId).val(); @@ -1340,7 +1274,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var $selectedOptions = $('').appendTo("#termList") $compile($selectedOptions)($scope); - } $("#totalTerms").empty(); $("#totalTerms").html("" + $("#termList option").length + " Structures"); @@ -1349,7 +1282,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var imageId = $rootScope.imageId; $scope.pinDataUrl = "aa_dat_pinterm_" + imageId; $rootScope.bodySystemTermArray = []; - + $.ajax({ url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json', type: 'GET', @@ -1379,7 +1312,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } } $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { - + var languageArray = $rootScope.lexiconLanguageArray; @@ -1389,11 +1322,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou .from($scope.AAPinTermData) .where('_TermNumber == ' + actualTermNo) .select(); - + if ($scope.matchedTermNoData != null || $scope.matchedTermNoData != undefined) { - + for (var j = 0; j <= languageArray.length - 1; j++) { - + $scope.matchedLanguageTermNoData = new jinqJs() .from($scope.matchedTermNoData) .where('_LanguageId == ' + languageArray[j].id) @@ -1406,7 +1339,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.hidePins = function () { - + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -1436,7 +1369,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.showAllPinsAfterHide = function (event) { - + + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -1463,13 +1397,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } }; - + $scope.showSelectedPins = function () { - - + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); - + $scope.isHidePinBtnClicked = false; if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) { @@ -1486,9 +1419,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $(".tooltip-custom").addClass("btn-black"); $("#selectedPin").addClass("btn-primary"); $("#selectedPin").removeClass("btn-black"); - + if ($scope.isSelectedPinBtnClickedAftrSliderCange == true) { - + for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { var pinName = $scope.activePinArray[i].split("_"); var activePinName = 'Pin_' + pinName[1]; @@ -1502,11 +1435,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } } + }; $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins) { - + if (isShowSelectedPins) { angular.forEach($scope.clickedPins, function (value, key) { @@ -1521,25 +1455,22 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou // if (aaPinDataValue._PinId != value.id) { var pinName = 'Pin_' + value1.id; var pinArcName = 'PinArc_' + value1.id; - - - $('#aaDetailViewCanvas').setLayer(pinName, { - visible: true // set to true instead to show the layer again - }).drawLayers(); - $('#aaDetailViewCanvas').setLayer(pinArcName, { - visible: true // set to true instead to show the layer again - }).drawLayers(); - - + $('#aaDetailViewCanvas').setLayer(pinName, { + visible: true // set to true instead to show the layer again + }).drawLayers(); + + $('#aaDetailViewCanvas').setLayer(pinArcName, { + visible: true // set to true instead to show the layer again + }).drawLayers(); // } }) - + angular.forEach(seletedSystemPinData, function (aaPinDataValue, aaPinDataKey) { var pinName = 'Pin_' + aaPinDataValue._PinId; var pinArcName = 'PinArc_' + aaPinDataValue._PinId; - + $('#aaDetailViewCanvas').setLayer(pinName, { visible: false // set to true instead to show the layer again }).drawLayers(); @@ -1547,10 +1478,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#aaDetailViewCanvas').setLayer(pinArcName, { visible: false // set to true instead to show the layer again }).drawLayers(); - }) - } else { @@ -1619,18 +1548,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.highlightPinBasedOnSerachItem = function (id) { - $scope.searchItemId = id; - $scope.searchItemText = $("#" + id).text(); - $rootScope.searchSelectedText = $("#"+id).text(); - $('#termList option[selected="selected"]').prop("selected", false); - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); + $scope.searchItemId = id; + $scope.searchItemText = $("#" + id).text(); + $rootScope.searchSelectedText = $("#" + id).text(); + $('#termList option[selected="selected"]').prop("selected", false); + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); - $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" }); - $("#termlistfilter li #" + $scope.searchItemId).css({ "background-color": "#3399FF", "color": "#ffffff" }); - $scope.searchFilter = $("#"+id).text(); - selectedTermName.placeholder = $("#"+id).text(); + $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" }); + $("#termlistfilter li #" + $scope.searchItemId).css({ "background-color": "#3399FF", "color": "#ffffff" }); + $scope.searchFilter = $("#" + id).text(); + selectedTermName.placeholder = $("#" + id).text(); //get data from pindata for this trem @@ -1644,7 +1573,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou // maintaing scroll position on selection of options in list manager. var annotationTopPos = $(".common-drag").css("top").split("p"); $("#canvasDiv").scrollTop(annotationTopPos[0]); - + $scope.IsSearchVisible = false; } @@ -1674,7 +1603,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#" + $rootScope.annotationArray[i].speechBuubleId).css("display", "none"); $("#" + $rootScope.annotationArray[i].speechBubbleLineId).css("display", "none"); } - } else { $rootScope.isShowHideButtonClicked = true; @@ -1685,43 +1613,39 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#comment-box").removeClass("btn-primary"); $("#comment-box").addClass("btn-black"); - + } - } $scope.activePinOnLayerChange = function () { - for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ x1: 50, y1: 50, x2: 50, y2: 50, r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(126, 187, 83)' + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' }); var clickedPin = $scope.activePinArray[i]; $('#aaDetailViewCanvas').setLayer(clickedPin, { fillStyle: radialAfterClick }).drawLayers(); - + } } - $scope.activePinOnSliderChange = function () { - if ($scope.activePinArray.length == 1) - { - for (var i = 0; i <= $scope.allPinDataArray.length - 1; i++) { + if ($scope.activePinArray.length == 1) { + for (var i = 0; i <= $scope.allPinDataArray.length - 1; i++) { var activeArc = $scope.activePinArray[0].split("_"); if ($scope.allPinDataArray[i] == activeArc[1]) { var pinName = 'Pin_' + $scope.allPinDataArray[i]; var pinArcName = 'PinArc_' + $scope.allPinDataArray[i]; - $('#aaDetailViewCanvas').setLayer(pinName, { - visible: true // set to true instead to show the layer again - }).drawLayers(); - $('#aaDetailViewCanvas').setLayer(pinArcName, { - visible: true // set to true instead to show the layer again - }).drawLayers(); + $('#aaDetailViewCanvas').setLayer(pinName, { + visible: true // set to true instead to show the layer again + }).drawLayers(); + $('#aaDetailViewCanvas').setLayer(pinArcName, { + visible: true // set to true instead to show the layer again + }).drawLayers(); } else { var pinName = 'Pin_' + $scope.allPinDataArray[i]; @@ -1733,44 +1657,44 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou visible: false // set to true instead to show the layer again }).drawLayers(); } - } - } - else { - var seletedSystemPinData; - angular.forEach($scope.activePinArray, function (value, key) { - var pinID = value.split("_"); - seletedSystemPinData = new jinqJs() - .from($scope.allPinDataArray) - .where('_PinId != ' + pinID[1]) - .select(); - }) + } + } + else { + var seletedSystemPinData; + angular.forEach($scope.activePinArray, function (value, key) { + var pinID = value.split("_"); + seletedSystemPinData = new jinqJs() + .from($scope.allPinDataArray) + .where('_PinId != ' + pinID[1]) + .select(); + }) - angular.forEach(seletedSystemPinData, function (aaPinDataValue, aaPinDataKey) { - - var pinName = 'Pin_' + aaPinDataValue; - var pinArcName = 'PinArc_' + aaPinDataValue; + angular.forEach(seletedSystemPinData, function (aaPinDataValue, aaPinDataKey) { - $('#aaDetailViewCanvas').setLayer(pinName, { - visible: false // set to true instead to show the layer again - }).drawLayers(); + var pinName = 'Pin_' + aaPinDataValue; + var pinArcName = 'PinArc_' + aaPinDataValue; - $('#aaDetailViewCanvas').setLayer(pinArcName, { - visible: false // set to true instead to show the layer again - }).drawLayers(); - - }) - for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { - var pinName = $scope.activePinArray[i].split("_"); - var activePinName = 'Pin_' + pinName[1]; - var pinArcName = 'PinArc_' + pinName[1]; - $('#aaDetailViewCanvas').setLayer(activePinName, { - visible: true // set to true instead to show the layer again - }).drawLayers(); - $('#aaDetailViewCanvas').setLayer(pinArcName, { - visible: true // set to true instead to show the layer again - }).drawLayers(); - } - } + $('#aaDetailViewCanvas').setLayer(pinName, { + visible: false // set to true instead to show the layer again + }).drawLayers(); + + $('#aaDetailViewCanvas').setLayer(pinArcName, { + visible: false // set to true instead to show the layer again + }).drawLayers(); + + }) + for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { + var pinName = $scope.activePinArray[i].split("_"); + var activePinName = 'Pin_' + pinName[1]; + var pinArcName = 'PinArc_' + pinName[1]; + $('#aaDetailViewCanvas').setLayer(activePinName, { + visible: true // set to true instead to show the layer again + }).drawLayers(); + $('#aaDetailViewCanvas').setLayer(pinArcName, { + visible: true // set to true instead to show the layer again + }).drawLayers(); + } + } } }]); @@ -1824,7 +1748,7 @@ function hideSearchList(event) { } function onSearchItemSelection(id) { - + console.log('AA hide search is called'); var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); scope.$apply(function () { @@ -1869,7 +1793,7 @@ function openModuleItemView(event) { } function openListViewModuleItem(event) { - + var scope = angular.element(document.getElementById("list-view")).scope(); scope.isListViewButtonClicked = true; scope.$apply(function () { @@ -1880,6 +1804,7 @@ function openListViewModuleItem(event) { function openCurrentView(event) { var scope = angular.element(document.getElementById("list-view")).scope(); + scope.isListViewButtonClicked = true; scope.isOpenBtnClicked = true; scope.$apply(function () { scope.openModuleItemView(event); @@ -1888,7 +1813,7 @@ function openCurrentView(event) { } function onZoom(scope) { - + //$(".common-drag").remove(); //$(".commonDot").remove(); //$(".commonDraggedLine").remove(); @@ -1904,14 +1829,14 @@ function onZoom(scope) { //}).drawLayers(); // scope.removePin(); // scope.showAllPins(); - + //6. Show all pins on AA opened item } $(document).ready(function () { - + $(".slider").slider({ min: 25, max: 100, @@ -1926,40 +1851,40 @@ $(document).ready(function () { var relativeWidth = 0; var relativeHeight = 0; if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) { - if (ui.value == 100) { - relativeWidth = scope.ViewImageWidth; - relativeHeight = scope.ViewImageHeight - scope.sliderPercentValue = 1.0; - } - else if (ui.value == 85) { - relativeWidth = scope.ViewImageWidth * 0.85; - relativeHeight = scope.ViewImageHeight * 0.85; - scope.sliderPercentValue = 0.85; + if (ui.value == 100) { + relativeWidth = scope.ViewImageWidth; + relativeHeight = scope.ViewImageHeight + scope.sliderPercentValue = 1.0; + } + else if (ui.value == 85) { + relativeWidth = scope.ViewImageWidth * 0.85; + relativeHeight = scope.ViewImageHeight * 0.85; + scope.sliderPercentValue = 0.85; - } else if (ui.value == 70) { - relativeWidth = scope.ViewImageWidth * 0.70; - relativeHeight = scope.ViewImageHeight * 0.70; - scope.sliderPercentValue = 0.70; - } else if (ui.value == 55) { + } else if (ui.value == 70) { + relativeWidth = scope.ViewImageWidth * 0.70; + relativeHeight = scope.ViewImageHeight * 0.70; + scope.sliderPercentValue = 0.70; + } else if (ui.value == 55) { - relativeWidth = scope.ViewImageWidth * 0.55; - relativeHeight = scope.ViewImageHeight * 0.55; - scope.sliderPercentValue = 0.55; + relativeWidth = scope.ViewImageWidth * 0.55; + relativeHeight = scope.ViewImageHeight * 0.55; + scope.sliderPercentValue = 0.55; - } else if (ui.value == 40) { + } else if (ui.value == 40) { - relativeWidth = scope.ViewImageWidth * 0.40; - relativeHeight = scope.ViewImageHeight * 0.40; - scope.sliderPercentValue = 0.40; + relativeWidth = scope.ViewImageWidth * 0.40; + relativeHeight = scope.ViewImageHeight * 0.40; + scope.sliderPercentValue = 0.40; - } else if (ui.value == 25) { + } else if (ui.value == 25) { - relativeWidth = scope.ViewImageWidth * 0.25; - relativeHeight = scope.ViewImageHeight * 0.25; - scope.sliderPercentValue = 0.25; + relativeWidth = scope.ViewImageWidth * 0.25; + relativeHeight = scope.ViewImageHeight * 0.25; + scope.sliderPercentValue = 0.25; + } } - } if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) { $("#modItemImage").css("width", relativeWidth + "px"); @@ -1969,7 +1894,7 @@ $(document).ready(function () { $("#modItemImage").attr('src', ''); - + $("#aaDetailViewCanvas").remove(); //0.5 create canvas on the top of image so that I can draw a line over the canvas. var canvas = document.createElement('canvas'); @@ -1980,7 +1905,7 @@ $(document).ready(function () { canvas.style.left = '0px'; canvas.style.top = '0px'; canvas.style.position = "absolute"; - + $("#canvasDiv").append(canvas); scope.context = canvas.getContext("2d") $("#modItemImage").attr('src', scope.OpenItemImagePath); @@ -1988,18 +1913,18 @@ $(document).ready(function () { var btnID = ''; $("div.tools div:eq(1) div").each(function () { if ($(this).find("button").hasClass("btn-primary")) { - btnID = $(this).find("button").attr("id"); + btnID = $(this).find("button").attr("id"); $('#' + btnID).removeClass("btn-black"); $('#' + btnID).addClass("btn-primary"); } }); scope.isSelectedPinBtnClickedAftrSliderCange = true; switch (btnID) { - + case "hidePinBtn": break; case "allPinBtn": - scope.showAllPins(); + scope.showAllPins(); break; case "selectedPin": scope.showAllPins(); @@ -2010,7 +1935,7 @@ $(document).ready(function () { break; } } - + }); } }) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html index cb230d1..6b8159c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html @@ -3,103 +3,185 @@
    - - - -