Skip to content

Commit

Permalink
Added button to show all events for month.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuhnsbuildfire committed Jun 19, 2017
1 parent 9ed15c1 commit c7431cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions widget/controllers/widget.home.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@
DataStore.get(TAG_NAMES.EVENTS_MANUAL_INFO).then(success, error);
};

WidgetHome.resetCalendar = function() {
$rootScope.chnagedMonth = $scope.dt.getFullYear() + "-" + moment($scope.dt).format("MM") + "-" + ("0" + $scope.dt.getDate()).slice(-2) + "T00:00:00" + WidgetHome.getUTCZone();
WidgetHome.getEvent();
};

/*
* Fetch user's data from datastore
*/
Expand Down
3 changes: 3 additions & 0 deletions widget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
</div>
</div>
</div>
<div style="text-align: center;margin-bottom: 3px;">
<button type="button" class="btn btn-success btn-sm" ng-click="WidgetHome.resetCalendar()">All Events</button>
</div>
<div class="event-list">
<div ng-if="WidgetHome.events">
<div infinite-scroll="WidgetHome.loadMore()" infinite-scroll-distance="1" data-infinite-container=".infinite-scroll-parent" infinite-scroll-disabled="WidgetHome.busy">
Expand Down

0 comments on commit c7431cc

Please sign in to comment.