From fbea34819abac95ecb2750e3a8bbb691d2bcb8b0 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 24 Jul 2018 14:31:17 -0600 Subject: [PATCH] * Filemanager - make files and their paths clickable --- api/js/etemplate/et2_widget_vfs.js | 4 ++-- filemanager/templates/default/index.xet | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/et2_widget_vfs.js b/api/js/etemplate/et2_widget_vfs.js index 4736bf0626..a78bf6d739 100644 --- a/api/js/etemplate/et2_widget_vfs.js +++ b/api/js/etemplate/et2_widget_vfs.js @@ -75,7 +75,7 @@ var et2_vfs = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDet // calculate path as parent of name, which can contain slashes // eg. _value.path=/home/ralf/sub/file, _value.name=sub/file --> path=/home/ralf // --> generate clickable fields for sub/ + file - var sub_path = path.substr(0, _value.path.length-_value.name.length-1); + var sub_path = path.substring(0, _value.path.length-_value.name.length-1); if(_value.path.indexOf(_value.name) >= 0 && sub_path[sub_path.length-1] === '/') { path = sub_path; @@ -90,7 +90,7 @@ var et2_vfs = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDet path = sub_path; } var path_offset = 0; - var path_parts = [_value.name]; + var path_parts = _value.name.split('/'); } var text; diff --git a/filemanager/templates/default/index.xet b/filemanager/templates/default/index.xet index eb7b4e07fa..876b6dff30 100644 --- a/filemanager/templates/default/index.xet +++ b/filemanager/templates/default/index.xet @@ -31,7 +31,7 @@ - +