diff options
author | Florian Schunk <florian.schunk@rwth-aachen.de> | 2018-11-09 12:23:51 +0100 |
---|---|---|
committer | Florian Schunk <florian.schunk@rwth-aachen.de> | 2019-01-16 22:54:16 +0100 |
commit | 528964e0b73fc3ddbf14737a342823d7b6fd9816 (patch) | |
tree | 114f7a4fdadb80083c370d659701f8960515a2bf /core | |
parent | 4e76b56497ac31e712ea626b9b0fd95aa4e79ca4 (diff) | |
download | nextcloud-server-528964e0b73fc3ddbf14737a342823d7b6fd9816.tar.gz nextcloud-server-528964e0b73fc3ddbf14737a342823d7b6fd9816.zip |
copy Dialog starts in current directory
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/oc-dialogs.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index ed09b4121a7..9646eb0cc41 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -189,8 +189,9 @@ var OCdialogs = { * @param mimetypeFilter mimetype to filter by - directories will always be included * @param modal make the dialog modal * @param type Type of file picker : Choose, copy, move, copy and move + * @param path path to the folder that the the file can be picket from */ - filepicker:function(title, callback, multiselect, mimetypeFilter, modal, type) { + filepicker:function(title, callback, multiselect, mimetypeFilter, modal, type, path) { var self = this; this.filepicker.sortField = 'name'; @@ -214,6 +215,9 @@ var OCdialogs = { this.filepicker.filesClient = (OCA.Sharing && OCA.Sharing.PublicApp && OCA.Sharing.PublicApp.fileList)? OCA.Sharing.PublicApp.fileList.filesClient: OC.Files.getClient(); this.filelist = null; + if (path == undefined) { + path = ''; + } $.when(this._getFilePickerTemplate()).then(function($tmpl) { self.filepicker.loading = false; @@ -232,9 +236,14 @@ var OCdialogs = { self.$filePicker = $tmpl.octemplate({ dialog_name: dialogName, title: title, +<<<<<<< HEAD emptytext: emptyText, newtext: newText }).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter); +======= + emptytext: emptyText + }).data('path', path).data('multiselect', multiselect).data('mimetype', mimetypeFilter); +>>>>>>> copy Dialog starts in current directory if (modal === undefined) { modal = false; @@ -355,7 +364,7 @@ var OCdialogs = { self.filepicker.sortOrder = self.filepicker.sortOrder === 'asc' ? 'desc' : 'asc'; self._fillFilePicker(dir); }); - self._fillFilePicker(''); + self._fillFilePicker(path); }); // build buttons |