From c21e7c3f2c3c4d2ed873e9fbd5332cc2f9942a0e Mon Sep 17 00:00:00 2001 From: Birendra Date: Fri, 17 Dec 2021 11:27:30 +0530 Subject: [PATCH] fix lab ex i --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 1 - 400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 2 -- 400-SOURCECODE/Admin/src/app/app.component.ts | 2 +- 400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html | 2 +- 400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.ts | 2 +- 7 files changed, 65 insertions(+), 34 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index beb8ecd..4025835 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -2974,6 +2974,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ width: $rootScope.AIWindowData[i].width }, imageId: $rootScope.AIWindowData[i].imageId, + imgLeft:$rootScope.AIWindowData[i].imgLeft, minimised: $rootScope.AIWindowData[i].minimised, windowTitle: $rootScope.AIWindowData[i].currentViewTitle, maximised: $rootScope.AIWindowData[i].maximised, @@ -3206,7 +3207,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ height: $rootScope.AAWindowData[i].height }, id: $rootScope.AAWindowData[i].id, - imgLeft:$rootScope.AAWindowData[i].imgLeft, showSelectedPins: $rootScope.AAWindowData[i].isShowSelectedPins, hideCallOuts: false,//N showAllPins: $rootScope.AAWindowData[i].isShowAllPins, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 205b537..b8b9f3a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -525,7 +525,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } ; - //window.parent.closeIFrame(); window.parent.AIAModuleOpenResourceInfo(DaopenData); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js index ea1b814..c9c0c96 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js @@ -233,8 +233,6 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, window.parent.AIAModuleOpenResourceInfo(LEopenData); - window.parent.closeIFrame(); - } else { // $rootScope.menuLabExer = 1;//used in home controller @@ -488,7 +486,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, var userloginid = JSON.parse(localStorage.getItem('loggedInUserDetails')).Id; $scope.SetLEwindowStoreData(windowviewid, 'userloginid', userloginid); - + $timeout(function () { var isMaximize = $scope.GetLEwindowStoreData(windowviewid, 'maximised'); @@ -512,15 +510,62 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $scope.SetLEwindowStoreData(windowviewid, 'width', $scope.jsPanelWidth); $scope.SetLEwindowStoreData(windowviewid, 'height', $scope.jsPanelHeight); - $scope.setControlsIDs(windowviewid); - $scope.createScopeVariable(windowviewid); - - $scope.labViewID = "LabView_" + windowviewid; - var labViewElement = angular.element(document.getElementById($scope.labViewID)); - - $compile(labViewElement.contents())($scope); - - + + $scope.setControlsIDs(windowviewid); + + var timeintval = null; + timeintval = $interval(function () { + $scope.labViewID = "LabView_" + windowviewid; + var labViewElement = angular.element(document.getElementById($scope.labViewID)); + if (document.getElementById($scope.labViewID) != null) + { + var panelBody = document.getElementById("panelbodyDiv_" + windowviewid); + var len = panelBody!=null?(panelBody.id).split("_").length:0; + if (len>1) { + $scope.stopLabIntervalLoader(); + $compile(labViewElement.contents())($scope); + $scope.createScopeVariable(windowviewid); + + //wait until DOM element load of Lab + + $scope.PanelActivity(); + $scope.JsPanelclick(windowviewid); + + var canvasDIvHeight = $('#labImagePanel_' + windowviewid+ " .jsPanel-content").height(); + $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-100); + $('#resultbodyDiv_' + windowviewid).css("height",canvasDIvHeight-90); + + $scope.LoadLabExercise(windowviewid,userloginid,Identifier); + + } + else + { + $scope.setControlsIDs(windowviewid); + console.log("waiting for loading content"); + } + + } + else + { + $scope.setControlsIDs(windowviewid); + console.log("waiting for loading view scope"); + } + + + },100); + $scope.stopLabIntervalLoader = function () { + if (angular.isDefined(timeintval)) { + $interval.cancel(timeintval); + timeintval = undefined; + } + }; + + + }, 100); + } + + $scope.LoadLabExercise = function (windowviewid,userloginid,Identifier) { + var labExerciseInfo = { userId: userloginid, identifier: Identifier, @@ -528,13 +573,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, LabExerciseService.GetLabExercise(labExerciseInfo) .then( function (labResult) { - - $timeout(function () { - var canvasDIvHeight = $('#labImagePanel_' + windowviewid+ " .jsPanel-content").height(); - $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-100); - $('#resultbodyDiv_' + windowviewid).css("height",canvasDIvHeight-90); - $scope.JsPanelclick(windowviewid); - + if (labResult != undefined && labResult.lastQuestion > 0 && labResult != AIAConstants.SAVED_LAB_EXERCISE_NOT_FOUND) { $scope.SetLEwindowStoreData(windowviewid, 'SavedLabExercise', labResult); @@ -550,18 +589,13 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, } $scope.DisableLabUI(windowviewid); - },300) - }, function (error) { console.log('error in getting save ddata'); $scope.DisableLabUI(windowviewid); - } - ) - - $scope.PanelActivity(); - }, 500); - } + }) + } + $scope.JsPanelclick = function (windowviewid) { //reset option list manager and annotation diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 037f268..32b74a5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -366,8 +366,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou window.parent.AIAModuleOpenResourceInfo(AAopenData); - window.parent.closeIFrame(); - } else { diff --git a/400-SOURCECODE/Admin/src/app/app.component.ts b/400-SOURCECODE/Admin/src/app/app.component.ts index 57163da..f132655 100644 --- a/400-SOURCECODE/Admin/src/app/app.component.ts +++ b/400-SOURCECODE/Admin/src/app/app.component.ts @@ -104,7 +104,7 @@ export class AppComponent implements OnInit { UserId: this.global.UserId, UserType: this.global.UserTypeName }).subscribe(x => { - //console.log(x); this.UserManageRightsList = x; + this.UserManageRightsList = x; this.objMenuGernal = this.obj[i].HeaderMenu; //this.objMenuGernal = this.objMenu; //this.objMenu=''; diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html b/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html index 15f2900..03857d6 100644 --- a/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html +++ b/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html @@ -175,7 +175,7 @@ - + {{esr.AccountNumber}} {{esr.LicenseeName}} {{esr.LicenseType}} diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.ts index ced699f..503752e 100644 --- a/400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.ts @@ -120,7 +120,7 @@ export class UsageReport implements OnInit, AfterViewChecked { this.GetState(); this.recordCount = 0; - this.pageNo = 0; + this.pageNo = 1; this.pageLength = 10; this.pagerComponent = new PagerComponent(); -- libgit2 0.21.4