/** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2015 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ (function() { /** * @class OCA.Files.DetailTabView * @classdesc * * Base class for tab views to display file information. * */ var DetailTabView = OC.Backbone.View.extend({ tag: 'div', className: 'tab', /** * Tab label */ _label: null, _template: null, initialize: function(options) { options = options || {}; if (!this.id) { this.id = 'detailTabView' + DetailTabView._TAB_COUNT; DetailTabView._TAB_COUNT++; } if (options.order) { this.order = options.order || 0; } }, /** * Returns the extra CSS classes used by the tabs container when this * tab is the selected one. * * In general you should not extend this method, as tabs should not * modify the classes of its container; this is reserved as a last * resort for very specific cases in which there is no other way to get * the proper style or behaviour. * * @return {String} space-separated CSS classes */ getTabsContainerExtraClasses: function() { return ''; }, /** * Returns the tab label * * @return {String} label */ getLabel: function() { return 'Tab ' + this.id; }, /** * Returns the tab label * * @return {String}|{null} icon class */ getIcon: function() { return null }, /** * returns the jQuery object for HTML output * * @returns {jQuery} */ get$: function() { return this.$el; }, /** * Renders this details view * * @abstract */ render: function() { // to be implemented in subclass // FIXME: code is only for testing this.$el.html('