diff --git a/css/gpxedit.css b/css/gpxedit.css index 549459b..4cd803d 100644 --- a/css/gpxedit.css +++ b/css/gpxedit.css @@ -483,3 +483,7 @@ input[type=checkbox] margin-left: 10px; margin-right: 10px; } +.selectedFolder{ + color: blue !important; + font-weight: bold !important; +} diff --git a/js/gpxedit.js b/js/gpxedit.js index 6705f50..369ff34 100644 --- a/js/gpxedit.js +++ b/js/gpxedit.js @@ -529,9 +529,13 @@ $(document).ready(function(){ $('#savetree').on('filetreeexpand', function(e, data){ gpxedit.savePath = data.rel; + $('#savetree a').removeClass('selectedFolder'); + data.li.find('>a').addClass('selectedFolder'); }); $('#savetree').on('filetreecollapse', function(e, data){ - gpxedit.savePath = data.rel; + gpxedit.savePath = data.li.parent().parent().find('>a').attr('rel'); + data.li.find('li.expanded').removeClass('expanded'); + data.li.find('>a').removeClass('selectedFolder'); }); });