User Tools

Site Tools


sample_code:folder_picker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sample_code:folder_picker [2014/12/06 06:03]
stevegarman updated for v1.15
sample_code:folder_picker [2015/02/19 23:17] (current)
Line 4: Line 4:
 See also [[sample_code:file_picker|Sample File Picker]] See also [[sample_code:file_picker|Sample File Picker]]
 ===== The code ===== ===== The code =====
- 
 <code javascript folderpicker.js> <code javascript folderpicker.js>
  
Line 81: Line 80:
     var lst = app.ListFolder(folderPath);     var lst = app.ListFolder(folderPath);
     lst.sort(function(x,y){return (x.toLowerCase() > y.toLowerCase())?1:-1});     lst.sort(function(x,y){return (x.toLowerCase() > y.toLowerCase())?1:-1});
-    //var dirlist=[]; 
     self.lstFolds.SetList("");     self.lstFolds.SetList("");
     if( self.FolderPath != self.basePath )     if( self.FolderPath != self.basePath )
Line 89: Line 87:
       if ((! self.hideHiddenFiles) || (ths.indexOf(".") != 0)){       if ((! self.hideHiddenFiles) || (ths.indexOf(".") != 0)){
         var pth = folderPath + "/" + ths;         var pth = folderPath + "/" + ths;
-        //if (app.IsFolder(pth))dirlist.push(ths); 
         if (app.IsFolder(pth))         if (app.IsFolder(pth))
            self.lstFolds.AddItem(ths,null,"folder")            self.lstFolds.AddItem(ths,null,"folder")
Line 96: Line 93:
     }     }
          
-   // self.lstFolds.SetList(dirlist.join(",")); 
     app.HideProgress();     app.HideProgress();
   }     }  
sample_code/folder_picker.1417845811.txt.gz · Last modified: 2014/12/06 14:03 (external edit)