Commit e2476de01bb485ec1e7866665dc8340a6768ae4e
1 parent
e14ef591
working for CA direct link
Showing
3 changed files
with
95 additions
and
36 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -329,13 +329,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
329 | 329 | + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); |
330 | 330 | |
331 | 331 | $compile($el)($scope); |
332 | - | |
332 | + | |
333 | 333 | $(".sidebar").mCustomScrollbar({ |
334 | 334 | autoHideScrollbar: true, |
335 | 335 | //theme:"rounded" |
336 | 336 | }); |
337 | 337 | |
338 | - }); | |
338 | + }); | |
339 | + | |
339 | 340 | $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); |
340 | 341 | $timeout(function () { |
341 | 342 | if ($rootScope.getLocalStorageValue('CAGridViewScroll') !== null && $location.url() == "/clinical-animations") { |
... | ... | @@ -346,7 +347,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
346 | 347 | 200); |
347 | 348 | |
348 | 349 | |
349 | - $timeout(function () { $scope.EnableUI(); }, 400); | |
350 | + $timeout(function () { $scope.EnableUI(); | |
351 | + //open default animation | |
352 | + if($rootScope.siteUrlInfo.mtype!=null) | |
353 | + { | |
354 | + if($rootScope.siteUrlInfo.mtype=='CA'&& $rootScope.siteUrlInfo.id!=null) | |
355 | + $('#'+$rootScope.siteUrlInfo.id).trigger('click'); | |
356 | + // clear detail | |
357 | + $rootScope.siteUrlInfo.mtype=null; | |
358 | + $rootScope.siteUrlInfo.id=null; | |
359 | + } | |
360 | + | |
361 | + }, 400); | |
350 | 362 | |
351 | 363 | } |
352 | 364 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -89,17 +89,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
89 | 89 | licenseeAccountNumber: null |
90 | 90 | }; |
91 | 91 | |
92 | - $rootScope.siteUrlInfo = { | |
93 | - siteIP: null, | |
94 | - remoteIPAddress: null, | |
95 | - status: null, | |
96 | - accountNumber: null, | |
97 | - edition: null, | |
98 | - urlReferer: null, | |
99 | - calsCreds: null, | |
100 | - userId: null, | |
101 | - password: null | |
102 | - } | |
103 | 92 | $rootScope.userData; |
104 | 93 | $rootScope.userModules; |
105 | 94 | $rootScope.passwordMismatchMessage; |
... | ... | @@ -913,6 +902,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
913 | 902 | |
914 | 903 | |
915 | 904 | $location.path('/'); |
905 | + | |
906 | + $timeout(function () { | |
907 | + if($rootScope.siteUrlInfo.mtype!=null) | |
908 | + { | |
909 | + if($rootScope.siteUrlInfo.mtype=='CA') | |
910 | + $('#clinical-animations').trigger('click'); | |
911 | + } | |
912 | + }, 100); | |
916 | 913 | |
917 | 914 | } |
918 | 915 | else |
... | ... | @@ -1008,6 +1005,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1008 | 1005 | } |
1009 | 1006 | else { |
1010 | 1007 | $location.path('/'); |
1008 | + $timeout(function () { | |
1009 | + if($rootScope.siteUrlInfo.mtype!=null) | |
1010 | + { | |
1011 | + if($rootScope.siteUrlInfo.mtype=='CA') | |
1012 | + $('#clinical-animations').trigger('click'); | |
1013 | + } | |
1014 | + }, 100); | |
1011 | 1015 | } |
1012 | 1016 | } |
1013 | 1017 | else { |
... | ... | @@ -1049,9 +1053,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1049 | 1053 | |
1050 | 1054 | |
1051 | 1055 | $scope.ValidateClientSiteUrl = function () { |
1052 | - | |
1056 | + $rootScope.siteUrlInfo = { | |
1057 | + siteIP: null, | |
1058 | + remoteIPAddress: null, | |
1059 | + status: null, | |
1060 | + accountNumber: null, | |
1061 | + edition: null, | |
1062 | + urlReferer: null, | |
1063 | + calsCreds: null, | |
1064 | + userId: null, | |
1065 | + password: null, | |
1066 | + mtype:null, | |
1067 | + id:null | |
1068 | + } | |
1053 | 1069 | $rootScope.isCallFromSite = true; |
1054 | - | |
1070 | + | |
1055 | 1071 | var siteInfo = params.split('&'); |
1056 | 1072 | |
1057 | 1073 | for (var i = 0; i < siteInfo.length; i++) { |
... | ... | @@ -1062,27 +1078,48 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1062 | 1078 | |
1063 | 1079 | if (isCalsCredantialForSIte == "True") { |
1064 | 1080 | var paramInfo = siteInfo[i].split('='); |
1065 | - if (paramInfo[0] == 'calsCredantial') { | |
1066 | - | |
1067 | - $rootScope.siteUrlInfo.calsCreds = paramInfo[1]; | |
1068 | - console.log("$rootScope.siteUrlInfo.calsCreds" + $rootScope.siteUrlInfo.calsCreds); | |
1081 | + //added by birendra direct open CA module | |
1082 | + if(paramInfo[0].toLowerCase() == 'mtype') | |
1083 | + { | |
1084 | + $rootScope.siteUrlInfo.mtype = paramInfo[1]; | |
1085 | + console.log("$rootScope.siteUrlInfo.mtype" + $rootScope.siteUrlInfo.mtype); | |
1069 | 1086 | } |
1070 | - else if (paramInfo[0] == 'username') { | |
1071 | - | |
1087 | + else if (paramInfo[0].toLowerCase() == 'id') { | |
1088 | + | |
1089 | + $rootScope.siteUrlInfo.id = paramInfo[1]; | |
1090 | + console.log("$rootScope.siteUrlInfo.id" + $rootScope.siteUrlInfo.id); | |
1091 | + } | |
1092 | + else if (paramInfo[0].toLowerCase() == 'username') { | |
1093 | + | |
1072 | 1094 | $rootScope.siteUrlInfo.username = paramInfo[1]; |
1073 | 1095 | console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.username); |
1074 | 1096 | } |
1075 | - else if (paramInfo[0] == 'password') { | |
1076 | - | |
1097 | + else if (paramInfo[0].toLowerCase() == 'password') { | |
1098 | + | |
1077 | 1099 | $rootScope.siteUrlInfo.password = paramInfo[1]; |
1078 | - console.log("$rootScope.siteUrlInfo.password " + $rootScope.siteUrlInfo.password); | |
1100 | + // console.log("$rootScope.siteUrlInfo.password" + $rootScope.siteUrlInfo.password); | |
1079 | 1101 | } |
1102 | + | |
1103 | + | |
1104 | + // if (paramInfo[0] == 'calsCredantial') { | |
1080 | 1105 | |
1106 | + // $rootScope.siteUrlInfo.calsCreds = paramInfo[1]; | |
1107 | + // console.log("$rootScope.siteUrlInfo.calsCreds" + $rootScope.siteUrlInfo.calsCreds); | |
1108 | + // } | |
1109 | + // else if (paramInfo[0] == 'username') { | |
1110 | + | |
1111 | + // $rootScope.siteUrlInfo.username = paramInfo[1]; | |
1112 | + // console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.username); | |
1113 | + // } | |
1114 | + // else if (paramInfo[0] == 'password') { | |
1115 | + | |
1116 | + // $rootScope.siteUrlInfo.password = paramInfo[1]; | |
1117 | + // console.log("$rootScope.siteUrlInfo.password " + $rootScope.siteUrlInfo.password); | |
1118 | + // } | |
1119 | + | |
1081 | 1120 | $rootScope.userInfo.username = $rootScope.siteUrlInfo.username; |
1082 | 1121 | $rootScope.userInfo.password = $rootScope.siteUrlInfo.password; |
1083 | - console.log("$rootScope.userInfo.username" + $rootScope.userInfo.username + " $rootScope.userInfo.password" + $rootScope.userInfo.password); | |
1084 | - | |
1085 | - | |
1122 | + | |
1086 | 1123 | } |
1087 | 1124 | else { |
1088 | 1125 | var paramInfo = siteInfo[i].split('='); |
... | ... | @@ -1320,12 +1357,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1320 | 1357 | ) |
1321 | 1358 | |
1322 | 1359 | } |
1323 | - //$rootScope.siteUrlInfo.siteIP = siteInfo[0]; | |
1324 | - //$rootScope.siteUrlInfo.remoteIPAddress = siteInfo[1]; | |
1325 | - //$rootScope.siteUrlInfo.accountNumber = siteInfo[2]; | |
1326 | - //$rootScope.siteUrlInfo.edition = siteInfo[3]; | |
1327 | - //$rootScope.siteUrlInfo.urlReferer = siteInfo[4]; | |
1328 | - | |
1360 | + | |
1329 | 1361 | |
1330 | 1362 | } |
1331 | 1363 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.aspx.cs
... | ... | @@ -36,8 +36,23 @@ namespace ADAM.AIA |
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | - string c = "nm"; | |
40 | - if (Request.QueryString["account"] != null) | |
39 | + if (Request.QueryString["mtype"] != null) | |
40 | + { | |
41 | + //birendra | |
42 | + //open default CA module by query string | |
43 | + isCalsCredantial = true; | |
44 | + | |
45 | + string[] allQueryData = new string[Request.QueryString.AllKeys.Length]; | |
46 | + | |
47 | + for(int i=0;i< Request.QueryString.AllKeys.Length; i++) | |
48 | + { | |
49 | + allQueryData[i] = Request.QueryString.AllKeys[i] + "=" + Request.QueryString[Request.QueryString.AllKeys[i]].ToString(); | |
50 | + } | |
51 | + urlParams = string.Join("&", allQueryData); | |
52 | + | |
53 | + //urlParams = "mtype=" + Request.QueryString[allQueryData[].ToString() + "&id=" + Request.QueryString["id"].ToString() + "&username=" + Request.QueryString["username"].ToString() + "&password=" + Request.QueryString["password"].ToString(); | |
54 | + } | |
55 | + else if (Request.QueryString["account"] != null) | |
41 | 56 | { |
42 | 57 | // http://stackoverflow.com/questions/9032005/request-servervariableshttp-referer-is-not-working-in-ie |
43 | 58 | // http://stackoverflow.com/questions/5643773/http-referrer-not-always-being-passed?rq=1 | ... | ... |