Allow options to be passed to `FileList.createFile`, so that `scrollTo` can be overridden.
Signed-off-by: Thomas Ebert <thomas.ebert@te-online.net>
This commit is contained in:
parent
7149ed74c1
commit
e47a7f0a95
|
@ -2743,7 +2743,7 @@
|
|||
*
|
||||
* @since 8.2
|
||||
*/
|
||||
createFile: function(name) {
|
||||
createFile: function(name, options) {
|
||||
var self = this;
|
||||
var deferred = $.Deferred();
|
||||
var promise = deferred.promise();
|
||||
|
@ -2767,7 +2767,8 @@
|
|||
)
|
||||
.done(function() {
|
||||
// TODO: error handling / conflicts
|
||||
self.addAndFetchFileInfo(targetPath, '', {scrollTo: true}).then(function(status, data) {
|
||||
options = _.extend({scrollTo: true}, options || {});
|
||||
self.addAndFetchFileInfo(targetPath, '', options).then(function(status, data) {
|
||||
deferred.resolve(status, data);
|
||||
}, function() {
|
||||
OC.Notification.show(t('files', 'Could not create file "{file}"',
|
||||
|
|
Loading…
Reference in New Issue