aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/oc-dialogs.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/oc-dialogs.js')
-rw-r--r--core/js/oc-dialogs.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index ed09b4121a7..3583019ef08 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,7 @@ 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;
+ path = path || '';
$.when(this._getFilePickerTemplate()).then(function($tmpl) {
self.filepicker.loading = false;
@@ -234,7 +236,7 @@ var OCdialogs = {
title: title,
emptytext: emptyText,
newtext: newText
- }).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter);
+ }).data('path', path).data('multiselect', multiselect).data('mimetype', mimetypeFilter);
if (modal === undefined) {
modal = false;
@@ -355,7 +357,7 @@ var OCdialogs = {
self.filepicker.sortOrder = self.filepicker.sortOrder === 'asc' ? 'desc' : 'asc';
self._fillFilePicker(dir);
});
- self._fillFilePicker('');
+ self._fillFilePicker(path);
});
// build buttons