Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Commit

Permalink
Feature: UpdateData Method for Organizer
Browse files Browse the repository at this point in the history
This is to make it easier for the user to update the Calendar Data

It is done by updating the Data variable, and then updating the organizer. In addition, updating the indicated events in case they were being shown.
  • Loading branch information
nizarmah committed Sep 2, 2019
1 parent 46c9aeb commit 2ef6cd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions calendarorganizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ Organizer.prototype.update = function () {
this.showEvents();
};

Organizer.prototype.updateData = function (data) {
this.data = data;

this.indicateEvents();
this.update();
};

Organizer.prototype.list = function (data) {
var container = document.createElement("UL");
for (var i = 0; i < data.length; i++) {
Expand Down
Loading

0 comments on commit 2ef6cd9

Please sign in to comment.