@@ -84,6 +84,7 @@ define([
8484this . currentFileList = [ ] ;
8585
8686this . pathState = {
87+ parentPath :'' ,
8788currentPath :'' ,
8889baseFolder :'' , // root folder name
8990relativeDir :'' , // root folder name
@@ -257,9 +258,24 @@ define([
257258let fileList = this . currentFileList ;
258259// clear body
259260$ ( this . wrapSelector ( '.fileNavigationPage-body' ) ) . html ( '' ) ;
261+
260262// render file items
261263let dirArr = [ ] ;
262264let fileArr = [ ] ;
265+
266+ // render upper folder
267+ if ( that . pathState . parentPath != '' ) {
268+ let upperFolderTag = that . renderFileItem ( {
269+ name :'..' ,
270+ type :'dir' ,
271+ path :that . pathState . parentPath ,
272+ size :'' ,
273+ atime :'' ,
274+ mtime :''
275+ } ) ;
276+ dirArr . push ( upperFolderTag ) ;
277+ }
278+
263279fileList && fileList . forEach ( ( file , idx ) => {
264280if ( idx == 0 ) return ;
265281let fileTag = that . renderFileItem ( file ) ;
@@ -400,15 +416,15 @@ define([
400416let selectedExt = $ ( that . wrapSelector ( '#vp_fileNavigationExt' ) ) . val ( ) ;
401417let fileExtIdx = fileName . lastIndexOf ( '.' ) ;
402418// if no extension, add it
403- if ( fileExtIdx < 0 || fileName . substring ( fileExtIdx + 1 ) != selectedExt ) {
419+ if ( selectedExt != '' && ( fileExtIdx < 0 || fileName . substring ( fileExtIdx + 1 ) != selectedExt ) ) {
404420fileName += '.' + selectedExt ;
405421}
406422// no path, set it
407423if ( filePath == '' ) {
408424filePath = './' + fileName ;
409425}
410426fileExtIdx = filePath . lastIndexOf ( '.' ) ;
411- if ( fileExtIdx < 0 || filePath . substring ( fileExtIdx + 1 ) != selectedExt ) {
427+ if ( selectedExt != '' && ( fileExtIdx < 0 || filePath . substring ( fileExtIdx + 1 ) != selectedExt ) ) {
412428filePath += '.' + selectedExt ;
413429}
414430
@@ -569,8 +585,15 @@ define([
569585} ) ;
570586}
571587
588+ vpLog . display ( VP_LOG_TYPE . DEVELOP , 'FileNavigation - getFileList: ' , filtered_varList ) ;
572589
573590var { currentDirStr, currentRelativePathStr} = that . splitPathStrAndSetStack ( dirObj , filtered_varList ) ;
591+ if ( filtered_varList [ 0 ] . current === filtered_varList [ 0 ] . parent ) {
592+ // no parent
593+ that . pathState . parentPath = '' ;
594+ } else {
595+ that . pathState . parentPath = filtered_varList [ 0 ] . parent ; // parent path
596+ }
574597that . pathState . relativeDir = currentRelativePathStr ;
575598that . pathState . currentPath = currentDirStr ;
576599that . currentFileList = filtered_varList ;