From 4b3cd9484c23ee426928bae1e670bca8a9010fb3 Mon Sep 17 00:00:00 2001 From: Ahmed Mazen Date: Mon, 10 Jul 2023 18:01:45 +0800 Subject: [PATCH] add "(copy)" to implicitily titled documents Normally, documents that are created get a title similar to this: "Sheet - Mon, July 10, 2023". This commit adds " (copy)" to those documents when copied. --- www/common/onlyoffice/inner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 46a33b7d9..64716c7e1 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -242,7 +242,8 @@ define([ title = "download"; } if(title === "" && APP.startWithTemplate) { - var copyTitle = Messages._getKey('copy_title', [APP.startWithTemplate.content.metadata.title]); + var metadata = APP.startWithTemplate.content.metadata; + var copyTitle = Messages._getKey('copy_title', [metadata.title || metadata.defaultTitle]); common.getMetadataMgr().updateTitle(copyTitle); title = copyTitle; }