summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-09-01 14:24:01 +0200
committerVincent Petry <pvince81@owncloud.com>2013-09-13 19:59:15 +0200
commit3cf0820d3507349fa2d518c24579d8605db7cd2e (patch)
tree048a971ff7b6b87d241cfa249384155eef2839ee /apps
parent364e7991a42c92affb9085082ff79f6b653de6dd (diff)
downloadnextcloud-server-3cf0820d3507349fa2d518c24579d8605db7cd2e.tar.gz
nextcloud-server-3cf0820d3507349fa2d518c24579d8605db7cd2e.zip
Changed breadcrumb event handling to not use delegate
Using delegate might break apps that embed themselves in the files container. When an app embeds itself and the user clicks a breadcrumb, it will simply reload the whole browser page.
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/files.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 1ea2f5fbcc2..7aef8ea1d11 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -131,10 +131,12 @@ Files={
Files.breadcrumbsWidth += $(breadcrumb).get(0).offsetWidth;
});
-
$.each($('#controls .actions>div'), function(index, action) {
Files.breadcrumbsWidth += $(action).get(0).offsetWidth;
});
+
+ // event handlers for breadcrumb items
+ $('#controls .crumb a').on('click', onClickBreadcrumb);
},
resizeBreadcrumbs: function (width, firstRun) {
@@ -349,9 +351,6 @@ $(document).ready(function() {
var width = $(this).width();
Files.resizeBreadcrumbs(width, true);
- // event handlers for breadcrumb items
- $('#controls').delegate('.crumb a', 'click', onClickBreadcrumb);
-
// display storage warnings
setTimeout ( "Files.displayStorageWarnings()", 100 );
OC.Notification.setDefault(Files.displayStorageWarnings);