calendar work highlight shows class
This commit is contained in:
parent
2076a9f562
commit
970eb983ee
@ -373,6 +373,7 @@ Template.main.helpers({
|
|||||||
sendData("editWork");
|
sendData("editWork");
|
||||||
},
|
},
|
||||||
eventClick: function(event, jsEvent, view) { // On-click for work.
|
eventClick: function(event, jsEvent, view) { // On-click for work.
|
||||||
|
console.log(event);
|
||||||
Session.set("newWork", false);
|
Session.set("newWork", false);
|
||||||
Session.set("currentWork", work.findOne({_id: event.id}));
|
Session.set("currentWork", work.findOne({_id: event.id}));
|
||||||
$(".overlay").velocity("fadeIn", 150);
|
$(".overlay").velocity("fadeIn", 150);
|
||||||
@ -383,9 +384,25 @@ Template.main.helpers({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
eventMouseover: function(event, jsEvent, view) {
|
eventMouseover: function(event, jsEvent, view) {
|
||||||
|
console.log(event);
|
||||||
|
var classid = work.findOne({_id: event.id})["class"];
|
||||||
|
var className = (classid === Meteor.userId()) ? "Personal" : classes.findOne({_id: classid}).name;
|
||||||
|
var span = this.children[0].children[0];
|
||||||
|
$(span).velocity("stop");
|
||||||
|
$(span).velocity({opacity:0}, 50, function() {
|
||||||
|
span.childNodes[0].nodeValue = className;
|
||||||
|
$(span).velocity({opacity:1}, 50);
|
||||||
|
});
|
||||||
this.style.boxShadow = "inset 0 0 0 99999px rgba(255,255,255,0.2)";
|
this.style.boxShadow = "inset 0 0 0 99999px rgba(255,255,255,0.2)";
|
||||||
},
|
},
|
||||||
eventMouseout: function(event, jsEvent, view) {
|
eventMouseout: function(event, jsEvent, view) {
|
||||||
|
var workName = work.findOne({_id: event.id}).name;
|
||||||
|
var span = this.children[0].children[0];
|
||||||
|
$(span).velocity("stop");
|
||||||
|
$(span).velocity({opacity:0}, 50, function() {
|
||||||
|
span.childNodes[0].nodeValue = workName;
|
||||||
|
$(span).velocity({opacity:1}, 50);
|
||||||
|
});
|
||||||
this.style.boxShadow = "";
|
this.style.boxShadow = "";
|
||||||
},
|
},
|
||||||
dayClick: function(date, jsEvent, view) { // On-click for each day.
|
dayClick: function(date, jsEvent, view) { // On-click for each day.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user