summaryrefslogtreecommitdiffstats
path: root/apps/files/js/detailtabview.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/js/detailtabview.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/js/detailtabview.js')
-rw-r--r--apps/files/js/detailtabview.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/js/detailtabview.js b/apps/files/js/detailtabview.js
index d885e47b15e..0bd34a88188 100644
--- a/apps/files/js/detailtabview.js
+++ b/apps/files/js/detailtabview.js
@@ -95,6 +95,17 @@
*/
nextPage: function() {
// load the next page, if applicable
+ },
+
+ /**
+ * Returns whether the current tab is able to display
+ * the given file info, for example based on mime type.
+ *
+ * @param {OCA.Files.FileInfoModel} fileInfo file info model
+ * @return {bool} whether to display this tab
+ */
+ canDisplay: function(fileInfo) {
+ return true;
}
});
DetailTabView._TAB_COUNT = 0;