Skip to content

Commit

Permalink
remove "one click button"
Browse files Browse the repository at this point in the history
This has been replaced by the new checkmark icon in MultilabelButtonGroup.
  • Loading branch information
JGreenlee committed Jun 16, 2023
1 parent 02e7a44 commit d71eb5f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 96 deletions.
1 change: 0 additions & 1 deletion www/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import './js/intro.js';
import './js/main.js';
import './js/survey/survey.js';
import './js/survey/input-matcher.js';
import './js/survey/one-click-button.js';
import './js/survey/multilabel/infinite_scroll_filters.js';
import './js/survey/multilabel/trip-confirm-services.js';
import './js/survey/multilabel/multi-label-ui.js';
Expand Down
48 changes: 0 additions & 48 deletions www/js/survey/enketo/enketo-trip-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,54 +33,6 @@ angular.module('emission.survey.enketo.trip.button',
EnketoTripButtonService) {
console.log("Invoked enketo directive controller for labels "+EnketoTripButtonService.SINGLE_KEY);

/**
* BEGIN: Required external interface for all label directives
* These methods will be invoked by the verifycheck directive
* For more details on cooperating directives in this situation, please see:
* e-mission/e-mission-docs#674 (comment)
* to
* e-mission/e-mission-docs#674 (comment)
*
* Input: none
* Side effect: verifies the trip (partially if needed) and updates the trip
* verifiability status.
*/

/**
* verifyTrip turns all of a given trip's yellow labels green
*/
$scope.verifyTrip = function() {
console.log("About to verify trip "+$scope.timelineEntry.start_ts
+" -> "+$scope.timelineEntry.end_ts+" with current visibility"
+ $scope.timelineEntry.verifiability);
// Return early since we don't want to support trip verification yet
return;
if ($scope.timelineEntry.verifiability != "can-verify") {
ClientStats.addReading(ClientStats.getStatKeys().VERIFY_TRIP,
{"verifiable": false, "currView": $scope.currentViewState});
return;
}
ClientStats.addReading(ClientStats.getStatKeys().VERIFY_TRIP,
{"verifiable": true,
"currView": $scope.currentViewState,
"userInput": angular.toJson($scope.timelineEntry.userInput),
"finalInference": angular.toJson($scope.timelineEntry.finalInference)});

$scope.draftInput = {
"start_ts": $scope.timelineEntry.start_ts,
"end_ts": $scope.timelineEntry.end_ts
};
$scope.editingTrip = $scope.timelineEntry;

const inferred = $scope.timelineEntry.finalInference[EnketoTripButtonService.SINGLE_KEY];
// TODO: figure out what to do with "other". For now, do not verify.
if (inferred && !$scope.timelineEntry.userInput[EnketoTripButtonService.SINGLE_KEY] && inferred != "other") $scope.store(inputType, inferred, false);
}

/*
* END: Required external interface for all label directives
*/

if ($scope.recomputedelay == "") {
let THIRTY_SECS = 30 * 1000;
$scope.recomputedelay = THIRTY_SECS;
Expand Down
41 changes: 0 additions & 41 deletions www/js/survey/one-click-button.js

This file was deleted.

1 change: 0 additions & 1 deletion www/js/survey/survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import angular from 'angular';
import MultilabelButtonGroup from './multilabel/MultiLabelButtonGroup';

angular.module('emission.survey', [
"emission.survey.verifycheck",
"emission.survey.external.launch",
"emission.survey.multilabel.buttons",
"emission.survey.multilabel.infscrollfilters",
Expand Down
2 changes: 0 additions & 2 deletions www/templates/diary/infinite_scroll_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
-->
<linkedsurvey element-tag="{{surveyOpt.elementTag}}" id="infscroll-detail-labels"
recomputedelay=2 class="col-90" timeline-entry="trip"></linkedsurvey>
<verifycheck linkedtag="{{surveyOpt.elementTag}}" linkedid="infscroll-detail-labels"
class="col-10 diarycheckmark-container center-vert center-horiz" style="padding-left: 10px"></verifycheck>
</div>
<div style="height: 20px;"></div>
<div ng-if="trip.sections.length > 1" id="sectionList" class="col">
Expand Down
3 changes: 0 additions & 3 deletions www/templates/survey/one-click-button.html

This file was deleted.

0 comments on commit d71eb5f

Please sign in to comment.