[Pkg-owncloud-commits] [owncloud] 01/42: Fix to not destroy draggable when no draggable was set

David Prévot taffit at moszumanska.debian.org
Wed Jan 22 21:21:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit d44b98d3dd1c8147228b23101aa89b3f0171ec81
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon Dec 9 16:03:23 2013 +0100

    Fix to not destroy draggable when no draggable was set
    
    When a dir has no delete permission, the draggable isn't initialized on
    files. This fix makes sure we don't try to destroy a draggable when it
    wasn't inited in the first place.
    
    Fixes #6254
    
    Backport of 8135828 to stable6
---
 apps/files/js/filelist.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index c02ab70..30aea9c 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -300,7 +300,10 @@ var FileList={
 	},
 	remove:function(name){
 		var fileEl = FileList.findFileEl(name);
-		fileEl.find('td.filename').draggable('destroy');
+		if (fileEl.data('permissions') & OC.PERMISSION_DELETE) {
+			// file is only draggable when delete permissions are set
+			fileEl.find('td.filename').draggable('destroy');
+		}
 		fileEl.remove();
 		FileList.updateFileSummary();
 		if ( ! $('tr[data-file]').exists() ) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list