jsdialog: command is better id than text

When id is missing for uno button - command is better source
than text, because it is not translated.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I57d8442b7c826aae6ba5a12c74172871103a3670
pull/5882/head
Szymon Kłos 2023-02-17 16:56:51 +01:00 committed by Szymon Kłos
parent e7f77af7bd
commit ad8f35462e
1 changed files with 1 additions and 1 deletions

View File

@ -2352,7 +2352,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
var isRealUnoCommand = true;
if (data.command || data.postmessage === true) {
var id = data.id ? data.id : (data.text && data.text !== '') ? data.text : data.command;
var id = data.id ? data.id : (data.command && data.command !== '') ? data.command : data.text;
var isUnoCommand = data.command && data.command.indexOf('.uno:') >= 0;
if (isUnoCommand)
id = encodeURIComponent(data.command.substr('.uno:'.length));