diff --git a/index.html b/index.html
index e0825f2..8bd2abc 100644
--- a/index.html
+++ b/index.html
@@ -9,6 +9,9 @@
+
@@ -270,6 +273,17 @@
return current_id++;
}
+ populate_task_scheduler = function(appointmentId, posX, posY){
+ var appointment = appointment_dict[appointmentId];
+ var domElement = document.getElementById("task_schdeuler_dialogue");
+ domElement.style.left = posX + "px";
+ domElement.style.top = posY + "px";
+ domElement.style.visibility = "visible";
+ var innerHTML = appointment.name;
+ innerHTML += "
";
+ domElement.innerHTML = innerHTML;
+ }
+
class Appointment {
constructor(name, start, end, type = 4) { // 1: blue, 2: dark blue, 3: green, 4: yellow
this.id = "appointment_" + generate_id();
@@ -282,7 +296,7 @@
appointment_dict[this.id] = this;
}
- clicked = function(){
+ clicked = function(event){
alert("I was clicked");
this.parent.remove_child(this.id)
this.parent.rebulid_html();
@@ -305,6 +319,9 @@
constructor(start, end, type = 0) {
super("Free", start, end, type);
}
+ clicked = function(event){
+ populate_task_scheduler(this.id, event.pageX, event.pageY)
+ }
}
@@ -400,7 +417,7 @@
]);
handleEvent = function(event, id) {
- appointment_dict[id].clicked();
+ appointment_dict[id].clicked(event);
}
schedule.rebulid_html();