Fix js error if droptarget doesn't exist

This commit is contained in:
Aleksander Machniak 2014-11-23 06:48:32 -05:00
parent f97e1b5309
commit bf39566fab
2 changed files with 4 additions and 1 deletions

View file

@ -819,6 +819,9 @@ kolab_files_drag_drop_init = function(container)
return;
}
if (!container.length)
return;
$(document.body).bind('dragover dragleave drop', function(e) {
if (!file_api.env.folder)
return;

View file

@ -44,7 +44,7 @@
</div>
</div>
<div id="filelistcontainer" class="uibox">
<div id="filelistcontainer" class="uibox droptarget">
<h2 id="aria-label-filelist" class="voice"><roundcube:label name="arialabelfilelist" /></h2>
<div id="filelistbox" class="boxlistcontent">
<roundcube:object name="filelist" id="filelist" class="records-table filelist sortheader fixedheader" optionsmenuIcon="true" aria-labelledby="aria-label-filelist" />