summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-10-07 05:01:02 -0700
committerMorris Jobke <morris.jobke@gmail.com>2013-10-07 05:01:02 -0700
commit193e815133a410eb81ef0fb71022171969479135 (patch)
treedf609320990c3cdd1ffec5a57059312cc60343ef /apps
parent30faaf92b9a427594a061420c590daf6dd372013 (diff)
parent6a4563f203d8decb07bee3a82e111d876255e516 (diff)
downloadnextcloud-server-193e815133a410eb81ef0fb71022171969479135.tar.gz
nextcloud-server-193e815133a410eb81ef0fb71022171969479135.zip
Merge pull request #5165 from owncloud/files-dropontobreadcrumbfix
Fix breadcrumb to reinit dnd after ajax nav #5064
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/files.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 899bc6469e5..53858d65c65 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -98,6 +98,8 @@ Files={
lastWidth: 0,
initBreadCrumbs: function () {
+ var $controls = $('#controls');
+
Files.lastWidth = 0;
Files.breadcrumbs = [];
@@ -118,7 +120,10 @@ Files={
});
// event handlers for breadcrumb items
- $('#controls .crumb a').on('click', onClickBreadcrumb);
+ $controls.find('.crumb a').on('click', onClickBreadcrumb);
+
+ // setup drag and drop
+ $controls.find('.crumb:not(.last)').droppable(crumbDropOptions);
},
resizeBreadcrumbs: function (width, firstRun) {
@@ -176,11 +181,8 @@ $(document).ready(function() {
$('#file_action_panel').attr('activeAction', false);
- $('div.crumb:not(.last)').droppable(crumbDropOptions);
- $('ul#apps>li:first-child').data('dir','');
- if($('div.crumb').length){
- $('ul#apps>li:first-child').droppable(crumbDropOptions);
- }
+ // allow dropping on the "files" app icon
+ $('ul#apps li:first-child').data('dir','').droppable(crumbDropOptions);
// Triggers invisible file input
$('#upload a').on('click', function() {