Commit 60d57fa8e06db42a3e32d1681968e9abcda33da5
1 parent
a2a99e48
manually merged AODScrollIissue
Showing
2 changed files
with
30 additions
and
9 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/LinkController.js
@@ -29,22 +29,40 @@ function ($scope, $rootScope, log, $location, pages, $routeParams) { | @@ -29,22 +29,40 @@ function ($scope, $rootScope, log, $location, pages, $routeParams) { | ||
29 | for (var i = 0; i < $scope.links.length; i++) { | 29 | for (var i = 0; i < $scope.links.length; i++) { |
30 | if ($scope.links[i].modname == $routeParams.modname) { | 30 | if ($scope.links[i].modname == $routeParams.modname) { |
31 | $rootScope.currentActiveModuleTitle = $scope.links[i].title; | 31 | $rootScope.currentActiveModuleTitle = $scope.links[i].title; |
32 | - if ($rootScope.currentActiveModuleTitle == "IP 10" || $rootScope.currentActiveModuleTitle == "A.D.A.M OnDemand") | 32 | + if ($rootScope.currentActiveModuleTitle == "IP 10" ) |
33 | { | 33 | { |
34 | // document.getElementById('externalLink').style.height = "1024px"; | 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 | - } | 35 | + document.getElementById('externalLink').style.height = $(window).outerHeight() - 41 + "px"; |
41 | 36 | ||
42 | 37 | ||
43 | 38 | ||
44 | } | 39 | } |
45 | $scope.objdata = $scope.links[i].objurl; | 40 | $scope.objdata = $scope.links[i].objurl; |
46 | - $scope.myObj = $scope.links[i].objstyle; | ||
47 | - } | 41 | + $scope.myObj = $scope.links[i].objstyle; |
42 | + if ($('#externalLink').css('display') === 'none') | ||
43 | + { | ||
44 | + document.getElementById('externalLink').style.display = "block"; | ||
45 | + document.getElementById('externalLinkiframe').style.display = "none"; | ||
46 | + | ||
47 | + } | ||
48 | + | ||
49 | + if ($rootScope.currentActiveModuleTitle == "A.D.A.M OnDemand") { | ||
50 | + if ($uaAOD.match(/(iPod|iPhone|iPad)/i)) | ||
51 | + { | ||
52 | + document.getElementById('externalLink').style.display = "none"; | ||
53 | + document.getElementById('externalLinkiframe').style.display = "block"; | ||
54 | + document.getElementById('externalLinkiframe').style.height = $(window).outerHeight() - 128 + "px"; | ||
55 | + document.getElementById("externalLinkiframe").src = $scope.objdata; | ||
56 | + | ||
57 | + } | ||
58 | + | ||
59 | + else { | ||
60 | + document.getElementById('externalLink').style.height = $(window).outerHeight() - 128 + "px"; | ||
61 | + | ||
62 | + } | ||
63 | + | ||
64 | + } | ||
65 | + } | ||
48 | } | 66 | } |
49 | }); | 67 | }); |
50 | 68 |
400-SOURCECODE/AIAHTML5.Web/app/views/Link/Link-view.html
@@ -4,6 +4,9 @@ | @@ -4,6 +4,9 @@ | ||
4 | <div id="siteloader" class="col-sm-12"> | 4 | <div id="siteloader" class="col-sm-12"> |
5 | <!--<object style="width:100%; height:100%" type="text/html" data={{objdata}}></object>--> | 5 | <!--<object style="width:100%; height:100%" type="text/html" data={{objdata}}></object>--> |
6 | <object id="externalLink" ng-style="myObj" type="text/html" data={{objdata}}></object> | 6 | <object id="externalLink" ng-style="myObj" type="text/html" data={{objdata}}></object> |
7 | + <iframe style="width:100%;display:none" id="externalLinkiframe" ng-style="myObj" src=""></iframe> | ||
8 | + | ||
9 | + | ||
7 | </div> | 10 | </div> |
8 | </div> | 11 | </div> |
9 | </div> | 12 | </div> |