From 07fb9e1d721b49150f0e38fa2aa64d6618561b11 Mon Sep 17 00:00:00 2001 From: amrita.vishnoi Date: Tue, 1 Nov 2016 17:36:22 +0530 Subject: [PATCH] renamed view and controller name for AA and also fixed the issues created due to this... --- 400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj | 5 +++-- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 289 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.Web/app/controllers/TinyViewListController.js | 289 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js | 6 +++--- 400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html | 369 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 664 insertions(+), 294 deletions(-) create mode 100644 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js delete mode 100644 400-SOURCECODE/AIAHTML5.Web/app/controllers/TinyViewListController.js create mode 100644 400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html diff --git a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj index 6ceaebc..e1f8f33 100644 --- a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj +++ b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj @@ -50,7 +50,7 @@ - + @@ -67,6 +67,7 @@ + @@ -76,7 +77,7 @@ - + diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js new file mode 100644 index 0000000..6c56467 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -0,0 +1,289 @@ +'use strict'; + +AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "$timeout", "Modules", "$routeParams", "DataService", +function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, BodySystems, ViewOrientations, ImageTypes, $timeout, Modules, $routeParam, DataService) +{ + var ATLAS_ANATOMY = 'Atlas Anatomy'; + var CLINICAL_ILLUSTRATION ='Clinical Illustrations'; + var CLINICAL_ANIMATION='Clinical Animations'; + + + $scope.AllBodyRegion = []; + $scope.AllBodySystem = []; + $scope.AllOrientation = []; + $scope.AllImageType = []; + + $scope.loadForModuleById = function (moduleId) { + + console.log('loadForModuleById is called') + var moduleName = Modules[moduleId].Name; + + $scope.loadDataForModule(moduleName); + } + + $scope.loadDataForModule = function (moduleName) + { + + //0. load filter static data + + $scope.AllBodyRegion = BodyRegions; + $scope.AllBodySystem = BodySystems; + $scope.AllOrientation = ViewOrientations; + $scope.AllImageType = ImageTypes; + + //1. load dynamic data for module specific images + var jsonPath; + if(moduleName==ATLAS_ANATOMY) + { + jsonPath ='~/../content/data/json/aa/aa_dat_contentlist.json'; + } + else if(moduleName == CLINICAL_ANIMATION) + { + //to do, in next phase of project + jsonPath ='~/../content/data/json/ca/ca_dat_contentlist.json'; + } + else if(moduleName == CLINICAL_ILLUSTRATION) + { + //to do, in next phase of project + jsonPath ='~/../content/data/json/ci/ci_dat_contentlist.json'; + } + + var promise = DataService.getJson(jsonPath) + promise.then( + function (result) { + $scope.AtlasAnatomyData = result; + + $scope.data = new jinqJs() + .from($scope.AtlasAnatomyData.root.Item) + .orderBy([{ field: '_Title', sort: 'asc' }]) + .select(); + + //console.log($scope.selectedCIListViewData); + //$('#grid-view').empty(); + angular.forEach($scope.data, function (value, key) { + $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TinyImageName; + + var $el = $('
' + + '
' + + '' + + '

' + value._Title + '

').appendTo('#grid-view'); + + + $compile($el)($scope); + + //$(".sidebar").mCustomScrollbar({ + // autoHideScrollbar: true, + // //theme:"rounded" + //}); + + + }); + + $scope.scroll(); + + }, + function (error) { + // handle errors here + console.log(' $scope.IllustrationData = ' + error.statusText); + } + ); + + + } + + $scope.scroll = function () { + $("html,body").scrollTop(0); + } + + + $scope.ApplySearch = function (query) { + + $scope.filterstring = true; + + while ($scope.searchCIListViewData.length) { + $scope.searchCIListViewData.pop(); + } + + //$('#grid-view').empty(); + + filtercount = 0; + if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { + filtercount = filtercount + 1; + localStorage.setItem("CICurBodyRegion", query.selectedbodyregion); + } + else { + localStorage.setItem("CICurBodyRegion", ''); + } + + if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { + filtercount = filtercount + 1; + localStorage.setItem("CICurBodySystem", query.selectedbodysystem); + } + else { + localStorage.setItem("CICurBodySystem", ''); + } + + if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== '')) { + filtercount = filtercount + 1; + localStorage.setItem("CICurOrientation", query.selectedorientation); + } + else { + localStorage.setItem("CICurOrientation", ''); + } + + if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== '')) { + filtercount = filtercount + 1; + localStorage.setItem("CICurImageType", query.selectedimagetype); + } + else { + localStorage.setItem("CICurImageType", ''); + } + + if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== '')) { + filtercount = filtercount + 1; + localStorage.setItem("CICurSpeciality", query.selectedspecialty); + } + else { + localStorage.setItem("CICurSpeciality", ''); + } + + + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') + promise.then( + function (result) { + $scope.IllustrationData = result; + //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; + + $scope.selectedCIListViewData = new jinqJs() + .from($scope.IllustrationData.root.CIData) + .orderBy([{ field: '_Title', sort: 'asc' }]) + .select(); + + $('#grid-view').empty(); + + angular.forEach($scope.selectedCIListViewData, function (value, key) { + + var selectimg = true; + var count = 0; + + + if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { + var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); + if (posbodyregion > -1) { + selectimg = true; + count = count + 1; + + } + else { + selectimg = false; + count = count - 1; + } + + } + + if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { + var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); + if (posbodysystem > -1) { + count = count + 1; + selectimg = true; + } else { + selectimg = false; + count = count - 1; + } + } + + if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== "")) { + var posorientation = value._ViewOrientation.indexOf(query.selectedorientation); + if (posorientation > -1) { + count = count + 1; + selectimg = true; + + } else { + selectimg = false; + count = count - 1; + } + + } + + if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== "")) { + var posimagetype = value._ImageType.indexOf(query.selectedimagetype); + if (posimagetype > -1) { + count = count + 1; + selectimg = true; + + } else { + selectimg = false; + count = count - 1; + } + + } + + if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== "")) { + var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); + if (posspeciality > -1) { + count = count + 1; + selectimg = true; + } else { + selectimg = false; + count = count - 1; + } + + } + + if (selectimg === true && count >= filtercount) { + + + $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; + + var $el = $('
' + + '
' + + '' + + '

' + value._Title + '

').appendTo('#grid-view'); + + + $compile($el)($scope); + + $(".sidebar").mCustomScrollbar({ + autoHideScrollbar: true, + //theme:"rounded" + }); + + + $scope.searchCIListViewData.push( + { + "_id": value._id, + "_ImageId": value._ImageId, + "_Title": value._Title, + "_contentImage": value._contentImage, + "_ThumbnailImage": value._ThumbnailImage, + "_BodySystem": value._BodySystem, + "_BodyRegion": value._BodyRegion, + "_ViewOrientation": value._ViewOrientation, + "_MedicalSpecialty": value._MedicalSpecialty, + "_ImageType": value._ImageType, + "_Summary": value._Summary + + }); + + } + + + }); + + //Show Error Message in case of gridview if no data is found + if ($scope.searchCIListViewData.length == 0) { + + var $el = $('
No illustration found for the selected search criteria!
').appendTo('#grid-view'); + $compile($el)($scope); + } + }, + function (error) { + // handle errors here + console.log(' $scope.IllustrationData = ' + error.statusText); + } + ); + + + } + +}]); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TinyViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TinyViewListController.js deleted file mode 100644 index 2e7d37a..0000000 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TinyViewListController.js +++ /dev/null @@ -1,289 +0,0 @@ -'use strict'; - -AIA.controller("TinyViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "$timeout", "Modules", "$routeParams", "DataService", -function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, BodySystems, ViewOrientations, ImageTypes, $timeout, Modules, $routeParam, DataService) -{ - var ATLAS_ANATOMY = 'Atlas Anatomy'; - var CLINICAL_ILLUSTRATION ='Clinical Illustrations'; - var CLINICAL_ANIMATION='Clinical Animations'; - - - $scope.AllBodyRegion = []; - $scope.AllBodySystem = []; - $scope.AllOrientation = []; - $scope.AllImageType = []; - - $scope.loadForModuleById = function (moduleId) { - - console.log('loadForModuleById is called') - var moduleName = Modules[moduleId].Name; - - $scope.loadDataForModule(moduleName); - } - - $scope.loadDataForModule = function (moduleName) - { - - //0. load filter static data - - $scope.AllBodyRegion = BodyRegions; - $scope.AllBodySystem = BodySystems; - $scope.AllOrientation = ViewOrientations; - $scope.AllImageType = ImageTypes; - - //1. load dynamic data for module specific images - var jsonPath; - if(moduleName==ATLAS_ANATOMY) - { - jsonPath ='~/../content/data/json/aa/aa_dat_contentlist.json'; - } - else if(moduleName == CLINICAL_ANIMATION) - { - //to do, in next phase of project - jsonPath ='~/../content/data/json/ca/ca_dat_contentlist.json'; - } - else if(moduleName == CLINICAL_ILLUSTRATION) - { - //to do, in next phase of project - jsonPath ='~/../content/data/json/ci/ci_dat_contentlist.json'; - } - - var promise = DataService.getJson(jsonPath) - promise.then( - function (result) { - $scope.AtlasAnatomyData = result; - - $scope.data = new jinqJs() - .from($scope.AtlasAnatomyData.root.Item) - .orderBy([{ field: '_Title', sort: 'asc' }]) - .select(); - - //console.log($scope.selectedCIListViewData); - //$('#grid-view').empty(); - angular.forEach($scope.data, function (value, key) { - $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TinyImageName; - - var $el = $('
' - + '
' - + '' - + '

' + value._Title + '

').appendTo('#grid-view'); - - - $compile($el)($scope); - - //$(".sidebar").mCustomScrollbar({ - // autoHideScrollbar: true, - // //theme:"rounded" - //}); - - - }); - - $scope.scroll(); - - }, - function (error) { - // handle errors here - console.log(' $scope.IllustrationData = ' + error.statusText); - } - ); - - - } - - $scope.scroll = function () { - $("html,body").scrollTop(0); - } - - - $scope.ApplySearch = function (query) { - - $scope.filterstring = true; - - while ($scope.searchCIListViewData.length) { - $scope.searchCIListViewData.pop(); - } - - //$('#grid-view').empty(); - - filtercount = 0; - if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { - filtercount = filtercount + 1; - localStorage.setItem("CICurBodyRegion", query.selectedbodyregion); - } - else { - localStorage.setItem("CICurBodyRegion", ''); - } - - if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { - filtercount = filtercount + 1; - localStorage.setItem("CICurBodySystem", query.selectedbodysystem); - } - else { - localStorage.setItem("CICurBodySystem", ''); - } - - if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== '')) { - filtercount = filtercount + 1; - localStorage.setItem("CICurOrientation", query.selectedorientation); - } - else { - localStorage.setItem("CICurOrientation", ''); - } - - if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== '')) { - filtercount = filtercount + 1; - localStorage.setItem("CICurImageType", query.selectedimagetype); - } - else { - localStorage.setItem("CICurImageType", ''); - } - - if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== '')) { - filtercount = filtercount + 1; - localStorage.setItem("CICurSpeciality", query.selectedspecialty); - } - else { - localStorage.setItem("CICurSpeciality", ''); - } - - - var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') - promise.then( - function (result) { - $scope.IllustrationData = result; - //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; - - $scope.selectedCIListViewData = new jinqJs() - .from($scope.IllustrationData.root.CIData) - .orderBy([{ field: '_Title', sort: 'asc' }]) - .select(); - - $('#grid-view').empty(); - - angular.forEach($scope.selectedCIListViewData, function (value, key) { - - var selectimg = true; - var count = 0; - - - if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { - var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); - if (posbodyregion > -1) { - selectimg = true; - count = count + 1; - - } - else { - selectimg = false; - count = count - 1; - } - - } - - if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { - var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); - if (posbodysystem > -1) { - count = count + 1; - selectimg = true; - } else { - selectimg = false; - count = count - 1; - } - } - - if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== "")) { - var posorientation = value._ViewOrientation.indexOf(query.selectedorientation); - if (posorientation > -1) { - count = count + 1; - selectimg = true; - - } else { - selectimg = false; - count = count - 1; - } - - } - - if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== "")) { - var posimagetype = value._ImageType.indexOf(query.selectedimagetype); - if (posimagetype > -1) { - count = count + 1; - selectimg = true; - - } else { - selectimg = false; - count = count - 1; - } - - } - - if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== "")) { - var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); - if (posspeciality > -1) { - count = count + 1; - selectimg = true; - } else { - selectimg = false; - count = count - 1; - } - - } - - if (selectimg === true && count >= filtercount) { - - - $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - - var $el = $('
' - + '
' - + '' - + '

' + value._Title + '

').appendTo('#grid-view'); - - - $compile($el)($scope); - - $(".sidebar").mCustomScrollbar({ - autoHideScrollbar: true, - //theme:"rounded" - }); - - - $scope.searchCIListViewData.push( - { - "_id": value._id, - "_ImageId": value._ImageId, - "_Title": value._Title, - "_contentImage": value._contentImage, - "_ThumbnailImage": value._ThumbnailImage, - "_BodySystem": value._BodySystem, - "_BodyRegion": value._BodyRegion, - "_ViewOrientation": value._ViewOrientation, - "_MedicalSpecialty": value._MedicalSpecialty, - "_ImageType": value._ImageType, - "_Summary": value._Summary - - }); - - } - - - }); - - //Show Error Message in case of gridview if no data is found - if ($scope.searchCIListViewData.length == 0) { - - var $el = $('
No illustration found for the selected search criteria!
').appendTo('#grid-view'); - $compile($el)($scope); - } - }, - function (error) { - // handle errors here - console.log(' $scope.IllustrationData = ' + error.statusText); - } - ); - - - } - -}]); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js index 8a997f5..d112f26 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js @@ -26,9 +26,9 @@ AIA.constant('pages', [ }, { name: 'Tiny View List', - pageSlug: 'tiny-view-list', - pageUrl: 'app/views/tiny-view.html', - pageController: 'TinyViewListController' + pageSlug: 'tile-view-list', + pageUrl: 'app/views/tile-view.html', + pageController: 'TileViewListController' }, { // id:3, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html new file mode 100644 index 0000000..85ced9f --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html @@ -0,0 +1,369 @@ + + + + + + + A.D.A.M. Interactive Anatomy + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + +

1st & 2nd Intercostal Spaces

+ +
+
+
+
+ +
+

Zoom

+
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- libgit2 0.21.4