Commit 1d7653c62f51fa9160d45685a8e18031faaf33b4
1 parent
13294ebb
this is the solution for AOD IPAD scroll
Showing
1 changed file
with
67 additions
and
60 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/LinkController.js
1 | -'use strict'; | ||
2 | - | ||
3 | -AIA.controller("LinkController", ["$scope", "$rootScope", "$log", "$location", "pages", "$routeParams", | ||
4 | -function ($scope, $rootScope, log, $location, pages, $routeParams) { | ||
5 | - | ||
6 | - //$rootScope.currentActiveModuleTitle = Modules[10].Name; | ||
7 | - //$rootScope.currentActiveModuleTitle = $routeParams.modname; | ||
8 | - $scope.links = [ | ||
9 | - new link("encyclopedia", "Encyclopedia", 'https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=117', "100%", "750px"), | ||
10 | - new link("IP-10", "IP 10", "http://interactiveanatomy.com/IPWeb10/index.aspx", "100%", "750px"), | ||
11 | - new link("indepth-reports", "InDepth Reports", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=10", "100%", "4000px"), | ||
12 | - new link("complementary-and-alternate-medicine", "Complementary and Alternative Medicine", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=107", "100%", "750px"), | ||
13 | - new link("bodyguide", "Body Guide", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=25 ", "100%", "1050px"), | ||
14 | - new link("health-navigator", "Health Navigator", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=65 ", "100%", "1000px"), | ||
15 | - new link("wellness-tools", "The Wellness Tools", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=20 ", "100%", "1500px"), | ||
16 | - new link("aod", "A.D.A.M OnDemand", "http://uat.adamondemand.com/Home/AIACatalog?categoriesID=2", "100%", "1500px") | ||
17 | - ]; | ||
18 | - | ||
19 | - $scope.$on('$viewContentLoaded', function (event) { | ||
20 | - | ||
21 | - | ||
22 | - if ($rootScope.refreshcheck == null) { | ||
23 | - $location.path('/'); | ||
24 | - } | ||
25 | - // code that will be executed ... | ||
26 | - // every time this view is loaded | ||
27 | - | ||
28 | - | ||
29 | - for (var i = 0; i < $scope.links.length; i++) { | ||
30 | - if ($scope.links[i].modname == $routeParams.modname) { | ||
31 | - $rootScope.currentActiveModuleTitle = $scope.links[i].title; | ||
32 | - if ($rootScope.currentActiveModuleTitle == "IP 10" || $rootScope.currentActiveModuleTitle == "A.D.A.M OnDemand") | ||
33 | - { | ||
34 | - // document.getElementById('externalLink').style.height = "1024px"; | ||
35 | - document.getElementById('externalLink').style.height = $(window).outerHeight() - 128+"px"; | ||
36 | - | ||
37 | - } | ||
38 | - $scope.objdata = $scope.links[i].objurl; | ||
39 | - $scope.myObj = $scope.links[i].objstyle; | ||
40 | - } | ||
41 | - } | ||
42 | - }); | ||
43 | - | ||
44 | - $scope.showTabButton = false; | ||
45 | - $scope.IsVisible = function () { | ||
46 | - $scope.scroll(); | ||
47 | - | ||
48 | - } | ||
49 | - | ||
50 | - $scope.scroll = function () { | ||
51 | - // $window.scrollTo(0, 0); | ||
52 | - $("html,body").scrollTop(0); | ||
53 | - //alert("scroll"); | ||
54 | - } | ||
55 | -}] | ||
56 | - | ||
57 | - | ||
58 | -); | ||
59 | - | ||
60 | - | 1 | +'use strict'; |
2 | + | ||
3 | +AIA.controller("LinkController", ["$scope", "$rootScope", "$log", "$location", "pages", "$routeParams", | ||
4 | +function ($scope, $rootScope, log, $location, pages, $routeParams) { | ||
5 | + | ||
6 | + //$rootScope.currentActiveModuleTitle = Modules[10].Name; | ||
7 | + //$rootScope.currentActiveModuleTitle = $routeParams.modname; | ||
8 | + $scope.links = [ | ||
9 | + new link("encyclopedia", "Encyclopedia", 'https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=117', "100%", "750px"), | ||
10 | + new link("IP-10", "IP 10", "http://interactiveanatomy.com/IPWeb10/index.aspx", "100%", "750px"), | ||
11 | + new link("indepth-reports", "InDepth Reports", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=10", "100%", "4000px"), | ||
12 | + new link("complementary-and-alternate-medicine", "Complementary and Alternative Medicine", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=107", "100%", "750px"), | ||
13 | + new link("bodyguide", "Body Guide", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=25 ", "100%", "1050px"), | ||
14 | + new link("health-navigator", "Health Navigator", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=65 ", "100%", "1000px"), | ||
15 | + new link("wellness-tools", "The Wellness Tools", "https://ssl.adam.com/content.aspx?site=aia5se3.adam.com&login=AIA41842&productId=20 ", "100%", "1500px"), | ||
16 | + new link("aod", "A.D.A.M OnDemand", "http://uat.adamondemand.com/Home/AIACatalog?categoriesID=2", "100%", "1500px") | ||
17 | + ]; | ||
18 | + | ||
19 | + $scope.$on('$viewContentLoaded', function (event) { | ||
20 | + | ||
21 | + | ||
22 | + if ($rootScope.refreshcheck == null) { | ||
23 | + $location.path('/'); | ||
24 | + } | ||
25 | + // code that will be executed ... | ||
26 | + // every time this view is loaded | ||
27 | + | ||
28 | + var $uaAOD = navigator.userAgent; | ||
29 | + for (var i = 0; i < $scope.links.length; i++) { | ||
30 | + if ($scope.links[i].modname == $routeParams.modname) { | ||
31 | + $rootScope.currentActiveModuleTitle = $scope.links[i].title; | ||
32 | + if ($rootScope.currentActiveModuleTitle == "IP 10" || $rootScope.currentActiveModuleTitle == "A.D.A.M OnDemand") | ||
33 | + { | ||
34 | + // document.getElementById('externalLink').style.height = "1024px"; | ||
35 | + if ($uaAOD.match(/(iPod|iPhone|iPad|android)/i)) { | ||
36 | + document.getElementById('externalLink').style.height = 2048 + "px"; | ||
37 | + } | ||
38 | + else { | ||
39 | + document.getElementById('externalLink').style.height = $(window).outerHeight() - 128 + "px"; | ||
40 | + } | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + } | ||
45 | + $scope.objdata = $scope.links[i].objurl; | ||
46 | + $scope.myObj = $scope.links[i].objstyle; | ||
47 | + } | ||
48 | + } | ||
49 | + }); | ||
50 | + | ||
51 | + $scope.showTabButton = false; | ||
52 | + $scope.IsVisible = function () { | ||
53 | + $scope.scroll(); | ||
54 | + | ||
55 | + } | ||
56 | + | ||
57 | + $scope.scroll = function () { | ||
58 | + // $window.scrollTo(0, 0); | ||
59 | + $("html,body").scrollTop(0); | ||
60 | + //alert("scroll"); | ||
61 | + } | ||
62 | +}] | ||
63 | + | ||
64 | + | ||
65 | +); | ||
66 | + | ||
67 | + |