Changeset 1127 for trunk


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

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

Location:
trunk/plugins
Files:
2 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      }); 
  • trunk/plugins/PersistentStorage/PersistentStorage.js

    r1124 r1127  
    281281  }; 
    282282 
     283  // Enable and disable the buttons with filename input 
     284  var nameinput = this.dialog.getElementById("filename"); 
     285 
     286  button.disabled = nameinput.value ? false : true; 
     287 
     288  nameinput.onkeyup = nameinput.onkeypress = nameinput.onchange = function() { 
     289 
     290    button.disabled = nameinput.value ? false : true; 
     291  } 
     292 
    283293  this.showDialog({typeFilter:['document','html','text','folder'], styleFor:'documentsave'}); 
    284294} 
     
    488498    self.selectedEntry = [entry, fileBlock]; 
    489499    self.selectedEntry[1].className += ' selected'; 
     500 
     501    var filename = self.dialog.getElementById('filename'); 
     502    filename.value = entry.name; 
     503 
     504    var confirmbutton = self.dialog.getElementById('confirm'); 
     505    confirmbutton.disabled = false; 
    490506  }); 
    491507 
Note: See TracChangeset for help on using the changeset viewer.