Skip to content

Commit

Permalink
some more
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Jan 21, 2024
1 parent ec64f73 commit f511c41
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
26 changes: 0 additions & 26 deletions app/assets/javascripts/services/queriesSvc.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ angular.module('QuepidApp')
self.modified = queryWithRatings.updated_at;


// Threshold properties
self.threshold = queryWithRatings.threshold;
self.thresholdEnabled = queryWithRatings.threshold_enabled;

// Error
self.errorText = '';
Expand Down Expand Up @@ -631,29 +628,6 @@ angular.module('QuepidApp')
});
};

this.setThreshold = function(enabled, threshold) {
var that = this;
var url = 'api/cases/' + caseNo + '/queries/' + that.queryId + '/threshold';
var thresholdJson = {
query: {
threshold: threshold,
threshold_enbl: enabled
}
};

return $http.put(url, thresholdJson)
.then(function() {
that.threshold = threshold;
that.thresholdEnabled = enabled;
}, function(response) {
$log.debug('Failed to set threshold: ', response);
return response;
}).catch(function(response) {
$log.debug('Failed to set threshold');
return response;
});
};

this.reset = function() {
this.errorText = '';
resultsReturned = false;
Expand Down
16 changes: 0 additions & 16 deletions app/assets/templates/views/searchResults.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,13 @@ <h2 class="results-title">

<span class="error-warning glyphicon glyphicon-warning-sign"></span>

<span ng-show="overThreshold()" class="fa-stack fa-lg" title="Threshold of {{query.threshold}} not met.">
<i class="fa fa-circle fa-stack-2x"></i>
<strong class="fa-stack-1x text-danger">
{{query.threshold}}
</strong>
</span>

<span ng-show="query.isNotAllRated()" class="froggy pull-right fa-lg" style="margin-right: 20px;" title="Hop to it! There are unrated results!">
<i class="fas fa-frog fa-stack-2x" data-count="{{ query.currentScore.countMissingRatings }}"></i>
</span>




<span class="toggleSign glyphicon {{query.isToggled() | plusOrMinus}}" ng-hide="isSortingEnabled()" ng-click="query.toggle()"></span>
</div>



<!-- <span ng-click="removeQuery(query.queryId)" class="btn btn-default delete-query glyphicon glyphicon-remove"></span> -->

<div ng-if="query.isToggled()" class="sub-results container clearfix">
<div class="col-ratings query-rating">
<strong>Score All</strong>
Expand Down Expand Up @@ -90,8 +76,6 @@ <h2 class="results-title">

<div class="btn-group">
<query-options query="query"></query-options>
<button type="button" class="btn btn-default btn-sm" ng-controller="TakeThresholdCtrl" ng-click="snapshot.prompt()">Set Threshold
</button>
</div>

<div class="btn-group">
Expand Down

0 comments on commit f511c41

Please sign in to comment.