summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-23 11:31:52 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-23 11:31:52 +0200
commit4c62d71db7f1b8ff490011bcc5050e835b70e745 (patch)
treefe85a5d65d2b10fe9a01ca15d929613f18f9aa9f /apps
parent53a167eae911b8b595a5207c15ccf48a6301b982 (diff)
parenta7d84287ad150bc9b3008074829bb947f5cdd611 (diff)
downloadnextcloud-server-4c62d71db7f1b8ff490011bcc5050e835b70e745.tar.gz
nextcloud-server-4c62d71db7f1b8ff490011bcc5050e835b70e745.zip
Merge pull request #19277 from owncloud/files-plusbuttonfix
Only render the plus button when it makes sense
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 28bac23ecb0..4b1b38d783c 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -2537,8 +2537,9 @@
},
_renderNewButton: function() {
- // if an upload button (legacy) already exists, skip
- if ($('#controls .button.upload').length) {
+ // if an upload button (legacy) already exists or no actions container exist, skip
+ var $actionsContainer = this.$el.find('#controls .actions');
+ if (!$actionsContainer.length || this.$el.find('.button.upload').length) {
return;
}
if (!this._addButtonTemplate) {
@@ -2549,7 +2550,7 @@
iconUrl: OC.imagePath('core', 'actions/add')
}));
- $('#controls .actions').prepend($newButton);
+ $actionsContainer.prepend($newButton);
$newButton.tooltip({'placement': 'bottom'});
$newButton.click(_.bind(this._onClickNewButton, this));