[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/js loleaflet/src

2020-09-02 Thread Szymon Kłos (via logerrit)
 loleaflet/js/toolbar.js  |3 ++-
 loleaflet/src/layer/marker/Cursor.js |2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit a13d9673beb2596e90546b1588a874beccae31ff
Author: Szymon Kłos 
AuthorDate: Wed Sep 2 09:36:52 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Sep 2 10:34:05 2020 +0200

Fix name formatting

Change-Id: I2aed56cf362c0e68918955340d35013179a54ad1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101909
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101919
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 94e96e020..4e493bb50 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -2396,10 +2396,11 @@ function onAddView(e) {
 }
 
 function onRemoveView(e) {
+   var username = escapeHtml(e.username);
$('#tb_actionbar_item_userlist')
.w2overlay({
class: 'loleaflet-font',
-   html: userLeftPopupMessage.replace('%user', e.username),
+   html: userLeftPopupMessage.replace('%user', username),
style: 'padding: 5px'
});
clearTimeout(userPopupTimeout);
diff --git a/loleaflet/src/layer/marker/Cursor.js 
b/loleaflet/src/layer/marker/Cursor.js
index 592658dca..6514fc4f2 100644
--- a/loleaflet/src/layer/marker/Cursor.js
+++ b/loleaflet/src/layer/marker/Cursor.js
@@ -81,7 +81,7 @@ L.Cursor = L.Layer.extend({
if (this.options.header) {
this._cursorHeader = L.DomUtil.create('div', 
'leaflet-cursor-header', this._container);
 
-   this._cursorHeader.innerHTML = this.options.headerName;
+   this._cursorHeader.textContent = 
this.options.headerName;
 
clearTimeout(this._blinkTimeout);
this._blinkTimeout = setTimeout(L.bind(function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/js loleaflet/src

2019-10-09 Thread merttumer (via logerrit)
 loleaflet/js/toolbar.js  |   10 +-
 loleaflet/src/map/Map.js |3 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 11607909fe37af81775d54f20561dfc49be25b2c
Author: merttumer 
AuthorDate: Mon Jun 10 11:36:15 2019 +0300
Commit: Aron Budea 
CommitDate: Wed Oct 9 14:27:47 2019 +0200

Save document before rename for keeping changes

Change-Id: Iadd5a93f902f916e1db14c0cafe39b125b531f02
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/80096
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 3cc701119..e990b5a80 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -1335,7 +1335,9 @@ function documentNameConfirm() {
// file name must be without the extension
if (value.lastIndexOf('.') > 0)
value = value.substr(0, value.lastIndexOf('.'));
-   map.renameFile(value);
+   
+   map.sendUnoCommand('.uno:Save');
+   map._RenameFile = value;
} else {
// saveAs for rename
map.saveAs(value);
@@ -2122,6 +2124,12 @@ function onCommandResult(e) {
if (e.success) {
// Saved a new version; the document is modified.
map._everModified = true;
+   
+   // document is saved for rename
+   if (map._RenameFile) {
+   map.renameFile(map._RenameFile);
+   map._RenameFile = '';
+   }
}
var postMessageObj = {
success: e.success
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 2c802d5e9..0e7642925 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -204,6 +204,9 @@ L.Map = L.Evented.extend({
// This becomes true if document was ever modified by the user
this._everModified = false;
 
+   // This becomes new file name if document is renamed which used 
later on uno:Save result
+   this._RenameFile = '';
+
// Document is completely loaded or not
this._docLoaded = false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/js loleaflet/src

2019-06-13 Thread Tor Lillqvist (via logerrit)
 loleaflet/js/jquery.mCustomScrollbar.js |3 +--
 loleaflet/src/control/Control.Scroll.js |6 +-
 loleaflet/src/layer/tile/TileLayer.js   |6 +-
 3 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 798311db942ab291b12ccf1ec51cc819a8e782b7
Author: Tor Lillqvist 
AuthorDate: Thu Jan 24 12:55:00 2019 +0200
Commit: Andras Timar 
CommitDate: Thu Jun 13 10:17:32 2019 +0200

tdf#122359: Un-revert and edit in a attempt to reach a compromise

Change-Id: I0f23c70b3c4a07bae24e490eb8d1a5e56a4ba9ee
Reviewed-on: https://gerrit.libreoffice.org/70289
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 
(cherry picked from commit 4506d7c2de2c20c4211300ac58cecd2a42e7bb27)
Reviewed-on: https://gerrit.libreoffice.org/73934
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/js/jquery.mCustomScrollbar.js 
b/loleaflet/js/jquery.mCustomScrollbar.js
index 2785ec65c..abaa9b9e0 100644
--- a/loleaflet/js/jquery.mCustomScrollbar.js
+++ b/loleaflet/js/jquery.mCustomScrollbar.js
@@ -2138,8 +2138,7 @@ and dependencies (minified).
// hidden part of the document 
(for instance when pressing enter on the
// last visible line). The 
options.timeout==1 is a silly way to detect
// the mouse-wheel scrolling.
-   if((window.ThisIsAMobileApp && 
(options.drag || options.timeout===1 || 
options.calledFromInvalidateCursorMsg==true)) ||
-  (!window.ThisIsAMobileApp)) {
+   if(!window.ThisIsAMobileApp || 
options.drag || options.timeout===1 || 
options.calledFromInvalidateCursorMsg==true){
/* callbacks: 
whileScrolling */

if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);}
}
diff --git a/loleaflet/src/control/Control.Scroll.js 
b/loleaflet/src/control/Control.Scroll.js
index adb85d55b..ab3fc47c6 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -158,11 +158,7 @@ L.Control.Scroll = L.Control.extend({
 
_onScrollTo: function (e) {
// triggered by the document (e.g. search result out of the 
viewing area)
-   if (window.ThisIsAMobileApp) {
-   $('.scroll-container').mCustomScrollbar('scrollTo', 
[e.y, e.x], {calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
-   } else {
-   $('.scroll-container').mCustomScrollbar('scrollTo', 
[e.y, e.x]);
-   }
+   $('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x], 
{calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
},
 
_onScrollBy: function (e) {
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 00759ca65..661f4f82c 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1634,11 +1634,7 @@ L.TileLayer = L.GridLayer.extend({
if (!zoom && !(this._selectionHandles.start && 
this._selectionHandles.start.isDragged) &&
!(this._selectionHandles.end && 
this._selectionHandles.end.isDragged) &&
!(docLayer._followEditor || docLayer._followUser)) {
-   if (window.ThisIsAMobileApp) {
-   this._map.fire('scrollto', {x: 
center.x, y: center.y, calledFromInvalidateCursorMsg: scroll !== undefined});
-   } else {
-   this._map.fire('scrollto', {x: 
center.x, y: center.y});
-   }
+   this._map.fire('scrollto', {x: center.x, y: 
center.y, calledFromInvalidateCursorMsg: scroll !== undefined});
}
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/js loleaflet/src

2019-06-12 Thread Jan Holesovsky (via logerrit)
 loleaflet/js/toolbar.js  |   19 ++-
 loleaflet/src/control/Control.Menubar.js |   13 +
 2 files changed, 31 insertions(+), 1 deletion(-)

New commits:
commit 368ec07dcee9e25dec0bd305cbf305f9dbff9090
Author: Jan Holesovsky 
AuthorDate: Mon Jun 3 14:25:30 2019 +0200
Commit: Andras Timar 
CommitDate: Wed Jun 12 10:12:36 2019 +0200

Show the state of the Delete Slide.

When there is only one slide, it cannot be deleted.  Use the information
from the core to enable or disable the state of the "Delete Slide"
button in the slide sorter and the menu entry.

Change-Id: I549d4c09b6fd999b14e281976320d1b6f63d64b7
Reviewed-on: https://gerrit.libreoffice.org/73383
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 
(cherry picked from commit 3a1f68dc84dddf252cdd222ab14b2a4635f39251)
Reviewed-on: https://gerrit.libreoffice.org/73863
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index bae578585..cce5b6991 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -1952,6 +1952,9 @@ function onCommandStateChanged(e) {
if (_inMobileMode()) {
toolbarUp = statusbar;
}
+   if (map.getDocType() === 'presentation' && (id === 'deletepage' 
|| id === 'insertpage' || id === 'duplicatepage')) {
+   toolbarUp = w2ui['presentation-toolbar'];
+   }
if (state === 'enabled') {
toolbarUp.enable(id);
} else {
@@ -2184,7 +2187,21 @@ function onUpdatePermission(e) {
 
toolbar = w2ui['presentation-toolbar'];
presentationButtons.forEach(function(id) {
-   toolbar.enable(id);
+   if (id === 'deletepage') {
+   var itemState = 
map['stateChangeHandler'].getItemValue('.uno:DeletePage');
+   } else if (id === 'insertpage') {
+   itemState = 
map['stateChangeHandler'].getItemValue('.uno:InsertPage');
+   } else if (id === 'duplicatepage') {
+   itemState = 
map['stateChangeHandler'].getItemValue('.uno:DuplicatePage');
+   } else {
+   itemState = 'enabled';
+   }
+
+   if (itemState === 'enabled') {
+   toolbar.enable(id);
+   } else {
+   toolbar.disable(id);
+   }
});
 
toolbar = w2ui['actionbar'];
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 1ba848f07..32591f830 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -685,6 +685,19 @@ L.Control.Menubar = L.Control.extend({
if (index > 0) {

self.options.allowedViewModeActions.splice(index, 1);
}
+   } else if (self._map.getDocType() === 
'presentation' && (id === 'deletepage' || id === 'insertpage' || id === 
'duplicatepage')) {
+   if (id === 'deletepage') {
+   itemState = 
self._map['stateChangeHandler'].getItemValue('.uno:DeletePage');
+   } else if (id === 'insertpage') 
{
+   itemState = 
self._map['stateChangeHandler'].getItemValue('.uno:InsertPage');
+   } else {
+   itemState = 
self._map['stateChangeHandler'].getItemValue('.uno:DuplicatePage');
+   }
+   if (itemState === 'disabled') {
+   
$(aItem).addClass('disabled');
+   } else {
+   
$(aItem).removeClass('disabled');
+   }
} else {

$(aItem).removeClass('disabled');
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits