From 64a0ec9c02172d9d1937c6b56ce379c7d1f93675 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 25 Apr 2019 11:37:39 -0600 Subject: [PATCH] Etemplate - better formatting for display of linked files in sub-directories --- api/js/etemplate/et2_widget_link.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/et2_widget_link.js b/api/js/etemplate/et2_widget_link.js index 72084b9940..03a933c00b 100644 --- a/api/js/etemplate/et2_widget_link.js +++ b/api/js/etemplate/et2_widget_link.js @@ -2144,7 +2144,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( // VFS link - check for same dir as above, and hide dir var reformat = false; - var span_size = 0.3; + var span_size = 1; var prev = jQuery('td.title',$td.parent().prev('tr')); if(prev.length === 1) { @@ -2167,16 +2167,16 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( } } } - if(reformat) + var filename = dirs.pop(); + if(reformat && dirs.length === 1) { $td.html(' - '+dirs.join('')); } else { // Different format for directory - var filename = dirs.pop(); span_size += dirs.join('/').length+1; - $td.html(''+dirs.join('/')+': - ' + filename); + $td.html(''+dirs.join('/')+': - ' + filename); } } });}).call(this);