Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
browse dirs bug
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Jan 16, 2016
1 parent 7390694 commit e21608f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion browsedirs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
print '<input type="text" id="win-drive" size="1" maxlength="1" value="C">:';
}
?>
<div class="items" id="filetree" data-root="/" style="height:316px;overflow:auto"></div>
<div class="items" id="filetree" data-root="/" style="height:280px;overflow:auto"></div>
10 changes: 6 additions & 4 deletions js/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,6 @@ $(window).load(function () {
$(this).dialog('close');
var dir = $('#filetree-input').val();
dir = dir.substr(0, ($('#filetree-input').val().length - 1));
if (navigator.platform === 'Win32' && dir.substr(1,1) !== ':') {
dir = 'C:' + dir;
}
$('input[name="directory"]:visible').val(dir);
},
Cancel: function () {
Expand Down Expand Up @@ -397,7 +394,12 @@ var browsedirs = {
$('#filetree').fileTree({
root: $('#filetree').data('root')
}, function (file) {
$('#filetree-input').val(file);
if ($('#win-drive').length === 1 && $('#win-drive').length !== '') {
$('#filetree-input').val($('#win-drive').val() + ':' + file);

} else {
$('#filetree-input').val(file);
}
});
$('#win-drive').keyup(function () {
$('#filetree').fileTree({
Expand Down

0 comments on commit e21608f

Please sign in to comment.