Commit 315946b3c252e144fb53034dcfb142f3db60e8da
1 parent
785253ad
changes for save data
Showing
1 changed file
with
11 additions
and
13 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -461,18 +461,7 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, | @@ -461,18 +461,7 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, | ||
461 | var x = $("#droppable").offset(); | 461 | var x = $("#droppable").offset(); |
462 | 462 | ||
463 | var id = $(this).attr("id"); | 463 | var id = $(this).attr("id"); |
464 | - | ||
465 | - // $scope.dragableText = $("#" + $scope.dragableId).text(); | ||
466 | - | ||
467 | - //$rootScope.selectedDivArray.push({ | ||
468 | - // "questionNo": $scope.quiznumber, | ||
469 | - // "draggedID": $scope.dragableId, | ||
470 | - // "draggedText": $scope.dragableText, | ||
471 | - // "droppedID": id | ||
472 | - //}); | ||
473 | - | ||
474 | - | ||
475 | - //console.log($rootScope.selectedDivArray); | 464 | + |
476 | 465 | ||
477 | var keywords = $location.search(); | 466 | var keywords = $location.search(); |
478 | 467 | ||
@@ -1043,7 +1032,16 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, | @@ -1043,7 +1032,16 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, | ||
1043 | .select(); | 1032 | .select(); |
1044 | if (value.text != "") { | 1033 | if (value.text != "") { |
1045 | 1034 | ||
1046 | - $scope.DraggedList.push({ "id": value.blockbox, "optionName": value.blockbox, "Value": value.text, "topcoord": questionOptionBox[0].topcoord, "leftcoord": questionOptionBox[0].leftcoord }); | 1035 | + var OptionList = new jinqJs() |
1036 | + .from(labQuestionData[0].Options) | ||
1037 | + .where('OptionTitle == ' + value.text) | ||
1038 | + .select(); | ||
1039 | + | ||
1040 | + var blockId = 'block-' + OptionList[0].OptionNumber; | ||
1041 | + $scope.DraggedList.push({ "blockID": blockId, "id": value.blockbox, "optionName": value.blockbox, "Value": value.text, "topcoord": questionOptionBox[0].topcoord, "leftcoord": questionOptionBox[0].leftcoord }); | ||
1042 | + | ||
1043 | + | ||
1044 | + // $scope.DraggedList.push({ "id": value.blockbox, "optionName": value.blockbox, "Value": value.text, "topcoord": questionOptionBox[0].topcoord, "leftcoord": questionOptionBox[0].leftcoord }); | ||
1047 | 1045 | ||
1048 | $rootScope.isLoading = false; | 1046 | $rootScope.isLoading = false; |
1049 | $('#spinner').css('visibility', 'hidden'); | 1047 | $('#spinner').css('visibility', 'hidden'); |