Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-10 10:23:24 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-10 10:23:24 +0300
commitf40e56f0e645cfb36ed39decdba7d4a215ed986c (patch)
treeb743da4edb2b48745260a0dc8c798e61979c2206 /apps/files/js/breadcrumb.js
parentebf131be84cfbab2ce024e7beabcd2820bd7b4bd (diff)
Fix menu declaration and width calculation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r--apps/files/js/breadcrumb.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js
index 44dccf95b7c..35aeb8d357d 100644
--- a/apps/files/js/breadcrumb.js
+++ b/apps/files/js/breadcrumb.js
@@ -114,8 +114,8 @@
* Renders the breadcrumb elements
*/
render: function() {
- // Hide menu on render
- OC.hideMenus();
+ // Menu is destroyed on every change, we need to init it
+ OC.unregisterMenu($('.crumbmenu'), $('.crumbmenu > .popovermenu'));
var parts = this._makeCrumbs(this.dir || '/');
var $crumb;
@@ -193,8 +193,10 @@
greedy: true
});
}
+
// Menu is destroyed on every change, we need to init it
OC.registerMenu($('.crumbmenu'), $('.crumbmenu > .popovermenu'));
+
this._resize();
},
@@ -329,7 +331,7 @@
// Used for testing since this.$el.parent fails
if (!this.availableWidth) {
- this.usedWidth = this.$el.parent().width() - this.$el.next('.actions').width();
+ this.usedWidth = this.$el.parent().width() - (this.$el.parent().find('.button').length + 1) * 44;
} else {
this.usedWidth = this.availableWidth;
}
@@ -337,7 +339,7 @@
// If container is smaller than content
// AND if there are crumbs left to hide
while (this.getTotalWidth() > this.usedWidth
- && this.$el.find(this.crumbSelector).length > 0) {
+ && this.$el.find(this.crumbSelector).length > 0) {
this._hideCrumb();
}
// If container is bigger than content + element to be shown