Add input to hilight texts in responses
This commit is contained in:
parent
c351de26ea
commit
1176c52ae7
@ -287,6 +287,17 @@ angular.module("AtsebaytApp")
|
||||
|
||||
.controller("QuestionController", function($scope, Survey, SurveyQuest, SurveyQuest, AllResponses, CorrectionTemplate, $http, $routeParams) {
|
||||
$scope.notCorrected = true
|
||||
$scope.highlight = ''
|
||||
|
||||
$scope.chHilight = function () {
|
||||
var words = $scope.highlight.split(',').join('|')
|
||||
|
||||
$('.card-text').each(function (k, i) {
|
||||
var e = $(i)
|
||||
e.html(e.text().replace(new RegExp('(' + words + ')', 'g'), '<span class="bg-warning">$1</span>'))
|
||||
})
|
||||
}
|
||||
|
||||
$scope.survey = Survey.get({ surveyId: $routeParams.surveyId });
|
||||
$scope.survey.$promise.then(function(survey) {
|
||||
survey.start_availability = Date.parse(survey.start_availability)
|
||||
|
@ -1,8 +1,11 @@
|
||||
<div class="btn-group-toggle float-right" data-toggle="buttons">
|
||||
<div class="btn-group-toggle float-right ml-1" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="checkbox" ng-model="notCorrected"> Pas corrigés
|
||||
</label>
|
||||
</div>
|
||||
<div class="float-right ml-1">
|
||||
<input class="form-control" ng-model="highlight" placeholder="highlight1,highlight2,..." ng-change="chHilight()">
|
||||
</div>
|
||||
<h2>
|
||||
<span class="text-muted">{{ survey.title }}</span>
|
||||
<small>
|
||||
|
Reference in New Issue
Block a user