@@ -189,8 +189,9 @@ var OCdialogs = {
189189 * @param mimetypeFilter mimetype to filter by - directories will always be included
190190 * @param modal make the dialog modal
191191 * @param type Type of file picker : Choose, copy, move, copy and move
192+ * @param path path to the folder that the the file can be picket from
192193 */
193- filepicker :function ( title , callback , multiselect , mimetypeFilter , modal , type ) {
194+ filepicker :function ( title , callback , multiselect , mimetypeFilter , modal , type , path ) {
194195 var self = this ;
195196
196197 this . filepicker . sortField = 'name' ;
@@ -214,6 +215,7 @@ var OCdialogs = {
214215 this . filepicker . filesClient = ( OCA . Sharing && OCA . Sharing . PublicApp && OCA . Sharing . PublicApp . fileList ) ? OCA . Sharing . PublicApp . fileList . filesClient : OC . Files . getClient ( ) ;
215216
216217 this . filelist = null ;
218+ path = path || '' ;
217219
218220 $ . when ( this . _getFilePickerTemplate ( ) ) . then ( function ( $tmpl ) {
219221 self . filepicker . loading = false ;
@@ -234,7 +236,7 @@ var OCdialogs = {
234236 title : title ,
235237 emptytext : emptyText ,
236238 newtext : newText
237- } ) . data ( 'path' , '' ) . data ( 'multiselect' , multiselect ) . data ( 'mimetype' , mimetypeFilter ) ;
239+ } ) . data ( 'path' , path ) . data ( 'multiselect' , multiselect ) . data ( 'mimetype' , mimetypeFilter ) ;
238240
239241 if ( modal === undefined ) {
240242 modal = false ;
@@ -355,7 +357,7 @@ var OCdialogs = {
355357 self . filepicker . sortOrder = self . filepicker . sortOrder === 'asc' ? 'desc' : 'asc' ;
356358 self . _fillFilePicker ( dir ) ;
357359 } ) ;
358- self . _fillFilePicker ( '' ) ;
360+ self . _fillFilePicker ( path ) ;
359361 } ) ;
360362
361363 // build buttons
0 commit comments