re-added current-work updating

This commit is contained in:
Kenneth Jao 2017-04-25 03:34:59 -04:00
parent fc3f4319a0
commit af905f899d

View File

@ -1071,9 +1071,9 @@ updateWork = function(id, fields, type) {
return work._id !== id; return work._id !== id;
}); });
myWork.push(workObj); myWork.push(workObj);
/*if(!Session.equals("currentWork", null) && Session.get("currentWork")._id === id) { Notification beta, probably rework. if(!Session.equals("currentWork", null) && Session.get("currentWork")._id === id) { //Notification beta, probably rework.
Session.set("currentWork", workObj); Session.set("currentWork", workObj);
if($(".overlay").css("display") !== "none") { // If currently viewing work. /*if($(".overlay").css("display") !== "none") { // If currently viewing work.
var message = Object.keys(fields)[0].replace("dueDate", "due date"); var message = Object.keys(fields)[0].replace("dueDate", "due date");
if(!workChanger && message !== "comments" && message !== "done" && message !== "confirmations") sAlert.success("The " + message + " of this work was updated by someone else!", { if(!workChanger && message !== "comments" && message !== "done" && message !== "confirmations") sAlert.success("The " + message + " of this work was updated by someone else!", {
effect: 'stackslide', effect: 'stackslide',
@ -1081,8 +1081,8 @@ updateWork = function(id, fields, type) {
timeout: 1500 timeout: 1500
}); });
workChanger = false; workChanger = false;
} }*/
}*/ }
} }
Session.set("myWork", myWork); Session.set("myWork", myWork);