[Libreoffice-commits] online.git: loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 24 01:04:04 UTC 2020
loleaflet/src/core/Socket.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit e98459439e405896bc7f36178bbaf07c40033bbc
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Jul 23 19:33:02 2020 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Fri Jul 24 03:03:44 2020 +0200
loleaflet: fix the "vex" dialog that throw an uncaught type error
This happens when a dialog related to saving a document conflict
Change-Id: I37c4840ef09f421a16c0313891b75a61be9c881d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99342
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 08e82af1c..33f73f6fc 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -544,6 +544,7 @@ L.Socket = L.Class.extend({
}
else if (command.errorKind === 'documentconflict')
{
+ var that = this;
storageError = errorMessages.storage.documentconflict;
vex.closeAll();
@@ -572,15 +573,15 @@ L.Socket = L.Class.extend({
callback: function(value) {
if (value === 'discard') {
// They want to refresh the page and load document again for all
- this.sendMessage('closedocument');
+ that.sendMessage('closedocument');
} else if (value === 'overwrite') {
// They want to overwrite
- this.sendMessage('savetostorage force=1');
+ that.sendMessage('savetostorage force=1');
} else if (value === 'saveas') {
- var filename = this._map['wopi'].BaseFileName;
+ var filename = that._map['wopi'].BaseFileName;
if (filename) {
filename = L.LOUtil.generateNewFileName(filename, '_new');
- this._map.saveAs(filename);
+ that._map.saveAs(filename);
}
}
},
More information about the Libreoffice-commits
mailing list