Commit 7ab40d3dcfb05028f74c7627a9b07338e5c525f7

Authored by Birendra
1 parent f771c498

aod more changes

400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
... ... @@ -8,7 +8,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
8 8 'multiwinid': windowviewid,
9 9 'AODAnimationData': [],
10 10 'moduleName': '',
11   - 'VideoUrl':'',
  11 + 'aodUrl':'',
  12 + 'courseId':'',
  13 + 'uid':'2',
12 14 'currentViewTitle': '',
13 15 'parentSlugName': '',
14 16 'currentSlug': '',
... ... @@ -321,13 +323,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
321 323 var clickedAODVideoData = [];
322 324 clickedAODVideoData = new jinqJs()
323 325 .from($scope.AODlistViewData)
324   - .where('_ImageId == ' + id)
325   - .select('_VideoUrl');
  326 + .where('_CourseId == ' + id)
  327 + .select();
326 328  
327   - var clickedVideoUrl = clickedAODVideoData[0]._VideoUrl;
328   -
329   - $scope.SetAODwindowStoreData(windowviewid, 'VideoUrl', clickedVideoUrl);
330   -
  329 + $scope.SetAODwindowStoreData(windowviewid, 'aodUrl', clickedAODVideoData[0]._VideoUrl);
  330 + $scope.SetAODwindowStoreData(windowviewid, 'courseId', clickedAODVideoData[0]._CourseId);
  331 +
331 332 var AODGridViewScrollPosition = $($window).scrollTop();
332 333 localStorage.setItem('AODGridViewScroll', AODGridViewScrollPosition);
333 334 $location.url('/AOD-view-detail');
... ... @@ -352,16 +353,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
352 353 $scope.loadAdamVideo = function (windowviewid) {
353 354 $scope.DisableUI();
354 355 $scope.jsPanelID = 'aodImagePanel' + '_' + windowviewid;
355   - var tittle = $scope.GetAODwindowStoreData(windowviewid, 'currentViewTitle');
356   - var videoUrl = $rootScope.aodSiteUrl+ $scope.GetAODwindowStoreData(windowviewid, 'VideoUrl');
357   - // var videoUrl = "https://adamondemand.com/"+ $scope.GetAODwindowStoreData(windowviewid, 'VideoUrl');
  356 + var tittle = $scope.GetAODwindowStoreData(windowviewid, 'currentViewTitle');
  357 +
  358 + // var aodurl = $rootScope.aodSiteUrl+ $scope.GetAODwindowStoreData(windowviewid, 'aodUrl');
  359 + // var aodurl = "https://uat.adamondemand.com/"+ $scope.GetAODwindowStoreData(windowviewid, 'aodUrl');
  360 + var aodurl = "http://localhost:90/Home/CoursePlayerAIATest";
  361 + var courseid = $scope.GetAODwindowStoreData(windowviewid, 'courseId');
  362 + var uid = $scope.GetAODwindowStoreData(windowviewid, 'uid');
  363 + var key="as@2$eDu8Jk";
358 364  
359 365 $scope.jsPanelWidth = $(window).outerWidth() - 20;
360 366 $scope.jsPanelHeight = $(window).outerHeight() - 140;
361 367 $scope.jsPanelLeft = 1;
362 368 $scope.jsPanelTop = 70;
363 369  
364   - if (videoUrl.length > 0 ) {
  370 + if (aodurl.length > 0 ) {
365 371 $scope.jsPanelVideo = $.jsPanel({
366 372 id: $scope.jsPanelID,
367 373 selector: '.aodView',
... ... @@ -369,8 +375,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
369 375 currentController: 'AODController',
370 376 parentSlug: $scope.GetAODwindowStoreData(windowviewid, 'parentSlugName'),
371 377 content: '<div class="col-sm-12" style="height: 100%;overflow: scroll;" >' +
372   - // '<iframe name="myFrame" src="' + videoUrl + '" style="width: 100%;height:100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)"></iframe>'+
373   - '<object data="' + videoUrl + '" width="100%" height="100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)"></object>' +
  378 + '<iframe name="aodFrame" src="" style="width: 100%;height:100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)"></iframe>'+
  379 + // '<object data="' + aodurl + '" width="100%" height="100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)"></object>' +
374 380 '</div><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {var threeDivWidth = $("#AODView").css("width");$("#AODView").css({"left":"0px","width":"100%","min-idth": threeDivWidth}); var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#aodImagePanel_' + windowviewid + '").css("width", "100%"); }});</script>',
375 381 title: tittle,
376 382 position: {
... ... @@ -400,11 +406,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
400 406 $scope.SetAODwindowStoreData(windowviewid, 'currentSlug', 'AOD-view-detail');
401 407 $('html, body').animate({ scrollTop: 0 });
402 408  
403   - // $.post($rootScope.aodSiteUrl+"/AodHome/CoursePlayerAIAP", { aiakeypass: "as@2$eDu8Jk" }, function (result) {
  409 + postToIframe(aodurl,key,courseid,uid);
  410 +
  411 + // $.post(aodurl, { aiakeypass: "as@2$eDu8Jk",courseid: "as@2$09011209",uid: "as@2$2" }, function (result) {
  412 +
  413 + // });
  414 +
  415 +
  416 + // $.post("https://uat.adamondemand.com/AodHome/CoursePlayerAIAP/", { aiakeypass: "as@2$eDu8Jk" }, function (result) {
404 417  
405 418 // if (result.Success === true) {
406 419 // alert('ok')
407   - // $('#aodvideo_' + windowviewid).attr('src', videoUrl+"&type=SCORMPackage&uID=" + 2, "_self")
  420 + // $('#aodvideo_' + windowviewid).attr('src', videoUrl);
408 421  
409 422 // // window.open("https://adamondemand.com/AodHome/CoursePlayerAIATest?courseid=" + ProID + "&type=" + productype + "&uID=" + userid, "_self");
410 423 // }
... ... @@ -430,6 +443,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
430 443  
431 444 }
432 445  
  446 + function postToIframe(url,key,courseid,uid){
  447 + $('body').append('<form action="'+url+'" method="post" target="aodFrame" id="aodform"></form>');
  448 + $('#aodform').append('<input type="hidden" name="aiakeypass" value="'+key+'" />'+
  449 + '<input type="hidden" name="courseid" value="'+courseid+'" />'+
  450 + '<input type="hidden" name="uid" value="'+uid+'" />)'
  451 + )
  452 +
  453 + //remove form after submit data
  454 + $('#aodform').submit().remove();
  455 + }
  456 +
433 457 $scope.MyAODvideoOnLoad = function (windowviewid)
434 458 {
435 459 $scope.EnableUI();
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view-detail.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3   - <form id="aodform" target="myFrame" method="POST">
4   - <input type="hidden" id="aodkey" />
5   - <!-- <input type="hidden" id="aodkey" name="aiakeypass" value="as@2$eDu8Jk" /> -->
6   - <!-- <input type="hidden" name="aiakeypass" value="{{aodkeypass}}" /> -->
7   -
8   - </form>
9   -
10 3 <div ng-init="openAODBodyViewMain()" id="AODView" class="aodView" ng-controller="AODController"></div>
11 4 </div>
... ...
400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist_video.json
... ... @@ -3,153 +3,153 @@
3 3 "AODData":[
4 4 {
5 5 "_id":"1",
6   - "_ImageId":"11014009",
  6 + "_CourseId":"11014009",
7 7 "_Title":"Anatomy and Physiology of the Breast",
8   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=11014009&type=SCORMPackage&uID=2,_self"
  8 + "_VideoUrl":"AodHome/CoursePlayerAIA"
9 9 },
10 10 {
11 11 "_id":"2",
12   - "_ImageId":"02011209",
  12 + "_CourseId":"02011209",
13 13 "_Title":"Understanding the Physiology of the Skin",
14   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=02011209&type=SCORMPackage&uID=2,_self"
  14 + "_VideoUrl":"AodHome/CoursePlayerAIA"
15 15 },
16 16 {
17 17 "_id":"3",
18   - "_ImageId":"14011109",
  18 + "_CourseId":"14011109",
19 19 "_Title":"Understanding the Anatomy of the Urinary System",
20   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=14011109&type=SCORMPackage&uID=2,_self"
  20 + "_VideoUrl":"AodHome/CoursePlayerAIA"
21 21 },
22 22 {
23 23 "_id":"4",
24   - "_ImageId":"06011109",
  24 + "_CourseId":"06011109",
25 25 "_Title":"Understanding the Anatomy of the Immune System",
26   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=06011109&type=SCORMPackage&uID=2,_self"
  26 + "_VideoUrl":"AodHome/CoursePlayerAIA"
27 27 },
28 28 {
29 29 "_id":"5",
30   - "_ImageId":"09011209",
  30 + "_CourseId":"09011209",
31 31 "_Title":"Understanding the Physiology of the Visual System",
32   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=09011209&type=SCORMPackage&uID=2,_self"
  32 + "_VideoUrl":"AodHome/CoursePlayerAIA"
33 33 },
34 34 {
35 35 "_id":"6",
36   - "_ImageId":"02011109",
  36 + "_CourseId":"02011109",
37 37 "_Title":"Understanding the Anatomy of the Skin",
38   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=02011109&type=SCORMPackage&uID=2,_self"
  38 + "_VideoUrl":"AodHome/CoursePlayerAIA"
39 39 },
40 40 {
41 41 "_id":"7",
42   - "_ImageId":"00016009",
  42 + "_CourseId":"00016009",
43 43 "_Title":"Understanding Cell Biology",
44   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=00016009&type=SCORMPackage&uID=2,_self"
  44 + "_VideoUrl":"AodHome/CoursePlayerAIA"
45 45 },
46 46 {
47 47 "_id":"8",
48   - "_ImageId":"05011009",
  48 + "_CourseId":"05011009",
49 49 "_Title":"Blood Anatomy and Physiology",
50   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=05011009&type=SCORMPackage&uID=2,_self"
  50 + "_VideoUrl":"AodHome/CoursePlayerAIA"
51 51 },
52 52 {
53 53 "_id":"9",
54   - "_ImageId":"09011109",
  54 + "_CourseId":"09011109",
55 55 "_Title":"Understanding the Anatomy of the Visual System",
56   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=09011109&type=SCORMPackage&uID=2,_self"
  56 + "_VideoUrl":"AodHome/CoursePlayerAIA"
57 57 },
58 58 {
59 59 "_id":"10",
60   - "_ImageId":"01011209",
  60 + "_CourseId":"01011209",
61 61 "_Title":"Understanding the Physiology of the Cardiovascular System",
62   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=01011209&type=SCORMPackage&uID=2,_self"
  62 + "_VideoUrl":"AodHome/CoursePlayerAIA"
63 63 },
64 64 {
65 65 "_id":"11",
66   - "_ImageId":"13011209",
  66 + "_CourseId":"13011209",
67 67 "_Title":"Understanding the Physiology of the Musculoskeletal System",
68   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=13011209&type=SCORMPackage&uID=2,_self"
  68 + "_VideoUrl":"AodHome/CoursePlayerAIA"
69 69 },
70 70 {
71 71 "_id":"12",
72   - "_ImageId":"04011209",
  72 + "_CourseId":"04011209",
73 73 "_Title":"Understanding the Physiology of the Digestive System",
74   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=04011209&type=SCORMPackage&uID=2,_self"
  74 + "_VideoUrl":"AodHome/CoursePlayerAIA"
75 75 },
76 76 {
77 77 "_id":"13",
78   - "_ImageId":"07029109",
  78 + "_CourseId":"07029109",
79 79 "_Title":"Understanding the Physiology of Pain",
80   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=07029109&type=SCORMPackage&uID=2,_self"
  80 + "_VideoUrl":"AodHome/CoursePlayerAIA"
81 81 },
82 82 {
83 83 "_id":"14",
84   - "_ImageId":"01011109",
  84 + "_CourseId":"01011109",
85 85 "_Title":"Understanding the Anatomy of the Cardiovascular System",
86   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=01011109&type=SCORMPackage&uID=2,_self"
  86 + "_VideoUrl":"AodHome/CoursePlayerAIA"
87 87 },
88 88 {
89 89 "_id":"15",
90   - "_ImageId":"13011109",
  90 + "_CourseId":"13011109",
91 91 "_Title":"Understanding the Anatomy of the Musculoskeletal System",
92   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=13011109&type=SCORMPackage&uID=2,_self"
  92 + "_VideoUrl":"AodHome/CoursePlayerAIA"
93 93 },
94 94 {
95 95 "_id":"16",
96   - "_ImageId":"04011109",
  96 + "_CourseId":"04011109",
97 97 "_Title":"Understanding the Anatomy of the Digestive System",
98   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=04011109&type=SCORMPackage&uID=2,_self"
  98 + "_VideoUrl":"AodHome/CoursePlayerAIA"
99 99 },
100 100 {
101 101 "_id":"17",
102   - "_ImageId":"07011209",
  102 + "_CourseId":"07011209",
103 103 "_Title":"Understanding the Physiology of the Nervous System",
104   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=07011209&type=SCORMPackage&uID=2,_self"
  104 + "_VideoUrl":"AodHome/CoursePlayerAIA"
105 105 },
106 106 {
107 107 "_id":"18",
108   - "_ImageId":"01011009",
  108 + "_CourseId":"01011009",
109 109 "_Title":"Introduction to the Cardiovascular System",
110   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=01011009&type=SCORMPackage&uID=2,_self"
  110 + "_VideoUrl":"AodHome/CoursePlayerAIA"
111 111 },
112 112 {
113 113 "_id":"19",
114   - "_ImageId":"12011209",
  114 + "_CourseId":"12011209",
115 115 "_Title":"Understanding the Physiology of the Respiratory System",
116   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=12011209&type=SCORMPackage&uID=2,_self"
  116 + "_VideoUrl":"AodHome/CoursePlayerAIA"
117 117 },
118 118 {
119 119 "_id":"20",
120   - "_ImageId":"03011209",
  120 + "_CourseId":"03011209",
121 121 "_Title":"Understanding the Physiology of the Endocrine System",
122   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=03011209&type=SCORMPackage&uID=2,_self"
  122 + "_VideoUrl":"AodHome/CoursePlayerAIA"
123 123 },
124 124 {
125 125 "_id":"21",
126   - "_ImageId":"07011109",
  126 + "_CourseId":"07011109",
127 127 "_Title":"Understanding the Anatomy of the Nervous System",
128   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=07011109&type=SCORMPackage&uID=2,_self"
  128 + "_VideoUrl":"AodHome/CoursePlayerAIA"
129 129 },
130 130 {
131 131 "_id":"22",
132   - "_ImageId":"12011109",
  132 + "_CourseId":"12011109",
133 133 "_Title":"Understanding the Anatomy of the Respiratory System",
134   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=12011109&type=SCORMPackage&uID=2,_self"
  134 + "_VideoUrl":"AodHome/CoursePlayerAIA"
135 135 },
136 136 {
137 137 "_id":"23",
138   - "_ImageId":"03011109",
  138 + "_CourseId":"03011109",
139 139 "_Title":"Understanding the Anatomy of the Endocrine System",
140   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=03011109&type=SCORMPackage&uID=2,_self"
  140 + "_VideoUrl":"AodHome/CoursePlayerAIA"
141 141 },
142 142 {
143 143 "_id":"24",
144   - "_ImageId":"14011209",
  144 + "_CourseId":"14011209",
145 145 "_Title":"Understanding the Physiology of the Urinary System",
146   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=14011209&type=SCORMPackage&uID=2,_self"
  146 + "_VideoUrl":"AodHome/CoursePlayerAIA"
147 147 },
148 148 {
149 149 "_id":"25",
150   - "_ImageId":"06011209",
  150 + "_CourseId":"06011209",
151 151 "_Title":"Understanding the Physiology of the Immune System",
152   - "_VideoUrl":"AodHome/CoursePlayerAIA?courseid=06011209&type=SCORMPackage&uID=2,_self"
  152 + "_VideoUrl":"AodHome/CoursePlayerAIA"
153 153 }
154 154 ]
155 155 }
... ...