DrawioComment.js 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. DrawioComment = function(file, id, content, modifiedDate, createdDate, isResolved, user)
  2. {
  3. // The file having this comment
  4. this.file = file;
  5. // Unique ID
  6. this.id = id;
  7. // Comment contents
  8. this.content = content;
  9. // Comment modified date
  10. this.modifiedDate = modifiedDate;
  11. // Comment created date
  12. this.createdDate = createdDate;
  13. // Is comment resolved
  14. this.isResolved = isResolved;
  15. // User created this comment
  16. // Type: DrawioUser
  17. this.user = user;
  18. this.replies = [];
  19. };
  20. DrawioComment.prototype.addReplyDirect = function(reply)
  21. {
  22. if (reply != null)
  23. this.replies.push(reply);
  24. };
  25. DrawioComment.prototype.addReply = function(reply, success, error, doResolve, doReopen)
  26. {
  27. //Placeholder
  28. success();
  29. };
  30. DrawioComment.prototype.editComment = function(newContent, success, error)
  31. {
  32. //Placeholder
  33. success();
  34. };
  35. DrawioComment.prototype.deleteComment = function(success, error)
  36. {
  37. //Placeholder
  38. success();
  39. };