diff options
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 7b9811d50bb..44f035fed1a 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -722,9 +722,10 @@ * * @param fileData map of file attributes * @param options map of attributes: - * - "updateSummary": true to update the summary after adding (default), false otherwise - * - "silent": true to prevent firing events like "fileActionsReady" - * - "animate": true to animate preview loading (defaults to true here) + * @param options.updateSummary true to update the summary after adding (default), false otherwise + * @param options.silent true to prevent firing events like "fileActionsReady" + * @param options.animate true to animate preview loading (defaults to true here) + * @param options.scrollTo true to automatically scroll to the file's location * @return new tr element (not appended to the table) */ add: function(fileData, options) { @@ -773,6 +774,10 @@ }); } + if (options.scrollTo) { + this.scrollTo(fileData.name); + } + // defaults to true if not defined if (typeof(options.updateSummary) === 'undefined' || !!options.updateSummary) { this.fileSummary.add(fileData, true); |