|
6 | 6 | /** Lesson Controller (includes menu stuff)
|
7 | 7 | * prepares and updates menu topic items for the view
|
8 | 8 | */
|
9 |
| -goat.controller('goatLesson', function($scope, $http, $modal, $log, $templateCache) { |
| 9 | +goat.controller('goatLesson', function($scope, $http, $modal, $log, $sce) { //$templateCache |
10 | 10 | $scope.cookies = [];
|
11 | 11 | $scope.params = [];
|
12 | 12 | //TODO: implement via separate promise and use config for menu (goat.data.loadMenuData())
|
@@ -128,22 +128,32 @@ goat.controller('goatLesson', function($scope, $http, $modal, $log, $templateCac
|
128 | 128 |
|
129 | 129 | $('.lessonHelp').hide();
|
130 | 130 | $('#lesson_hint_row').show();
|
131 |
| - goat.utils.scrollToHelp(); |
| 131 | + //goat.utils.scrollToHelp(); |
| 132 | + //TODO |
132 | 133 | $scope.curHint = $scope.hints[$scope.hintIndex].hint;
|
| 134 | + //$scope.curHint = $sce.trustAsHtml($scope.hints[$scope.hintIndex].hint); |
| 135 | + //TODO get html binding workin in the UI ... in the meantime ... |
| 136 | + $scope.renderCurHint(); |
133 | 137 | $scope.manageHintButtons();
|
134 | 138 | };
|
135 | 139 |
|
136 | 140 | $scope.viewNextHint = function() {
|
137 | 141 | $scope.hintIndex++;
|
138 | 142 | $scope.curHint = $scope.hints[$scope.hintIndex].hint;
|
| 143 | + $scope.renderCurHint(); |
139 | 144 | $scope.manageHintButtons();
|
140 | 145 | };
|
141 | 146 |
|
142 | 147 | $scope.viewPrevHint = function() {
|
143 | 148 | $scope.hintIndex--;
|
144 | 149 | $scope.curHint = $scope.hints[$scope.hintIndex].hint;
|
| 150 | + $scope.renderCurHint(); |
145 | 151 | $scope.manageHintButtons();
|
146 | 152 | };
|
| 153 | + |
| 154 | + $scope.renderCurHint = function() { |
| 155 | + $('#curHintContainer').html($scope.curHint); |
| 156 | + } |
147 | 157 |
|
148 | 158 | $scope.hideHints = function() {
|
149 | 159 |
|
|
0 commit comments