* Filemanager - make files and their paths clickable

This commit is contained in:
nathangray 2018-07-24 14:31:17 -06:00
parent a75272b1bc
commit fbea34819a
2 changed files with 3 additions and 3 deletions

View File

@ -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 // calculate path as parent of name, which can contain slashes
// eg. _value.path=/home/ralf/sub/file, _value.name=sub/file --> path=/home/ralf // eg. _value.path=/home/ralf/sub/file, _value.name=sub/file --> path=/home/ralf
// --> generate clickable fields for sub/ + file // --> 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] === '/') if(_value.path.indexOf(_value.name) >= 0 && sub_path[sub_path.length-1] === '/')
{ {
path = sub_path; path = sub_path;
@ -90,7 +90,7 @@ var et2_vfs = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDet
path = sub_path; path = sub_path;
} }
var path_offset = 0; var path_offset = 0;
var path_parts = [_value.name]; var path_parts = _value.name.split('/');
} }
var text; var text;

View File

@ -31,7 +31,7 @@
</row> </row>
<row class="row $row_cont[class]"> <row class="row $row_cont[class]">
<vfs-mime align="center" id="$row"/> <vfs-mime align="center" id="$row"/>
<vfs-name id="${row}[name]" no_lang="1" readonly="true"/> <vfs id="$row" no_lang="1"/>
<vfs-size align="right" id="${row}[size]"/> <vfs-size align="right" id="${row}[size]"/>
<date-time id="${row}[mtime]" readonly="true"/> <date-time id="${row}[mtime]" readonly="true"/>
<date-time id="${row}[ctime]" readonly="true"/> <date-time id="${row}[ctime]" readonly="true"/>