diff --git a/400-SOURCECODE/AIAHTML5.Web/Web.config b/400-SOURCECODE/AIAHTML5.Web/Web.config
index 4e17604..9a16866 100644
--- a/400-SOURCECODE/AIAHTML5.Web/Web.config
+++ b/400-SOURCECODE/AIAHTML5.Web/Web.config
@@ -21,7 +21,7 @@
-
+
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
index a87f1b5..96abcc6 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -65,14 +65,12 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
//to get all lab exercise modules from json files
$scope.getLabExerciseModules = function () {
- //debugger;
+
$scope.LabExerciseModules1 = null;
var labExerciseModulePath = '~/../content/data/json/le/labexercise.json';
DataService.getAnotherJson(labExerciseModulePath).then(
function (result) {
- //debugger;
- //alert(JSON.stringify(result));
$scope.LabExerciseModules1 = result;
},
function (error) {
@@ -537,38 +535,13 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
if ($scope.DraggedList != null) {
$.each($scope.DraggedList, function (inx1, value3) {
$scope.UserAttempt.push({ "BlankBoxName": id.split('-')[1], "OptionName": $scope.dragableId.split('-')[1] });
- debugger;
-
if ($scope.DraggedList[inx1].DraggedAttr == $scope.draggableAttribute) {
// $scope.b = $scope.DraggedList[inx1].blockID;
$scope.DraggedList.splice(inx1, 1);
$('#' + $scope.draggableAttribute).css({ "display": "block", "color": "#000000!important" });
$('#blockans-' + $scope.a.split('-')[1]).css("background-color", "transparent !important");
- // alert('removed from dropbox= '+'blockans-' + $scope.b.split('-')[1]);
-
}
-
-
-
- //if ($scope.DraggedList[inx1].id == $scope.a.split('-')[1]) {
- // $scope.b = $scope.DraggedList[inx1].blockID;
- // $scope.DraggedList.splice(inx1, 1);
- // $('#' + $scope.b).css({ "display": "block", "color": "#000000!important" });
- // $('#blockans-' + $scope.a.split('-')[1]).css("background-color", "transparent !important");
-
- //}
-
- //else
- //{
- // if ($scope.DraggedList[inx1].DraggedAttr == $scope.draggableAttribute) {
- // $scope.b = $scope.DraggedList[inx1].blockID;
- // $scope.DraggedList.splice(inx1, 1);
- // $('#' + $scope.draggableAttribute).css({ "display": "block", "color": "#000000!important" });
- // $('#blockans-' + $scope.b.split('-')[1]).css("background-color", "transparent !important");
- // // alert('removed from dropbox= '+'blockans-' + $scope.b.split('-')[1]);
- // }
- //}
});
}
}
@@ -601,23 +574,11 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
$.each(Options, function (inx, value2) {
if (Options[inx].BoxName == id.split('-')[1]) {
if ($scope.DraggedList != null) {
- //$.each($scope.DraggedList, function (inx1, value3) {
- // if ($scope.DraggedList[inx1].Value == dataText) {
- // $scope.DraggedList.splice(inx1, 1);
- // }
- //});
for (var i = 0; i <= $scope.DraggedList.length - 1; i++) {
-
if ($scope.DraggedList[i].Value == undefined) {
i = 0;
continue;
}
-
- debugger;
-
- //if ($scope.DraggedList[i].Value == dataText) {
- // if ($scope.DraggedList[i].id == id.split('-')[1])
-
if ($scope.DraggedList[i].DraggedAttr == $scope.draggableAttribute)
{
$scope.DraggedList.splice(i, 1);
@@ -1118,28 +1079,45 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
for (var i = 0; i < lastQuestionAnswers.length; i++) {
var num = i + 1;
$scope.QustionAnsKeyValue.push({ blockbox: 'T' + num, text: lastQuestionAnswers[i] });
+
if (isFromDB) {
-
+
if (lastQuestionAnswers[i] != "") {
var blocks = $("div[id*='block-']");
for (var j = 0; j < blocks.length; j++) {
+
if ((blocks[j].innerHTML).toString() == lastQuestionAnswers[i]) {
- debugger;
- alert((blocks[j].innerHTML).toString());
- $('#' + blocks[j].id).css("display", "none");
- break;
+ if ($('#' + blocks[j].id).css('display').toLowerCase() == 'block') {
+ $('#' + blocks[j].id).css("display", "none");
+ break;
+ }
+
};
+
}
+
}
}
- else {
- var dragList = lastQuestionDetails[0].DragList;
- angular.forEach(dragList, function (v, k) {
- $('#' + v.blockID).css("display", "none");
- })
- }
+ }
+ if (lastQuestionDetails != undefined && lastQuestionDetails.length > 0 && !isFromDB) {
+ var dragList = lastQuestionDetails[0].DragList;
+ var blocks = $("div[id*='block-']");
+ angular.forEach(dragList, function (v, k) {
+
+ for (var j = 0; j < blocks.length; j++) {
+ if ((blocks[j].innerHTML).toString() == v.Value) {
+ if ($('#' + blocks[j].id).css('display').toLowerCase() == 'block') {
+ $('#' + blocks[j].id).css("display", "none");
+ break;
+ }
+
+ };
+
+ }
+ //$('#' + v.blockID).css("display", "none");
+ })
}
var labQuestionData = new jinqJs()
.from($scope.LabExData.LabExercise[0].Questions)
@@ -1158,7 +1136,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
.where('OptionTitle == ' + value.text)
.select();
- debugger;
+
var blockId = 'block-' + OptionList[0].OptionNumber;
if (OptionList != undefined && OptionList.length > 1 && blockIds.indexOf(blockId) != -1) {
blockId = 'block-' + OptionList[1].OptionNumber;
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 0d34178..76d2775 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -96,19 +96,41 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$scope.FilterByImage(1, $scope.query);
setTimeout(function () {
- if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) {
- $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail');
- }
- if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null && $location.url() == "/tile-view-list") {
- $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow');
+ if ($('#grid-view').css("display") == "block") {
+ if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) {
+ $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail');
+ }
+ if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null && $location.url() == "/tile-view-list") {
+
+ $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow');
+
+ }
+ }
+ if ($('#list-view').css("display") == "block") {
- }
- $rootScope.isLoading = false;
- $('#spinner').css('visibility', 'hidden');
+ var AAListViewScroll = $rootScope.getLocalStorageValue("AAListViewScroll");
+ if (typeof (AAListViewScroll) !== "undefined" && AAListViewScroll !== null && AAListViewScroll !== '' && $location.url() == "/tile-view-list") {
+ if (typeof InstallTrigger !== 'undefined') {
+
+ $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AAListViewScroll') }, 'slow');
+ }
+ else {
+
+ $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AAListViewScroll') }, 'slow');
+ }
+ $("#list-view table tbody tr").removeClass("active");
+ $("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active");
+ }
+
+ }
+
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
}, 100);
}, 100);
+
//console.log(JSON.stringify(result, null, 4));
},
function (error) {
@@ -160,8 +182,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$rootScope.listArray.push({ "imageName": $rootScope.OpenItemImagePath, "text": moduleItemDataToBeSaved });
//3. set opened module item ti
localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]);
- localStorage.setItem("AAGridViewScroll", $($window).scrollTop());
- localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id'));
+ if ($('#grid-view').css("display") == "block") {
+ localStorage.setItem("AAGridViewScroll", $($window).scrollTop());
+ localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id'));
+ }
//3. Navigate to the Module-item-view
var u = $location.url();
@@ -1519,7 +1543,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
if ($rootScope.bodySystemTermArray[j].language == $rootScope.lexiconLanguageArray[0].id) {
$rootScope.duplicateListArray.push({ "title": $rootScope.bodySystemTermArray[j].text, "id": $rootScope.bodySystemTermArray[j].termNumbr });
- $rootScope.sortedListArray.push({ "title": $rootScope.bodySystemTermArray[j].text, "id": $rootScope.bodySystemTermArray[j].termNumbr });
+
// console.log($rootScope.bodySystemTermArray);
}
@@ -1527,38 +1551,38 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
}
}
}
- //var temp = [];
- //console.log($rootScope.duplicateListArray);
- //for (var i = 0; i <= $rootScope.duplicateListArray.length - 1; i++) {
- // var termID = $rootScope.duplicateListArray[i].id;
- // if ($.inArray(termID, temp) == -1) {
- // temp.push(termID);
- // console.log('1'+$rootScope.duplicateListArray[i].title + " " + $rootScope.duplicateListArray[i].id);
- // $rootScope.sortedListArray.push({ "title": $rootScope.duplicateListArray[i].title, "id": termID });
- // console.log('3' + $rootScope.sortedListArray[i].title + " " + $rootScope.sortedListArray[i].id)
- // }
- //}
- //console.log('2'+$rootScope.sortedListArray);
- //for (var i = 0; i <= $rootScope.sortedListArray.length - 1; i++) {
-
- // for (j = i + 1; j <= $rootScope.sortedListArray.length - 1; j++) {
+ var temp = [];
+ console.log($rootScope.duplicateListArray);
+ for (var i = 0; i <= $rootScope.duplicateListArray.length - 1; i++) {
+ var termID = $rootScope.duplicateListArray[i].id;
+ if ($.inArray(termID, temp) == -1) {
+ temp.push(termID);
+ console.log('1'+$rootScope.duplicateListArray[i].title + " " + $rootScope.duplicateListArray[i].id);
+ $rootScope.sortedListArray.push({ "title": $rootScope.duplicateListArray[i].title, "id": termID });
+ console.log('3' + $rootScope.sortedListArray[i].title + " " + $rootScope.sortedListArray[i].id)
+ }
+ }
+ console.log('2'+$rootScope.sortedListArray);
+ for (var i = 0; i <= $rootScope.sortedListArray.length - 1; i++) {
+
+ for (j = i + 1; j <= $rootScope.sortedListArray.length - 1; j++) {
- // if ($rootScope.sortedListArray[i].title.substr(0, 1) > $rootScope.sortedListArray[j].title.substr(0, 1)) {
-
- // var termText = $rootScope.sortedListArray[i].title;
- // var termNumbr = $rootScope.sortedListArray[i].termNumbr;
- // var termLanguage = $rootScope.sortedListArray[i].language;
-
- // $rootScope.sortedListArray[i].title = $rootScope.sortedListArray[j].title;
- // $rootScope.sortedListArray[i].termNumbr = $rootScope.sortedListArray[j].termNumbr;
- // $rootScope.sortedListArray[i].language = $rootScope.sortedListArray[j].language;
-
- // $rootScope.sortedListArray[j].title = termText;
- // $rootScope.sortedListArray[j].termNumbr = termNumbr;
- // $rootScope.sortedListArray[j].language = termLanguage;
- // }
- // }
- //}
+ if ($rootScope.sortedListArray[i].title.substr(0, 1) > $rootScope.sortedListArray[j].title.substr(0, 1)) {
+
+ var termText = $rootScope.sortedListArray[i].title;
+ var termNumbr = $rootScope.sortedListArray[i].id;
+ var termLanguage = $rootScope.sortedListArray[i].language;
+
+ $rootScope.sortedListArray[i].title = $rootScope.sortedListArray[j].title;
+ $rootScope.sortedListArray[i].id = $rootScope.sortedListArray[j].id;
+ $rootScope.sortedListArray[i].language = $rootScope.sortedListArray[j].language;
+
+ $rootScope.sortedListArray[j].title = termText;
+ $rootScope.sortedListArray[j].id = termNumbr;
+ $rootScope.sortedListArray[j].language = termLanguage;
+ }
+ }
+ }
for (var j = 0; j <= $rootScope.sortedListArray.length - 1; j++) {
var $selectedOptions = $('').appendTo("#termList");