Skip to content

Commit

Permalink
Merge pull request #88 from BuildFire/replace-native-alert-with-bf
Browse files Browse the repository at this point in the history
Replace native alert with bf
  • Loading branch information
charkhaw authored May 9, 2023
2 parents 3de6f15 + f914e97 commit bb294f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions widget/controllers/widget.event.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@
eventEndDate = new Date(event.data.startDate + 3600000); //add hour to start date to derive end date
}
if (WidgetEvent.getAddedEventToLocalStorage(event.id) != -1) {
alert("Event already added in calendar");
buildfire.dialog.alert({
title: ' ',
message: "Event already added in calendar",
});
}
console.log("inCal3:", eventEndDate, event);
if (buildfire.device && buildfire.device.calendar && WidgetEvent.getAddedEventToLocalStorage(event.id) == -1) {
Expand Down Expand Up @@ -225,7 +228,10 @@
else {
console.log('worked ' + JSON.stringify(result));
WidgetEvent.setAddedEventToLocalStorage(event.id);
alert("Event added to calendar");
buildfire.dialog.alert({
title: ' ',
message: "Event added to calendar",
});
$scope.$digest();
}
}
Expand Down
10 changes: 8 additions & 2 deletions widget/controllers/widget.home.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@
eventEndDate = eventStartDate;
}
if (WidgetHome.getAddedEventToLocalStorage(event.id) != -1) {
alert("Event already added in calendar");
buildfire.dialog.alert({
title: ' ',
message: "Event already added in calendar",
});
}
console.log("inCal3:", eventEndDate, event, eventStartDate);
if (buildfire.device && buildfire.device.calendar && WidgetHome.getAddedEventToLocalStorage(event.id) == -1) {
Expand Down Expand Up @@ -505,7 +508,10 @@
WidgetHome.swiped[i] = false;
console.log('worked ' + JSON.stringify(result));
WidgetHome.setAddedEventToLocalStorage(event.id);
alert("Event added to calendar");
buildfire.dialog.alert({
title: ' ',
message: "Event added to calendar",
});
$scope.$digest();
}
}
Expand Down

0 comments on commit bb294f2

Please sign in to comment.