diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-09-25 13:23:39 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-28 14:57:44 +0200 |
commit | a8fb0038e9d34ddd6f39747ac57fc2701fe550d3 (patch) | |
tree | 1b6597672269d32af0f35ff7592e7d6512b493ff /apps/files_versions/js/versionstabview.js | |
parent | d68079f93210f8fe0b5327e686497db97fde6a3e (diff) | |
download | nextcloud-server-a8fb0038e9d34ddd6f39747ac57fc2701fe550d3.tar.gz nextcloud-server-a8fb0038e9d34ddd6f39747ac57fc2701fe550d3.zip |
Hide sidebar tab headers conditionally
Added canDisplay() in DetailsTabView that should return false if the tab
header of this tab must be hidden
Diffstat (limited to 'apps/files_versions/js/versionstabview.js')
-rw-r--r-- | apps/files_versions/js/versionstabview.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_versions/js/versionstabview.js b/apps/files_versions/js/versionstabview.js index 6dab8014229..55f24868196 100644 --- a/apps/files_versions/js/versionstabview.js +++ b/apps/files_versions/js/versionstabview.js @@ -189,6 +189,18 @@ this.$el.find('.has-tooltip').tooltip(); this.$versionsContainer = this.$el.find('ul.versions'); this.delegateEvents(); + }, + + /** + * Returns true for files, false for folders. + * + * @return {bool} true for files, false for folders + */ + canDisplay: function(fileInfo) { + if (!fileInfo) { + return false; + } + return !fileInfo.isDirectory(); } }); |