dont load filelist previews if we know we dont have one
This commit is contained in:
parent
1fef5d3d06
commit
03c17ff614
|
@ -1335,7 +1335,7 @@
|
||||||
// display actions
|
// display actions
|
||||||
this.fileActions.display(filenameTd, !options.silent, this);
|
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');
|
var iconDiv = filenameTd.find('.thumbnail');
|
||||||
// lazy load / newly inserted td ?
|
// lazy load / newly inserted td ?
|
||||||
// the typeof check ensures that the default value of animate is true
|
// the typeof check ensures that the default value of animate is true
|
||||||
|
|
|
@ -47,7 +47,8 @@
|
||||||
baseUrl: this._baseUrl,
|
baseUrl: this._baseUrl,
|
||||||
xmlNamespaces: {
|
xmlNamespaces: {
|
||||||
'DAV:': 'd',
|
'DAV:': 'd',
|
||||||
'http://owncloud.org/ns': 'oc'
|
'http://owncloud.org/ns': 'oc',
|
||||||
|
'http://nextcloud.org/ns': 'nc'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (options.userName) {
|
if (options.userName) {
|
||||||
|
@ -61,6 +62,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
Client.NS_OWNCLOUD = 'http://owncloud.org/ns';
|
Client.NS_OWNCLOUD = 'http://owncloud.org/ns';
|
||||||
|
Client.NS_NEXTCLOUD = 'http://nextcloud.org/ns';
|
||||||
Client.NS_DAV = 'DAV:';
|
Client.NS_DAV = 'DAV:';
|
||||||
Client._PROPFIND_PROPERTIES = [
|
Client._PROPFIND_PROPERTIES = [
|
||||||
/**
|
/**
|
||||||
|
@ -95,7 +97,11 @@
|
||||||
/**
|
/**
|
||||||
* File sizes
|
* 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);
|
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'];
|
var contentType = props['{' + Client.NS_DAV + '}getcontenttype'];
|
||||||
if (!_.isUndefined(contentType)) {
|
if (!_.isUndefined(contentType)) {
|
||||||
data.mimetype = contentType;
|
data.mimetype = contentType;
|
||||||
|
|
|
@ -127,7 +127,12 @@
|
||||||
*
|
*
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
mountType: null
|
mountType: null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type boolean
|
||||||
|
*/
|
||||||
|
hasPreview: true
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!OC.Files) {
|
if (!OC.Files) {
|
||||||
|
|
Loading…
Reference in New Issue