Skip to content

Commit

Permalink
Merge pull request #4047 from QuantiModo/feature/trackAll
Browse files Browse the repository at this point in the history
Removed polymorphic trackAll usage
  • Loading branch information
mikepsinn authored Sep 19, 2020
2 parents 6bd3f2a + 00d54f8 commit 3b54347
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/js/controllers/remindersInboxCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,8 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state",
refreshIfRunningOutOfNotifications();
return n;
};
$scope.track = function(n, value, $ev, trackAll){ // Keep trackAll param because it's used in templates/items/notification-item.html
$scope.track = function(n, value, $ev){ // Keep trackAll param because it's used in templates/items/notification-item.html
if(isGhostClick($ev)){return false;}
if(trackAll){
return $scope.trackAll(n, value, $ev);
}
n.action = 'track';
n.modifiedValue = value;
var valueUnit = qm.stringHelper.formatValueUnitDisplayText(n.modifiedValue + ' ' + n.unitAbbreviatedName);
Expand Down
10 changes: 5 additions & 5 deletions src/templates/items/notification-value-input-buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<img id="{{'numericRatingOptions' + option.numericValue}}"
ng-repeat="option in numericRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event, trackAll)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
title="{{option.numericValue}}/5"
ng-src="{{option.img}}">
</div>
Expand All @@ -23,7 +23,7 @@
<img id="{{'positiveRatingOptions' + option.numericValue}}"
ng-repeat="option in positiveRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event, trackAll)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
title="{{option.numericValue}}/5"
ng-src="{{option.img}}">
</div>
Expand All @@ -35,7 +35,7 @@
<img id="{{'negativeRatingOptions' + option.numericValue}}"
ng-repeat="option in negativeRatingOptions"
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
ng-click="track(trackingReminderNotification, option.numericValue, $event, trackAll)"
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
title="{{option.numericValue}}/5"
ng-src="{{option.img}}">
</div>
Expand All @@ -48,13 +48,13 @@
<button class="button button-assertive"
style="text-overflow: clip; font-size: 14px;"
on-hold="trackAllWithConfirmation(trackingReminderNotification, 0, $event)"
ng-click="track(trackingReminderNotification, 0, $event, trackAll)">
ng-click="track(trackingReminderNotification, 0, $event)">
<i class="ion-android-done"> &nbsp; NO &nbsp</i>
</button>
<button class="button button-balanced"
style="text-overflow: clip; font-size: 14px;"
on-hold="trackAllWithConfirmation(trackingReminderNotification, 1, $event)"
ng-click="track(trackingReminderNotification, 1, $event, trackAll)">
ng-click="track(trackingReminderNotification, 1, $event)">
<i class="ion-android-done"> &nbsp; YES &nbsp</i>
</button>
</div>
Expand Down

0 comments on commit 3b54347

Please sign in to comment.