Files: Support display/title (instead of uid) in sharing form

This commit is contained in:
Aleksander Machniak 2019-06-20 08:59:14 +00:00
parent 22bfc61fbf
commit 2a1d9bb6b8
2 changed files with 7 additions and 4 deletions

View file

@ -2929,7 +2929,10 @@ function kolab_files_ui()
.on('click', function() { file_api.sharing_delete(post.folder, $(this).closest('tr'), post.mode); });
if (form_info.list_column) {
row.append($('<td>').append($('<span class="name">').text(post[form_info.list_column])));
row.append($('<td>').append($('<span class="name">')
.text(response.result.display || post[form_info.list_column])
.attr('title', response.result.title))
);
}
else {
$.each(form_info.form || [], function(i, v) {
@ -2945,7 +2948,7 @@ function kolab_files_ui()
content.append(opts).val(post[i]);
}
else {
content = $('<span class="name">').text(post[i]);
content = $('<span class="name">').text(response.result.display || post[i]).attr('title', response.result.title);
hidden.push($('<input>').attr({type: 'hidden', name: i, value: post[i] || ''}));
}

View file

@ -450,7 +450,7 @@ class kolab_files_engine
foreach ((array) $info['rights'] as $entry) {
if ($entry['mode'] == $mode) {
if (!empty($tab['list_column'])) {
$table->add(null, html::span('name', rcube::Q($entry[$tab['list_column']])));
$table->add(null, html::span(array('title' => $entry['title'], 'class' => 'name'), rcube::Q($entry[$tab['list_column']])));
}
else {
foreach ($tab['form'] as $index => $field) {
@ -458,7 +458,7 @@ class kolab_files_engine
$table->add(null, $fields[$index]->show($entry[$index]));
}
else if ($fields[$index] instanceof html_inputfield) {
$table->add(null, html::span('name', rcube::Q($entry[$index])));
$table->add(null, html::span(array('title' => $entry['title'], 'class' => 'name'), rcube::Q($entry[$index])));
}
}
}