Skip to content

Commit

Permalink
Added placeholder text if image is not inserted
Browse files Browse the repository at this point in the history
  • Loading branch information
czxcjx committed Feb 7, 2015
1 parent 5964e2c commit 81f736c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ng-src="<[imageUrl]>"
class="oppia-image-click-img"
ng-click="onClickImage($event)"
ng-mousemove="onMousemoveImage($event)">
ng-mousemove="onMousemoveImage($event)" />
<div ng-if="highlightRegionsOnHover">
<div
ng-repeat="region in allRegions"
Expand Down
5 changes: 5 additions & 0 deletions extensions/interactions/ImageClickInput/ImageClickInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ oppia.directive('oppiaInteractiveImageClickInput', [
$scope.onClickImage = function(event) {
$scope.$parent.$parent.submitAnswer($scope.currentlyHoveredRegions, 'submit');
};
// TODO(czx): Maybe this can be put in an angular directive?
$('.oppia-image-click-img').error(function(){
$(this).parent().text('[Select an image to display]');
$(this).hide();
});
}]
};
}
Expand Down

0 comments on commit 81f736c

Please sign in to comment.