2015-07-15 13:06:13 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2015
|
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3
|
|
|
|
* or later.
|
|
|
|
*
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
/**
|
|
|
|
* @class OCA.Files.DetailFileInfoView
|
|
|
|
* @classdesc
|
|
|
|
*
|
|
|
|
* Displays a block of details about the file info.
|
|
|
|
*
|
|
|
|
*/
|
2015-08-12 18:30:20 +03:00
|
|
|
var DetailFileInfoView = OC.Backbone.View.extend({
|
|
|
|
tagName: 'div',
|
|
|
|
className: 'detailFileInfoView',
|
2015-07-15 13:06:13 +03:00
|
|
|
|
|
|
|
_template: null,
|
|
|
|
|
2015-07-20 15:42:10 +03:00
|
|
|
/**
|
|
|
|
* returns the jQuery object for HTML output
|
|
|
|
*
|
|
|
|
* @returns {jQuery}
|
|
|
|
*/
|
|
|
|
get$: function() {
|
|
|
|
return this.$el;
|
|
|
|
},
|
|
|
|
|
2015-07-15 13:06:13 +03:00
|
|
|
/**
|
|
|
|
* Sets the file info to be displayed in the view
|
|
|
|
*
|
|
|
|
* @param {OCA.Files.FileInfo} fileInfo file info to set
|
|
|
|
*/
|
|
|
|
setFileInfo: function(fileInfo) {
|
2015-08-12 18:30:20 +03:00
|
|
|
this.model = fileInfo;
|
2015-07-15 13:06:13 +03:00
|
|
|
this.render();
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the file info.
|
|
|
|
*
|
|
|
|
* @return {OCA.Files.FileInfo} file info
|
|
|
|
*/
|
|
|
|
getFileInfo: function() {
|
2015-08-12 18:30:20 +03:00
|
|
|
return this.model;
|
2015-07-15 13:06:13 +03:00
|
|
|
}
|
2015-08-12 18:30:20 +03:00
|
|
|
});
|
2015-07-15 13:06:13 +03:00
|
|
|
|
|
|
|
OCA.Files.DetailFileInfoView = DetailFileInfoView;
|
|
|
|
})();
|
|
|
|
|