Changeset 1127 for trunk/plugins/PSLocal


Ignore:
Timestamp:
11/20/08 22:01:11 (11 years ago)
Author:
douglas
Message:

UPDATED Ticket #1328 Fix some issues with document storage and UI behavior

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/PSLocal/PSLocal.js

    r1123 r1127  
    248248 
    249249  for (var index=0; index<fileList.length; ++index) { 
    250     if (filterPath == fileList[index].path) { 
     250      // Gah perform file splitting here.. 
     251    var pathpart = fileList[index].fullpath.split('/'); 
     252    if (pathpart.length > 2) { 
     253      pathpart = pathpart.slice(0,pathpart.length-1).join('/'); 
     254    } else { 
     255      pathpart = '/'; 
     256    } 
     257 
     258    var filepart = fileList[index].fullpath.split('/').slice(-1)[0]; 
     259    if (filterPath == pathpart) { 
    251260      metadata.push({ 
    252261        URL: fileList[index].url, 
    253262        thumbURL: editor.imgURL('images/tango/32x32/mimetypes/text-x-generic.png'), 
    254         name: fileList[index].filename, 
    255         key: fileList[index].path + fileList[index].filename, 
     263        name: filepart, 
     264        key: fileList[index].fullpath, 
    256265        $type: fileList[index].filetype 
    257266      }); 
Note: See TracChangeset for help on using the changeset viewer.