Fixed path in other folders search

Signed-off-by: Marcin Czarnecki <marcin.czarnecki@protonmail.com>
This commit is contained in:
Marcin 2017-02-21 00:38:46 +00:00 committed by GitHub
parent a4266f59ae
commit 20ad3f33d0
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@
show size and last modified date on the right */ show size and last modified date on the right */
this.updateLegacyMimetype(result); this.updateLegacyMimetype(result);
var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1)); var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1, result.path.lastIndexOf("/")));
$row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.info div.name').after($pathDiv).text(result.name);
$row.find('td.result a').attr('href', result.link); $row.find('td.result a').attr('href', result.link);
@ -80,7 +80,7 @@
show size and last modified date on the right */ show size and last modified date on the right */
this.updateLegacyMimetype(result); this.updateLegacyMimetype(result);
var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1)); var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1, result.path.lastIndexOf("/")));
$row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.info div.name').after($pathDiv).text(result.name);
$row.find('td.result a').attr('href', result.link); $row.find('td.result a').attr('href', result.link);