dont load filelist previews if we know we dont have one
This commit is contained in:
parent
76b2cffb08
commit
276383ebf5
|
@ -1330,7 +1330,7 @@
|
|||
// display actions
|
||||
this.fileActions.display(filenameTd, !options.silent, this);
|
||||
|
||||
if (mime !== 'httpd/unix-directory') {
|
||||
if (mime !== 'httpd/unix-directory' && fileData.hasPreview !== false) {
|
||||
var iconDiv = filenameTd.find('.thumbnail');
|
||||
// lazy load / newly inserted td ?
|
||||
// the typeof check ensures that the default value of animate is true
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
baseUrl: this._baseUrl,
|
||||
xmlNamespaces: {
|
||||
'DAV:': 'd',
|
||||
'http://owncloud.org/ns': 'oc'
|
||||
'http://owncloud.org/ns': 'oc',
|
||||
'http://nextcloud.org/ns': 'nc'
|
||||
}
|
||||
};
|
||||
if (options.userName) {
|
||||
|
@ -61,6 +62,7 @@
|
|||
};
|
||||
|
||||
Client.NS_OWNCLOUD = 'http://owncloud.org/ns';
|
||||
Client.NS_NEXTCLOUD = 'http://nextcloud.org/ns';
|
||||
Client.NS_DAV = 'DAV:';
|
||||
Client._PROPFIND_PROPERTIES = [
|
||||
/**
|
||||
|
@ -95,7 +97,11 @@
|
|||
/**
|
||||
* File sizes
|
||||
*/
|
||||
[Client.NS_DAV, 'getcontentlength']
|
||||
[Client.NS_DAV, 'getcontentlength'],
|
||||
/**
|
||||
* Preview availability
|
||||
*/
|
||||
[Client.NS_NEXTCLOUD, 'has-preview']
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -274,6 +280,13 @@
|
|||
data.size = parseInt(sizeProp, 10);
|
||||
}
|
||||
|
||||
var hasPreviewProp = props['{' + Client.NS_NEXTCLOUD + '}has-preview'];
|
||||
if (!_.isUndefined(hasPreviewProp)) {
|
||||
data.hasPreview = hasPreviewProp === 'true';
|
||||
} else {
|
||||
data.hasPreview = true;
|
||||
}
|
||||
|
||||
var contentType = props['{' + Client.NS_DAV + '}getcontenttype'];
|
||||
if (!_.isUndefined(contentType)) {
|
||||
data.mimetype = contentType;
|
||||
|
|
|
@ -127,7 +127,12 @@
|
|||
*
|
||||
* @type string
|
||||
*/
|
||||
mountType: null
|
||||
mountType: null,
|
||||
|
||||
/**
|
||||
* @type boolean
|
||||
*/
|
||||
hasPreview: true
|
||||
};
|
||||
|
||||
if (!OC.Files) {
|
||||
|
|
Loading…
Reference in New Issue