Skip to content

Commit 99a1f3a

Browse files
authored
Merge branch 'develop' into feature/setHideDefaultValueField
2 parents 40544d1 + 3b54347 commit 99a1f3a

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/js/controllers/remindersInboxCtrl.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state",
7575
}
7676
autoRefresh();
7777
});
78+
$scope.$on('$ionicView.beforeLeave', function(){
79+
qmLog.debug('RemindersInboxCtrl beforeLeave');
80+
qm.notifications.post();
81+
});
82+
$scope.$on('$ionicView.afterLeave', function(){
83+
qmLog.debug('RemindersInboxCtrl afterLeave');
84+
$rootScope.hideHomeButton = false;
85+
$rootScope.hideBackButton = false;
86+
});
7887
function readHelpCards(helpCard){
7988
if(!qm.speech.getSpeechEnabled()){
8089
return;
@@ -101,11 +110,7 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state",
101110
}
102111
}, 30 * 60 * 1000);
103112
}
104-
$scope.$on('$ionicView.afterLeave', function(){
105-
qmLog.debug('RemindersInboxCtrl afterLeave', null);
106-
$rootScope.hideHomeButton = false;
107-
$rootScope.hideBackButton = false;
108-
});
113+
109114
var setPageTitle = function(){
110115
if(getVariableCategoryName() === 'Treatments'){
111116
$scope.state.title = 'Overdue Meds';
@@ -278,11 +283,8 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state",
278283
refreshIfRunningOutOfNotifications();
279284
return n;
280285
};
281-
$scope.track = function(n, value, $ev, trackAll){ // Keep trackAll param because it's used in templates/items/notification-item.html
286+
$scope.track = function(n, value, $ev){ // Keep trackAll param because it's used in templates/items/notification-item.html
282287
if(isGhostClick($ev)){return false;}
283-
if(trackAll){
284-
return $scope.trackAll(n, value, $ev);
285-
}
286288
n.action = 'track';
287289
n.modifiedValue = value;
288290
var valueUnit = qm.stringHelper.formatValueUnitDisplayText(n.modifiedValue + ' ' + n.unitAbbreviatedName);

src/templates/items/notification-value-input-buttons.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<img id="{{'numericRatingOptions' + option.numericValue}}"
1212
ng-repeat="option in numericRatingOptions"
1313
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
14-
ng-click="track(trackingReminderNotification, option.numericValue, $event, trackAll)"
14+
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
1515
title="{{option.numericValue}}/5"
1616
ng-src="{{option.img}}">
1717
</div>
@@ -23,7 +23,7 @@
2323
<img id="{{'positiveRatingOptions' + option.numericValue}}"
2424
ng-repeat="option in positiveRatingOptions"
2525
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
26-
ng-click="track(trackingReminderNotification, option.numericValue, $event, trackAll)"
26+
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
2727
title="{{option.numericValue}}/5"
2828
ng-src="{{option.img}}">
2929
</div>
@@ -35,7 +35,7 @@
3535
<img id="{{'negativeRatingOptions' + option.numericValue}}"
3636
ng-repeat="option in negativeRatingOptions"
3737
on-hold="trackAllWithConfirmation(trackingReminderNotification, option.numericValue, $event)"
38-
ng-click="track(trackingReminderNotification, option.numericValue, $event, trackAll)"
38+
ng-click="track(trackingReminderNotification, option.numericValue, $event)"
3939
title="{{option.numericValue}}/5"
4040
ng-src="{{option.img}}">
4141
</div>
@@ -48,13 +48,13 @@
4848
<button class="button button-assertive"
4949
style="text-overflow: clip; font-size: 14px;"
5050
on-hold="trackAllWithConfirmation(trackingReminderNotification, 0, $event)"
51-
ng-click="track(trackingReminderNotification, 0, $event, trackAll)">
51+
ng-click="track(trackingReminderNotification, 0, $event)">
5252
<i class="ion-android-done"> &nbsp; NO &nbsp</i>
5353
</button>
5454
<button class="button button-balanced"
5555
style="text-overflow: clip; font-size: 14px;"
5656
on-hold="trackAllWithConfirmation(trackingReminderNotification, 1, $event)"
57-
ng-click="track(trackingReminderNotification, 1, $event, trackAll)">
57+
ng-click="track(trackingReminderNotification, 1, $event)">
5858
<i class="ion-android-done"> &nbsp; YES &nbsp</i>
5959
</button>
6060
</div>

0 commit comments

Comments
 (0)