diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx index a1f36b4..4fed988 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx @@ -4350,6 +4350,7 @@ + @@ -6323,6 +6324,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetUsersList_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetUsersList_Result.cs index 5e57615..46f0615 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetUsersList_Result.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetUsersList_Result.cs @@ -31,5 +31,6 @@ namespace AIAHTML5.ADMIN.API.Entity public Nullable EditionTypeId { get; set; } public Nullable LoginStatus { get; set; } public string TotalLogin { get; set; } + public string LicenseStatus { get; set; } } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js index b8acb19..94d2cde 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js @@ -518,38 +518,31 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 500); } - $scope.ResetGridListLength=function() + $rootScope.ResetGridListLength=function() { var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - if(screen.height<=768) - { - $('#grid-view').css({"height":"505","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"260","overflow":"scroll"}); - } - else if(screen.height<=1024) - { - $('#grid-view').css({"height":"720","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"480","overflow":"scroll"}); - } - else - { - $('#grid-view').css({"height":"950","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"850","overflow":"scroll"}); - } + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-132; + var listheight=screen.height-srchHeight-356; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); } else { - $('#grid-view').css({"height":"670","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"450","overflow":"scroll"}); + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-281; + var listheight=screen.height-srchHeight-504; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); } } $scope.IsVisible = function () { @@ -789,7 +782,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 500); } @@ -933,7 +926,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 500); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js index 423112f..cea5ad0 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js @@ -233,33 +233,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 400); } - $scope.ResetGridListLength=function() + $rootScope.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"}); - } + var gridheight=screen.height-107; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + } else { - $('#grid-view').css({"height":"830","overflow":"scroll"}); + var gridheight=screen.height-252; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + } + } $scope.openView = function ($event) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 53b3288..f304eda 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -11,6 +11,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SelectedCAImage = []; $scope.SelectedCASummary = []; $scope.filterstring = false; + $scope.islinkActive = false; $scope.hostedServer = "https://ssl.adam.com/graphics/Multimedia/en/"; $scope.hostedFolderId; $scope.idSelected; @@ -164,7 +165,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null) { if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="") - { + { $rootScope.isCallFromOtherModule = true; $rootScope.linkToOpenCa=true; // store exist module in module service @@ -182,33 +183,44 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout .from(result.root.CAData) .where('_id = ' + $rootScope.siteUrlInfo.id) .select('_Title'); - - var CAlinkData = { - "id": $rootScope.siteUrlInfo.id, - "mType": 'CLINICAL_ANIMATIONS', - "textVisible": true, - "windowTitle": AnimationTitle[0]._Title, - - }; - ModuleService.setModuleData(CAlinkData, 0); - // close/remove prev panel when in minimised mode - - if($rootScope.CAWindowData!=undefined) + + if(AnimationTitle.length>0) { - if($rootScope.CAWindowData.length>0) + var CAlinkData = { + "id": $rootScope.siteUrlInfo.id, + "mType": 'CLINICAL_ANIMATIONS', + "textVisible": true, + "maximised": true, + "windowTitle": AnimationTitle[0]._Title, + + }; + + ModuleService.setModuleData(CAlinkData, 0); + // close/remove prev panel when in minimised mode + + if($rootScope.CAWindowData!=undefined) { - for(var x=0 ;x < $rootScope.CAWindowData.length;x++){ - var winid=$rootScope.CAWindowData[x].multiwinid; - if ($('#caImagePanel_' + winid).html() != undefined) { - $('#caImagePanel_' + winid).remove(); - } + if($rootScope.CAWindowData.length>0) + { + for(var x=0 ;x < $rootScope.CAWindowData.length;x++){ + var winid=$rootScope.CAWindowData[x].multiwinid; + if ($('#caImagePanel_' + winid).html() != undefined) { + $('#caImagePanel_' + winid).remove(); + } + } + $rootScope.CAWindowData=[]; } - $rootScope.CAWindowData=[]; } + + $location.url('/clinical-animations-detail'); } - - $location.url('/clinical-animations-detail'); - + else + { + $('#errorMessage').text("Animation course not found. Please try again!"); + $("#messageModal").modal('show'); + + } + }, function (error) { $scope.EnableUI(); @@ -228,6 +240,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }; $scope.loadCAlist = function () { $rootScope.isCallFromOtherModule = undefined; + $('.breadcrumb').css('display','block'); + $('.tab-content').css('display','block'); $rootScope.MULTI_VIEW_ID += 1 // store exist module in module service @@ -369,31 +383,46 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') promise.then( - function (result) { + function (result) { + + if($rootScope.userData.Id>1 && $rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2) + { + $scope.islinkActive = true; + var AnimationData = new jinqJs() + .from(result.root.CAData) + .orderBy([{ field: '_Title', sort: 'asc' }]) + .select('_id','_BodyRegion','_BodySystem','_ImageId','_LowerSummary','_MedicalSpecialty','_Summary','_ThumbnailImage','_Title','_Video','copyLink'); - var AnimationData = new jinqJs() - .from(result.root.CAData) - .orderBy([{ field: '_Title', sort: 'asc' }]) - .select(); + angular.forEach(AnimationData, function (value, key) { - $scope.SetCAwindowStoreData(windowviewid, 'AnimationData', AnimationData); + AnimationData[key].copyLink=$rootScope.homeURL+'?username='+$rootScope.userData.LoginId+'&accountNumber='+$rootScope.userData.LicenseInfo.AccountNumber.trim()+'&mtype=CA&id='+value._id; - $scope.selectedCAListViewData = AnimationData; + }); + + } + else + { + var AnimationData = new jinqJs() + .from(result.root.CAData) + .orderBy([{ field: '_Title', sort: 'asc' }]) + .select(); + } + $scope.SetCAwindowStoreData(windowviewid, 'AnimationData', AnimationData); + $scope.selectedCAListViewData = AnimationData; - }, - function (error) { - $scope.EnableUI(); - // handle errors here - console.log(' $scope.AnimationData = ' + error.statusText); - } - ); + }, + function (error) { + $scope.EnableUI(); + // handle errors here + console.log(' $scope.AnimationData = ' + error.statusText); + }); }; $scope.loadAllCA = function (windowviewid) { - + $scope.selectedCAListViewData = $scope.GetCAwindowStoreData(windowviewid, 'AnimationData'); $('#grid-view').empty(); @@ -401,12 +430,37 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout angular.forEach($scope.selectedCAListViewData, function (value, key) { var imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; - var $el = $('').appendTo('#grid-view'); + if($rootScope.userData.Id>1 && $rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2) + { + var $el = $('
' + +'' + +'
' + +'' + +'
' + + +'
').appendTo('#grid-view'); + + $compile($el)($scope); + } + else + { + //site license and super admin section + //site license not has loginId and super admin not has accountNumber + var $el = $('
' + +'' + +'
').appendTo('#grid-view'); + $compile($el)($scope); + } - $compile($el)($scope); + $(".sidebar").mCustomScrollbar({ autoHideScrollbar: true, @@ -427,7 +481,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 400); } @@ -618,22 +672,42 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if (selectimg === true && count >= filtercount) { - $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; - - var $el = $('').appendTo('#grid-view'); - + var imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; + if($rootScope.userData.Id>1 && $rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2) + { + var $el = $('
' + +'' + +'
' + +'' + +'
' + + +'
').appendTo('#grid-view'); $compile($el)($scope); + } + else + { + //site license and super admin section + //site license not has loginId and super admin not has accountNumber + var $el = $('
' + +'' + +'
').appendTo('#grid-view'); + $compile($el)($scope); + } $(".sidebar").mCustomScrollbar({ autoHideScrollbar: true, //theme:"rounded" }); - calistviewdata.push( { "_id": value._id, @@ -667,36 +741,29 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 500); } - $scope.ResetGridListLength=function() + $rootScope.ResetGridListLength=function() { var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - if(screen.height<=768) - { - $('#grid-view').css({"height":"535","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"290","overflow":"scroll"}); - } - else if(screen.height<=1024) - { - $('#grid-view').css({"height":"780","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"530","overflow":"scroll"}); - } - else - { - $('#grid-view').css({"height":"950","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"880","overflow":"scroll"}); - } + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-128; + var listheight=screen.height-srchHeight-352; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); } else { - $('#grid-view').css({"height":"696","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"460","overflow":"scroll"}); + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-276; + var listheight=screen.height-srchHeight-500; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); } } $scope.scroll = function () { @@ -944,13 +1011,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($rootScope.isCallFromOtherModule) { if($rootScope.linkToOpenCa==true) { - $scope.jsPanelWidth = $(window).outerWidth() - 10; + $scope.jsPanelWidth = $(window).outerWidth()-30; $scope.jsPanelHeight = $(window).outerHeight() - 105; $scope.jsPanelLeft = 1; - $scope.jsPanelTop = 70; - $rootScope.siteUrlInfo.mtype=null; - $rootScope.siteUrlInfo.id=null; - + $scope.jsPanelTop = 55; } else { @@ -1310,12 +1374,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout function videoOnLoad(event) { - console.log('video loaded') - var scope = angular.element(document.getElementById("CAView")).scope(); - // var len = (event.target.id).split("_").length; - var windowviewid = (event.target.id).split("_")[1]; setTimeout(function() { + var scope = angular.element(document.getElementById("CAView")).scope(); + // var len = (event.target.id).split("_").length; + var windowviewid = (event.target.id).split("_")[1]; scope.$apply(function () { scope.videoOnLoad(windowviewid); }); @@ -1332,3 +1395,72 @@ function GetTextVisibityCA(event) { scope.GetTextVisiblity(windowviewid, btnTextValue); }); } + +function copygridbtnclick(event) +{ + var id = (event.target.id).split("_")[1]; + + function setTooltip(message) { + + $('#spn_'+id).css({'visibility':'visible','margin-left':'0px','opacity':1}); + $('#spn_'+id).text(message); + + } + + function hideTooltip() { + setTimeout(function() { + $('#spn_'+id).css({'visibility':'hidden','margin-left':'-50px','opacity':0}); + $('#spn_'+id).text(''); + }, 2000); + } + + var clipboard = new ClipboardJS('#'+event.target.id); + + clipboard.on('success', function(e) { + setTooltip('link copied!'); + hideTooltip(); + + }); + + clipboard.on('error', function(e) { + setTooltip('link not copied!'); + hideTooltip(); + + }); + +} + +function copylistbtnclick(event) +{ + var id = (event.target.id).split("_")[1]; + + function setTooltip(message) { + + $('#spnlist_'+id).css({'visibility':'visible','opacity':1}); + $('#spnlist_'+id).text(message); + + } + + function hideTooltip() { + setTimeout(function() { + $('#spnlist_'+id).css({'visibility':'hidden','opacity':0}); + $('#spnlist_'+id).text(''); + }, 2000); + } + + var clipboard = new ClipboardJS('#'+event.target.id); + + clipboard.on('success', function(e) { + setTooltip('link copied!'); + hideTooltip(); + + }); + + clipboard.on('error', function(e) { + setTooltip('link not copied!'); + hideTooltip(); + + }); + + +} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index 6632eb4..19a4a4a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -396,7 +396,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 400); } @@ -687,36 +687,29 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 400); } - $scope.ResetGridListLength=function() + $rootScope.ResetGridListLength=function() { var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - if(screen.height<=768) - { - $('#grid-view').css({"height":"535","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"290","overflow":"scroll"}); - } - else if(screen.height<=1024) - { - $('#grid-view').css({"height":"720","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"480","overflow":"scroll"}); - } - else - { - $('#grid-view').css({"height":"950","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"880","overflow":"scroll"}); - } + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-128; + var listheight=screen.height-srchHeight-352; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); } else { - $('#grid-view').css({"height":"696","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"480","overflow":"scroll"}); + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-276; + var listheight=screen.height-srchHeight-500; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 2bfd5e6..62ad8b6 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -649,7 +649,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.checkRefreshButtonClick = 1; var date = new Date(); - $rootScope.userInfo = { username: null, password: null, @@ -727,13 +726,28 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data //licenseId would be zero for admin/gernal admin var isadminType=loggedInUser.LicenseId==0?true:false; - $scope.checkuserstatus = { - userId: userId, - tagName: loggedInUser.Id==0?'logout':'update', - SessionId:loggedInUser.SessionId, - isSiteUser:loggedInUser.isSiteUser, - isAdmin:isadminType - } + if(loggedInUser.mtype!=undefined) + { + $scope.checkuserstatus = { + userId: userId, + tagName: loggedInUser.mtype.toLowerCase()=='ca'?'logout':'update', + SessionId:loggedInUser.SessionId, + isSiteUser:loggedInUser.isSiteUser, + isAdmin:isadminType + } + } + else + { + $scope.checkuserstatus = { + userId: userId, + tagName: loggedInUser.Id==0?'logout':'update', + SessionId:loggedInUser.SessionId, + isSiteUser:loggedInUser.isSiteUser, + isAdmin:isadminType + } + + } + // this case found when browser closed by user after login. after long time (after 20 min) open site again // loggedInUserDetails contain user detail so user auto login but it is logout by @@ -987,6 +1001,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } $rootScope.AuthenticateUser = function (userInfo) { + $rootScope.isCAlink=false; if (navigator.cookieEnabled) { $('#errorMessage').text(""); if (userInfo.username == "" || userInfo.username == null || userInfo.username == undefined || userInfo.password == "" || userInfo.password == null || userInfo.password == undefined) { @@ -1018,6 +1033,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut; result.aiaPingInterval=$rootScope.aiaPingInterval; result.SessionId=userInfo.SessionId; + if(userInfo.mtype!=undefined) + { + //for CA bypass login + result.mtype=userInfo.mtype; + } //display user name $rootScope.userName=result.FirstName+" "+result.LastName; @@ -1381,12 +1401,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } $scope.RedirectToModule = function () { - - if($rootScope.siteUrlInfo.mtype!=null) + if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null) { - if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca') - { + if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="") + { $('#clinical-animations').trigger('click'); + $rootScope.isCAlink=true; } } @@ -1431,27 +1451,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.siteUrlInfo.accountNumber = paramInfo[1]; console.log("$rootScope.siteUrlInfo.accountNumber" + $rootScope.siteUrlInfo.accountNumber); } - - - // if (paramInfo[0] == 'calsCredantial') { - - // $rootScope.siteUrlInfo.calsCreds = paramInfo[1]; - // console.log("$rootScope.siteUrlInfo.calsCreds" + $rootScope.siteUrlInfo.calsCreds); - // } - // else if (paramInfo[0] == 'username') { - // $rootScope.siteUrlInfo.username = paramInfo[1]; - // console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.username); - // } - // else if (paramInfo[0] == 'password') { - - // $rootScope.siteUrlInfo.password = paramInfo[1]; - // console.log("$rootScope.siteUrlInfo.password " + $rootScope.siteUrlInfo.password); - // } - - //$rootScope.userInfo.username = $rootScope.siteUrlInfo.userId; - //$rootScope.userInfo.password = $rootScope.siteUrlInfo.password; - } else { var paramInfo = siteInfo[i].split('='); @@ -1485,7 +1485,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } } if (isCalsCredantialForSIte == "True") { - if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.userId!=null && $rootScope.siteUrlInfo.accountNumber!=null) + if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!=null && $rootScope.siteUrlInfo.id!="" && $rootScope.siteUrlInfo.userId!=null && $rootScope.siteUrlInfo.accountNumber!=null) { $rootScope.LoginDisableUI(); var userInfo=$rootScope.userInfo;//also get session id @@ -1508,6 +1508,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data userInfo.username = result.LoginId; userInfo.password = result.Password; + userInfo.mtype = $rootScope.siteUrlInfo.mtype; var loggedInUser = JSON.parse($scope.currentUserDetails); if(loggedInUser!==null && loggedInUser.LoginId==result.LoginId) { @@ -1538,7 +1539,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data { console.log(' invalid detail in bypass login'); $rootScope.isVisibleLogin = true; - $('#errorMessage').text("authentication is not allowed due to invalid details format .\nPlease pass the correct details again!"); + $('#errorMessage').text("authentication is not allowed due to invalid details format.\nPlease pass the correct details again!"); $("#messageModal").modal('show'); } @@ -1581,6 +1582,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.AuthenticateClientSiteUser = function (siteInfo) { $rootScope.LoginDisableUI(); + $rootScope.isCAlink=false; AuthenticationService.validateClientSite(siteInfo) .then( function (result) { @@ -2392,6 +2394,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } } + if(($location.url()== "/tile-view-list") ||($location.url()== "/clinical-illustrations")||($location.url()== "/clinical-animations")||($location.url()== "/ADAM-images")||($location.url()== "/ADAM-on-demand")) { + $rootScope.ResetGridListLength(); + } + }; @@ -3158,7 +3164,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data var modulePanel = $(document).find("div[id*='ImagePanel']"); if (modulePanel != undefined && modulePanel.length>0) { //if only one module left - if(modulePanel.length==1) $location.url('/' + slug); + if(slug=='clinical-animations' && $rootScope.userData.mtype!=undefined) + { + if($rootScope.userData.mtype.toLowerCase()=='ca') + { + $rootScope.siteUrlInfo.mtype=null; + $rootScope.siteUrlInfo.id=null; + $rootScope.LogoutUser(); + } + + } + else + { + if(modulePanel.length==1) $location.url('/' + slug); + } + } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index aeda0e5..0294560 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -415,7 +415,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var OpenItemImagePath = "../../../content/images/aa/images/" +OpenedTileData[3]; $scope.SetAAwindowStoreData(windowviewid,'OpenItemImagePath',OpenItemImagePath); $rootScope.listArray.push({ "imageName": OpenItemImagePath, "text": moduleItemDataToBeSaved }); - $("#viewList").append("
" + moduleItemDataToBeSaved + "
Open
"); + $("#viewList").append("
" + moduleItemDataToBeSaved + "
Open
"); } $rootScope.openAAModuleItemMain = function () { @@ -1670,7 +1670,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $timeout(function () { $scope.EnableUI(); - $scope.ResetGridListLength(); + $rootScope.ResetGridListLength(); }, 500); }, function (error) { @@ -1680,34 +1680,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou ) } - $scope.ResetGridListLength=function() + $rootScope.ResetGridListLength=function() { var $ua = navigator.userAgent; - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - if(screen.height<=768) - { - $('#ListViewDiv').css({"height":"300","overflow":"scroll"}); - $('#grid-view').css({"height":"535","overflow":"scroll"}); - } - else if(screen.height<=1024) - { - $('#ListViewDiv').css({"height":"460","overflow":"scroll"}); - $('#grid-view').css({"height":"720","overflow":"scroll"}); - } - else - { - $('#ListViewDiv').css({"height":"880","overflow":"scroll"}); - $('#grid-view').css({"height":"950","overflow":"scroll"}); - } - - } - else - { - $('#ListViewDiv').css({"height":"460","overflow":"scroll"}); - $('#grid-view').css({"height":"696","overflow":"scroll"}); - } + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-128; + var listheight=screen.height-srchHeight-352; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); + } + else + { + var srchHeight=$('.breadcrumb').height(); + var gridheight=screen.height-srchHeight-276; + var listheight=screen.height-srchHeight-500; + $('#grid-view').css({"height":gridheight,"overflow":"auto"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); + } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html index e71178a..7e528a9 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html @@ -81,37 +81,23 @@ -
-
+
+
- +
-
-
+
+

- +
-
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html index 9a6d448..5b7265a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html @@ -3,11 +3,10 @@
-