Commit d776869b30a5099ee28722d41623874b69586506

Authored by Amit Kumar
1 parent c3cb2f88

Options alignment done

400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
1 1 /// <reference path="../../content/data/json/le/LabExercise.js" />
2   -AIA.controller("LabExercController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document',
3   -function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document) {
  2 +AIA.controller("LabExercController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce',
  3 +function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce) {
  4 + $scope.$sce = $sce;
4 5 $scope.LabExerciseName;
5 6 $scope.LabExerciseQuiz = null;
6 7 $scope.TotalNumberofQuiz = "0";
... ... @@ -46,14 +47,14 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
46 47 //to get all lab exercise modules from json files
47 48 $scope.getLabExerciseModules = function () {
48 49 //debugger;
49   - $scope.LabExerciseModules = null;
  50 + $scope.LabExerciseModules1 = null;
50 51 var commondataJsonPath = '~/../content/data/json/le/LabExercise.json';
51 52  
52 53 DataService.getAnotherJson(commondataJsonPath).then(
53 54 function (result) {
54 55 //debugger;
55 56 //alert(JSON.stringify(result));
56   - $scope.LabExerciseModules = result;
  57 + $scope.LabExerciseModules1 = result;
57 58 },
58 59 function (error) {
59 60 console.log(error.statusText)
... ... @@ -83,18 +84,18 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
83 84 DataService.getAnotherJson(commondataJsonPath).then(
84 85 function (result) {
85 86 //debugger;
86   - // alert(JSON.stringify(result.LabExercise));
  87 + // alert(JSON.stringify(result.LabExercise));
87 88 $.each(result.LabExercise, function (index, value) {
88 89 $scope.LabExerciseName = result.LabExercise[index].Topic;
89 90 if (result.LabExercise[index].Slug == keywords.topic) {
90   -
  91 +
91 92 $scope.TotalNumberofQuiz = result.LabExercise[index].NumberofQuestions;
92 93 $.each(result.LabExercise[index].Questions, function (index1, value1) {
93 94 if (result.LabExercise[index].Questions[index1].Number == $scope.quiznumber) {
94 95 if (result.LabExercise[index].Questions[index1].ImagePath == "") {
95 96 $("#imgblock").css("display", "none");
96 97 $("#textblock").css("display", "block");
97   - $scope.LabExerciseModules = result.LabExercise[index].Questions[index1];
  98 + $scope.LabExerciseModules = result.LabExercise[index].Questions[index1];
98 99 $scope.activityTitle = result.LabExercise[index].Questions[index1].activityTitle;
99 100 $scope.Title = result.LabExercise[index].Questions[index1].Title;
100 101 }
... ... @@ -104,9 +105,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
104 105 $scope.LabExerciseModules = result.LabExercise[index].Questions[index1];
105 106 $scope.activityTitle = result.LabExercise[index].Questions[index1].activityTitle;
106 107 $scope.Title = result.LabExercise[index].Questions[index1].Title;
107   - $scope.Imagepath = keywords.topic+"/"+result.LabExercise[index].Questions[index1].ImagePath;
  108 + $scope.Imagepath = keywords.topic + "/" + result.LabExercise[index].Questions[index1].ImagePath;
108 109 }
109   -
  110 +
110 111 }
111 112 });
112 113 //$scope.quiznumber++;
... ... @@ -163,10 +164,10 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
163 164 var commondataJsonPath = '~/../content/data/json/le/' + keywords.topic + '.json';
164 165 DataService.getAnotherJson(commondataJsonPath).then(
165 166 function (result) {
166   -
  167 +
167 168 $.each(result.LabExercise, function (index, value) {
168 169 if (result.LabExercise[index].Slug == keywords.topic) {
169   -
  170 +
170 171 $.each(result.LabExercise[index].Questions, function (index1, value1) {
171 172 if (result.LabExercise[index].Questions[index1].Number == $scope.quiznumber) {
172 173 var Options = result.LabExercise[index].Questions[index1].OptionBox;
... ... @@ -174,7 +175,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
174 175 if (Options[inx].BoxName == id.split('-')[1]) {
175 176 if ($scope.DraggedList != null) {
176 177 $.each($scope.DraggedList, function (inx1, value3) {
177   -
  178 +
178 179 if ($scope.DraggedList[inx1].Value == dataText) {
179 180 $scope.DraggedList.splice(inx1, 1);
180 181 }
... ... @@ -285,4 +286,11 @@ AIA.directive(&#39;imageonload&#39;, function () {
285 286 });
286 287 }
287 288 };
288   -});
289 289 \ No newline at end of file
  290 +});
  291 +
  292 +//angular.module('app')
  293 +//.filter('to_trusted', ['$sce', function ($sce) {
  294 +// return function (text) {
  295 +// return $sce.trustAsHtml(text);
  296 +// };
  297 +//}]);
290 298 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/LabExerc-view.html
... ... @@ -4,7 +4,7 @@
4 4  
5 5  
6 6 <div class="col-sm-12">
7   - <div class="col-sm-3 col-lg-2" ng-repeat="labExerciseTitle in LabExerciseModules.LabExercise">
  7 + <div class="col-sm-3 col-lg-2" ng-repeat="labExerciseTitle in LabExerciseModules1.LabExercise">
8 8 <div class="thumbnail">
9 9 <a href="" ng-click="getLabExerciseTitle(labExerciseTitle)">
10 10 <img title="" alt="" src="~/../content/images/{{labExerciseTitle.TopicImagePath}}">
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercises-detail.html
... ... @@ -27,21 +27,32 @@
27 27 <div class="panel-body" style="padding:2px;overflow:scroll">
28 28 <div id="textblock" style="margin:20px;">
29 29 <div style="margin:14px;" ng-repeat="optionbox in LabExerciseModules.OptionBox" droppable="true">{{optionbox.QuizText}}</div>
  30 + <!--<ul>
  31 + <li ng-repeat="optionbox in LabExerciseModules.OptionBox" droppable="true" ng-bind-html="'{{optionbox.QuizText}}' | to_trusted"></li>
  32 + </ul>-->
30 33 </div>
31 34 <div align="center" class="dragger">
32   - <div style="position: relative;" id="imgdiv">
33   - <div id="imgblock">
34   - <img id="droppable" ng-src="content/images/LE/{{Imagepath}}" droppable="true" alt="" ng-click="onClick()" imageonload />
35   - </div>
36   -
37   - <div ng-repeat="optionbox in LabExerciseModules.OptionBox" droppable="true" class="droppable ui-droppable options" id="blockbox-{{optionbox.BoxName}}" ng-style="{'top':{{optionbox.topcoord}}, 'left':{{optionbox.leftcoord}},'position': 'absolute', 'width': '155px', 'height':'30px', 'border':'0px solid #333', 'background': '#E8E8E8' }">{{optionbox.Answervalue}}</div>
38   - <div draggable="true" ng-repeat="ans in DraggedList" droppable="true" class="droppable ui-droppable answerdroppable" id="blockans-{{ans.id}}" ng-style="{'top':{{ans.topcoord}}, 'left':{{ans.leftcoord}},'position': 'absolute', 'width': '158px', 'height':'30px', 'border':'0px solid #333', 'background': '#E8E8E8','font-size': '12px','border-color':'#FF0000','padding-top':'5px'}">{{ans.Value}}</div>
  35 + <div class="col-sm-2">
  36 + <div draggable="true" ng-repeat="option in LabExerciseModules.Options | filter:{'textalign':'left'}" ng-style="{'width': '150px', 'height':'40px','font-size':'8px;','valign':'middle','text-align':'center', 'vertical-align:middle','background-color': '#808080','margin':'5px !important','float':'{{option.textalign}}'} " style="margin-bottom: 5px !important; width: 180px;" class="thumbnail caption col-sm-2 col-lg-3 ui-draggable marginR5 " id="block-{{option.OptionNumber}}">{{option.OptionTitle}}</div>
39 37 </div>
  38 + <div class="col-sm-8">
  39 + <div style="position: relative;" id="imgdiv">
  40 + <div id="imgblock">
  41 + <img id="droppable" ng-src="content/images/LE/{{Imagepath}}" droppable="true" alt="" ng-click="onClick()" imageonload />
  42 + </div>
  43 +
  44 + <div ng-repeat="optionbox in LabExerciseModules.OptionBox" droppable="true" class="droppable ui-droppable options" id="blockbox-{{optionbox.BoxName}}" ng-style="{'top':{{optionbox.topcoord}}, 'left':{{optionbox.leftcoord}},'position': 'absolute', 'width': '155px', 'height':'30px', 'border':'0px solid #333', 'background': '#E8E8E8' }">{{optionbox.Answervalue}}</div>
  45 + <div draggable="true" ng-repeat="ans in DraggedList" droppable="true" class="droppable ui-droppable answerdroppable" id="blockans-{{ans.id}}" ng-style="{'top':{{ans.topcoord}}, 'left':{{ans.leftcoord}},'position': 'absolute', 'width': '158px', 'height':'30px', 'border':'0px solid #333', 'background': '#E8E8E8','font-size': '12px','border-color':'#FF0000','padding-top':'5px'}">{{ans.Value}}</div>
  46 + </div>
40 47  
41   - <div class="col-sm-10" style="margin-left:100px;margin-top:0px;" id="divoptions" droppable="true">
42   - <!--<div class="col-sm-3 col-lg-3 ui-draggable" >-->
43   - <div draggable="true" ng-repeat="option in LabExerciseModules.Options" ng-style="{'width': '150px', 'height':'40px','font-size':'8px;','valign':'middle','text-align':'center', 'vertical-align:middle','background-color': '#808080','margin':'5px !important'} " style="margin-bottom: 5px !important; width: 180px;" class="thumbnail caption col-sm-2 col-lg-3 ui-draggable marginR5 " id="block-{{option.OptionNumber}}">{{option.OptionTitle}}</div>
44   - <!--</div>-->
  48 + <div class="col-sm-12" style="margin-left:100px;margin-top:0px;" id="divoptions" droppable="true">
  49 + <!--<div class="col-sm-3 col-lg-3 ui-draggable" >-->
  50 + <div draggable="true" ng-repeat="option in LabExerciseModules.Options | filter:{'textalign':'bottom'}" ng-style="{'width': '150px', 'height':'40px','font-size':'8px;','valign':'middle','text-align':'center', 'vertical-align:middle','background-color': '#808080','margin':'5px !important','float':'{{option.textalign}}'} " style="margin-bottom: 5px !important; width: 180px;" class="thumbnail caption col-sm-2 col-lg-3 ui-draggable marginR5 " id="block-{{option.OptionNumber}}">{{option.OptionTitle}}</div>
  51 + <!--</div>-->
  52 + </div>
  53 + </div>
  54 + <div class="col-sm-2">
  55 + <div draggable="true" ng-repeat="option in LabExerciseModules.Options | filter:{'textalign':'right'}" ng-style="{'width': '150px', 'height':'40px','font-size':'8px;','valign':'middle','text-align':'center', 'vertical-align:middle','background-color': '#808080','margin':'5px !important','float':'{{option.textalign}}'} " style="margin-bottom: 5px !important; width: 180px;" class="thumbnail caption col-sm-2 col-lg-3 ui-draggable marginR5 " id="block-{{option.OptionNumber}}">{{option.OptionTitle}}</div>
45 56 </div>
46 57 </div>
47 58 </div>
... ...
400-SOURCECODE/AIAHTML5.Web/content/data/json/le/CS.json
... ... @@ -14,10 +14,10 @@
14 14 {"BoxName": "T3","topcoord":"194","leftcoord":"23","Answervalue":"","QuizText":""},{"BoxName": "T4","topcoord":"168","leftcoord":"960","Answervalue":"","QuizText":""},
15 15 {"BoxName": "T5","topcoord":"252","leftcoord":"23","Answervalue":"","QuizText":""},{"BoxName": "T6","topcoord":"210","leftcoord":"960","Answervalue":"","QuizText":""},
16 16 {"BoxName": "T7","topcoord":"250","leftcoord":"960","Answervalue":"","QuizText":""},{"BoxName": "T8","topcoord":"292","leftcoord":"960","Answervalue":"","QuizText":""}],
17   - "Options": [{"OptionNumber": "A","OptionTitle": "Right brachiocephalic vein"},{"OptionNumber": "B","OptionTitle": "Brachiocephalic artery"},
18   - {"OptionNumber": "C","OptionTitle": "Superior vena cava"},{"OptionNumber": "D","OptionTitle": "Pulmonary trunk"},{"OptionNumber": "E",
19   - "OptionTitle": "Aorta"},{"OptionNumber": "F","OptionTitle": "Right ventricle"},{"OptionNumber": "G","OptionTitle": "Left ventricle"},
20   - {"OptionNumber": "H","OptionTitle": "Right atrium"}],
  17 + "Options": [{"OptionNumber": "A","OptionTitle": "Right brachiocephalic vein","textalign":"bottom"},{"OptionNumber": "B","OptionTitle": "Brachiocephalic artery","textalign":"bottom"},
  18 + {"OptionNumber": "C","OptionTitle": "Superior vena cava","textalign":"bottom"},{"OptionNumber": "D","OptionTitle": "Pulmonary trunk","textalign":"bottom"},
  19 + {"OptionNumber": "E","OptionTitle": "Aorta","textalign":"bottom"},{"OptionNumber": "F","OptionTitle": "Right ventricle","textalign":"bottom"},
  20 + {"OptionNumber": "G","OptionTitle": "Left ventricle","textalign":"bottom"},{"OptionNumber": "H","OptionTitle": "Right atrium","textalign":"bottom"}],
21 21 "correctResponse": [{"OptionBox": "T1","Answer": "A"},{"OptionBox": "T2","Answer": "C"},{"OptionBox": "T3","Answer": "H"},{"OptionBox": "T4","Answer": "B"},
22 22 {"OptionBox": "T5","Answer": "E"},{"OptionBox": "T6","Answer": "D"},{"OptionBox": "T7","Answer": "F"},{"OptionBox": "T8","Answer": "G"}]
23 23 },
... ... @@ -30,10 +30,10 @@
30 30 {"BoxName": "T3","topcoord":"214","leftcoord":"23","Answervalue":"","QuizText":""},{"BoxName": "T4","topcoord":"256","leftcoord":"23","Answervalue":"","QuizText":""},
31 31 {"BoxName": "T5","topcoord":"412","leftcoord":"23","Answervalue":"","QuizText":""},{"BoxName": "T6","topcoord":"9","leftcoord":"612","Answervalue":"","QuizText":""},
32 32 {"BoxName": "T7","topcoord":"101","leftcoord":"612","Answervalue":"","QuizText":""},{"BoxName": "T8","topcoord":"190","leftcoord":"612","Answervalue":"","QuizText":""}],
33   - "Options": [{"OptionNumber": "A","OptionTitle": "Left common carotid artery"},{"OptionNumber": "B","OptionTitle": "Brachiocephalic trunk"},
34   - {"OptionNumber": "C","OptionTitle": "Left subclavian artery"},{"OptionNumber": "D","OptionTitle": "Left brachiocephalic vein"},
35   - {"OptionNumber": "E","OptionTitle": "Left pulmonary artery"},{"OptionNumber": "F","OptionTitle": "Inferior vena cava"},
36   - {"OptionNumber": "G","OptionTitle": "Right pulmonary artery"},{"OptionNumber": "H","OptionTitle": "Right pulmonary vein"}],
  33 + "Options": [{"OptionNumber": "A","OptionTitle": "Left common carotid artery","textalign":"left"},{"OptionNumber": "B","OptionTitle": "Brachiocephalic trunk","textalign":"left"},
  34 + {"OptionNumber": "C","OptionTitle": "Left subclavian artery","textalign":"left"},{"OptionNumber": "D","OptionTitle": "Left brachiocephalic vein","textalign":"left"},
  35 + {"OptionNumber": "E","OptionTitle": "Left pulmonary artery","textalign":"left"},{"OptionNumber": "F","OptionTitle": "Inferior vena cava","textalign":"right"},
  36 + {"OptionNumber": "G","OptionTitle": "Right pulmonary artery","textalign":"right"},{"OptionNumber": "H","OptionTitle": "Right pulmonary vein","textalign":"right"}],
37 37 "correctResponse": [{"OptionBox": "T1","Answer": "B"},{"OptionBox": "T2","Answer": "D"},{"OptionBox": "T3","Answer": "G"},{"OptionBox": "T4","Answer": "H"},
38 38 {"OptionBox": "T5","Answer": "F"},{"OptionBox": "T6","Answer": "C"},{"OptionBox": "T7","Answer": "A"},{"OptionBox": "T8","Answer": "E"}]
39 39 },
... ...
400-SOURCECODE/AIAHTML5.Web/content/data/json/le/RP.json
... ... @@ -88,6 +88,46 @@
88 88 {"OptionNumber": "G","OptionTitle": "Prostatic part of urethra"},{"OptionNumber": "H","OptionTitle": "Seminal vesicle"}],
89 89 "correctResponse": [{"OptionBox": "T1","Answer": "A"},{"OptionBox": "T2","Answer": "H"},{"OptionBox": "T3","Answer": "G"},{"OptionBox": "T4","Answer": "F"},
90 90 {"OptionBox": "T5","Answer": "C"},{"OptionBox": "T6","Answer": "B"},{"OptionBox": "T7","Answer": "E"},{"OptionBox": "T8","Answer": "D"}]
  91 + },{
  92 + "Number": "7",
  93 + "Title": "Drag the labels to the correct location on the image.",
  94 + "activityTitle": "Male Pelvic Organs (Med) II",
  95 + "ImagePath":"RP-07.JPG",
  96 + "OptionBox": [{"BoxName": "T1","topcoord":"159","leftcoord":"7","Answervalue":"","QuizText":""},{"BoxName": "T2","topcoord":"195","leftcoord":"7","Answervalue":"","QuizText":""},
  97 + {"BoxName": "T3","topcoord":"97","leftcoord":"820","Answervalue":"","QuizText":""},{"BoxName": "T4","topcoord":"158","leftcoord":"820","Answervalue":"","QuizText":""}],
  98 + "Options": [{"OptionNumber": "A","OptionTitle": "Urethra"},{"OptionNumber": "B","OptionTitle": "Prostate gland"},
  99 + {"OptionNumber": "C","OptionTitle": "Urinary Bladder"},{"OptionNumber": "D","OptionTitle": "Ejaculatory duct"}],
  100 + "correctResponse": [{"OptionBox": "T1","Answer": "B"},{"OptionBox": "T2","Answer": "A"},{"OptionBox": "T3","Answer": "C"},{"OptionBox": "T4","Answer": "D"}]
  101 + },{
  102 + "Number": "8",
  103 + "Title": "Complete the statements below.",
  104 + "activityTitle": "Male Reproductive II",
  105 + "ImagePath":"",
  106 + "OptionBox": [{"BoxName": "T1","topcoord":"-191","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is the surgical removal of the foreskin (prepuce) from the glans penis."},
  107 + {"BoxName": "T2","topcoord":"-156","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is a condition of undescended testes that can lead to sterility or cancer if not corrected."},
  108 + {"BoxName": "T3","topcoord":"-122","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is the inability to either achieve or maintain an erection."},
  109 + {"BoxName": "T4","topcoord":"-88","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is a low sperm count and is one of the main causes of male infertility."},
  110 + {"BoxName": "T5","topcoord":"-54","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is a sterilizing procedure for men where the vas deferens is severed and sutured."}],
  111 + "Options": [{"OptionNumber": "A","OptionTitle": "Circumcision"},{"OptionNumber": "B","OptionTitle": "Cryptorchidism"},
  112 + {"OptionNumber": "C","OptionTitle": "Impotence"},{"OptionNumber": "D","OptionTitle": "Oligospermia"},
  113 + {"OptionNumber": "E","OptionTitle": "Vasectomy"}],
  114 + "correctResponse": [{"OptionBox": "T1","Answer": "A"},{"OptionBox": "T2","Answer": "B"},{"OptionBox": "T3","Answer": "C"},{"OptionBox": "T4","Answer": "D"},{"OptionBox": "T5","Answer": "E"}]
  115 + },{
  116 + "Number": "9",
  117 + "Title": "Complete the statements below.",
  118 + "activityTitle": "Female Reproductive",
  119 + "ImagePath":"",
  120 + "OptionBox": [{"BoxName": "T1","topcoord":"-224","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is the monthly discharge of the endometrial lining of the uterus."},
  121 + {"BoxName": "T2","topcoord":"-191","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is a womanӳ first menstrual period."},
  122 + {"BoxName": "T3","topcoord":"-156","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is an uncomfortable and often painful menstrual period."},
  123 + {"BoxName": "T4","topcoord":"-122","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is the cessation of monthly menstrual periods once a woman is beyond her reproductive years."},
  124 + {"BoxName": "T5","topcoord":"-88","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is the surgical removal of the uterus."},
  125 + {"BoxName": "T6","topcoord":"-54","leftcoord":"-131","Answervalue":"","QuizText":"________________________ is a sterilizing procedure for women where the uterine tubes are severed and sutured."}],
  126 + "Options": [{"OptionNumber": "A","OptionTitle": "Menses"},{"OptionNumber": "B","OptionTitle": "Menarchy"},
  127 + {"OptionNumber": "C","OptionTitle": "Dysmenorrhea"},{"OptionNumber": "D","OptionTitle": "Menopause"},
  128 + {"OptionNumber": "E","OptionTitle": "Hysterectomy"},{"OptionNumber": "F","OptionTitle": "Tubal ligation"}],
  129 + "correctResponse": [{"OptionBox": "T1","Answer": "A"},{"OptionBox": "T2","Answer": "B"},{"OptionBox": "T3","Answer": "C"},{"OptionBox": "T4","Answer": "D"},
  130 + {"OptionBox": "T5","Answer": "E"},{"OptionBox": "T6","Answer": "F"}]
91 131 }]
92 132 }]
93 133 }
94 134 \ No newline at end of file
... ...