summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-28 16:34:00 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-30 10:06:30 +0200
commit66afd1aa3925f31f347edfc5dae7adf7603ba5c6 (patch)
tree995db59c4a2f574a355a1c077407be75393e94be /core/js/share.js
parente084183d1e9cd180ad1f29ba1d22c99ac643d166 (diff)
downloadnextcloud-server-66afd1aa3925f31f347edfc5dae7adf7603ba5c6.tar.gz
nextcloud-server-66afd1aa3925f31f347edfc5dae7adf7603ba5c6.zip
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.
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 894f0d488f4..90f6c7fdc7c 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];