Skip to content

Commit

Permalink
Merge branch 'develop' into feature/getVariableCategoryName
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepsinn authored Sep 19, 2020
2 parents 6e4f719 + 3b54347 commit ab3689c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
20 changes: 11 additions & 9 deletions src/js/controllers/remindersInboxCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state",
}
autoRefresh();
});
$scope.$on('$ionicView.beforeLeave', function(){
qmLog.debug('RemindersInboxCtrl beforeLeave');
qm.notifications.post();
});
$scope.$on('$ionicView.afterLeave', function(){
qmLog.debug('RemindersInboxCtrl afterLeave');
$rootScope.hideHomeButton = false;
$rootScope.hideBackButton = false;
});
function readHelpCards(helpCard){
if(!qm.speech.getSpeechEnabled()){
return;
Expand All @@ -101,11 +110,7 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state",
}
}, 30 * 60 * 1000);
}
$scope.$on('$ionicView.afterLeave', function(){
qmLog.debug('RemindersInboxCtrl afterLeave', null);
$rootScope.hideHomeButton = false;
$rootScope.hideBackButton = false;
});

var setPageTitle = function(){
if(getVariableCategoryName() === 'Treatments'){
$scope.state.title = 'Overdue Meds';
Expand Down Expand Up @@ -278,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

1 comment on commit ab3689c

@mikepsinn
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View recording of ionic_variables_spec.js
Cypress Dashboard

ionic_variables-ionic

BUILD LOG

Please sign in to comment.