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.
This commit is contained in:
parent
e084183d1e
commit
66afd1aa39
|
@ -37,9 +37,16 @@ OC.Share={
|
||||||
*/
|
*/
|
||||||
updateIcons:function(itemType, fileList){
|
updateIcons:function(itemType, fileList){
|
||||||
var item;
|
var item;
|
||||||
fileList = fileList || OCA.Files.App.fileList;
|
var $fileList;
|
||||||
var $fileList = fileList.$fileList;
|
var currentDir;
|
||||||
var currentDir = fileList.getCurrentDirectory();
|
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){
|
for (item in OC.Share.statuses){
|
||||||
var image;
|
var image;
|
||||||
var data = OC.Share.statuses[item];
|
var data = OC.Share.statuses[item];
|
||||||
|
|
Loading…
Reference in New Issue