[Libreoffice-commits] online.git: loleaflet/src
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 9 16:09:03 UTC 2020
loleaflet/src/control/Control.DocumentNameInput.js | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit a009c83fa270d4b0c480b4b06f7d8efc82b64515
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Tue Jun 9 15:50:59 2020 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Jun 9 18:08:44 2020 +0200
Pre-select base filename on rename click / focus.
Change-Id: I62fb629dc6021ab8cd60b46f73e8d9e39c2da4e0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95953
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/loleaflet/src/control/Control.DocumentNameInput.js b/loleaflet/src/control/Control.DocumentNameInput.js
index 13f83c4d2..090cc25f9 100644
--- a/loleaflet/src/control/Control.DocumentNameInput.js
+++ b/loleaflet/src/control/Control.DocumentNameInput.js
@@ -56,6 +56,12 @@ L.Control.DocumentNameInput = L.Control.extend({
onDocumentNameFocus: function() {
// hide the caret in the main document
this.map._onLostFocus();
+ var name = this.map['wopi'].BaseFileName;
+ var extn = name.lastIndexOf('.');
+ if (extn < 0)
+ extn = name.length;
+ $('#document-name-input').val(name);
+ $('#document-name-input')[0].setSelectionRange(0, extn);
},
onDocLayerInit: function() {
More information about the Libreoffice-commits
mailing list