detailfileinfoview.js 924 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * SPDX-FileCopyrightText: 2015 ownCloud, Inc.
  3. * SPDX-License-Identifier: AGPL-3.0-or-later
  4. */
  5. (function() {
  6. /**
  7. * @class OCA.Files.DetailFileInfoView
  8. * @classdesc
  9. *
  10. * Displays a block of details about the file info.
  11. *
  12. */
  13. var DetailFileInfoView = OC.Backbone.View.extend({
  14. tagName: 'div',
  15. className: 'detailFileInfoView',
  16. _template: null,
  17. /**
  18. * returns the jQuery object for HTML output
  19. *
  20. * @returns {jQuery}
  21. */
  22. get$: function() {
  23. return this.$el;
  24. },
  25. /**
  26. * Sets the file info to be displayed in the view
  27. *
  28. * @param {OCA.Files.FileInfo} fileInfo file info to set
  29. */
  30. setFileInfo: function(fileInfo) {
  31. this.model = fileInfo;
  32. this.render();
  33. },
  34. /**
  35. * Returns the file info.
  36. *
  37. * @return {OCA.Files.FileInfo} file info
  38. */
  39. getFileInfo: function() {
  40. return this.model;
  41. }
  42. });
  43. OCA.Files.DetailFileInfoView = DetailFileInfoView;
  44. })();