Show the document file name in the mobile apps, too
Show it in the same text input field that is used in the WOPI-like case. Make the text input field non-editable and not even focusable. Show the file name as it should be displayed to the user. I.e. reverse two layers of URL encoding. At least for the iOS app this is necessary. Change-Id: Ifc3c8c0907178ecb419f3108ffc558a05a16313d Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86840 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
This commit is contained in:
parent
e18fe5e5ef
commit
e03c81a976
1 changed files with 14 additions and 1 deletions
|
@ -1681,7 +1681,10 @@ function onDocLayerInit() {
|
|||
nUsers = '%n';
|
||||
oneUser = '1';
|
||||
noUser = '0';
|
||||
$('#document-name-input').hide();
|
||||
if (!window.ThisIsAMobileApp)
|
||||
$('#document-name-input').hide();
|
||||
else
|
||||
$('#document-name-input').show();
|
||||
} else {
|
||||
nUsers = _('%n users');
|
||||
oneUser = _('1 user');
|
||||
|
@ -1695,6 +1698,16 @@ function onDocLayerInit() {
|
|||
if (statusbar)
|
||||
statusbar.refresh();
|
||||
|
||||
if (window.ThisIsAMobileApp) {
|
||||
// We can now set the document name in the menu bar
|
||||
$('#document-name-input').prop('disabled', false);
|
||||
$('#document-name-input').removeClass('editable');
|
||||
$('#document-name-input').focus(function() { $(this).blur(); });
|
||||
// Call decodecodeURIComponent twice: Reverse both our encoding and the encoding of
|
||||
// the name in the file system.
|
||||
$('#document-name-input').val(decodeURIComponent(decodeURIComponent(map.options.doc.replace(/.*\//, ''))));
|
||||
}
|
||||
|
||||
if (!window.ThisIsTheiOSApp && window.mode.isTablet()) {
|
||||
map.hideMenubar();
|
||||
|
||||
|
|
Loading…
Reference in a new issue