detailfileinfoview.js 981 B

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