diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-10-08 10:28:29 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-10-08 10:28:29 +0200 |
commit | 4dba91838ff24202fa7e184469074b61a4872d1e (patch) | |
tree | 0f40e534fc66ec29b07fcea289849cfe1faa0fd9 /apps/files/js/files.js | |
parent | b934668b9e260866a465d36fef565aedf8f40339 (diff) | |
download | nextcloud-server-4dba91838ff24202fa7e184469074b61a4872d1e.tar.gz nextcloud-server-4dba91838ff24202fa7e184469074b61a4872d1e.zip |
add ID to upload form and check if ID exist to avoid loading invalid javascript code for read-only views.
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r-- | apps/files/js/files.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index c7f4c4ce080..b36e46813dc 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -199,7 +199,8 @@ $(document).ready(function() { $(document).bind('drop dragover', function (e) { e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone }); - + + if ( document.getElementById("data-upload-form") ) { $(function() { $('.file_upload_start').fileupload({ dropZone: $('#content'), // restrict dropZone to content div @@ -413,7 +414,7 @@ $(document).ready(function() { } }) }); - + } $.assocArraySize = function(obj) { // http://stackoverflow.com/a/6700/11236 var size = 0, key; |