aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/detailsview.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/detailsview.js')
-rw-r--r--apps/files/js/detailsview.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js
index b01f9cea610..bad4be4ceef 100644
--- a/apps/files/js/detailsview.js
+++ b/apps/files/js/detailsview.js
@@ -132,6 +132,14 @@
closeLabel: t('files', 'Close')
};
+ this._tabViews = this._tabViews.sort(function(tabA, tabB) {
+ var orderA = tabA.order || 0;
+ var orderB = tabB.order || 0;
+ if (orderA === orderB) {
+ return OC.Util.naturalSortCompare(tabA.getLabel(), tabB.getLabel());
+ }
+ return orderA - orderB;
+ });
if (this._tabViews.length > 1) {
// only render headers if there is more than one available
templateVars.tabHeaders = _.map(this._tabViews, function(tabView, i) {