[Libreoffice-commits] online.git: 2 commits - loleaflet/Makefile.am loleaflet/src

2020-05-08 Thread Szymon Kłos (via logerrit)
 loleaflet/Makefile.am   |2 
 loleaflet/src/control/Control.NotebookbarCalc.js| 1899 +++-
 loleaflet/src/control/Control.NotebookbarImpress.js |   60 
 loleaflet/src/control/Control.UIManager.js  |2 
 4 files changed, 1962 insertions(+), 1 deletion(-)

New commits:
commit 5ea3e965a5b8b01ad3fa2a4e6f1b38b5b9a79ce2
Author: Szymon Kłos 
AuthorDate: Mon May 4 10:26:43 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri May 8 08:32:50 2020 +0200

notebookbar: add tabs data for Calc

Change-Id: If67de1f908b37c84de8251c67aee6691d1770878
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93649
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/loleaflet/src/control/Control.NotebookbarCalc.js 
b/loleaflet/src/control/Control.NotebookbarCalc.js
index 3b530d922..08a7875cc 100644
--- a/loleaflet/src/control/Control.NotebookbarCalc.js
+++ b/loleaflet/src/control/Control.NotebookbarCalc.js
@@ -43,7 +43,1904 @@ L.Control.NotebookbarCalc = 
L.Control.NotebookbarWriter.extend({
},
 
getHomeTab: function() {
-   return '';
+   return {
+   'id': 'NotebookBar',
+   'type': 'notebookbar',
+   'children': [
+   {
+   'id': 'box1',
+   'type': 'container',
+   'children': [
+   {
+   'id': 
'ContextContainer',
+   'type': 'tabcontrol',
+   'children': [
+   {
+   'id': 
'',
+   'type': 
'tabpage',
+   
'children': [
+   
{
+   
'id': 'HomeBox',
+   
'type': 'container',
+   
'children': [
+   
{
+   
'id': 'Home-PasteBox',
+   
'type': 'container',
+   
'children': [
+   
{
+   
'id': 'FileSection7',
+   
'type': 'container',
+   
'children': [
+   
{
+   
'id': 'SectionBottom87',
+   
'type': 'toolbox',
+   
'children': [
+   
{
+   
'type': 
'toolitem',
+   
'text': 
'Paste',
+   

'command': '.uno:Paste'
+   
}
+

[Libreoffice-commits] online.git: 2 commits - loleaflet/Makefile.am loleaflet/src

2020-04-16 Thread Szymon Kłos (via logerrit)
 loleaflet/Makefile.am   |4 
 loleaflet/src/control/Control.SigningBar.js |   64 +++
 loleaflet/src/control/Control.Toolbar.js|  564 
 loleaflet/src/control/Control.TopToolbar.js |  554 +++
 4 files changed, 628 insertions(+), 558 deletions(-)

New commits:
commit b69000b366b1b60782dbb0140a137f7658171ac4
Author: Szymon Kłos 
AuthorDate: Thu Apr 16 13:19:55 2020 +0200
Commit: Szymon Kłos 
CommitDate: Thu Apr 16 16:01:30 2020 +0200

Move top toolbar to separate file

Change-Id: I0465b32af1fbb2534aa6db41342df3993b7837bf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92349
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 7017c6e72..6c10bc441 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -271,6 +271,7 @@ LOLEAFLET_JS =\
src/control/Control.SheetsBar.js \
src/control/Control.PresentationBar.js \
src/control/Control.SigningBar.js \
+   src/control/Control.TopToolbar.js \
src/control/Control.Layers.js \
src/control/Search.js \
src/control/Permission.js \
@@ -545,6 +546,7 @@ pot:
src/control/Control.StatusBar.js \
src/control/Control.Tabs.js \
src/control/Control.Toolbar.js \
+   src/control/Control.TopToolbar.js \
src/control/Control.UserList.js \
src/control/Ruler.js \
src/control/Signing.js \
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 33fd4ac46..005fbd21c 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -3,42 +3,12 @@
  * LibreOffice Online toolbar
  */
 
-/* global $ w2ui w2utils vex _ _UNO */
+/* global $ w2ui vex _ */
 /*eslint indent: [error, "tab", { "outerIIFEBody": 0 }]*/
 (function(global) {
 
 var map;
 
-function _updateVisibilityForToolbar(toolbar) {
-   if (!toolbar)
-   return;
-
-   var toShow = [];
-   var toHide = [];
-
-   toolbar.items.forEach(function(item) {
-   if (window.ThisIsTheiOSApp && window.mode.isTablet() && 
item.iosapptablet === false) {
-   toHide.push(item.id);
-   }
-   else if (((window.mode.isMobile() && item.mobile === false) || 
(window.mode.isTablet() && item.tablet === false) || (window.mode.isDesktop() 
&& item.desktop === false) || (!window.ThisIsAMobileApp && item.mobilebrowser 
=== false)) && !item.hidden) {
-   toHide.push(item.id);
-   }
-   else if (((window.mode.isMobile() && item.mobile === true) || 
(window.mode.isTablet() && item.tablet === true) || (window.mode.isDesktop() && 
item.desktop === true) || (window.ThisIsAMobileApp && item.mobilebrowser === 
true)) && item.hidden) {
-   toShow.push(item.id);
-   }
-   });
-
-   console.log('explicitly hiding: ' + toHide);
-   console.log('explicitly showing: ' + toShow);
-
-   toHide.forEach(function(item) { toolbar.hide(item); });
-   toShow.forEach(function(item) { toolbar.show(item); });
-}
-
-function _updateToolbarsVisibility() {
-   _updateVisibilityForToolbar(w2ui['editbar']);
-}
-
 function resizeToolbar() {
if ($(window).width() !== map.getSize().x) {
var toolbarUp = w2ui['editbar'];
@@ -620,9 +590,6 @@ function hideTooltip(toolbar, id) {
}
 }
 
-var stylesSelectValue;
-var fontsSelectValue;
-
 function createToolbar() {
 
if (window.mode.isMobile()) {
@@ -634,197 +601,8 @@ function createToolbar() {
}
 }
 
-// mobile:false means hide it both for normal Online used from a mobile phone 
browser, and in a mobile app on a mobile phone
-// mobilebrowser:false means hide it for normal Online used from a mobile 
browser, but don't hide it in a mobile app
-// tablet:true means show it in normal Online from a tablet browser, and in a 
mobile app on a tablet
-// tablet:false means hide it in normal Online used from a tablet browser, and 
in a mobile app on a tablet
-
-function createMainToolbar() {
-   var toolItems = [
-   {type: 'button',  id: 'closemobile',  img: 'closemobile', 
desktop: false, mobile: false, tablet: true, hidden: true},
-   {type: 'button',  id: 'save', img: 'save', hint: 
_UNO('.uno:Save')},
-   {type: 'button',  id: 'print', img: 'print', hint: 
_UNO('.uno:Print', 'text'), mobile: false, tablet: false},
-   {type: 'break', id: 'savebreak', mobile: false},
-   {type: 'button',  id: 'undo',  img: 'undo', hint: 
_UNO('.uno:Undo'), uno: 'Undo', disabled: true, mobile: false},
-   {type: 'button',  id: 'redo',  img: 'redo', hint: 
_UNO('.uno:Redo'), uno: 'Redo', disabled: true, mobile: false},
-   

[Libreoffice-commits] online.git: 2 commits - loleaflet/Makefile.am loleaflet/src

2017-01-04 Thread Pranav Kant
 loleaflet/Makefile.am |2 --
 loleaflet/src/map/handler/Map.Keyboard.js |   19 ---
 2 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 5374b6c6ff440b4016f393557b8e8846481a1355
Author: Pranav Kant 
Date:   Thu Jan 5 13:13:20 2017 +0530

loleaflet: Don't forward shift+insert/delete key events

This are converted to 'cut', 'paste' events which are
automatically handled by us using uno commands, so avoid
double-handling them.

Change-Id: If97e9f4efabbb929e7a5dd87c1228ee6a0df9e61

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index 62e61db..84c72d3 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -119,7 +119,7 @@ L.Map.Keyboard = L.Handler.extend({
222 : null  // single quote : UNKOWN
},
 
-   handleOnKeyDown: {
+   handleOnKeyDownKeys: {
// these keys need to be handled on keydown in order for them
// to work on chrome
8   : true, // backspace
@@ -180,6 +180,19 @@ L.Map.Keyboard = L.Handler.extend({
this._map.off('compositionstart compositionupdate 
compositionend textInput', this._onKeyDown, this);
},
 
+   _handleOnKeyDown: function (keyCode, modifier) {
+   if (modifier & this.keyModifier.shift) {
+   // don't handle shift+insert, shift+delete
+   // These are converted to 'cut', 'paste' events which 
are
+   // automatically handled by us, so avoid double-handling
+   if (keyCode === 45 || keyCode === 46) {
+   return false;
+   }
+   }
+
+   return this.handleOnKeyDownKeys[keyCode];
+   },
+
_setPanOffset: function (pan) {
var keys = this._panKeys = {},
codes = this.navigationKeyCodes,
@@ -295,12 +308,12 @@ L.Map.Keyboard = L.Handler.extend({
this._keyHandled = false;
this._bufferedTextInputEvent = null;
 
-   if (this.handleOnKeyDown[keyCode] && charCode 
=== 0) {
+   if (this._handleOnKeyDown(keyCode, 
this.modifier) && charCode === 0) {
docLayer._postKeyboardEvent('input', 
charCode, unoKeyCode);
}
}
else if ((e.type === 'keypress' || e.type === 
'compositionend') &&
-   (!this.handleOnKeyDown[keyCode] || charCode !== 
0)) {
+(!this._handleOnKeyDown(keyCode, 
this.modifier) || charCode !== 0)) {
if (charCode === keyCode && charCode !== 13) {
// Chrome sets keyCode = charCode for 
printable keys
// while LO requires it to be 0
commit 053f5b5d9f5b9ddb4a83527e0373ff294105d5b3
Author: Pranav Kant 
Date:   Wed Jan 4 20:59:58 2017 +0530

Unused variable

Change-Id: I1e8ba0dc8683193d7ce0680854cb43286fc0dd98

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 178b827..4e3ed35 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -3,8 +3,6 @@
 # ("micro") part: Between releases odd, even for releases (no other
 # changes inbetween).
 
-VERSION=2.0.1+
-
 # Version number of the bundled 'draw' thing
 DRAW_VERSION=0.2.4
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits