RemoteLibrary.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Copyright (c) 2006-2020, JGraph Ltd
  2. /**
  3. */
  4. RemoteLibrary = function(ui, data, libObj)
  5. {
  6. RemoteFile.call(this, ui, data, libObj.title);
  7. this.libObj = libObj;
  8. };
  9. //Extends mxEventSource
  10. mxUtils.extend(RemoteLibrary, LocalFile);
  11. /**
  12. *
  13. */
  14. RemoteLibrary.prototype.getHash = function()
  15. {
  16. return 'R' + encodeURIComponent(JSON.stringify([this.libObj.id, this.libObj.title, this.libObj.downloadUrl])); //Using an array to get the same order in all platforms
  17. };
  18. /**
  19. *
  20. */
  21. RemoteLibrary.prototype.isEditable = function()
  22. {
  23. return false;
  24. };
  25. /**
  26. *
  27. */
  28. RemoteLibrary.prototype.isRenamable = function()
  29. {
  30. return false;
  31. };
  32. /**
  33. *
  34. */
  35. RemoteLibrary.prototype.isAutosave = function()
  36. {
  37. return false;
  38. };
  39. /**
  40. *
  41. */
  42. RemoteLibrary.prototype.save = function(revision, success, error)
  43. {
  44. // Do nothing
  45. };
  46. /**
  47. *
  48. */
  49. RemoteLibrary.prototype.saveAs = function(title, success, error)
  50. {
  51. // Do nothing
  52. };
  53. /**
  54. *
  55. */
  56. RemoteLibrary.prototype.updateFileData = function()
  57. {
  58. // Do nothing
  59. };
  60. /**
  61. */
  62. RemoteLibrary.prototype.open = function()
  63. {
  64. // Do nothing - this should never be called
  65. };