diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs index 41bf612..6eb4669 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs @@ -120,9 +120,10 @@ namespace AIAHTML5.ADMIN.API.Controllers int userId = jsonData["userId"].Value(); string tagName = jsonData["tagName"].Value(); long SessionId = jsonData["SessionId"].Value(); + bool isSiteUser = jsonData["isSiteUser"].Value(); try { - Status = UserModel.ManageUserLoginStatus(dbContext, userId, tagName, SessionId); + Status = UserModel.ManageUserLoginStatus(dbContext, userId, tagName, SessionId, isSiteUser); return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs index f0d76f1..39f165b 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs @@ -1262,13 +1262,17 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetLicenseByIPAndAccount", sSiteIPParameter, sAccountNumberParameter, iEditionIdParameter); } - public virtual ObjectResult GetLicenseBySiteId(Nullable sSiteId) + public virtual ObjectResult GetLicenseBySiteId(Nullable sSiteId, Nullable sEditionId) { var sSiteIdParameter = sSiteId.HasValue ? new ObjectParameter("sSiteId", sSiteId) : new ObjectParameter("sSiteId", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetLicenseBySiteId", sSiteIdParameter); + var sEditionIdParameter = sEditionId.HasValue ? + new ObjectParameter("sEditionId", sEditionId) : + new ObjectParameter("sEditionId", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetLicenseBySiteId", sSiteIdParameter, sEditionIdParameter); } public virtual ObjectResult GetLicenseDetailByUserId(Nullable iUserId) @@ -4999,7 +5003,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter, status); } - public virtual ObjectResult> usp_ManageUserLoginStatus(Nullable userId, string tag, Nullable sessionId) + public virtual ObjectResult> usp_ManageUserLoginStatus(Nullable userId, string tag, Nullable sessionId, Nullable isSiteUser) { var userIdParameter = userId.HasValue ? new ObjectParameter("userId", userId) : @@ -5013,7 +5017,11 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("sessionId", sessionId) : new ObjectParameter("sessionId", typeof(long)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("usp_ManageUserLoginStatus", userIdParameter, tagParameter, sessionIdParameter); + var isSiteUserParameter = isSiteUser.HasValue ? + new ObjectParameter("isSiteUser", isSiteUser) : + new ObjectParameter("isSiteUser", typeof(bool)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("usp_ManageUserLoginStatus", userIdParameter, tagParameter, sessionIdParameter, isSiteUserParameter); } } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx index bae6689..3e05020 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx @@ -430,6 +430,7 @@ + @@ -1411,6 +1412,7 @@ + @@ -1911,6 +1913,7 @@ + @@ -3009,6 +3012,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs index 2ec74fc..8c65375 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs @@ -65,12 +65,12 @@ namespace AIAHTML5.ADMIN.API.Models return false; } } - public static bool ManageUserLoginStatus(AIADatabaseV5Entities dbContext, int userId, string tagName, long SessionId) + public static bool ManageUserLoginStatus(AIADatabaseV5Entities dbContext, int userId, string tagName, long SessionId, bool isSiteUser) { bool loginStatus = false; try { - loginStatus = Convert.ToBoolean(dbContext.usp_ManageUserLoginStatus(userId, tagName, SessionId).FirstOrDefault()); + loginStatus = Convert.ToBoolean(dbContext.usp_ManageUserLoginStatus(userId, tagName, SessionId, isSiteUser).FirstOrDefault()); return loginStatus; } diff --git a/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user b/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user index aaba182..749005e 100644 --- a/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user +++ b/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user @@ -8,6 +8,7 @@ False ProjectFiles API_Profile + false diff --git a/400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs b/400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs index f6b800a..4a8b00e 100644 --- a/400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs +++ b/400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs @@ -42,6 +42,7 @@ namespace AIAHTML5.API.Constants public const string INSERT_EXPORTED_IMAGE = "usp_InsertExportedImage"; public const string GET_USER_DETAIL_BYLOGIN_AND_ACCOUNT = "usp_GetUserDetailsByLoginIdandAccount"; public const string GET_USER_LOGIN_STATUS = "usp_ManageUserLoginStatus"; + public const string GET_AOD_AUTHENTICATION_STATUS = "usp_AodAuthenticationStatus"; public const string INSERT_SITE_LOGIN_LOG = "usp_InsertSiteLoginLog"; } } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs index 8100d42..084d929 100644 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs +++ b/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs @@ -534,8 +534,9 @@ namespace AIAHTML5.API.Controllers int userId = jsonData["userId"].Value(); string tagName = jsonData["tagName"].Value(); long SessionId = jsonData["SessionId"].Value(); + bool isSiteUser = jsonData["isSiteUser"].Value(); - loginStatus = AIAHTML5.API.Models.Users.GetUserLoginStatus(userId, tagName, SessionId); + loginStatus = AIAHTML5.API.Models.Users.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser); return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(loginStatus) }; } @@ -545,6 +546,51 @@ namespace AIAHTML5.API.Controllers } } + [HttpPost] + [Route("api/AodAuthentication")] + public HttpResponseMessage AodAuthentication([FromBody]JObject jsonData) + { + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); + int requestStatus = 0; + try + { + string aodpasskey = jsonData["aiapasskey"].Value(); + long SessionId = jsonData["SessionId"].Value(); + string CourseId = jsonData["CourseId"].Value(); + + logger.Debug("AOD request parameter: Session =" + SessionId +", aodkeypass="+ aodpasskey + ", CourseId=" + CourseId); + + string aiaConfigKey= ConfigurationManager.AppSettings["aiapasskey"]; + + requestStatus = AIAHTML5.API.Models.Users.ValidateAodAthenticationStatus(SessionId, aiaConfigKey, aodpasskey, CourseId); + + switch(requestStatus) + { + case 200: + { + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent("authentication successful") }; + } + case 401: + { + return new HttpResponseMessage { StatusCode = HttpStatusCode.Unauthorized, Content = new StringContent("passing key to api is not valid") }; + } + case 404: + { + return new HttpResponseMessage { StatusCode = HttpStatusCode.NotFound, Content = new StringContent("session has expired or does not exist") }; + } + default: + { + return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent("server encountered an unexpected error.") }; + } + } + + } + catch (Exception ex) + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message); + } + } + // PUT api/authenticate/5 public void Put(int id, [FromBody]string value) { @@ -556,5 +602,4 @@ namespace AIAHTML5.API.Controllers } } - } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs index 3eac795..83e84ad 100644 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs +++ b/400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs @@ -6,6 +6,9 @@ using System.Net.Http; using System.Web.Http; using System.Configuration; using Newtonsoft.Json; +using System.Text; +using System.Security.Cryptography; +using System.IO; namespace AIAHTML5.API.Controllers { @@ -24,6 +27,9 @@ namespace AIAHTML5.API.Controllers mconfig.serverPath = ConfigurationManager.AppSettings["ANIMATION_HOSTING_SERVER"]; mconfig.fileSize = Int32.Parse(ConfigurationManager.AppSettings["UploadMaxFileSize"]); + mconfig.aodSiteUrl = ConfigurationManager.AppSettings["Aod_site_Url"]; + mconfig.aodkeypass = ConfigurationManager.AppSettings["aiapasskey"]; + responseData = JsonConvert.SerializeObject(mconfig); return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(responseData) }; @@ -38,4 +44,7 @@ public class MyConfig public int pingInterval { get; set; } public string serverPath { get; set; } public int fileSize { get; set; } -} \ No newline at end of file + + public string aodSiteUrl { get; set; } + public string aodkeypass { get; set; } +} diff --git a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs index 292fc3c..9e64f2c 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs @@ -350,7 +350,7 @@ namespace AIAHTML5.API.Models return objUser; } - internal static string GetUserLoginStatus(int userId,string tagName, long SessionId) + internal static string GetUserLoginStatus(int userId,string tagName, long SessionId, bool isSiteUser) { string status=string.Empty; DBModel objModel = new DBModel(); @@ -366,6 +366,7 @@ namespace AIAHTML5.API.Models cmd.Parameters.AddWithValue("@userId", userId); cmd.Parameters.AddWithValue("@tag", tagName); cmd.Parameters.AddWithValue("@sessionId", SessionId); + cmd.Parameters.AddWithValue("@isSiteUser", isSiteUser); adapter = new SqlDataAdapter(cmd); adapter.Fill(ds); @@ -386,6 +387,44 @@ namespace AIAHTML5.API.Models return status; } + internal static int ValidateAodAthenticationStatus(long SessionId, string aiaConfigKey, string aodpasskey, string CourseId) + { + int status = 0; + DBModel objModel = new DBModel(); + + SqlConnection conn = new SqlConnection(dbConnectionString); + SqlCommand cmd = new SqlCommand(); + SqlDataAdapter adapter; + DataSet ds = new DataSet(); + + cmd.Connection = conn; + cmd.CommandText = DBConstants.GET_AOD_AUTHENTICATION_STATUS; + cmd.CommandType = CommandType.StoredProcedure; + cmd.Parameters.AddWithValue("@sessionId", SessionId); + cmd.Parameters.AddWithValue("@aiaConfigKey", aiaConfigKey); + cmd.Parameters.AddWithValue("@aodpasskey", aodpasskey); + cmd.Parameters.AddWithValue("@CourseId", CourseId); + + adapter = new SqlDataAdapter(cmd); + adapter.Fill(ds); + + if (ds != null && ds.Tables.Count > 0) + { + DataTable dt = ds.Tables[0]; + + if (dt.Rows.Count > 0) + { + foreach (DataRow dr in dt.Rows) + { + status =Convert.ToInt32( dr["requestStatus"]); + + } + } + } + + return status; + } + internal User GetSelectedSettings(int userId,bool isSiteUser) { logger.Debug(" Inside GetSelectedSettings for userId = " + userId); diff --git a/400-SOURCECODE/AIAHTML5.API/Models/Users.cs b/400-SOURCECODE/AIAHTML5.API/Models/Users.cs index 5c24061..3ddd15c 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/Users.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/Users.cs @@ -340,10 +340,17 @@ namespace AIAHTML5.API.Models return objUser; } - internal static string GetUserLoginStatus(int userId, string tagName, long SessionId) + internal static string GetUserLoginStatus(int userId, string tagName, long SessionId, bool isSiteUser) { string status = null; - status = DBModel.GetUserLoginStatus(userId, tagName, SessionId); + status = DBModel.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser); + + return status; + } + internal static int ValidateAodAthenticationStatus(long SessionId, string aiaConfigKey, string aodpasskey, string CourseId) + { + int status = 0; + status = DBModel.ValidateAodAthenticationStatus(SessionId, aiaConfigKey, aodpasskey, CourseId); return status; } diff --git a/400-SOURCECODE/AIAHTML5.API/Web.config b/400-SOURCECODE/AIAHTML5.API/Web.config index 08f0188..a6bd9fe 100644 --- a/400-SOURCECODE/AIAHTML5.API/Web.config +++ b/400-SOURCECODE/AIAHTML5.API/Web.config @@ -58,7 +58,10 @@ - + + + + diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js index 0994ae6..656e811 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js @@ -1,65 +1,474 @@ -AIA.controller("AODController", ["$scope", "$rootScope", "pages", "$log","$location", -function ($scope, $rootScope, pages, log, $location) { - //$scope.showTabButton = true; - //$scope.IsVisible = function () { - // $scope.scroll(); +'use strict'; - //} +AIA.controller("AODController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout","DataService", "ModuleService", "$interval", "AIAConstants", +function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout,DataService, ModuleService, $interval, AIAConstants) { + $scope.ObjectAttribute=function(windowviewid) + { + var windata={ + 'multiwinid': windowviewid, + 'AODAnimationData': [], + 'moduleName': '', + 'aodUrl':'', + 'courseId':'', + 'uid':'2',//categoty id. courseid cheched in category id + 'requestType':'SCORMPackage', + 'currentViewTitle': '', + 'parentSlugName': '', + 'currentSlug': '', + 'imageId': '' + }; + return windata; + } - $scope.setActiveTab = function (tabToSet) { - $scope.activeTab = tabToSet; - localStorage.setItem("currentAODTabView", $scope.activeTab); - }; + $scope.initializeAODWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { + if (isOpenWithExistsModule || openPanelNo == 0) { + if ($rootScope.AODWindowData != undefined) { + $rootScope.AODWindowData.length = 0; + } + else { + $rootScope.AODWindowData = []; + } + + $rootScope.AODWindowData.push($scope.ObjectAttribute(windowviewid)); + + } + else { + var isNewWindow = true; + for (var k = 0; k < $rootScope.AODWindowData.length; k++) { + if ($rootScope.AODWindowData[k].multiwinid == windowviewid) { + isNewWindow = false; + break; + } + } + + if (isNewWindow) { + $rootScope.AODWindowData.push($scope.ObjectAttribute(windowviewid)); + } + } + } + + $scope.GetAODwindowStoreData = function (windowviewid, keyname) { + for (var x = 0 ; x < $rootScope.AODWindowData.length; x++) { + + if ($rootScope.AODWindowData[x].multiwinid == windowviewid) { + return $rootScope.AODWindowData[x][keyname]; + } + } + } + + $scope.SetAODwindowStoreData = function (windowviewid, keyname, value) { + for (var x = 0 ; x < $rootScope.AODWindowData.length; x++) { + + if ($rootScope.AODWindowData[x].multiwinid == windowviewid) { + $rootScope.AODWindowData[x][keyname] = value; + } + } + } + + $scope.DisableUI = function () { + + var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); + for (var i = 0; i < aniImagePanelConetent.length; i++) { + aniImagePanelConetent[i].style.pointerEvents = "none"; + aniImagePanelConetent[i].style.opacity = "0.7"; + + } + $rootScope.isLoading = true; + $('#spinner').css('visibility', 'visible'); + + // CB module disable all + $('#HomeContainerDiv').css('pointer-events', 'none'); + $('#HomeContainerDiv').css('opacity', '0.7'); + } - $scope.scroll = function () { - // $window.scrollTo(0, 0); - $("html,body").scrollTop(0); - //alert("scroll"); + $scope.EnableUI = function () { + + var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); + for (var i = 0; i < aniImagePanelConetent.length; i++) { + aniImagePanelConetent[i].style.pointerEvents = "auto"; + aniImagePanelConetent[i].style.opacity = "1"; + } + + $rootScope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); + // CB module enable all + $('#HomeContainerDiv').css('pointer-events', 'auto'); + $('#HomeContainerDiv').css('opacity', '1'); + + } + + $scope.RemoveJSPanel = function (panelid) { + + var len = (panelid).split("_").length; + var windowviewid = (panelid).split("_")[len - 1]; + + // remove old stored data after close panel + for (var index = 0 ; index < $rootScope.AODWindowData.length; index++) { + + if ($rootScope.AODWindowData[index].multiwinid == windowviewid) { + + if (index != -1) { + // remove module which one is loaded + var reffid=$rootScope.AODWindowData[index].imageId; + $rootScope.AODWindowData.splice(index, 1); + //remove also stream/source video from close panel from cb + if($rootScope.collectAnimationSource !=undefined) + { + for (var vdx = 0 ; vdx < $rootScope.collectAnimationSource.length; vdx++) { + if(reffid==$rootScope.collectAnimationSource[vdx].imageId) + $rootScope.collectAnimationSource.splice(vdx, 1); + } + } + if ($('#' + panelid).html() != undefined) { + + $('#' + panelid).remove(); + + } + // $rootScope.resetjsPanelTop(panelid); + } + } + } } - //$rootScope.currentActiveModuleTitle = pages[10].name; + $scope.PanelActivity = function () { + // close panel + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function (event) { - $scope.$on('$viewContentLoaded', function (event) { + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); + + $scope.RemoveJSPanel(panelid); + + }); + } + + + $scope.loadAIModuleById = function (moduleId) { + + $rootScope.MULTI_VIEW_ID += 1 + + if($rootScope.AODWindowData!=undefined) + { + if($rootScope.AODWindowData.length>0) + { + for(var x=0 ;x < $rootScope.AODWindowData.length;x++){ + var winid=$rootScope.AODWindowData[x].multiwinid; + if ($('#aodImagePanel_' + winid).html() != undefined) { + $('#aodImagePanel_' + winid).remove(); + } + } + $rootScope.AODWindowData=[]; + } + } + + $scope.initializeAODWindowData($rootScope.MULTI_VIEW_ID, true, undefined); + + $scope.DisableUI(); if ($rootScope.refreshcheck == null) { $location.path('/'); } - - // code that will be executed ... + // code that will be executed ... // every time this view is loaded - //get current path - var currentURL = $location.path(); - var selectedModuleName = ''; - //set module title - angular.forEach($rootScope.userModules, function (value, key) { - if (value.slug === currentURL.replace('/', '')) { - selectedModuleName = value.name; + + $rootScope.currentActiveModuleTitle = "ADAM ON DEMAND"; + + $scope.SetAODwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "ADAM ON DEMAND"); + + $scope.LoadAODJsonData($rootScope.MULTI_VIEW_ID); + + setTimeout(function () { + + //call time interval function until load Illustration data + var timeintval = null; + timeintval = $interval(function () { + var AODAnimationData = $scope.GetAODwindowStoreData($rootScope.MULTI_VIEW_ID, 'AODAnimationData'); + if (AODAnimationData.length>0) { + $scope.stopIntervalAOD(); + $scope.loadAODList($rootScope.MULTI_VIEW_ID); + } + else + { + console.log("waiting for aod Data"); + } + }, 100); + + $scope.stopIntervalAOD = function () { + if (angular.isDefined(timeintval)) { + $interval.cancel(timeintval); + timeintval = undefined; + } + }; + + }, 200); + }; + + $scope.LoadAODJsonData = function (windowviewid) { + + var promise = DataService.getJson('~/../content/data/json/aod/aod_courselist.json') + promise.then( + function (result) { + + var AODAnimationData = new jinqJs() + .from(result.root.AODData) + .orderBy([{ field: '_BodySystem', sort: 'asc' }]) + .select(); + + $scope.SetAODwindowStoreData(windowviewid, 'AODAnimationData', AODAnimationData); + + }, + function (error) { + $scope.EnableUI(); + + } + ); + + + }; + + $scope.loadAODList = function (windowviewid) { + + var selectedAODListViewData = $scope.GetAODwindowStoreData(windowviewid, 'AODAnimationData'); + + $('#grid-view').empty(); + + angular.forEach(selectedAODListViewData, function (value, key) { + var imagePath = "~/../content/images/aod/thumbnails/" + value._ThumbnailImage; + + + var $el = $('').appendTo('#grid-view'); + + $compile($el)($scope); + + $(".sidebar").mCustomScrollbar({ + autoHideScrollbar: true, + //theme:"rounded" + }); + + }); + + $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); + $timeout(function () { + if ($rootScope.getLocalStorageValue('AODGridViewScroll') !== null && $location.url() == "/ADAM-on-demand") { + + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AODGridViewScroll') }, 'slow'); } - $rootScope.currentActiveModuleTitle = selectedModuleName; - }) + }, + 200); + + + $timeout(function () { + $scope.EnableUI(); + $scope.ResetGridListLength(); + }, 400); - $scope.showTabButton = true; - $scope.IsVisible = function () { - $scope.scroll(); + } + $scope.ResetGridListLength=function() + { + var $ua = navigator.userAgent; + + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { + if(screen.height<=768) + { + $('#grid-view').css({"height":"660","overflow":"scroll"}); + } + else if(screen.height<=1024) + { + $('#grid-view').css({"height":"910","overflow":"scroll"}); + } + else + { + $('#grid-view').css({"height":"1250","overflow":"scroll"}); + } } + else + { + $('#grid-view').css({"height":"830","overflow":"scroll"}); + } + } - // $rootScope.currentActiveModuleTitle = pages[10].name; + $scope.openView = function ($event) { + var windowviewid = $rootScope.MULTI_VIEW_ID; - //set the local storage + $rootScope.MenuModuleName = "AOD"; + $rootScope.currentBodyViewId = $event.currentTarget.id; + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { + var selectedAODListViewData = $scope.GetAODwindowStoreData(windowviewid, 'AODAnimationData'); + var selectedTileData = []; + selectedTileData = new jinqJs() + .from(selectedAODListViewData) + .where('_ImageId = ' + $event.currentTarget.id) + .select(); - var curtab = $rootScope.getLocalStorageValue("currentAODTabView"); - if (curtab == 2) { - $scope.setActiveTab(2); + $rootScope.ViewTitle = selectedTileData[0]._Title; } else { - $scope.setActiveTab(1); + $rootScope.ViewTitle = $event.currentTarget.textContent; } - }); + localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); + localStorage.setItem("currentBodyViewId", $event.currentTarget.id); + + $scope.SetAODwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); + $scope.SetAODwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); -}] + var promise = DataService.getJson('~/../content/data/json/aod/aod_courselist_video.json') + promise.then( + function (result) { + // $scope.AnimationData = result; + $scope.AODlistViewData = result.root.AODData; + var id = $scope.GetAODwindowStoreData(windowviewid, 'imageId'); + var clickedAODVideoData = []; + clickedAODVideoData = new jinqJs() + .from($scope.AODlistViewData) + .where('_CourseId == ' + id) + .select(); + + $scope.SetAODwindowStoreData(windowviewid, 'aodUrl', clickedAODVideoData[0]._VideoUrl); + $scope.SetAODwindowStoreData(windowviewid, 'courseId', clickedAODVideoData[0]._CourseId); + + var AODGridViewScrollPosition = $($window).scrollTop(); + localStorage.setItem('AODGridViewScroll', AODGridViewScrollPosition); + $location.url('/AOD-view-detail'); + + }, + function (error) { + + } + + ); + + + } + + + $scope.openAODBodyViewMain = function () { + $scope.SetAODwindowStoreData($rootScope.MULTI_VIEW_ID, 'parentSlugName', 'ADAM-on-demand'); + $scope.loadAdamVideo($rootScope.MULTI_VIEW_ID); + + } + + $scope.loadAdamVideo = function (windowviewid) { + $scope.DisableUI(); + $scope.jsPanelID = 'aodImagePanel' + '_' + windowviewid; + var tittle = $scope.GetAODwindowStoreData(windowviewid, 'currentViewTitle'); + + var aodlink = $rootScope.aodDomainName+ $scope.GetAODwindowStoreData(windowviewid, 'aodUrl'); + var courseid = $scope.GetAODwindowStoreData(windowviewid, 'courseId'); + var uid = $scope.GetAODwindowStoreData(windowviewid, 'uid'); + var requestType = $scope.GetAODwindowStoreData(windowviewid, 'requestType'); + var aodSiteUrl = aodlink+"?SessionId=" + $rootScope.userData.SessionId + "&Courseid=" + courseid + "&type="+requestType +"&uID=" + uid+ ",_self"; + + $scope.jsPanelWidth = $(window).outerWidth() - 20; + $scope.jsPanelHeight = $(window).outerHeight() - 140; + $scope.jsPanelLeft = 1; + $scope.jsPanelTop = 70; + + if (aodlink.length > 0 ) { + $scope.jsPanelVideo = $.jsPanel({ + id: $scope.jsPanelID, + selector: '.aodView', + theme: 'success', + currentController: 'AODController', + parentSlug: $scope.GetAODwindowStoreData(windowviewid, 'parentSlugName'), + content: '
' + + ''+ + '
', + title: tittle, + position: { + top: $scope.jsPanelTop, + left: $scope.jsPanelLeft + }, + + size: { + width: $scope.jsPanelWidth, + height: $scope.jsPanelHeight + }, + controls: { buttons: 'closeonly' }, + resizable: { + start:function(event, ui) + { + var len = (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + $('#aodvideo_'+windowviewid).css("display",'block'); + + } + }, + + }); + + + $scope.jsPanelVideo.maximize(); + $scope.SetAODwindowStoreData(windowviewid, 'currentSlug', 'AOD-view-detail'); + $('html, body').animate({ scrollTop: 0 }); + + $('#aodvideo_' + windowviewid).attr('src', aodSiteUrl); + } + $('#AODView').css("height", $(window).outerHeight() - 20); + + $('#AODView').css("width", $(window).outerWidth() - 30); + + //Calling methode for save Js Panel Activity for SaveCB + $scope.PanelActivity(); + + } + + $scope.MyAODvideoOnLoad = function (windowviewid) + { + $scope.EnableUI(); + $scope.JsPanelMouseEnter(windowviewid); + } + + $scope.JsPanelMouseEnter = function (windowviewid) { + $rootScope.resetMenuOption(); + + var timeintval = null; + timeintval = $interval(PointerEventEnableDisable, 5000); + + function PointerEventEnableDisable() { + var pointevents = $("#aodvideo_" + windowviewid).css('pointer-events'); + if (pointevents=='auto') { + $scope.stop3drefresh(timeintval); + timeintval = $interval(PointerEventEnableDisable, 500); + $("#aodvideo_" + windowviewid).css('pointer-events', 'none'); + } + else if(pointevents=='none') + { + $("#aodvideo_" + windowviewid).css('pointer-events', 'auto'); + $scope.stop3drefresh(timeintval); + timeintval = $interval(PointerEventEnableDisable, 10000); + } + else + { + //auto clode interval when panel close + $scope.stop3drefresh(timeintval); + } + } + + $scope.stop3drefresh = function (timeintval) { + if (angular.isDefined(timeintval)) { + $interval.cancel(timeintval); + timeintval = undefined; + } + }; + } + }]); + function MyAODvideoOnLoad(event) { -); \ No newline at end of file + console.log('video loaded') + var scope = angular.element(document.getElementById("AODView")).scope(); + var windowviewid = (event.target.id).split("_")[1]; + + setTimeout(function() + { + scope.$apply(function () { + scope.MyAODvideoOnLoad(windowviewid); + }); + }, 500); + + } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 9898d3e..8d26888 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -367,7 +367,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data '#Link\\/symptom-navigator{pointer-events: none; opacity: .3} ' + '#Link\\/health-navigator{pointer-events: none; opacity: .3} ' + '#Link\\/wellness-tools{pointer-events: none; opacity: .3} ' + - '#Link\\/aod{pointer-events: none; opacity: .3} ' + + '#ADAM-on-demand{pointer-events: none; opacity: .3} ' + ''; @@ -714,6 +714,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.aiaPingInterval = configresult.pingInterval; $rootScope.aiaAnimationPath = configresult.serverPath; $rootScope.MaxOneFileSize = configresult.fileSize; + $rootScope.aodDomainName = configresult.aodSiteUrl; + var loggedInUser = JSON.parse($scope.currentUserDetails); //incase site user login userid is 0 so then using license id //logout site user while reload url without parameter @@ -721,7 +723,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $scope.checkuserstatus = { userId: userId, tagName: loggedInUser.Id==0?'logout':'update', - SessionId:loggedInUser.SessionId + SessionId:loggedInUser.SessionId, + isSiteUser:loggedInUser.isSiteUser } // this case found when browser closed by user after login. after long time (after 20 min) open site again @@ -945,6 +948,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.aiaPingInterval = configresult.pingInterval; $rootScope.aiaAnimationPath = configresult.serverPath; $rootScope.MaxOneFileSize = configresult.fileSize; + $rootScope.aodDomainName = configresult.aodSiteUrl; }); } @@ -1469,6 +1473,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.aiaPingInterval = configresult.pingInterval; $rootScope.aiaAnimationPath = configresult.serverPath; $rootScope.MaxOneFileSize = configresult.fileSize; + $rootScope.aodDomainName = configresult.aodSiteUrl; userInfo.username = result.LoginId; userInfo.password = result.Password; @@ -1523,6 +1528,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.aiaPingInterval = configresult.pingInterval; $rootScope.aiaAnimationPath = configresult.serverPath; $rootScope.MaxOneFileSize = configresult.fileSize; + $rootScope.aodDomainName = configresult.aodSiteUrl; var loggedInUser = JSON.parse($scope.currentUserDetails); //check already login by account number bcz no login id for site login @@ -1715,7 +1721,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.userData = result; $rootScope.userModules = result.Modules; - + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); if (isCommingSoonModel == true) { @@ -1764,9 +1770,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } - $rootScope.userData = result; - $rootScope.userModules = result.Modules; - + $rootScope.userData = result; + $rootScope.userModules = result.Modules; + //1. set haveRoleAdmin = false because LicenseInfo is not null $rootScope.haveRoleAdmin = false; @@ -1887,6 +1893,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.isVisibleLogin = false; $rootScope.userData = userInfo; $rootScope.userModules = userInfo.Modules; + // ShowAssignedModulesPopup(userInfo.Modules);; // for reseller type user first need to update profile if (userInfo.UserTypeId == 7 && (userInfo.FirstName == "" || userInfo.EmailId == "" || userInfo.LastName == "")) { @@ -1948,7 +1955,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.userStatus = { userId: null, tagName: null, - SessionId:null + SessionId:null, + isSiteUser:false } console.log('user session start'); $rootScope.CheckUserSession('insert'); @@ -2024,6 +2032,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.userStatus.userId=$rootScope.userData.Id==0?$rootScope.userData.LicenseId:$rootScope.userData.Id; $rootScope.userStatus.tagName=tagName; $rootScope.userStatus.SessionId=$rootScope.userData.SessionId; + $rootScope.userStatus.isSiteUser=$rootScope.userData.isSiteUser; AuthenticationService.ManageUserLoginStatus($rootScope.userStatus) .then( @@ -9090,7 +9099,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $("#profileUpdateModal").modal('hide'); $timeout(function () { $rootScope.isRedirectToAdmin=true; - window.location.href = "Admin"; + window.location.href = "/Admin"; }, 300) }; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js index 973ea15..7a1c602 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js @@ -146,11 +146,11 @@ AIA.constant('pages', [ pageController: 'LinkController' }, - { - name: 'A.D.A.M OnDemand', - pageSlug: 'Link/aod', - pageUrl: 'app/views/Link/Link-view.html', - pageController: 'LinkController' + { + name: 'A.D.A.M OnDemand', + pageSlug: 'AOD-view-detail', + pageUrl: 'app/views/AOD/AOD-view-detail.html', + pageController: 'AODController' }, { //id:18, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view-detail.html new file mode 100644 index 0000000..3d698b9 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view-detail.html @@ -0,0 +1,4 @@ +
+
+
+
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html index e348377..65742b7 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html @@ -1,329 +1,7 @@ 
-
- - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TitleSystem
1st & 2nd Intercostal SpacesThorax
1st, 3rd, &8th RibsBody Wall and Back
Abdomen at L5 Vertebra (Inf)Abdomen
1st & 2nd Intercostal SpacesThorax
1st, 3rd, &8th RibsBody Wall and Back
Abdomen at L5 Vertebra (Inf)Abdomen
1st & 2nd Intercostal SpacesThorax
1st, 3rd, &8th RibsBody Wall and Back
Abdomen at L5 Vertebra (Inf)Abdomen
1st & 2nd Intercostal SpacesThorax
1st, 3rd, &8th RibsBody Wall and Back
Abdomen at L5 Vertebra (Inf)Abdomen
1st & 2nd Intercostal SpacesThorax
1st, 3rd, &8th RibsBody Wall and Back
Abdomen at L5 Vertebra (Inf)Abdomen
- -
- -
-
- -
-
+
+
diff --git a/400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist.json b/400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist.json new file mode 100644 index 0000000..32eabbf --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist.json @@ -0,0 +1,156 @@ +{ + "root":{ + "AODData":[ + { + "_ImageId":"11014009", + "_Title":"Anatomy and Physiology of the Breast", + "_BodySystem":"Breast", + "_ThumbnailImage":"11014009.jpg" + }, + { + "_ImageId":"02011209", + "_Title":"Understanding the Physiology of the Skin", + "_BodySystem":"Skin", + "_ThumbnailImage":"02011209.jpg" + }, + { + "_ImageId":"14011109", + "_Title":"Understanding the Anatomy of the Urinary System", + "_BodySystem":"Urinary System", + "_ThumbnailImage":"14011109.jpg" + }, + { + "_ImageId":"06011109", + "_Title":"Understanding the Anatomy of the Immune System", + "_BodySystem":"Immune System", + "_ThumbnailImage":"06011109.jpg" + }, + { + "_ImageId":"09011209", + "_Title":"Understanding the Physiology of the Visual System", + "_BodySystem":"Visual System", + "_ThumbnailImage":"09011209.jpg" + }, + { + "_ImageId":"02011109", + "_Title":"Understanding the Anatomy of the Skin", + "_BodySystem":"Skin", + "_ThumbnailImage":"02011109.jpg" + }, + { + "_ImageId":"09011109", + "_Title":"Understanding the Anatomy of the Visual System", + "_BodySystem":"Visual System", + "_ThumbnailImage":"09011109.jpg" + }, + { + "_ImageId":"01011209", + "_Title":"Understanding the Physiology of the Cardiovascular System", + "_BodySystem":"Cardiovascular System", + "_ThumbnailImage":"01011209.jpg" + }, + { + "_ImageId":"13011209", + "_Title":"Understanding the Physiology of the Musculoskeletal System", + "_BodySystem":"Musculoskeletal System", + "_ThumbnailImage":"13011209.jpg" + }, + { + "_ImageId":"04011209", + "_Title":"Understanding the Physiology of the Digestive System", + "_BodySystem":"Digestive System", + "_ThumbnailImage":"04011209.jpg" + }, + { + "_ImageId":"01011109", + "_Title":"Understanding the Anatomy of the Cardiovascular System", + "_BodySystem":"Cardiovascular System", + "_ThumbnailImage":"01011109.jpg" + }, + { + "_ImageId":"13011109", + "_Title":"Understanding the Anatomy of the Musculoskeletal System", + "_BodySystem":"Musculoskeletal System", + "_ThumbnailImage":"13011109.jpg" + }, + { + "_ImageId":"04011109", + "_Title":"Understanding the Anatomy of the Digestive System", + "_BodySystem":"Digestive System", + "_ThumbnailImage":"04011109.jpg" + }, + { + "_ImageId":"07011209", + "_Title":"Understanding the Physiology of the Nervous System", + "_BodySystem":"Nervous System", + "_ThumbnailImage":"07011209.jpg" + }, + { + "_ImageId":"01011009", + "_Title":"Introduction to the Cardiovascular System", + "_BodySystem":"Cardiovascular System", + "_ThumbnailImage":"01011009.jpg" + }, + { + "_ImageId":"12011209", + "_Title":"Understanding the Physiology of the Respiratory System", + "_BodySystem":"Respiratory System", + "_ThumbnailImage":"12011209.jpg" + }, + { + "_ImageId":"03011209", + "_Title":"Understanding the Physiology of the Endocrine System", + "_BodySystem":"Endocrine System", + "_ThumbnailImage":"03011209.jpg" + }, + { + "_ImageId":"07011109", + "_Title":"Understanding the Anatomy of the Nervous System", + "_BodySystem":"Nervous System", + "_ThumbnailImage":"07011109.jpg" + }, + { + "_ImageId":"12011109", + "_Title":"Understanding the Anatomy of the Respiratory System", + "_BodySystem":"Respiratory System", + "_ThumbnailImage":"12011109.jpg" + }, + { + "_ImageId":"03011109", + "_Title":"Understanding the Anatomy of the Endocrine System", + "_BodySystem":"Endocrine System", + "_ThumbnailImage":"03011109.jpg" + }, + { + "_ImageId":"14011209", + "_Title":"Understanding the Physiology of the Urinary System", + "_BodySystem":"Urinary System", + "_ThumbnailImage":"14011209.jpg" + }, + { + "_ImageId":"06011209", + "_Title":"Understanding the Physiology of the Immune System", + "_BodySystem":"Immune System", + "_ThumbnailImage":"06011209.jpg" + }, + { + "_ImageId":"00016009", + "_Title":"Understanding Cell Biology", + "_BodySystem":"1", + "_ThumbnailImage":"00016009.jpg" + }, + { + "_ImageId":"05011009", + "_Title":"Blood Anatomy and Physiology", + "_BodySystem":"2", + "_ThumbnailImage":"05011009.jpg" + }, + { + "_ImageId":"07029109", + "_Title":"Understanding the Physiology of Pain", + "_BodySystem":"3", + "_ThumbnailImage":"07029109.jpg" + } + ] + } +} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist_video.json b/400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist_video.json new file mode 100644 index 0000000..34b1cdc --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist_video.json @@ -0,0 +1,156 @@ +{ + "root":{ + "AODData":[ + { + "_id":"1", + "_CourseId":"11014009", + "_Title":"Anatomy and Physiology of the Breast", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"2", + "_CourseId":"02011209", + "_Title":"Understanding the Physiology of the Skin", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"3", + "_CourseId":"14011109", + "_Title":"Understanding the Anatomy of the Urinary System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"4", + "_CourseId":"06011109", + "_Title":"Understanding the Anatomy of the Immune System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"5", + "_CourseId":"09011209", + "_Title":"Understanding the Physiology of the Visual System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"6", + "_CourseId":"02011109", + "_Title":"Understanding the Anatomy of the Skin", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"7", + "_CourseId":"00016009", + "_Title":"Understanding Cell Biology", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"8", + "_CourseId":"05011009", + "_Title":"Blood Anatomy and Physiology", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"9", + "_CourseId":"09011109", + "_Title":"Understanding the Anatomy of the Visual System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"10", + "_CourseId":"01011209", + "_Title":"Understanding the Physiology of the Cardiovascular System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"11", + "_CourseId":"13011209", + "_Title":"Understanding the Physiology of the Musculoskeletal System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"12", + "_CourseId":"04011209", + "_Title":"Understanding the Physiology of the Digestive System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"13", + "_CourseId":"07029109", + "_Title":"Understanding the Physiology of Pain", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"14", + "_CourseId":"01011109", + "_Title":"Understanding the Anatomy of the Cardiovascular System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"15", + "_CourseId":"13011109", + "_Title":"Understanding the Anatomy of the Musculoskeletal System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"16", + "_CourseId":"04011109", + "_Title":"Understanding the Anatomy of the Digestive System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"17", + "_CourseId":"07011209", + "_Title":"Understanding the Physiology of the Nervous System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"18", + "_CourseId":"01011009", + "_Title":"Introduction to the Cardiovascular System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"19", + "_CourseId":"12011209", + "_Title":"Understanding the Physiology of the Respiratory System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"20", + "_CourseId":"03011209", + "_Title":"Understanding the Physiology of the Endocrine System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"21", + "_CourseId":"07011109", + "_Title":"Understanding the Anatomy of the Nervous System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"22", + "_CourseId":"12011109", + "_Title":"Understanding the Anatomy of the Respiratory System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"23", + "_CourseId":"03011109", + "_Title":"Understanding the Anatomy of the Endocrine System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"24", + "_CourseId":"14011209", + "_Title":"Understanding the Physiology of the Urinary System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + }, + { + "_id":"25", + "_CourseId":"06011209", + "_Title":"Understanding the Physiology of the Immune System", + "_VideoUrl":"AodHome/CoursePlayerAIA" + } + ] + } +} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/00016009.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/00016009.jpg new file mode 100644 index 0000000..2937548 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/00016009.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011009.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011009.jpg new file mode 100644 index 0000000..8bda336 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011009.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011109.jpg new file mode 100644 index 0000000..beff9a2 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011209.jpg new file mode 100644 index 0000000..0052344 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011109.jpg new file mode 100644 index 0000000..911d6d5 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011209.jpg new file mode 100644 index 0000000..58c5605 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011109.jpg new file mode 100644 index 0000000..31c082c --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011209.jpg new file mode 100644 index 0000000..708a2de --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011109.jpg new file mode 100644 index 0000000..b01b6de --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011209.jpg new file mode 100644 index 0000000..e747fce --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/05011009.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/05011009.jpg new file mode 100644 index 0000000..181e98b --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/05011009.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011109.jpg new file mode 100644 index 0000000..968340e --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011209.jpg new file mode 100644 index 0000000..08c487d --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011109.jpg new file mode 100644 index 0000000..86765fa --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011209.jpg new file mode 100644 index 0000000..0af7204 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07029109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07029109.jpg new file mode 100644 index 0000000..a90f53d --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07029109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011109.jpg new file mode 100644 index 0000000..847ae4a --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011209.jpg new file mode 100644 index 0000000..62959da --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/11014009.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/11014009.jpg new file mode 100644 index 0000000..a967619 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/11014009.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011109.jpg new file mode 100644 index 0000000..f1339cd --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011209.jpg new file mode 100644 index 0000000..75f8e33 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011109.jpg new file mode 100644 index 0000000..c71f62f --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011209.jpg new file mode 100644 index 0000000..e8f8311 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011209.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011109.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011109.jpg new file mode 100644 index 0000000..576173a --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011109.jpg diff --git a/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011209.jpg b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011209.jpg new file mode 100644 index 0000000..a3cafda --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011209.jpg diff --git a/400-SOURCECODE/Admin/src/app/app.component.ts b/400-SOURCECODE/Admin/src/app/app.component.ts index 6dcad5e..9e61f38 100644 --- a/400-SOURCECODE/Admin/src/app/app.component.ts +++ b/400-SOURCECODE/Admin/src/app/app.component.ts @@ -37,7 +37,7 @@ export class AppComponent implements OnInit { constructor(private idle: Idle, private keepalive: Keepalive,private titleService: Title,private _confirmService: ConfirmService,private userservice: UserService,private _loadingService: LoadingService, public global: GlobalService, private router: Router,) { const projectTitle= this.titleService.getTitle(); - console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval); + //console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval); // sets an idle timeout of 20 minutes. this.idle.setIdle(this.global.aiaIdleTime); @@ -141,9 +141,10 @@ export class AppComponent implements OnInit { this.userservice.ManageUserLoginStatus({ userId: this.global.UserId, tagName: tagname, - SessionId:this.global.SessionId + SessionId:this.global.SessionId, + isSiteUser:this.global.isSiteUser }).subscribe(status => { - console.log(status); + //console.log(status); if(status=='False') { if(tagname=='logout') diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts index a9b6138..8147c30 100644 --- a/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts +++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts @@ -56,7 +56,7 @@ export class UserService { //////////Manage UserLogin Status/////////// ManageUserLoginStatus(obj: any) { - var jsonData = { 'userId': obj.userId, 'tagName': obj.tagName,'SessionId': obj.SessionId }; + var jsonData = { 'userId': obj.userId, 'tagName': obj.tagName,'SessionId': obj.SessionId,'isSiteUser': obj.isSiteUser }; console.log(obj); var headers = new Headers({ 'Content-Type': 'application/json' diff --git a/400-SOURCECODE/Admin/src/app/shared/global.ts b/400-SOURCECODE/Admin/src/app/shared/global.ts index 7f61192..3ab3e04 100644 --- a/400-SOURCECODE/Admin/src/app/shared/global.ts +++ b/400-SOURCECODE/Admin/src/app/shared/global.ts @@ -28,23 +28,37 @@ export class GlobalService { aiaIdleTimeOut:number=0; aiaPingInterval:number=0; SessionId:number=0; + isSiteUser:boolean=false; RemoveColumns: Array = ["Serial_No", "LicenseId","RowNum"] error; public href: string = ""; constructor(private csvService: CsvService, private http: Http) { - this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); - if (this.loggedInUser != null) { - this.UserId = this.loggedInUser.Id; - this.UserType = this.loggedInUser.UserTypeId; - this.UserTypeName = this.loggedInUser.UserType; - this.DisplayName = this.loggedInUser.FirstName + " " + this.loggedInUser.LastName; - this.LoginId=this.loggedInUser.LoginId; - this.aiaIdleTime=this.loggedInUser.aiaIdleTime; - this.aiaIdleTimeOut=this.loggedInUser.aiaIdleTimeOut; - this.aiaPingInterval=this.loggedInUser.aiaPingInterval; - this.SessionId=this.loggedInUser.SessionId; + if(window.location.host=="localhost:4200") + { + // for 'ng serve --open' command + //**** for localhost:4200 *****// + var date = new Date(); + var newsessionid = date.getTime();//timestamp is the number of milliseconds that have passed since January 1, 1970 + localStorage.setItem('loggedInUserDetails', JSON.stringify( + { + "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016","aiaIdleTime": 300,"aiaIdleTimeOut": 30,"aiaPingInterval": 10,"SessionId":newsessionid,"isSiteUser":false, "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null + })); + } + + this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); + if (this.loggedInUser != null) { + this.UserId = this.loggedInUser.Id; + this.UserType = this.loggedInUser.UserTypeId; + this.UserTypeName = this.loggedInUser.UserType; + this.DisplayName = this.loggedInUser.FirstName + " " + this.loggedInUser.LastName; + this.LoginId=this.loggedInUser.LoginId; + this.aiaIdleTime=this.loggedInUser.aiaIdleTime; + this.aiaIdleTimeOut=this.loggedInUser.aiaIdleTimeOut; + this.aiaPingInterval=this.loggedInUser.aiaPingInterval; + this.SessionId=this.loggedInUser.SessionId; + this.isSiteUser=this.loggedInUser.isSiteUser; - } + } this.NoRecords = 'No Record Found.'; @@ -69,20 +83,8 @@ export class GlobalService { } - if (this.resourceBaseUrl == this.ProtocolType+"localhost/API/Adminapi/") { - if(window.location.host=="localhost:4200") - { - // for 'ng serve --open' command - //**** for localhost:4200 *****// - var date = new Date(); - var newsessionid = date.getTime();//timestamp is the number of milliseconds that have passed since January 1, 1970 - localStorage.setItem('loggedInUserDetails', JSON.stringify( - { - "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016","aiaIdleTime": 300,"aiaIdleTimeOut": 30,"aiaPingInterval": 10,"SessionId":newsessionid, "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null - })); - } - - this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); + if (this.resourceBaseUrl == this.ProtocolType+"localhost/API/Adminapi/") { + if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber }