[Pkg-owncloud-commits] [owncloud] 165/199: Fix fileList fallback in OC.Share for outside files app

David Prévot taffit at moszumanska.debian.org
Sun Jun 1 18:53:22 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 66afd1aa3925f31f347edfc5dae7adf7603ba5c6
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed May 28 16:34:00 2014 +0200

    Fix fileList fallback in OC.Share for outside files app
    
    OC.Share can be used in non-files apps, so the fileList callback needs
    to support that as well.
---
 core/js/share.js | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/core/js/share.js b/core/js/share.js
index 894f0d4..90f6c7f 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -37,9 +37,16 @@ OC.Share={
 	 */
 	updateIcons:function(itemType, fileList){
 		var item;
-		fileList = fileList || OCA.Files.App.fileList;
-		var $fileList = fileList.$fileList;
-		var currentDir = fileList.getCurrentDirectory();
+		var $fileList;
+		var currentDir;
+		if (!fileList && OCA.Files) {
+			fileList = OCA.Files.App.fileList;
+		}
+		// fileList is usually only defined in the files app
+		if (fileList) {
+			$fileList = fileList.$fileList;
+			currentDir = fileList.getCurrentDirectory();
+		}
 		for (item in OC.Share.statuses){
 			var image;
 			var data = OC.Share.statuses[item];

-- 
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