summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/js/versionstabview.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-09-25 13:23:39 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-28 14:57:44 +0200
commita8fb0038e9d34ddd6f39747ac57fc2701fe550d3 (patch)
tree1b6597672269d32af0f35ff7592e7d6512b493ff /apps/files_versions/js/versionstabview.js
parentd68079f93210f8fe0b5327e686497db97fde6a3e (diff)
downloadnextcloud-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.js12
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();
}
});