Merge pull request #24157 from owncloud/files-app-is-not-available-on-public-page
OCA.Files.App is not available on public page
This commit is contained in:
commit
a1da081c62
|
@ -147,7 +147,7 @@
|
||||||
/**
|
/**
|
||||||
* @type Backbone.Model
|
* @type Backbone.Model
|
||||||
*/
|
*/
|
||||||
_filesConfig: null,
|
_filesConfig: undefined,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sort attribute
|
* Sort attribute
|
||||||
|
@ -205,12 +205,15 @@
|
||||||
|
|
||||||
if (options.config) {
|
if (options.config) {
|
||||||
this._filesConfig = options.config;
|
this._filesConfig = options.config;
|
||||||
} else {
|
} else if (!_.isUndefined(OCA.Files) && !_.isUndefined(OCA.Files.App)) {
|
||||||
this._filesConfig = OCA.Files.App.getFilesConfig();
|
this._filesConfig = OCA.Files.App.getFilesConfig();
|
||||||
}
|
}
|
||||||
this._filesConfig.on('change:showhidden', function() {
|
|
||||||
self.setFiles(self.files);
|
if (!_.isUndefined(this._filesConfig)) {
|
||||||
});
|
this._filesConfig.on('change:showhidden', function() {
|
||||||
|
self.setFiles(self.files);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (options.dragOptions) {
|
if (options.dragOptions) {
|
||||||
this._dragOptions = options.dragOptions;
|
this._dragOptions = options.dragOptions;
|
||||||
|
@ -984,7 +987,7 @@
|
||||||
* @returns {array}
|
* @returns {array}
|
||||||
*/
|
*/
|
||||||
_filterHiddenFiles: function(files) {
|
_filterHiddenFiles: function(files) {
|
||||||
if (this._filesConfig.get('showhidden')) {
|
if (_.isUndefined(this._filesConfig) || this._filesConfig.get('showhidden')) {
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
return _.filter(files, function(file) {
|
return _.filter(files, function(file) {
|
||||||
|
|
Loading…
Reference in New Issue