[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/menubar.css |2 -- loleaflet/dist/toolbar.css |7 +++ loleaflet/src/control/Control.Menubar.js | 12 3 files changed, 3 insertions(+), 18 deletions(-) New commits: commit 8f6df703334fe98daa2f8bcd4956690e85ccab02 Author: Pranav KantDate: Wed May 2 23:05:54 2018 +0530 Revert "loleaflet: move document-name-input in menubar" The overflow: hidden is problematic here as popping out of menus from the menubar also stops working due to this. This reverts commit a9c053fba46ce026d8c06bf23ff9a2abcb1222ee. Change-Id: I5d86a38ff48c7ceced56592ab32a2e554f4b2e4f diff --git a/loleaflet/dist/menubar.css b/loleaflet/dist/menubar.css index cfdb8baf1..f192eacbf 100644 --- a/loleaflet/dist/menubar.css +++ b/loleaflet/dist/menubar.css @@ -2,8 +2,6 @@ top: 39px; height: 25px; padding-left: 125px; -padding-right: 32px; /* for: the red close button on the right */ -overflow: hidden; z-index: 1000; outline: none; background-color: transparent; diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index 0444312a2..d56b809a2 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -79,14 +79,13 @@ w2ui-toolbar { } #document-name-input { +position: fixed; z-index: 1050; +right: 35px; top: 2px; width: 200px; -font-size: 14px; +font-size: 16px; padding-right: 20px; -padding-top: 6px; -padding-bottom: 5px; -padding-left: 5px; border: 1px solid transparent; background-color: transparent; } diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 86849ad11..d6ec74ca8 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -503,16 +503,6 @@ L.Control.Menubar = L.Control.extend({ } }, - _addAfterElements: function() { - var elemLi = L.DomUtil.create('li', '', this._menubarCont); - L.DomUtil.setStyle(elemLi, 'float', 'right'); - - // move document-name-input element to menubar - var elem = L.DomUtil.get('document-name-input'); - L.DomUtil.remove(elem); - elemLi.appendChild(elem); - }, - _onDocLayerInit: function() { // clear initial menu while (this._menubarCont.hasChildNodes()) { @@ -529,8 +519,6 @@ L.Control.Menubar = L.Control.extend({ this._initializeMenu(this.options.presentation); } - this._addAfterElements(); - // initialize menubar plugin $('#main-menu').smartmenus({ hideOnClick: true, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/menubar.css |2 ++ loleaflet/dist/toolbar.css |7 --- loleaflet/src/control/Control.Menubar.js | 12 3 files changed, 18 insertions(+), 3 deletions(-) New commits: commit a9c053fba46ce026d8c06bf23ff9a2abcb1222ee Author: Pranav KantDate: Mon Apr 30 21:56:09 2018 +0530 loleaflet: move document-name-input in menubar ... so that it doesn't overlap with the menu items when the width of the screen is reduced. Change-Id: Ib1b2b18c631ed1c76b8807f6e3103e8eddd88efb Reviewed-on: https://gerrit.libreoffice.org/53670 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/menubar.css b/loleaflet/dist/menubar.css index f192eacbf..cfdb8baf1 100644 --- a/loleaflet/dist/menubar.css +++ b/loleaflet/dist/menubar.css @@ -2,6 +2,8 @@ top: 39px; height: 25px; padding-left: 125px; +padding-right: 32px; /* for: the red close button on the right */ +overflow: hidden; z-index: 1000; outline: none; background-color: transparent; diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index d56b809a2..0444312a2 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -79,13 +79,14 @@ w2ui-toolbar { } #document-name-input { -position: fixed; z-index: 1050; -right: 35px; top: 2px; width: 200px; -font-size: 16px; +font-size: 14px; padding-right: 20px; +padding-top: 6px; +padding-bottom: 5px; +padding-left: 5px; border: 1px solid transparent; background-color: transparent; } diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index d6ec74ca8..86849ad11 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -503,6 +503,16 @@ L.Control.Menubar = L.Control.extend({ } }, + _addAfterElements: function() { + var elemLi = L.DomUtil.create('li', '', this._menubarCont); + L.DomUtil.setStyle(elemLi, 'float', 'right'); + + // move document-name-input element to menubar + var elem = L.DomUtil.get('document-name-input'); + L.DomUtil.remove(elem); + elemLi.appendChild(elem); + }, + _onDocLayerInit: function() { // clear initial menu while (this._menubarCont.hasChildNodes()) { @@ -519,6 +529,8 @@ L.Control.Menubar = L.Control.extend({ this._initializeMenu(this.options.presentation); } + this._addAfterElements(); + // initialize menubar plugin $('#main-menu').smartmenus({ hideOnClick: true, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/framed.html| 38 ++ loleaflet/src/layer/tile/TileLayer.js | 14 ++-- loleaflet/src/map/handler/Map.WOPI.js | 10 +--- 3 files changed, 34 insertions(+), 28 deletions(-) New commits: commit a0158a143230a3ed573c56275f51d857f61d8da3 Author: Tor LillqvistDate: Fri Jan 19 12:16:55 2018 +0200 Be more generic in the calling of a Python script code Hardcode SetCellColor just in the framed.html. Change-Id: I4461e19191028637037338fe0e7c5621258b5d37 diff --git a/loleaflet/dist/framed.html b/loleaflet/dist/framed.html index 84c0082a0..f287aab91 100644 --- a/loleaflet/dist/framed.html +++ b/loleaflet/dist/framed.html @@ -7,17 +7,20 @@ for output only. When the submit button is pressed, the input fields are passed as - a postMessage to the iframe, with the MessageId of - 'SetCellColor'. That is then in our JavaScript passed on to a - Python script that sets the background colour of the - corresponding cell of the spreadsheet document open in the - loleaflet iframe. The Python script return a value, which gets - passed to loleaflet in a unocommandresult: message, and passed on - to the event listener on this page, which writes it to the output - field. + a postMessage to the iframe. The message also specifies what + Python script to call. (In this demo case, the 'SetCellColor' + script in scripting/examples/python/SetCellColor.py in + LibreOffice core.) The parameters are then in our JavaScript + passed on to the Python script that acts on the document open in + the iframe. The Python script returns a value, which gets passed + to loleaflet in a unocommandresult: message, and passed on to the + event listener on this page, which writes it to the output field. + For this to work, in the trivial proof of concept case of 'make + run', the below patch is needed to the C++ code. It is probably + not necessary in a "real" WOPI-based setup where iframes are + already used and things work fine. - For this to work, the following patch is needed to the C++ code: --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -172,7 +172,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M @@ -39,7 +42,6 @@ cspOss << "\r\n"; - --> @@ -48,7 +50,7 @@ Online Editor
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |9 + loleaflet/src/control/Control.LokDialog.js |9 - 2 files changed, 5 insertions(+), 13 deletions(-) New commits: commit 17ef36d1544e651ac713c4cee452f58caef4f68e Author: Jan HolesovskyDate: Mon Mar 12 16:48:29 2018 +0100 lokdialog: Don't strip the sub-menus in tunneled context menu. Simplifies the vertical growing / shrinking of listbox popups too. Change-Id: I8d8aa7e07a5bf9119713363dd95a5db843683feb Reviewed-on: https://gerrit.libreoffice.org/51154 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 4db830b8c..36df3e052 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -340,8 +340,8 @@ body { } .lokdialog_container.ui-dialog.ui-widget-content { -padding: 0px; - overflow: hidden; + padding: 0px; + overflow: visible; width: auto; height: auto; border: none; @@ -350,7 +350,8 @@ body { } .lokdialog.ui-dialog-content.ui-widget-content { -padding: 0px; + padding: 0px; + overflow: visible; } .lokdialog_canvas { @@ -372,4 +373,4 @@ body { .vex.vex-theme-bottom-right-corner .vex-content { bottom: 40px !important; right: 10px !important; -} \ No newline at end of file +} diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 20fe4b740..af50aba02 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -229,7 +229,6 @@ L.Control.LokDialog = L.Control.extend({ var dialogContainer = L.DomUtil.create('div', 'lokdialog', document.body); L.DomUtil.setStyle(dialogContainer, 'padding', '0px'); L.DomUtil.setStyle(dialogContainer, 'margin', '0px'); - L.DomUtil.setStyle(dialogContainer, 'overflow', 'hidden'); dialogContainer.id = strDlgId; var dialogCanvas = L.DomUtil.create('canvas', 'lokdialog_canvas', dialogContainer); @@ -375,14 +374,6 @@ L.Control.LokDialog = L.Control.extend({ ctx.drawImage(img, 0, 0); }; img.src = imgData; - - // increase the height of the container, - // so that if the floating window goes out of the parent, - // it doesn't get stripped off - height = parseInt(canvas.style.top) + canvas.height; - var currentHeight = parseInt($('#' + strDlgId).css('height')); - if (height > currentHeight) - $('#' + strDlgId).css('height', height + 'px'); }, _onDialogChildClose: function(dialogId) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src wsd/LOOLWSD.cpp wsd/UserMessages.hpp
loleaflet/dist/errormessages.js |2 +- loleaflet/src/core/Socket.js| 40 ++-- wsd/LOOLWSD.cpp | 33 ++--- wsd/UserMessages.hpp|3 ++- 4 files changed, 55 insertions(+), 23 deletions(-) New commits: commit 96292dc873ea2b021b22c755f02293184d818714 Author: Samuel MehrbrodtDate: Tue Feb 13 16:36:38 2018 +0100 Only apply hard limit when configured with support key In other case, show the warning to all users (instead of just the last one) and link to our get professional help page. Change-Id: Id443ba6427acd4c05f7e0e2ce86025acfb553265 Reviewed-on: https://gerrit.libreoffice.org/49673 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/dist/errormessages.js b/loleaflet/dist/errormessages.js index fa6a9997..edda0764 100644 --- a/loleaflet/dist/errormessages.js +++ b/loleaflet/dist/errormessages.js @@ -1,6 +1,6 @@ exports.diskfull = _('No disk space left on server, please contact the server administrator to continue.'); exports.emptyhosturl = _('The host URL is empty. The loolwsd server is probably misconfigured, please contact the administrator.'); -exports.limitreached = _('This development build is limited to %0 documents, and %1 connections - to avoid the impression that it is suitable for deployment in large enterprises. To find out more about deploying and scaling %2 check out: %3.'); +exports.limitreached = _('This is an unsupported version of {productname}. To avoid the impression that it is suitable for deployment in enterprises, this version is limited to {docs} documents, and {connections} connections.{a}More information and support{/a}'); exports.limitreachedprod = _('This service is limited to %0 documents, and %1 connections total by the admin. This limit has been reached. Please try again later.'); exports.serviceunavailable = _('Service is unavailable. Please try again later and report to your administrator if the issue persists.'); exports.unauthorized = _('Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists.'); diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 9cb99c23..3e33a88d 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -7,6 +7,7 @@ L.Socket = L.Class.extend({ ProtocolVersionNumber: '0.1', ReconnectCount: 0, + WasShownLimitDialog: false, getParameterValue: function (s) { var i = s.indexOf('='); @@ -550,31 +551,34 @@ L.Socket = L.Class.extend({ } else if (textMsg.startsWith('error:') && !this._map._docLayer) { textMsg = textMsg.substring(6); - if (command.errorKind === 'limitreached') { - this._map._fatal = true; - this._map._active = false; // Practically disconnected. + if (command.errorKind === 'hardlimitreached') { - // Servers configured for 50 documents are not demo/development. - if (parseInt(command.params[0]) >= 50) { - textMsg = errorMessages.limitreachedprod; - textMsg = textMsg.replace(/%0/g, command.params[0]); - textMsg = textMsg.replace(/%1/g, command.params[1]); - } - else { - textMsg = errorMessages.limitreached; - textMsg = textMsg.replace(/%0/g, command.params[0]); - textMsg = textMsg.replace(/%1/g, command.params[1]); - textMsg = textMsg.replace(/%2/g, (typeof brandProductName !== 'undefined' ? brandProductName : 'LibreOffice Online')); - textMsg = textMsg.replace(/%3/g, (typeof brandProductFAQURL !== 'undefined' ? brandProductFAQURL : 'https://wiki.documentfoundation.org/Development/LibreOffice_Online')); - } + textMsg = errorMessages.limitreachedprod; + textMsg = textMsg.replace(/%0/g, command.params[0]); + textMsg = textMsg.replace(/%1/g, command.params[1]); } else if (command.errorKind === 'serviceunavailable') { - this._map._fatal = true; - this._map._active = false; // Practically disconnected. textMsg = errorMessages.serviceunavailable; } +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |4 loleaflet/src/layer/tile/TileLayer.js | 12 ++-- loleaflet/src/map/handler/Map.Keyboard.js |6 +- 3 files changed, 19 insertions(+), 3 deletions(-) New commits: commit 341c9dcc96dcf84cadfabcce2c3eabc09c1bf8d1 Author: Henry CastroDate: Sat Feb 10 14:20:52 2018 -0400 loleaflet: copy text of the annotation element to clipboard Change-Id: I8675b3752656afc1ba79d614d2f1fe3e7d98f600 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index b4974c54..f458c371 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -142,6 +142,10 @@ body { .loleaflet-annotation { position: absolute; text-align: center; + user-select: text; + -moz-user-select: text; + -webkit-user-select: text; + -ms-user-select: text; } .loleaflet-annotation-content-wrapper, .loleaflet-annotation-redline-content-wrapper { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 2ef79251..aebeaf79 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1906,7 +1906,11 @@ L.TileLayer = L.GridLayer.extend({ _onCopy: function (e) { e = e.originalEvent; e.preventDefault(); - if (this._selectionTextContent) { + if (this._map._docLayer._textArea.value !== '') { + L.Compatibility.clipboardSet(e, this._map._docLayer._textArea.value); + this._map._docLayer._textArea.value = ''; + } + if (this._textSelectionStart && this._textSelectionEnd && this._selectionTextContent) { L.Compatibility.clipboardSet(e, this._selectionTextContent); // remember the copied text, for rich copy/paste inside a document @@ -1919,7 +1923,11 @@ L.TileLayer = L.GridLayer.extend({ _onCut: function (e) { e = e.originalEvent; e.preventDefault(); - if (this._selectionTextContent) { + if (this._map._docLayer._textArea.value !== '') { + L.Compatibility.clipboardSet(e, this._map._docLayer._textArea.value); + this._map._docLayer._textArea.value = ''; + } + if (this._textSelectionStart && this._textSelectionEnd && this._selectionTextContent) { L.Compatibility.clipboardSet(e, this._selectionTextContent); // remember the copied text, for rich copy/paste inside a document diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 95433c8d..6c4b1dc5 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -425,6 +425,10 @@ L.Map.Keyboard = L.Handler.extend({ }, _handleCtrlCommand: function (e) { + // Control + if (e.originalEvent.keyCode == 17) + return true; + if (e.type !== 'keydown' && e.originalEvent.key !== 'c' && e.originalEvent.key !== 'v' && e.originalEvent.key !== 'x' && /* Safari */ e.originalEvent.keyCode !== 99 && e.originalEvent.keyCode !== 118 && e.originalEvent.keyCode !== 120) { e.originalEvent.preventDefault(); @@ -512,7 +516,7 @@ L.Map.Keyboard = L.Handler.extend({ case 91: // Left Cmd (Safari) case 93: // Right Cmd (Safari) // we prepare for a copy or cut event - this._map._docLayer._textArea.value = 'dummy text'; + this._map._docLayer._textArea.value = window.getSelection().toString(); this._map._docLayer._textArea.focus(); this._map._docLayer._textArea.select(); return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css|4 ++-- loleaflet/src/layer/tile/TileLayer.js |5 + loleaflet/src/map/Map.js |3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) New commits: commit 1e91799663945fdfde84385bcfbb96fd03c6fe2e Author: Pranav KantDate: Thu Feb 8 15:04:29 2018 +0530 Move the IME candidate window with cursor position Change-Id: I7b37b0c4981b4ebcefb7606915711ca2adec3c31 diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index c324ebfd..b2bf8115 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -679,7 +679,7 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header { } .clipboard-container { - position: fixed; + position: absolute; left: 0px; top: 0px; width: 0px; @@ -863,4 +863,4 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header { border-radius: 2px; top: 24px; color: white; - } \ No newline at end of file + } diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 1494fe88..3752f58b 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1534,6 +1534,11 @@ L.TileLayer = L.GridLayer.extend({ this._cursorMarker.setLatLng(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom(; } this._map.addLayer(this._cursorMarker); + + // move the hidden input field with the cursor + var clipContainer = L.DomUtil.get('doc-clipboard-container'); + var pos = this._map.latLngToLayerPoint(L.latLng(cursorPos)).round(); + L.DomUtil.setPosition(clipContainer, pos); } else if (this._cursorMarker) { this._map.removeLayer(this._cursorMarker); diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index f2b31925..c90b6a0c 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -692,7 +692,8 @@ L.Map = L.Evented.extend({ throw new Error('Map container is already initialized.'); } - var textAreaContainer = L.DomUtil.create('div', 'clipboard-container', container.parentElement); + var textAreaContainer = L.DomUtil.create('div', 'clipboard-container', container); + textAreaContainer.id = 'doc-clipboard-container'; this._textArea = L.DomUtil.create('input', 'clipboard', textAreaContainer); this._textArea.setAttribute('type', 'text'); this._textArea.setAttribute('autocorrect', 'off'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |6 +++--- loleaflet/src/admin/AdminSocketAnalytics.js |2 +- loleaflet/src/control/Control.ColumnHeader.js |2 +- loleaflet/src/control/Control.DocumentRepair.js |2 +- loleaflet/src/control/Control.Menubar.js| 10 +- loleaflet/src/control/Control.RowHeader.js |2 +- loleaflet/src/control/Control.Tabs.js |2 +- 7 files changed, 13 insertions(+), 13 deletions(-) New commits: commit 0ed1840aaa365b3228df97f9f33c8a8b78eaffca Author: Jan HolesovskyDate: Fri Jan 5 13:49:50 2018 +0100 Fix various JS warnings. Change-Id: I6042781141eed9fbbdb452337e7bb0b18803fa1b diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 59fc53af..263bace4 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -2,7 +2,7 @@ * LibreOffice Online toolbar */ -/* global $ map closebutton w2ui w2utils vex _ */ +/* global $ map closebutton w2ui w2utils vex _ _UNO */ /* exported onUseritemClicked editorUpdate */ var mobileWidth = 768; @@ -1088,8 +1088,8 @@ map.on('doclayerinit', function () { { func: '32', text: _('Minimum'), icon: ''}, { func: '512', text: _('Sum'), icon: 'selected'}, { func: '8192', text: _('Selection count'), icon: ''}, - { func: '1', text: _('None'), icon: ''}, - ]}, + { func: '1', text: _('None'), icon: ''} + ]} ]); // Remove irrelevant toolbars diff --git a/loleaflet/src/admin/AdminSocketAnalytics.js b/loleaflet/src/admin/AdminSocketAnalytics.js index 34decef0..8af70e02 100644 --- a/loleaflet/src/admin/AdminSocketAnalytics.js +++ b/loleaflet/src/admin/AdminSocketAnalytics.js @@ -3,7 +3,7 @@ containing various graphs to show to the user on specified interval */ -/* global d3 Util AdminSocketBase $ Admin */ +/* global _ d3 Util AdminSocketBase $ Admin */ var AdminSocketAnalytics = AdminSocketBase.extend({ constructor: function(host) { this.base(host); diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index 690eac2c..31ac194a 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -2,7 +2,7 @@ * Control.ColumnHeader */ -/* global $ _ */ +/* global $ _UNO */ L.Control.ColumnHeader = L.Control.Header.extend({ options: { cursor: 'col-resize' diff --git a/loleaflet/src/control/Control.DocumentRepair.js b/loleaflet/src/control/Control.DocumentRepair.js index 0d4b16f8..88401d21 100644 --- a/loleaflet/src/control/Control.DocumentRepair.js +++ b/loleaflet/src/control/Control.DocumentRepair.js @@ -1,7 +1,7 @@ /* * L.Control.DocumentRepair. */ -/* global $ _ */ +/* global $ _ _UNO */ L.Control.DocumentRepair = L.Control.extend({ options: { position: 'topright' diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index b6c03cdf..8ef8ad31 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -11,7 +11,7 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:EditMenu'), disabled: true}, {name: _UNO('.uno:ViewMenu'), disabled: true}, {name: _UNO('.uno:InsertMenu'), disabled: true}, - {name: _UNO('.uno:ToolsMenu'), disabled: true}, + {name: _UNO('.uno:ToolsMenu'), disabled: true} ], text: [ {name: _UNO('.uno:PickList', 'text'), id: 'file', type: 'menu', menu: [ @@ -47,7 +47,7 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:PreviousTrackedChange'}, {uno: '.uno:NextTrackedChange'} ]}, - {uno: '.uno:EditStyle'}, + {uno: '.uno:EditStyle'} ]}, {name: _UNO('.uno:ViewMenu', 'text'), id: 'view', type: 'menu', menu: [ {name: _UNO('.uno:FullScreen', 'text'), id: 'fullscreen', type: 'action'}, @@ -56,7 +56,7 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action'}, {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, {type: 'separator'}, - {uno: '.uno:ControlCodes'}, + {uno: '.uno:ControlCodes'} ] },
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css| 27 +- loleaflet/src/control/Control.ColumnHeader.js | 265 +++ loleaflet/src/control/Control.Header.js | 347 -- loleaflet/src/control/Control.Menubar.js |9 loleaflet/src/control/Control.RowHeader.js| 248 +++--- loleaflet/src/control/Control.Scroll.js |5 loleaflet/src/dom/DomUtil.js | 12 loleaflet/src/layer/tile/CalcTileLayer.js |4 8 files changed, 788 insertions(+), 129 deletions(-) New commits: commit 550de386482c075e55fecffca4083eaa065ab076 Author: Marco CecchettiDate: Mon Nov 27 19:37:53 2017 +0100 calc: outline and groups handling Change-Id: Ie7dcb9a742344e6b0a8813faebc589167a457261 Reviewed-on: https://gerrit.libreoffice.org/45360 Reviewed-by: Marco Cecchetti Tested-by: Marco Cecchetti diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 8435b271..e97f6041 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -59,7 +59,7 @@ } #spreadsheet-row-column-frame { -position: absolute; + position: absolute; left: 0; right: 0; top: 103px; @@ -70,7 +70,7 @@ top: 30px; } -.spreadsheet-header-corner { +#spreadsheet-header-corner-container { border: 1px solid darkgrey; background-color: lightgrey; cursor: pointer; @@ -84,7 +84,26 @@ height: 19px; } -.spreadsheet-header-columns-container { +#spreadsheet-header-corner { + display: inline-block; + white-space: nowrap; + width: 100%; + height: 100%; + border-spacing: 0px !important; + position: relative; + margin: 0px; + padding: 0px; + } + +.spreadsheet-header-corner-styles { + border: 1px solid darkgray; + font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; + color: black; + background-color: lightgray; + cursor: pointer; + } + +#spreadsheet-header-columns-container { border: 1px solid darkgrey; background-color: lightgrey; @@ -130,7 +149,7 @@ cursor: col-resize; } -.spreadsheet-header-rows-container { +#spreadsheet-header-rows-container { border: 1px solid darkgrey; background-color: lightgrey; diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index 264fea4d..ae95f183 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -15,38 +15,44 @@ L.Control.ColumnHeader = L.Control.Header.extend({ _initialize: function () { this._initialized = true; + this._isColumn = true; this._map.on('scrolloffset', this.offsetScrollPosition, this); this._map.on('updatescrolloffset', this.setScrollPosition, this); this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, this); this._map.on('updateselectionheader', this._onUpdateSelection, this); this._map.on('clearselectionheader', this._onClearSelection, this); this._map.on('updatecurrentheader', this._onUpdateCurrentColumn, this); + this._map.on('updatecornerheader', this.drawCornerHeader, this); var rowColumnFrame = L.DomUtil.get('spreadsheet-row-column-frame'); - var cornerHeader = L.DomUtil.create('div', 'spreadsheet-header-corner', rowColumnFrame); - L.DomEvent.on(cornerHeader, 'contextmenu', L.DomEvent.preventDefault); - L.DomEvent.addListener(cornerHeader, 'click', this._onCornerHeaderClick, this); - this._headersContainer = L.DomUtil.create('div', 'spreadsheet-header-columns-container', rowColumnFrame); + this._headerContainer = L.DomUtil.createWithId('div', 'spreadsheet-header-columns-container', rowColumnFrame); this._initHeaderEntryStyles('spreadsheet-header-column'); this._initHeaderEntryHoverStyles('spreadsheet-header-column-hover'); this._initHeaderEntrySelectedStyles('spreadsheet-header-column-selected'); this._initHeaderEntryResizeStyles('spreadsheet-header-column-resize'); - this._headerCanvas = L.DomUtil.create('canvas', 'spreadsheet-header-columns', this._headersContainer); - this._canvasContext = this._headerCanvas.getContext('2d'); - this._headerCanvas.width = parseInt(L.DomUtil.getStyle(this._headersContainer, 'width')); - this._headerCanvas.height = parseInt(L.DomUtil.getStyle(this._headersContainer, 'height')); + this._canvas = L.DomUtil.create('canvas', 'spreadsheet-header-columns', this._headerContainer); +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |4 loleaflet/src/control/Control.LokDialog.js |2 +- 2 files changed, 5 insertions(+), 1 deletion(-) New commits: commit 2b8c4ee3bb2535dfc40019cf6c31684102606688 Author: Pranav KantDate: Thu Nov 9 09:48:44 2017 +0530 lokdialog: Remove padding around dialog canvas completely Change-Id: Ie6d65ca23936f081c5e2b37fff6f5d90d9fcd06e diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 5c64f4dd..f139c026 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -344,3 +344,7 @@ body { .lokdialog.ui-dialog-content.ui-widget-content { padding: 0px; } + +.lokdialog_canvas { +display: block; /* required to remove all borders around canvas element */ +} diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index e7c2cd4c..329c45ea 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -39,7 +39,7 @@ L.Control.LokDialog = L.Control.extend({ _launchDialog: function(dialogId, width, height) { var canvas = '' + - '' + + '' + ''; $(document.body).append(canvas); var that = this; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css| 101 ++ loleaflet/src/control/Control.ColumnHeader.js |7 + loleaflet/src/control/Control.Header.js | 64 ++-- loleaflet/src/control/Control.RowHeader.js|8 +- 4 files changed, 92 insertions(+), 88 deletions(-) New commits: commit 7f9cdb2e52b09d4315a2779248a20622c71aae6e Author: Marco CecchettiDate: Mon Oct 30 10:36:36 2017 +0100 loleflet: calc: canvas styles for headers are fetched from css file Change-Id: I0423c353d22736aa2edaf45d55112af001d46692 Reviewed-on: https://gerrit.libreoffice.org/44049 Reviewed-by: Marco Cecchetti Tested-by: Marco Cecchetti diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 15ea4ff9..8435b271 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -110,28 +110,25 @@ } .spreadsheet-header-column { - border-right: 1px solid darkgrey; - display: inline-block; - text-align: left; - padding: 0px; - padding-top: 1px; - margin: 0px; - height: 100%; - overflow: hidden; - } + border: 1px solid darkgray; + font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; + color: black; + background-color: lightgray; + cursor: pointer; +} -.spreadsheet-header-selected { - background: #3465A4; /* For browsers that do not support gradients */ - background: -webkit-linear-gradient(#3465A4, #729FCF, #004586); - background: -o-linear-gradient(#3465A4, #729FCF, #004586); - background: -moz-linear-gradient(#3465A4, #729FCF, #004586); - background: linear-gradient(#3465A4, #729FCF, #004586); +.spreadsheet-header-column-hover { + background-color: #DDD; +} + +.spreadsheet-header-column-selected { color: white; - } + background: linear-gradient(#3465A4, #729FCF, #004586); +} -.spreadsheet-header-column:hover { - background-color: #DDD; - } +.spreadsheet-header-column-resize { + cursor: col-resize; +} .spreadsheet-header-rows-container { border: 1px solid darkgrey; @@ -155,72 +152,22 @@ } .spreadsheet-header-row { - border-bottom: 1px solid darkgrey; - padding: 0px; - margin: 0px; - height: 100%; - overflow: hidden; - } - -.spreadsheet-header-row:hover { - background-color: #DDD; - } - -.spreadsheet-header-column-text { - display: inline-block; - vertical-align: top; + border: 1px solid darkgray; font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; - text-overflow: ellipsis; - white-space: nowrap; - text-align: center; - height: 100%; - margin: 0px; - border: 0px; - padding: 0px; + color: black; + background-color: lightgray; cursor: pointer; - - /* Make the text unselectable for all browsers */ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; } -.spreadsheet-header-column-resize { - display: inline-block; - vertical-align: top; - cursor: col-resize; - height: 100%; - margin: 0px; - border: 0px; - padding: 0px; +.spreadsheet-header-row-hover { + background-color: #DDD; } -.spreadsheet-header-row-text { - font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; - text-overflow: ellipsis; - white-space: nowrap; - text-align: center; - height: 100%; - margin: 0px; - border: 0px; - padding: 0px; - overflow: hidden; - cursor: pointer; - - /* Make the text unselectable for all browsers */ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; +.spreadsheet-header-row-selected { + color: white; + background: linear-gradient(#3465A4, #729FCF, #004586); } .spreadsheet-header-row-resize { cursor: row-resize; - height: 100%; - margin: 0px; - border: 0px; - padding: 0px; } diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index 6d86d7fa..27765ec7 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -27,6 +27,11 @@ L.Control.ColumnHeader = L.Control.Header.extend({ L.DomEvent.addListener(cornerHeader, 'click', this._onCornerHeaderClick, this); this._headersContainer = L.DomUtil.create('div', 'spreadsheet-header-columns-container', rowColumnFrame); + this._initHeaderEntryStyles('spreadsheet-header-column');
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|3 +++ loleaflet/src/control/Control.Menubar.js |4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 18867cc98fa42462c1a99bf9a258d2b2cc29704b Author: Henry CastroDate: Sat Oct 21 13:42:35 2017 -0400 loleaflet: enable Calc spell checking Change-Id: I9293335e1da7a3ad35d6ed03caf8289e2f26d066 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 07d30512..9bd33b91 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1023,6 +1023,9 @@ map.on('doclayerinit', function () { {type: 'break', id:'break3'}, {type: 'html', id: 'InsertMode', html: '' }, + {type: 'break', id:'break4'}, + {type: 'html', id: 'LanguageStatus', + html: '' }, {type: 'break', id:'break5'}, {type: 'html', id: 'StatusSelectionMode', html: '' }, diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 7a37cce5..ad5bec54 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -298,7 +298,9 @@ L.Control.Menubar = L.Control.extend({ {name: _('Delete column'), type: 'unocommand', uno: '.uno:DeleteColumns'}] }, {name: _('Tools'), id: 'tools', type: 'menu', menu: [ - {name: _('Automatic spell checking'), type: 'unocommand', uno: '.uno:SpellOnline'} + {name: _('Automatic spell checking'), type: 'unocommand', uno: '.uno:SpellOnline'}, + {name: _('Language for entire document'), type: 'menu', menu: [ + {name: _('None (Do not check spelling)'), id: 'nonelanguage', type: 'unocommand', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]} ]}, {name: _('Help'), id: 'help', type: 'menu', menu: [ {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|1 + loleaflet/src/control/Control.Menubar.js |4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) New commits: commit cf3076a2600d0379446d87d3c8b8f05c4332a926 Author: Pranav KantDate: Tue Oct 3 22:01:53 2017 +0530 [API CHANGE]: loleaflet: postmessage: s/rev-history/UI_FileVersions/ And keep the compatibility with older clients by adding 'Deprecated' flag to the messages in PostMessage API. The clients must ignore such messages marked with deprecated flag and should wait for the standard non-deprecated post message. Change-Id: Id203c44db5986303c574e66602d8f98b4c04ba50 Reviewed-on: https://gerrit.libreoffice.org/43093 Reviewed-by: Jan Holesovsky Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 2dc57cf0..07d30512 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1817,6 +1817,7 @@ $(document).ready(function() { $('#closebuttonwrapper').hide(); } else { $('#closebutton').click(function(e) { + map.fire('postMessage', {msgId: 'close', args: {EverModified: map._everModified, Deprecated: true}}); map.fire('postMessage', {msgId: 'UI_Close', args: {EverModified: map._everModified}}); map.remove(); }); diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 056e3332..7a37cce5 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -707,8 +707,10 @@ L.Control.Menubar = L.Control.extend({ } else if (id === 'rev-history') { // if we are being loaded inside an iframe, ask // our host to show revision history mode - map.fire('postMessage', {msgId: 'rev-history'}); + map.fire('postMessage', {msgId: 'rev-history', args: {Deprecated: true}}); + map.fire('postMessage', {msgId: 'UI_FileVersions'}); } else if (id === 'closedocument') { + map.fire('postMessage', {msgId: 'close', args: {EverModified: map._everModified, Deprecated: true}}); map.fire('postMessage', {msgId: 'UI_Close', args: {EverModified: map._everModified}}); map.remove(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|3 +++ loleaflet/src/control/Control.Menubar.js |4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit b57a4e9171064941eb4554c1ca07c5424c88b2e2 Author: Henry CastroDate: Fri Oct 13 20:59:19 2017 -0400 loleaflet: enable Impress spell checking Change-Id: Ie4ae3f683bc55f7ca67b01e65dafea9746784b5a diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index c0f68fe0..2dc57cf0 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1084,6 +1084,9 @@ map.on('doclayerinit', function () { {type: 'break', id:'break1'}, {type: 'html', id: 'PageStatus', html: '' }, + {type: 'break', id:'break2'}, + {type: 'html', id: 'LanguageStatus', + html: '' } ]); // Remove irrelevant toolbars diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 57ec87e9..056e3332 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -244,7 +244,9 @@ L.Control.Menubar = L.Control.extend({ {name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}] }, {name: _('Tools'), id: 'tools', type: 'menu', menu: [ - {name: _('Automatic spell checking'), type: 'unocommand', uno: '.uno:SpellOnline'} + {name: _('Automatic spell checking'), type: 'unocommand', uno: '.uno:SpellOnline'}, + {name: _('Language for entire document'), type: 'menu', menu: [ + {name: _('None (Do not check spelling)'), id: 'nonelanguage', type: 'unocommand', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]} ]}, {name: _('Help'), id: 'help', type: 'menu', menu: [ {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|2 +- loleaflet/src/control/Control.Menubar.js |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit cb2de581089e6b71eaf53d999ace4b8795564172 Author: Andras TimarDate: Wed Oct 4 13:29:20 2017 +0200 loleaflet: enable l10n of language names Change-Id: Idd8b1b0bb081d718cf8d36c60ce6e293bd818fc6 Reviewed-on: https://gerrit.libreoffice.org/43130 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index d8da7ddf..a973991e 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1213,7 +1213,7 @@ map.on('commandstatechanged', function (e) { } } else if (commandName === '.uno:LanguageStatus') { - $('#LanguageStatus').html(state); + $('#LanguageStatus').html(_(state)); } else if (commandName === '.uno:ModifiedStatus') { var modifiedStatus = e.state === 'true'; diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 0948db0e..0abeea34 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -365,9 +365,9 @@ L.Control.Menubar = L.Control.extend({ $menuParagraph = $('#menu-resetparagraph').parent(); $menuDefault = $('#menu-resetlanguage').parent(); for (var lang in e.commandValues) { - $menuSelection.append(this._createLangMenuItem(e.commandValues[lang], encodeURIComponent('Current_' + e.commandValues[lang]))); - $menuParagraph.append(this._createLangMenuItem(e.commandValues[lang], encodeURIComponent('Paragraph_' + e.commandValues[lang]))); - $menuDefault.append(this._createLangMenuItem(e.commandValues[lang], encodeURIComponent('Default_' + e.commandValues[lang]))); + $menuSelection.append(this._createLangMenuItem(_(e.commandValues[lang]), encodeURIComponent('Current_' + e.commandValues[lang]))); + $menuParagraph.append(this._createLangMenuItem(_(e.commandValues[lang]), encodeURIComponent('Paragraph_' + e.commandValues[lang]))); + $menuDefault.append(this._createLangMenuItem(_(e.commandValues[lang]), encodeURIComponent('Default_' + e.commandValues[lang]))); } } }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|8 +++- loleaflet/src/control/Control.Menubar.js |5 - 2 files changed, 11 insertions(+), 2 deletions(-) New commits: commit 5112f33d097a3c30787aad861deaf6eb6f0d7280 Author: Marco CecchettiDate: Thu Sep 7 20:44:44 2017 +0200 Disable slideshow feature when DisableExport property is set. Change-Id: I424da9abf2bba737c2985c6dcbb2ab9dbee4770c Reviewed-on: https://gerrit.libreoffice.org/42081 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index d69fe1b3..6810034a 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -981,6 +981,9 @@ map.on('wopiprops', function(e) { if (e.HideSaveOption) { w2ui['toolbar-up'].hide('save'); } + if (e.HideExportOption) { + w2ui['presentation-toolbar'].hide('presentation', 'presentationbreak'); + } if (e.DisableCopy) { $('input#formulaInput').bind('copy', function(evt) { evt.preventDefault(); @@ -1060,7 +1063,10 @@ map.on('doclayerinit', function () { break; case 'presentation': var presentationToolbar = w2ui['presentation-toolbar']; - presentationToolbar.show('presentation', 'presentationbreak', 'insertpage', 'duplicatepage', 'deletepage'); + presentationToolbar.show('insertpage', 'duplicatepage', 'deletepage'); + if (!map['wopi'].HideExportOption) { + presentationToolbar.show('presentation', 'presentationbreak'); + } toolbarUp.remove('insertannotation', 'wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); toolbarUpMore.remove('insertannotation', 'wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); statusbar.insert('left', [ diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 17bc8a64..808b58fa 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -229,7 +229,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('New slide'), id: 'insertpage', type: 'action'}, {name: _('Duplicate slide'), id: 'duplicatepage', type: 'action'}, {name: _('Delete slide'), id: 'deletepage', type: 'action'}, - {type: 'separator'}, + {type: 'separator', id: 'fullscreen-presentation-separator'}, {name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}] }, {name: _('Help'), id: 'help', type: 'menu', menu: [ @@ -738,6 +738,9 @@ L.Control.Menubar = L.Control.extend({ if (menu[i].id === 'save' && this._map['wopi'].HideSaveOption) continue; + if (menu[i].id && menu[i].id.startsWith('fullscreen-presentation') && this._map['wopi'].HideExportOption) + continue; + // Keep track of all 'downloadas-' options and register them as // export formats with docLayer which can then be publicly accessed unlike // this Menubar control for which there doesn't seem to be any easy way ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/admin/bootstrap/dashboard.css | 12 loleaflet/src/admin/AdminSocketAnalytics.js | 66 --- 2 files changed, 62 insertions(+), 16 deletions(-) New commits: commit 0cf9c8791f7b40db4f04f3946fa067fed63d44bf Author: Aditya DewanDate: Sat Aug 19 03:38:59 2017 +0530 tdf#107278 Beautification of graphs - better looking axis - smooth transition for axis and data path Change-Id: I419a1e9a0691fc4b6a396a970a438431aa724d9c Reviewed-on: https://gerrit.libreoffice.org/41313 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/admin/bootstrap/dashboard.css b/loleaflet/dist/admin/bootstrap/dashboard.css index 82fb2f5f..1f627f0e 100644 --- a/loleaflet/dist/admin/bootstrap/dashboard.css +++ b/loleaflet/dist/admin/bootstrap/dashboard.css @@ -140,10 +140,20 @@ tr:hover .userContainer .dropdown-menu, td:hover .docContainer .dropdown-menu{ /* * Graph view buttons */ - .nav-tabs > li.active > a{ background-color: #f5f5f5; } .graph-content { background-color: #f5f5f5; +} + +.axis path, .axis line{ + fill: none; + stroke: grey; + stroke-width: 1; + shape-rendering: crispEdges; +} + +path { + stroke-width: 1; } \ No newline at end of file diff --git a/loleaflet/src/admin/AdminSocketAnalytics.js b/loleaflet/src/admin/AdminSocketAnalytics.js index 72d5f275..f2286596 100644 --- a/loleaflet/src/admin/AdminSocketAnalytics.js +++ b/loleaflet/src/admin/AdminSocketAnalytics.js @@ -120,12 +120,17 @@ var AdminSocketAnalytics = AdminSocketBase.extend({ d3XAxis = d3.svg.axis() .scale(xScale) .tickFormat(function(d) { - d = Math.abs(d / 1000); + var d = Math.abs(d / 1000), sUnit; var units = ['s', 'min', 'hr']; for (var i = 0; i < units.length && Math.abs(d) >= 60; i++) { + sUnit = parseInt(d % 60); d = parseInt(d / 60); } - return parseInt(d) + units[i] + ' ago'; + if (i !== 0 && sUnit !== 0) { + return d + units[i][0] + ' ' + sUnit + units[i-1][0]; + } + else + return d + units[i]; }); d3Line = d3.svg.line() @@ -236,12 +241,12 @@ var AdminSocketAnalytics = AdminSocketBase.extend({ } vis.append('svg:g') - .attr('class', 'x-axis') + .attr('class', 'x-axis axis') .attr('transform', 'translate(0,' + (this._graphHeight - this._graphMargins.bottom) + ')') .call(xAxis); vis.append('svg:g') - .attr('class', 'y-axis') + .attr('class', 'y-axis axis') .attr('transform', 'translate(' + this._graphMargins.left + ',0)') .call(yAxis); @@ -251,7 +256,7 @@ var AdminSocketAnalytics = AdminSocketBase.extend({ .attr('d', line(data)) .attr('class', 'line') .attr('stroke', 'blue') - .attr('stroke-width', 2) + .attr('stroke-width', 1) .attr('fill', 'none'); } else if (option === 'net') { @@ -260,29 +265,54 @@ var AdminSocketAnalytics = AdminSocketBase.extend({ .attr('d', this._d3NetSentLine(this._sentAvgStats)) .attr('class', 'lineSent') .attr('stroke', 'red') - .attr('stroke-width', 2) + .attr('stroke-width', 1) .attr('fill', 'none'); vis.append('svg:path') .attr('d', this._d3NetRecvLine(this._recvAvgStats)) .attr('class', 'lineRecv') .attr('stroke', 'green') - .attr('stroke-width', 2) + .attr('stroke-width', 1) .attr('fill', 'none'); } }, _addNewData: function(oldData, newData, option) { - var size; - if (option === 'mem') + var size, graphName, line, elemSize; + elemSize = this._graphWidth - this._graphMargins['left'] - this._graphMargins['right']; + + if (option === 'mem') { size = this._memStatsSize; - else
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js| 17 + loleaflet/src/control/Control.Menubar.js | 12 +++- 2 files changed, 20 insertions(+), 9 deletions(-) New commits: commit 7a69dc16509cee56f1a90b459c8189c5cfb08add Author: Aditya DewanDate: Sat Jun 17 08:48:13 2017 +0530 disable search as type from the dialog box for calc/impress Change-Id: I93fa810876c405ea29521ecd90d4cf70affc7994 Reviewed-on: https://gerrit.libreoffice.org/38904 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index b2657afb..a0d9a5b5 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -757,10 +757,19 @@ function selectItem(item, func) } function onSearch(e) { var toolbar = w2ui['toolbar-down']; - map.search(L.DomUtil.get('search-input').value, false, '', 0, true /* expand search */); - toolbar.enable('searchprev'); - toolbar.enable('searchnext'); - toolbar.show('cancelsearch'); + // conditionally disabling until, we find a solution for tdf#108577 + if (L.DomUtil.get('search-input').value === '') { + toolbar.disable('searchprev'); + toolbar.disable('searchnext'); + toolbar.hide('cancelsearch'); + } + else { + if(map.getDocType() === 'text') + map.search(L.DomUtil.get('search-input').value, false, '', 0, true /* expand search */); + toolbar.enable('searchprev'); + toolbar.enable('searchnext'); + toolbar.show('cancelsearch'); + } } function onSearchKeyPress(e) { diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 71b9f774..af87725d 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -499,11 +499,13 @@ L.Control.Menubar = L.Control.extend({ var xElem = 0, yElem = 0; var maxH = window.innerHeight, maxW = window.innerWidth; - $('#findthis').on('input', function() { - if (this.value.length != 0) { - map.search(this.value, false, '', 0, true); - } - }); + if (map.getDocType() === 'text') { + $('#findthis').on('input', function() { + if (this.value.length != 0) { + map.search(this.value, false, '', 0, true); + } + }); + } $('.vex-content').on('mousedown', function(e) { selected = this; selected.style.cursor = 'move'; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/images/custom_button.png |binary loleaflet/dist/toolbar/toolbar.js | 10 +- loleaflet/src/layer/tile/TileLayer.js |4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) New commits: commit 6e46c760ce6928e5c2120499a44d79529e263e07 Author: Pranav KantDate: Wed Jun 21 12:12:25 2017 +0530 Disable Copy from calc cells and formula bar ... of course only when DisableCopy is mentioned. Change-Id: Ia47c403a437384c673364f500c2137f54c1f4bad diff --git a/loleaflet/dist/images/custom_button.png b/loleaflet/dist/images/custom_button.png new file mode 100644 index ..788cef39 Binary files /dev/null and b/loleaflet/dist/images/custom_button.png differ diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index cf79c558..b2657afb 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -953,6 +953,14 @@ map.on('wopiprops', function(e) { if (e.HideSaveOption) { w2ui['toolbar-up'].hide('save'); } + if (e.DisableCopy) { + $('input#formulaInput').bind('copy', function(evt) { + evt.preventDefault(); + }); + $('input#addressInput').bind('copy', function(evt) { + evt.preventDefault(); + }); + } }); map.on('doclayerinit', function () { @@ -1586,7 +1594,7 @@ function getUserItem(viewId, userName, extraInfo, color) { var html = '' + ''; if (extraInfo !== undefined && extraInfo.avatar !== undefined) { - html += '' + html += ''; } // TODO: Add mail and other links as sub-menu. diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 986a2ca0..3dfe8ac2 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -509,7 +509,9 @@ L.TileLayer = L.GridLayer.extend({ _onCellFormulaMsg: function (textMsg) { var formula = textMsg.substring(13); - this._selectionTextContent = formula; + if (!this._map['wopi'].DisableCopy) { + this._selectionTextContent = formula; + } this._map.fire('cellformula', {formula: formula}); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css|6 ++ loleaflet/src/control/Control.Scroll.js |5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) New commits: commit b4ff02cacd7bd332f1e3d0074f333dea667c079d Author: Pranav KantDate: Tue Jun 13 18:13:00 2017 +0530 loleaflet: Also show scrollbar on hover Better to add our own class and then add/remove it instead of messing up with original CSS rules. Change-Id: I45cf2a566d51fe8e7d9b009c4c9d86b97354ffd1 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index fe69deff..010d8894 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -35,6 +35,12 @@ z-index: 1000; } +.loleaflet-scrollbar-show { +opacity: 1 !important; +filter: "alpha(opacity=100)" !important; +-ms-filter: "alpha(opacity=100)" !important; +} + body { margin: 0; } diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js index 03bdcb77..89affd46 100644 --- a/loleaflet/src/control/Control.Scroll.js +++ b/loleaflet/src/control/Control.Scroll.js @@ -37,7 +37,8 @@ L.Control.Scroll = L.Control.extend({ if (autoHideTimeout) clearTimeout(autoHideTimeout); autoHideTimeout = setTimeout(function() { - $('.mCS-autoHide > .mCustomScrollBox .mCSB_scrollTools, .mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools').css({opacity: 0, 'filter': 'alpha(opacity=0)', '-ms-filter': 'alpha(opacity=0)'}); + // $('.mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools').css({opacity: 0, 'filter': 'alpha(opacity=0)', '-ms-filter': 'alpha(opacity=0)'}); + $('.mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools').removeClass('loleaflet-scrollbar-show'); }, 2000); }, whileScrolling: function() { @@ -46,7 +47,7 @@ L.Control.Scroll = L.Control.extend({ // autoHide feature doesn't work because plugin relies on hovering on scroll container // and we have a mock scroll container whereas the actual user hovering happens only on // real document. Change the CSS rules manually to simulate autoHide feature. - $('.mCS-autoHide > .mCustomScrollBox .mCSB_scrollTools, .mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools').css({opacity: 1, 'filter': 'alpha(opacity=100)', '-ms-filter': 'alpha(opacity=100)'}); + $('.mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools').addClass('loleaflet-scrollbar-show'); }, onUpdate: function() { console.debug('mCustomScrollbar: onUpdate:'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/searchControl.css |3 ++- loleaflet/src/control/Control.Menubar.js |4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) New commits: commit fe6ad562419dcfcc6ac5c9da59a3272cb925eb90 Author: Jan HolesovskyDate: Wed Jun 7 16:10:14 2017 +0200 The arrows in Next / Prev don't show for me. Using it this way looks very fragile to me; let's just avoid this. Change-Id: I7459f3b215f5f9930287566a1bd946a94e9b343b Reviewed-on: https://gerrit.libreoffice.org/38512 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/searchControl.css b/loleaflet/dist/searchControl.css index 1bd0c1c6..e8933f29 100644 --- a/loleaflet/dist/searchControl.css +++ b/loleaflet/dist/searchControl.css @@ -20,6 +20,7 @@ float: left !important; margin: 0px !important; margin-right: 6px !important; + width: 20%; } .findReplaceVex .vex-dialog-button { text-transform: initial !important; @@ -31,4 +32,4 @@ -o-transition: background-color 0.8s linear; transition: background-color 0.8s linear; -} \ No newline at end of file +} diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index a480f15e..a23d0fa7 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -475,13 +475,13 @@ L.Control.Menubar = L.Control.extend({ $vexContent.data().vex.option = 'replaceAll'; }}), $.extend({}, vex.dialog.buttons.findPrev, { - text: '⯇ ' + _('Prev'), + text: _('Previous'), className: 'btnArrow', click: function($vexContent, e) { $vexContent.data().vex.option = 'previous'; }}), $.extend({}, vex.dialog.buttons.findNext, { - text: _('Next') + ' ⯈', + text: _('Next'), className: 'btnArrow', click: function($vexContent, e) { $vexContent.data().vex.option = 'next'; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/searchControl.css | 28 +++ loleaflet/dist/toolbar/toolbar.js|4 - loleaflet/src/control/Control.Menubar.js | 119 ++- loleaflet/src/control/Search.js | 30 +-- 4 files changed, 168 insertions(+), 13 deletions(-) New commits: commit ccca292d7d50c7bbb0a5bdf29ac9981be07c41c1 Author: Aditya DewanDate: Thu Jun 1 02:57:16 2017 +0530 tdf#97020 Adding find functionality Change-Id: I4d8d22368e6f8ee85873c86f9e80fbdffc2ad17a Reviewed-on: https://gerrit.libreoffice.org/38287 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/searchControl.css b/loleaflet/dist/searchControl.css index 85928da6..1bd0c1c6 100644 --- a/loleaflet/dist/searchControl.css +++ b/loleaflet/dist/searchControl.css @@ -1,3 +1,29 @@ +.findReplaceVex .findreplacetable { + width: 100%; +} +.findReplaceVex .findreplacetable label, .findReplaceVex .findreplacetable input { + font-size: .9em; + width: 95%; +} +.findReplaceVex .vex-content{ + width: 650px !important; + position: absolute !important; + z-index: 1100; + left: calc(50vw - 325px); + box-shadow: 0 4px 16px rgba(0,0,0,.2); + border: 1px solid rgba(0,0,0,.333); +} +.vex-dialog-message { + font-size: 1.2em; +} +.findReplaceVex .btnArrow { + float: left !important; + margin: 0px !important; + margin-right: 6px !important; +} +.findReplaceVex .vex-dialog-button { + text-transform: initial !important; +} .search-not-found { background-color: red; -webkit-transition: background-color 0.8s linear; @@ -5,4 +31,4 @@ -o-transition: background-color 0.8s linear; transition: background-color 0.8s linear; -} +} \ No newline at end of file diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index ea3ab1d2..e1a2d019 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -753,7 +753,7 @@ function selectItem(item, func) } function onSearch(e) { var toolbar = w2ui['toolbar-down']; - map.search(L.DomUtil.get('search-input').value, false, 0, true /* expand search */); + map.search(L.DomUtil.get('search-input').value, false, '', 0, true /* expand search */); toolbar.enable('searchprev'); toolbar.enable('searchnext'); toolbar.show('cancelsearch'); @@ -1251,8 +1251,10 @@ map.on('search', function (e) { toolbar.disable('searchnext'); toolbar.hide('cancelsearch'); L.DomUtil.addClass(searchInput, 'search-not-found'); + $('#findthis').addClass('search-not-found'); map.resetSelection(); setTimeout(function () { + $('#findthis').removeClass('search-not-found'); L.DomUtil.removeClass(searchInput, 'search-not-found'); }, 500); } diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 0b786615..87d224e7 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -28,6 +28,8 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}, {type: 'separator'}, + {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}, + {type: 'separator'}, {name: _('Track Changes'), type: 'menu', menu: [ {name: _('Record'), type: 'unocommand', uno: '.uno:TrackChanges'}, {name: _('Show'), type: 'unocommand', uno: '.uno:ShowTrackedChanges'}, @@ -428,6 +430,121 @@ L.Control.Menubar = L.Control.extend({ // check if it is empty fileName = fileName === '' ? 'document' : fileName; map.downloadAs(fileName + '.' + format, format); + } else if (id === 'findandreplace') { + findReplaceContent = + '\ + \ + \ + \ + Find\ + \ + \ + \ + \ + \ + \ + \ + Replace with\ + \ + \ +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src wsd/DocumentBroker.cpp wsd/Storage.cpp wsd/Storage.hpp
loleaflet/dist/errormessages.js |1 + loleaflet/src/core/Socket.js|3 +++ wsd/DocumentBroker.cpp |5 + wsd/Storage.cpp |4 wsd/Storage.hpp |1 + 5 files changed, 14 insertions(+) New commits: commit d840e8720a2ba45ae981b53e5a06b4d28f847314 Author: Pranav KantDate: Wed May 31 11:51:12 2017 +0530 Handle WOPI PutFile unauthorized access token Change-Id: I29ee8cc0c9f3ea42f70628eca6f74d161d1a38f9 diff --git a/loleaflet/dist/errormessages.js b/loleaflet/dist/errormessages.js index 89f31fc7..8ea1185c 100644 --- a/loleaflet/dist/errormessages.js +++ b/loleaflet/dist/errormessages.js @@ -12,5 +12,6 @@ exports.faileddocloading = _('Failed to load the document. Please ensure the fil exports.storage = { loadfailed: _('Failed to read document from storage. Please contact your storage server (%storageserver) administrator.'), savediskfull: _('Save failed due to no disk space left on storage server. Document will now be read-only. Please contact the server (%storageserver) administrator to continue editing.'), + saveunauthorized: _('Document cannot be saved to storage server (%storageserver) due to expired or invalid access token. Refresh your session to not to lose your work.'), savefailed: _('Document cannot be saved to storage. Check your permissions or contact the storage server (%storageserver) administrator.') }; diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 25f5f83f..fdce2a54 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -320,6 +320,9 @@ L.Socket = L.Class.extend({ else if (command.errorKind === 'savefailed') { storageError = errorMessages.storage.savefailed; } + else if (command.errorKind === 'saveunauthorized') { + storageError = errorMessages.storage.saveunauthorized; + } else if (command.errorKind === 'loadfailed') { storageError = errorMessages.storage.loadfailed; // Since this is a document load failure, wsd will disconnect the socket anyway, diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 7e2a1669..e5e8a19c 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -647,6 +647,11 @@ bool DocumentBroker::saveToStorageInternal(const std::string& sessionId, sessionIt.second->sendTextFrame("error: cmd=storage kind=savediskfull"); } } +else if (storageSaveResult == StorageBase::SaveResult::UNAUTHORIZED) +{ +LOG_ERR("Cannot save docKey [" << _docKey << "] to storage URI [" << uri << "]. Invalid or expired access token. Notifying client."); +it->second->sendTextFrame("error: cmd=storage kind=saveunauthorized"); +} else if (storageSaveResult == StorageBase::SaveResult::FAILED) { //TODO: Should we notify all clients? diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp index 3ade24e2..a698b04f 100644 --- a/wsd/Storage.cpp +++ b/wsd/Storage.cpp @@ -662,6 +662,10 @@ StorageBase::SaveResult WopiStorage::saveLocalFileToStorage(const std::string& a { saveResult = StorageBase::SaveResult::DISKFULL; } +else if (response.getStatus() == Poco::Net::HTTPResponse::HTTP_UNAUTHORIZED) +{ +saveResult = StorageBase::SaveResult::UNAUTHORIZED; +} } catch(const Poco::Exception& pexc) { diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp index e786f5b2..34b56de3 100644 --- a/wsd/Storage.hpp +++ b/wsd/Storage.hpp @@ -57,6 +57,7 @@ public: { OK, DISKFULL, +UNAUTHORIZED, FAILED }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |2 +- loleaflet/src/map/handler/Map.Keyboard.js |3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit ac8e458bda37a17e289ee2da71a59b234db5e753 Author: Pranav KantDate: Wed May 31 11:25:03 2017 +0530 User save should terminate edit in calc; and save if unmodified Only autosave should do the opposite which it already does in DocumentBroker. Change-Id: Ibb86e0b29fc058318de96d2684c326dbe958e6fb diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 801e7b58..90de878e 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -219,7 +219,7 @@ function onClick(id, item, subItem) { } } else if (id === 'save') { - map.save(true, true); + map.save(false /* An explicit save should terminate cell edit */, false /* An explicit save should save it again */); } else if (id === 'repair') { map._socket.sendMessage('commandvalues command=.uno:DocumentRepair'); diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 812ea847..1109b35f 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -511,7 +511,8 @@ L.Map.Keyboard = L.Handler.extend({ this._map.print(); return true; case 83: // s - this._map.save(true, true); + this._map.save(false /* An explicit save should terminate cell edit */, + false /* An explicit save should save it again */); return true; case 86: // v case 118: // v (Safari) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 17 + loleaflet/src/map/Map.js |2 +- 2 files changed, 14 insertions(+), 5 deletions(-) New commits: commit d0ac8a4b969d05d474170b2d06d601d54eb8ab26 Author: Ashod NakashianDate: Sun May 28 17:47:53 2017 -0400 loleaflet: add user avatar to useritem Change-Id: I0b366ab4b92fb9b1d5f7aa0ea6fe51ac9897bdce Reviewed-on: https://gerrit.libreoffice.org/38121 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 18c996bf..801e7b58 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1565,10 +1565,19 @@ function onUseritemClicked(e) { } } -function getUserItem(viewId, userName, color) { +function getUserItem(viewId, userName, extraInfo, color) { var html = '' + -'' + -'' + userName + '' + +' ' + } + else { + html += '">'; + } + + // TODO: Add mail and other links as sub-menu. + html += '' + +'' + userName + '' + ''; return html; @@ -1617,7 +1626,7 @@ map.on('addview', function(e) { } var userlistItem = w2ui['toolbar-down'].get('userlist'); - var newhtml = $(userlistItem.html).find('#userlist_table tbody').append(getUserItem(e.viewId, username, color)).parent().parent()[0].outerHTML; + var newhtml = $(userlistItem.html).find('#userlist_table tbody').append(getUserItem(e.viewId, username, e.extraInfo, color)).parent().parent()[0].outerHTML; userlistItem.html = newhtml; updateUserListCount(); }); diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 180da860..c809980e 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -163,7 +163,7 @@ L.Map = L.Evented.extend({ this.fire('postMessage', {msgId: 'View_Added', args: {ViewId: viewInfo.id, UserId: viewInfo.userid, UserName: viewInfo.username, UserExtraInfo: viewInfo.userextrainfo, Color: viewInfo.color, ReadOnly: viewInfo.readonly}}); // Fire last, otherwise not all events are handled correctly. - this.fire('addview', {viewId: viewInfo.id, username: viewInfo.username, readonly: this.isViewReadOnly(viewInfo.id)}); + this.fire('addview', {viewId: viewInfo.id, username: viewInfo.username, extraInfo: viewInfo.userextrainfo, readonly: this.isViewReadOnly(viewInfo.id)}); }, removeView: function(viewid) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/protocol.txt
loleaflet/dist/toolbar/toolbar.js|5 +- loleaflet/src/control/Control.Menubar.js | 10 ++-- loleaflet/src/control/Toolbar.js | 12 - wsd/ClientSession.cpp|8 +++ wsd/DocumentBroker.cpp | 70 --- wsd/DocumentBroker.hpp |6 +- wsd/protocol.txt | 10 +++- 7 files changed, 67 insertions(+), 54 deletions(-) New commits: commit 1cb75cbcb8c87481bf341c5ac058a36c13529dc8 Author: Pranav KantDate: Mon May 15 11:29:04 2017 +0530 wsd: Save wrapper over .uno:Save Document broker needs to know when the save request is sent and when the save finished. It uses these parameters to avoid shutting down document, in the document broker main polling loop, if save is already going on. But direct .uno:Save commands issued from loleaflet precludes document broker to keep track of it - in this case a .uno:Save command issued from loleaflet followed by closing the session will prevent saving the document to storage, if document is huge enough and LO core takes a bit of time to save it. A save wrapper command, 'save', ensures that document broker is aware of all such save requests (_saveRequestTime member variable) and doesn't close the document until we completely save it (to storage and other cleanups). Change-Id: I5ec73d45adff23b2e7543e93dfd0624a5e5af46d diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index bbd4b81e..55d50353 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -218,6 +218,9 @@ function onClick(id, item, subItem) { map.toggleCommandState(item.uno); } } + else if (id === 'save') { + map.save(true, true); + } else if (id === 'repair') { map._socket.sendMessage('commandvalues command=.uno:DocumentRepair'); } @@ -465,7 +468,7 @@ $(function () { { text: _('Right wrap'), id: 'wrap-WrapRight' }, { text: _('Wrap through'), id: 'wrap-WrapThrough' } ]}, - {type: 'button', id: 'save', img: 'save', hint: _('Save'), uno: 'Save'}, + {type: 'button', id: 'save', img: 'save', hint: _('Save')}, {type: 'break', id: 'savebreak'}, {type: 'button', id: 'undo', img: 'undo', hint: _('Undo'), uno: 'Undo'}, {type: 'button', id: 'redo', img: 'redo', hint: _('Redo'), uno: 'Redo'}, diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 89048a3b..8206ab5c 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -8,7 +8,7 @@ L.Control.Menubar = L.Control.extend({ options: { text: [ {name: _('File'), id: 'file', type: 'menu', menu: [ - {name: _('Save'), id: 'save', type: 'unocommand', uno: '.uno:Save'}, + {name: _('Save'), id: 'save', type: 'action'}, {name: _('Print'), id: 'print', type: 'action'}, {name: _('See revision history'), id: 'rev-history', type: 'action'}, {name: _('Download as'), id: 'downloadas', type: 'menu', menu: [ @@ -172,7 +172,7 @@ L.Control.Menubar = L.Control.extend({ presentation: [ {name: _('File'), id: 'file', type: 'menu', menu: [ - {name: _('Save'), id: 'save', type: 'unocommand', uno: '.uno:Save'}, + {name: _('Save'), id: 'save', type: 'action'}, {name: _('Print'), id: 'print', type: 'action'}, {name: _('See revision history'), id: 'rev-history', type: 'action'}, {name: _('Download as'), id: 'downloadas', type: 'menu', menu: [ @@ -232,7 +232,7 @@ L.Control.Menubar = L.Control.extend({ spreadsheet: [ {name: _('File'), id: 'file', type: 'menu', menu: [ - {name: _('Save'), id: 'save', type: 'unocommand', uno: '.uno:Save'}, + {name: _('Save'), id: 'save', type: 'action'}, {name: _('Print'), id: 'print', type: 'action'}, {name: _('See revision history'), id: 'rev-history', type: 'action'}, {name: _('Download as'), id:'downloadas', type: 'menu', menu: [ @@ -417,7 +417,9 @@ L.Control.Menubar = L.Control.extend({ }, _executeAction: function(id) { - if (id === 'print') { +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |6 -- loleaflet/src/layer/tile/CalcTileLayer.js | 12 2 files changed, 18 deletions(-) New commits: commit 56c49af98a14cb7098849c046c32a181f6761e11 Author: Pranav KantDate: Thu Apr 27 10:27:54 2017 +0530 loleaflet: Bin client side cell annotation marker No need as core renders its in-tile annotation marker now, if comment indicator setting is on in the document. Change-Id: I213827fc089790398e02b0fd9cba464ab62b0d8d diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index b637a217..dd7ddb59 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -191,12 +191,6 @@ body { width: 95%; } -.loleaflet-cell-annotation { - background: red; - border: 1px solid red; - pointer-events: none; -} - .loleaflet-div-layer { position: absolute; left: 0; diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 8db36a7a..b495b467 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -34,16 +34,6 @@ L.CalcTileLayer = L.TileLayer.extend({ createAnnotation: function (comment) { var annotation = L.divOverlay(comment.cellPos).bindAnnotation(L.annotation(L.latLng(0, 0), comment, comment.id === 'new' ? {noMenu: true} : {})); - annotation.mark = L.marker(comment.cellPos.getNorthEast(), { - draggable: false, - clickable: false, - keyboard: false, - icon: L.divIcon({ - iconSize: L.point(2, 2), - iconAnchor: L.point(4, 0), - className: 'loleaflet-cell-annotation' - }) - }); return annotation; }, @@ -94,12 +84,10 @@ L.CalcTileLayer = L.TileLayer.extend({ }, showAnnotation: function (annotation) { - this._map.addLayer(annotation.mark); this._map.addLayer(annotation); }, hideAnnotation: function (annotation) { - this._map.removeLayer(annotation.mark); this._map.removeLayer(annotation); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |9 + loleaflet/src/layer/AnnotationManager.js |4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) New commits: commit 0c53975f180042e1c7b3cc3fd70737deefaba7a1 Author: Pranav KantDate: Tue Apr 25 13:32:51 2017 +0530 loleaflet: New comment size/width Change-Id: Ief2d9c942dffab7a98dc5a7de2208e511f45df78 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 568b8785..9f643e4e 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -149,14 +149,7 @@ body { color: #222; border: none; border-radius: 2px; -} - -.loleaflet-annotation-content-wrapper { -width: 180px; -} - -.loleaflet-annotation-redline-content-wrapper { -width: 240px; + width: 240px; } .loleaflet-annotation-content { diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index 012a6a08..4b714319 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -4,10 +4,10 @@ L.AnnotationManager = L.Class.extend({ options: { - marginX: 50, + marginX: 40, marginY: 10, offset: 5, - extraSize: L.point(250, 0) + extraSize: L.point(290, 0) }, initialize: function (map, options) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src wsd/Admin.cpp wsd/Admin.hpp wsd/AdminModel.cpp wsd/AdminModel.hpp wsd/ClientSession.hpp wsd/DocumentBroker.cpp
loleaflet/dist/admin/bootstrap/dashboard.css | 12 ++ loleaflet/src/admin/AdminSocketOverview.js | 53 ++- wsd/Admin.cpp|6 +-- wsd/Admin.hpp|2 - wsd/AdminModel.cpp | 43 ++--- wsd/AdminModel.hpp | 10 +++-- wsd/ClientSession.hpp|1 wsd/DocumentBroker.cpp |2 - 8 files changed, 99 insertions(+), 30 deletions(-) New commits: commit 41ed318de8c1ebb5c2d707b6fb12a9c9b5440407 Author: Aditya DewanDate: Fri Apr 7 19:49:04 2017 +0530 tdf#106449 admin:adding user list for each document Change-Id: Ia5c382f469a80464d0435e1e2e4de3daaba8a690 Reviewed-on: https://gerrit.libreoffice.org/36275 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/admin/bootstrap/dashboard.css b/loleaflet/dist/admin/bootstrap/dashboard.css index 0535a2fd..60ed98d2 100644 --- a/loleaflet/dist/admin/bootstrap/dashboard.css +++ b/loleaflet/dist/admin/bootstrap/dashboard.css @@ -113,3 +113,15 @@ body { position: absolute; display: none; } + +.userContainer{ + display: none; + position: absolute; + border: 1px solid black; + padding: 5px; + border-radius: 4px; + background-color: #dd; +} +tr:hover .userContainer{ + display: block; +} \ No newline at end of file diff --git a/loleaflet/src/admin/AdminSocketOverview.js b/loleaflet/src/admin/AdminSocketOverview.js index 4f6e0812..96c29a0b 100644 --- a/loleaflet/src/admin/AdminSocketOverview.js +++ b/loleaflet/src/admin/AdminSocketOverview.js @@ -89,21 +89,31 @@ var AdminSocketOverview = AdminSocketBase.extend({ var nViews, nTotalViews; var docProps, sPid, sName, sViews, sMem, sDocTime; if (textMsg.startsWith('documents')) { - var documents = textMsg.substring('documents'.length); - documents = documents.trim().split('\n'); - for (var i = 0; i < documents.length; i++) { - docProps = documents[i].trim().split(' '); - sPid = docProps[0]; - sName = decodeURI(docProps[1]); - sViews = docProps[2]; - sMem = docProps[3]; - sDocTime = docProps[4]; - sDocIdle = docProps[5]; + jsonStart = textMsg.indexOf('{'); + jsonMsg = JSON.parse(textMsg.substr(jsonStart).trim()); + docList = jsonMsg['documents']; + for (var i = 0; i < docList.length; i++) { + + docProps = docList[i]; + sPid = docProps['pid']; + sName = decodeURI(docProps['fileName']); + sViews = docProps['activeViews']; + sMem = docProps['memory']; + sDocTime = docProps['elapsedTime']; + sDocIdle = docProps['idleTime']; + userListJson = docProps['views'] $doc = $('#doc' + sPid); $rowContainer = $(document.createElement('tr')).attr('id', 'doc' + sPid); - $pid = $(document.createElement('td')).text(sPid); + $userContainer = $(document.createElement('div')).attr('id', 'ucontainer' + sPid) + .addClass('userContainer'); + for (var j = 0; j < userListJson.length; j++) { + $user = $(document.createElement('div')).text(userListJson[j]['userName']) + .attr('id', 'user' + userListJson[j]['sessionid']); + $userContainer.append($user); + } + $pid.append($userContainer); $rowContainer.append($pid); $name = $(document.createElement('td')).text(sName); @@ -142,14 +152,18 @@ var AdminSocketOverview = AdminSocketBase.extend({ docProps = textMsg.trim().split(' '); sPid = docProps[0]; sName = decodeURI(docProps[1]); - // docProps[2] == sessionid - sMem = docProps[3]; + sessionid = docProps[2]; + uName = decodeURI(docProps[3]); + sMem =
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |6 +- loleaflet/src/layer/marker/Annotation.js |9 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) New commits: commit 043ec94bef7dd82dd558fe5834e068636820300c Author: Pranav KantDate: Fri Apr 14 11:46:12 2017 +0530 loleaflet: Same width for all comments, different from redline comments Separate css classes for these different types of annotations. Change-Id: I2013a05a2f7095956765661169670e0bb87bb372 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index d7522f87..cd7ae6a0 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -138,7 +138,7 @@ body { text-align: center; } -.loleaflet-annotation-content-wrapper { +.loleaflet-annotation-content-wrapper, .loleaflet-annotation-redline-content-wrapper { padding: 8px; font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important; font-size: 13px; @@ -151,6 +151,10 @@ body { border-radius: 2px; } +.loleaflet-annotation-content-wrapper { +width: 180px; +} + .loleaflet-annotation-content { margin: 3px 3px; line-height: 1.4; diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 2c881c9a..97b2d8e9 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -131,9 +131,12 @@ L.Annotation = L.Layer.extend({ classTextArea = 'loleaflet-annotation-textarea', classEdit = 'loleaflet-annotation-edit'; var container = this._container = - L.DomUtil.create(tagDiv, 'loleaflet-annotation'); - var wrapper = this._wrapper = - L.DomUtil.create(tagDiv, 'loleaflet-annotation-content-wrapper', container); + L.DomUtil.create(tagDiv, 'loleaflet-annotation'); + if (this._data.trackchange) { + var wrapper = this._wrapper = L.DomUtil.create(tagDiv, 'loleaflet-annotation-redline-content-wrapper', container); + } else { + wrapper = this._wrapper = L.DomUtil.create(tagDiv, 'loleaflet-annotation-content-wrapper', container); + } this._author = L.DomUtil.create('table', 'loleaflet-annotation-table', wrapper); var tbody = L.DomUtil.create('tbody', empty, this._author); var tr = L.DomUtil.create('tr', empty, tbody); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
dev/null |binary loleaflet/dist/images/submenu.svg| 76 +++ loleaflet/dist/loleaflet.css | 52 +++-- loleaflet/src/layer/marker/Annotation.js | 27 ++- 4 files changed, 111 insertions(+), 44 deletions(-) New commits: commit 7b7c73f8beb4c6f6cee0b35c9a31341e0ad7e801 Author: Jan HolesovskyDate: Wed Apr 12 16:57:37 2017 +0200 Align the Accept / Reject buttons with the kebab menu. And few other improvemnts inluding: * use svg instead of png for the menu * add title (caption) for the Accept / Reject change. Change-Id: Ic7e781d7e93d319f766b387a8eddfa70c1920760 diff --git a/loleaflet/dist/images/submenu.png b/loleaflet/dist/images/submenu.png deleted file mode 100644 index 5159693f.. Binary files a/loleaflet/dist/images/submenu.png and /dev/null differ diff --git a/loleaflet/dist/images/submenu.svg b/loleaflet/dist/images/submenu.svg new file mode 100644 index ..59401d65 --- /dev/null +++ b/loleaflet/dist/images/submenu.svg @@ -0,0 +1,76 @@ + +http://purl.org/dc/elements/1.1/; + xmlns:cc="http://creativecommons.org/ns#; + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns:svg="http://www.w3.org/2000/svg; + xmlns="http://www.w3.org/2000/svg; + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape; + height="24" + viewBox="0 0 24 24" + width="24" + id="svg2" + version="1.1" + inkscape:version="0.48.5 r10040" + sodipodi:docname="submenu.svg"> + + + +image/svg+xml +http://purl.org/dc/dcmitype/StillImage; /> + + + + + + + + + + + + diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 20563cac..d7522f87 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -204,27 +204,35 @@ body { .loleaflet-annotation-author { padding-left: 10px; + padding-right: 10px; vertical-align: top; display: table-cell; } -.loleaflet-redline-accept-button, .loleaflet-redline-reject-button { +.loleaflet-annotation-menu, .loleaflet-annotation-menu-redline, .loleaflet-redline-accept-button, .loleaflet-redline-reject-button { + margin: 0; padding: 0; -border: 0; -height: 25px; -width: 21px; +width: 24px; +height: 24px; + vertical-align: top; + border: 1px solid transparent; + display: inline-block; } .loleaflet-redline-accept-button { -background: url('../images/lc_accepttrackedchanges.svg'); +background: url('../images/lc_accepttrackedchanges.svg') no-repeat center !important; } .loleaflet-redline-reject-button { -background: url('../images/lc_rejecttrackedchange.svg'); +background: url('../images/lc_rejecttrackedchange.svg') no-repeat center !important; } -.loleaflet-redline-accept-button:hover, .loleaflet-redline-reject-button:hover { -background-color: #dcdcdc; +.loleaflet-annotation-menu, .loleaflet-annotation-menu-redline { + background: url(../images/submenu.svg) no-repeat center !important; +} + +.loleaflet-annotation-menu:hover, .loleaflet-annotation-menu-redline:hover, .loleaflet-redline-accept-button:hover, .loleaflet-redline-reject-button:hover { + border: 1px solid darkgrey; } .loleaflet-annotation-date { @@ -237,34 +245,10 @@ body { height: 6px; } -.loleaflet-annotation-menu { - background: url(../images/submenu.png) no-repeat; - margin: 0; - padding: 0; - min-width: 15px; - height: 21px; - text-align: right; - border: 1px solid transparent; - display: inline-block; -} - -.loleaflet-annotation-menu:hover { - border: 1px solid darkgrey; -} - -.loleaflet-annotation-menu-redline { - background: url(../images/submenu.png) no-repeat; +.loleaflet-annotation-menubar { margin: 0; padding: 0; - min-width: 15px; - height: 21px; - text-align: right; - border: 1px solid transparent; - display: inline-block; -} - -.loleaflet-annotation-menu-redline:hover { - border: 1px solid darkgrey; + vertical-align: top; } .loleaflet-annotation-caption { diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index a1f22f60..11cd7046 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -139,27 +139,34 @@ L.Annotation = L.Layer.extend({ var tr = L.DomUtil.create('tr', empty, tbody); var tdImg = L.DomUtil.create(tagTd, 'loleaflet-annotation-img', tr); var tdAuthor = L.DomUtil.create(tagTd, 'loleaflet-annotation-author', tr); + var imgAuthor = L.DomUtil.create('img', empty, tdImg); +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |4 loleaflet/dist/partsPreviewControl.css|2 ++ loleaflet/src/control/Control.PartsPreview.js |4 ++-- loleaflet/src/layer/tile/ImpressTileLayer.js | 11 ++- 4 files changed, 18 insertions(+), 3 deletions(-) New commits: commit 064b2508a7bde1e2d3422824cd06bf0f7c915061 Author: Pranav KantDate: Mon Mar 20 13:58:33 2017 +0530 loleaflet: Slide sorter for draw documents Change-Id: I4ad11236c0186561b5c7df1a3c634e54f8576c8c diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index fbecbf7e..a3880d46 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -50,6 +50,10 @@ body { display: block; } +#presentation-controls-wrapper.drawing { +bottom: 34px; /* Hide the presentation toolbar (insert slide etc.) for doctype = drawing */ +} + #presentation-controls-wrapper.readonly { top: 30px; } diff --git a/loleaflet/dist/partsPreviewControl.css b/loleaflet/dist/partsPreviewControl.css index 4dc87f95..438b137d 100644 --- a/loleaflet/dist/partsPreviewControl.css +++ b/loleaflet/dist/partsPreviewControl.css @@ -19,6 +19,8 @@ } .preview-img { + /* In draw docs, the width of previews are small, but we want a min of 180px to align it with document's left edge */ +min-width: 180px; vertical-align: middle; max-width: 184px; cursor: pointer; diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index c4409105..f466be8c 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -28,7 +28,7 @@ L.Control.PartsPreview = L.Control.extend({ return; } - if (docType === 'presentation') { + if (docType === 'presentation' || docType === 'drawing') { if (!this._previewInitialized) { // make room for the preview @@ -145,7 +145,7 @@ L.Control.PartsPreview = L.Control.extend({ }, _updatePreview: function (e) { - if (this._map.getDocType() === 'presentation') { + if (this._map.getDocType() === 'presentation' || this._map.getDocType() === 'drawing') { // the scrollbar has to be re-initialized here else it doesn't work // probably a bug from the scrollbar this._previewTiles[e.id].onload = function () { diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index 2584679d..1390216e 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -145,7 +145,13 @@ L.ImpressTileLayer = L.TileLayer.extend({ }, _onCommandValuesMsg: function (textMsg) { - var values = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); + try { + var values = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); + } catch (e) { + // One such case is 'commandvalues: ' for draw documents in response to .uno:AcceptTrackedChanges + values = null; + } + if (!values) { return; } @@ -325,6 +331,9 @@ L.ImpressTileLayer = L.TileLayer.extend({ this._docWidthTwips = command.width; this._docHeightTwips = command.height; this._docType = command.type; + if (this._docType === 'drawing') { + L.DomUtil.addClass(L.DomUtil.get('presentation-controls-wrapper'), 'drawing'); + } this._updateMaxBounds(true); this._documentInfo = textMsg; this._parts = command.parts; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|3 ++- loleaflet/src/control/Control.Menubar.js |2 +- loleaflet/src/map/Map.js |8 3 files changed, 11 insertions(+), 2 deletions(-) New commits: commit f57e4124035f22d9182c7cda9910e8dc84df5f07 Author: Pranav KantDate: Fri Mar 17 13:59:38 2017 +0530 loleaflet: Tell WOPI host if document was ever modified by user Change-Id: Ic99136168716d7a01d1388c4f5e1107ef9e64616 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 04e7011c..6bbd3439 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -340,7 +340,7 @@ function onClick(id, item, subItem) { resizeToolbar(); } else if (id === 'close') { - map.fire('postMessage', {msgId: 'UI_Close'}); + map.fire('postMessage', {msgId: 'UI_Close', args: {EverModified: map._everModified}}); map.remove(); } else if (id === 'specialcharacter') { @@ -1042,6 +1042,7 @@ map.on('doclayerinit', function () { resizeToolbar(); }); + map.on('commandstatechanged', function (e) { var toolbar = w2ui['toolbar-up']; var toolbarUpMore = w2ui['toolbar-up-more']; diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index da2fbee9..c3a51d5f 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -481,7 +481,7 @@ L.Control.Menubar = L.Control.extend({ // our host to show revision history mode map.fire('postMessage', {msgId: 'rev-history'}); } else if (id === 'closedocument') { - map.fire('postMessage', {msgId: 'UI_Close'}); + map.fire('postMessage', {msgId: 'UI_Close', args: {EverModified: map._everModified}}); map.remove(); } else if (id === 'repair') { diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index c1861d37..3d86db2b 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -136,6 +136,14 @@ L.Map = L.Evented.extend({ // View color map this._viewColors = {}; + + // This becomes true if document was ever modified by the user + this._everModified = false; + + this.on('commandstatechanged', function(e) { + if (e.commandName === '.uno:ModifiedStatus') + this._everModified = this._everModified || (e.state === 'true'); + }, this); }, // public methods that modify map state ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src wsd/Admin.cpp wsd/protocol.txt
loleaflet/dist/admin/adminSettings.html| 12 loleaflet/src/admin/AdminSocketSettings.js | 24 +++- wsd/Admin.cpp | 12 wsd/protocol.txt | 26 ++ 4 files changed, 73 insertions(+), 1 deletion(-) New commits: commit 92ad94f259cfbaa6c81eb86f69ebea0d59b8fdad Author: DewanDate: Tue Mar 14 18:55:16 2017 +0530 display lokit and loolwsd version in admin panel Change-Id: Ia5b89373bfd7e921597b73d5a84963268244b748 Reviewed-on: https://gerrit.libreoffice.org/35199 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/admin/adminSettings.html b/loleaflet/dist/admin/adminSettings.html index d860de21..3b74b80e 100644 --- a/loleaflet/dist/admin/adminSettings.html +++ b/loleaflet/dist/admin/adminSettings.html @@ -59,6 +59,18 @@ document.write(l10nstrings.strOverview) document.write(l10nstrings.strCurrent) document.write(l10nstrings.strAnalytics) + + +About + + LOOLWSD + + + + LOKit + + + document.write(l10nstrings.strSettings) diff --git a/loleaflet/src/admin/AdminSocketSettings.js b/loleaflet/src/admin/AdminSocketSettings.js index 5f4ba6f2..5a7ec207 100644 --- a/loleaflet/src/admin/AdminSocketSettings.js +++ b/loleaflet/src/admin/AdminSocketSettings.js @@ -41,9 +41,9 @@ var AdminSocketSettings = AdminSocketBase.extend({ onSocketOpen: function() { // Base class' onSocketOpen handles authentication this.base.call(this); - this.socket.send('subscribe settings'); this.socket.send('settings'); + this.socket.send('version'); }, onSocketMessage: function(e) { @@ -65,6 +65,28 @@ var AdminSocketSettings = AdminSocketBase.extend({ document.getElementById(settingKey).value = settingVal; } } + else if (textMsg.startsWith('loolserver ')) { + // This must be the first message, unless we reconnect. + var loolwsdVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); + var h = loolwsdVersionObj.Hash; + if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) { + h = 'https://gerrit.libreoffice.org/gitweb?p=online.git;a=log;h=' + h + '">' + h + ''; + $('#loolwsd-version').html(loolwsdVersionObj.Version + ' (git hash: ' + h + ')'); + } + else { + $('#loolwsd-version').text(loolwsdVersionObj.Version); + } + } + else if (textMsg.startsWith('lokitversion ')) { + var lokitVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); + var h = lokitVersionObj.BuildId.substring(0, 7); + if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) { + h = 'https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=' + h + '">' + h + ''; + } + $('#lokit-version').html(lokitVersionObj.ProductName + ' ' + +lokitVersionObj.ProductVersion + lokitVersionObj.ProductExtension.replace('.10.','-') + +' (git hash: ' + h + ')'); + } }, onSocketClose: function() { diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp index 1870cb0f..dfa97bc4 100644 --- a/wsd/Admin.cpp +++ b/wsd/Admin.cpp @@ -109,6 +109,18 @@ void AdminSocketHandler::handleMessage(bool /* fin */, WSOpCode /* code */, if (!result.empty()) sendTextFrame(tokens[0] + ' ' + result); } +else if (tokens[0] == "version") +{ +// Send LOOL version information +std::string version, hash; +Util::getVersionInfo(version, hash); +std::string versionStr = +"{ \"Version\": \"" + version + "\", " + +"\"Hash\": \"" + hash + "\" }"; +sendTextFrame("loolserver " + versionStr); +// Send LOKit version information +sendTextFrame("lokitversion " + LOOLWSD::LOKitVersion); +} else if (tokens[0] == "subscribe" && tokens.count() > 1) { for (std::size_t i = 0; i < tokens.count() - 1; i++) diff --git a/wsd/protocol.txt b/wsd/protocol.txt index ba3a191d..867380b3 100644 --- a/wsd/protocol.txt +++ b/wsd/protocol.txt @@ -476,6 +476,12 @@ subscribe Where list
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css| 15 loleaflet/src/layer/AnnotationManager.js| 29 +++- loleaflet/src/layer/marker/Annotation.js|4 +-- loleaflet/src/layer/tile/TileLayer.js | 33 loleaflet/src/layer/tile/WriterTileLayer.js |8 ++ 5 files changed, 86 insertions(+), 3 deletions(-) New commits: commit 7c844788402bcb1c1aaf2f519f94b3bb66085ea5 Author: Pranav KantDate: Thu Mar 9 17:11:01 2017 +0530 loleaflet: Allow accepting/rejecting a change from sidebar object Change-Id: I309b33c4569bc74c69200298566734e16d08b305 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 14d6a93..de2d830 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -228,3 +228,18 @@ body { .loleaflet-annotation-menu:hover { border: 1px solid darkgrey; } + +.loleaflet-annotation-menu-redline { + background: url(../images/submenu.png) no-repeat; + margin: 0; + padding: 0; + min-width: 15px; + height: 21px; + text-align: right; + border: 1px solid transparent; + display: inline-block; +} + +.loleaflet-annotation-menu-redline:hover { + border: 1px solid darkgrey; +} diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index c7d13cc..c747ad7 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -215,6 +215,32 @@ L.AnnotationManager = L.Class.extend({ this._map.focus(); }, + acceptChange: function(id) { + var command = { + AcceptTrackedChange: { + type: 'unsigned short', + value: id.substring('change-'.length) + } + }; + this._map.sendUnoCommand('.uno:AcceptTrackedChange', command); + this._map.removeLayer(this.removeItem(id)); + this.unselect(); + this._map.focus(); + }, + + rejectChange: function(id) { + var command = { + RejectTrackedChange: { + type: 'unsigned short', + value: id.substring('change-'.length) + } + }; + this._map.sendUnoCommand('.uno:RejectTrackedChange', command); + this._map.removeLayer(this.removeItem(id)); + this.unselect(); + this._map.focus(); + }, + onACKComment: function (obj) { var changetrack = obj.redline ? true : false; var action = changetrack ? obj.redline.action : obj.comment.action; @@ -224,6 +250,7 @@ L.AnnotationManager = L.Class.extend({ // transform change tracking index into an id obj.redline.id = 'change-' + obj.redline.index; obj.redline.anchorPos = L.LOUtil.stringToPoint(obj.redline.textRange); + obj.redline.trackchange = true; obj.redline.text = obj.redline.comment; this.add(obj.redline, false); this._map.focus(); @@ -253,7 +280,6 @@ L.AnnotationManager = L.Class.extend({ this.unselect(); } } else if (action === 'Modify') { - console.log(action); id = changetrack ? 'change-' + obj.redline.index : obj.comment.id; var modified = this.getItem(id); if (modified) { @@ -261,6 +287,7 @@ L.AnnotationManager = L.Class.extend({ if (changetrack) { obj.redline.anchorPos = obj.redline.anchorPos ? L.LOUtil.stringToPoing(obj.redline.anchorPos) : modified._data.anchorPos; obj.redline.text = obj.redline.comment; + obj.redline.id = id; modifiedObj = obj.redline; } else { obj.comment.anchorPos = obj.comment.anchorPos ? L.LOUtil.stringToPoint(obj.comment.anchorPos) : diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 14383a9..2c55b57 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -92,7 +92,7 @@ L.Annotation = L.Layer.extend({ L.DomUtil.create('div', 'loleaflet-annotation-userline', tdImg); this._contentAuthor = L.DomUtil.create('div', 'loleaflet-annotation-content-author', tdAuthor); this._contentDate =
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/images/submenu.png|binary loleaflet/dist/images/user.png |binary loleaflet/dist/loleaflet.css | 67 --- loleaflet/src/layer/marker/Annotation.js | 33 --- 4 files changed, 80 insertions(+), 20 deletions(-) New commits: commit dc24fdea67236190333f60c0a4037cf38a54739d Author: Henry CastroDate: Wed Mar 1 17:40:57 2017 -0400 loleaflet: change annotation appearance Change-Id: I9c27b0576b686ac5b8a92bda8ab7960a1b400777 diff --git a/loleaflet/dist/images/submenu.png b/loleaflet/dist/images/submenu.png new file mode 100644 index 000..5159693 Binary files /dev/null and b/loleaflet/dist/images/submenu.png differ diff --git a/loleaflet/dist/images/user.png b/loleaflet/dist/images/user.png new file mode 100644 index 000..88d9050 Binary files /dev/null and b/loleaflet/dist/images/user.png differ diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index cebdde0..a5e3f05 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -135,13 +135,16 @@ body { } .loleaflet-annotation-content-wrapper { - padding: 1px; + padding: 8px; + font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important; + font-size: 13px; text-align: left; border-radius: 5px; - background: #c0; - box-shadow: 0 3px 14px rgba(0,0,0,0.4); + background-color: #f5f5f5; + box-shadow: 0px 3px 6px rgba(0,0,0,0.2); color: #333; - border: 1px solid #999; + border: none; + border-radius: 2px; } .loleaflet-annotation-content { @@ -149,15 +152,26 @@ body { line-height: 1.4; } +.loleaflet-annotation-content-author { + margin: 0; + margin-top: 2px; + height: 18px; +} + .loleaflet-annotation-edit { margin: 3px 3px; line-height: 1.4; } .loleaflet-annotation-textarea { + font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important; + font-size: 13px; border: 1px solid #c8c8c8; resize: none; - background-color: #c0; + background-color: white; + overflow-x: hidden; + overflow-y: hidden; + width: 95%; } .loleaflet-cell-annotation { @@ -171,3 +185,46 @@ body { left: 0; top: 0; } + +.loleaflet-annotation-table { + border-spacing: 0; + border-collapse: separate; + white-space: nowrap; + width: 100%; +} + +.loleaflet-annotation-img { + max-width: 32px; + display: inline-block; +} + +.loleaflet-annotation-author { + padding-left: 10px; + vertical-align: top; + display: table-cell; +} + +.loleaflet-annotation-date { + font-size: 11px; +} + +.loleaflet-annotation-userline { + background-color: darkblue; + width: 32px; + height: 6px; +} + +.loleaflet-annotation-menu { + background: url(../images/submenu.png) no-repeat; + margin: 0; + padding: 0; + min-width: 15px; + height: 21px; + text-align: right; + border: 1px solid transparent; + display: inline-block; +} + +.loleaflet-annotation-menu:hover { + border: 1px solid darkgrey; +} diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 26299b0..4ff80dd 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -4,7 +4,7 @@ L.Annotation = L.Layer.extend({ options: { - minWidth: 200, + minWidth: 240, maxHeight: 50 }, @@ -81,19 +81,23 @@ L.Annotation = L.Layer.extend({ L.DomUtil.create('div', 'loleaflet-annotation'); var wrapper = this._wrapper = L.DomUtil.create('div', 'loleaflet-annotation-content-wrapper', container); - - L.DomEvent.disableScrollPropagation(this._container); + var table = L.DomUtil.create('table', 'loleaflet-annotation-table', wrapper); + var tbody = L.DomUtil.create('tbody', '', table); + var tr = L.DomUtil.create('tr', '', tbody); + var tdImg = L.DomUtil.create('td', 'loleaflet-annotation-img', tr); + var tdAuthor = L.DomUtil.create('td', 'loleaflet-annotation-author', tr); + var tdMenu = L.DomUtil.create('td', '', tr); + var imgAuthor = L.DomUtil.create('img', '', tdImg); + imgAuthor.src = L.Icon.Default.imagePath + '/user.png'; + L.DomUtil.create('div', 'loleaflet-annotation-userline', tdImg); + this._contentAuthor = L.DomUtil.create('div', 'loleaflet-annotation-content-author', tdAuthor); + this._contentDate = L.DomUtil.create('div', 'loleaflet-annotation-date', tdAuthor); + L.DomUtil.create('div', 'loleaflet-annotation-menu', tdMenu);
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |6 ++ loleaflet/dist/spreadsheet.css | 10 +- loleaflet/src/map/Map.js |1 + 3 files changed, 16 insertions(+), 1 deletion(-) New commits: commit 8fa0bb54bda8c41f594770267c70c13a454e7eaf Author: Pranav KantDate: Fri Feb 17 21:12:17 2017 +0530 loleaflet: fix readonly UI for spreadsheets There is still one known problem - for some reason, when a spreasheet is opened in readonly mode, the ViewRowColumnHeader request sent to server has height=0 leading to server sending no rows information back to client. Though the problem gets resolved when one scrolls the spreadsheet window, but something to fix. Change-Id: I2aefafd1a93c1bc5a9ad8581edb83018ec9a3f07 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index ef7a3fd..956aaee 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -66,12 +66,18 @@ body { #document-container.spreadsheet-document { top: 93px !important; } +#document-container.spreadsheet-document.readonly { + top: 50px !important; +} #document-container { top: 40px; } #spreadsheet-row-column-frame { top: 73px !important; } +#spreadsheet-row-column-frame.readonly { + top: 30px !important; +} /* There seems to be some bug in w2ui library - * when we are in very low screen width, the toolbar-up-more * toolbar's width doesn't adjust according to its children toolbar diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index b75b78c..15ea4ff 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -3,7 +3,11 @@ top: 123px; left: 50px; bottom: 65px; - } +} + +#document-container.spreadsheet-document.readonly { +top: 50px; +} .spreadsheet-tabs-container { margin: 0; @@ -62,6 +66,10 @@ bottom: 65px; } +#spreadsheet-row-column-frame.readonly { +top: 30px; +} + .spreadsheet-header-corner { border: 1px solid darkgrey; background-color: lightgrey; diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 51fc434..7b07fe9 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -108,6 +108,7 @@ L.Map = L.Evented.extend({ L.DomUtil.addClass(L.DomUtil.get('toolbar-wrapper'), 'readonly'); L.DomUtil.addClass(L.DomUtil.get('main-menu'), 'readonly'); L.DomUtil.addClass(L.DomUtil.get('presentation-controls-wrapper'), 'readonly'); + L.DomUtil.addClass(L.DomUtil.get('spreadsheet-row-column-frame'), 'readonly'); } }, this); this.on('doclayerinit', function() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |4 loleaflet/src/map/Map.js |1 + 2 files changed, 5 insertions(+) New commits: commit c3f9ebb888ac41502c6dd7080063a4d12d1c62ef Author: Pranav KantDate: Fri Feb 17 20:53:54 2017 +0530 loleaflet: Fix readonly UI for impress Change-Id: I1434cad4f471a3f13c989d67b95b967345598148 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 425859d..ef7a3fd 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -50,6 +50,10 @@ body { display: block; } +#presentation-controls-wrapper.readonly { +top: 30px; +} + @media (max-width: 767px) { /* Show slidesorter beyond 768px only */ #presentation-controls-wrapper { diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index bd6c531..51fc434 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -107,6 +107,7 @@ L.Map = L.Evented.extend({ L.DomUtil.addClass(L.DomUtil.get('logo'), 'readonly'); L.DomUtil.addClass(L.DomUtil.get('toolbar-wrapper'), 'readonly'); L.DomUtil.addClass(L.DomUtil.get('main-menu'), 'readonly'); + L.DomUtil.addClass(L.DomUtil.get('presentation-controls-wrapper'), 'readonly'); } }, this); this.on('doclayerinit', function() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js| 15 +++ loleaflet/src/control/Control.Menubar.js |6 +- 2 files changed, 16 insertions(+), 5 deletions(-) New commits: commit 625a9099026b3c1799cfa3dd16734b691eadc632 Author: Pranav KantDate: Fri Feb 17 17:54:45 2017 +0530 loleaflet: Kill manual browser checking code; user our Browser class Change-Id: Ia75e1f1bf79647c2eb6562fed8c549b3e272a953 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 733dda9..09c7a3f 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -940,6 +940,10 @@ map.on('wopiprops', function(e) { }); map.on('doclayerinit', function () { + if (map.getPermission() === 'readonly') { + return; + } + var toolbarUp = w2ui['toolbar-up']; var toolbarUpMore = w2ui['toolbar-up-more']; var statusbar = w2ui['toolbar-down']; @@ -1452,6 +1456,17 @@ map.on('hyperlinkclicked', function (e) { map.on('updatepermission', function (e) { var toolbar = w2ui['toolbar-up']; var toolbarUpMore = w2ui['toolbar-up-more']; + + if (e.perm === 'readonly') { + // if readonly, hide all the items in toolbars except close + for (id in w2ui['toolbar-up'].items) { + if (w2ui['toolbar-up'].items[id].id !== 'close') { + w2ui['toolbar-up'].hide(w2ui['toolbar-up'].items[id].id); + } + } + return; + } + // {En,Dis}able toolbar buttons for (var id in formatButtons) { if (e.perm === 'edit' && formatButtons[id]) { diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 6b7261e..07ffcee 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -353,10 +353,6 @@ L.Control.Menubar = L.Control.extend({ _beforeShow: function(e, menu) { var self = e.data.self; var items = $(menu).children().children('a').not('.has-submenu'); - var ua = window.navigator.userAgent; - var msie = ua.indexOf('MSIE '); // IE 10 or older - var trident = ua.indexOf('Trident/'); // IE 11 - var edge = ua.indexOf('Edge/'); // Microsoft Edge $(items).each(function() { var aItem = this; var type = $(aItem).data('type'); @@ -370,7 +366,7 @@ L.Control.Menubar = L.Control.extend({ $(aItem).removeClass('disabled'); } } else if (type === 'action') { // enable all except fullscreen on windows - if (id === 'fullscreen' && (msie > 0 || trident > 0 || edge > 0)) { // Full screen works weirdly on IE 11 and on Edge + if (id === 'fullscreen' && (L.Browser.ie || L.Browser.edge)) { // Full screen works weirdly on IE 11 and on Edge $(aItem).addClass('disabled'); var index = self.options.allowedViewModeActions.indexOf('fullscreen'); if (index > 0) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |5 ++ loleaflet/src/layer/AnnotationManager.js | 64 +++ loleaflet/src/layer/marker/Annotation.js | 21 +- 3 files changed, 64 insertions(+), 26 deletions(-) New commits: commit aa751efbeef7a5ed6207452bcc646a4cbac62135 Author: Henry CastroDate: Tue Feb 14 16:37:16 2017 -0400 loleaflet: modify and remove annotations diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index eac27ef..cc9c355 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -126,6 +126,11 @@ body { line-height: 1.4; } +.loleaflet-annotation-edit { + margin: 3px 3px; + line-height: 1.4; +} + .loleaflet-annotation-textarea { border: 1px solid #c8c8c8; resize: none; diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index 56147e9..3fef9d1 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -18,6 +18,25 @@ L.AnnotationManager = L.Class.extend({ this._map.on('AnnotationCancel', this._onAnnotationCancel, this); this._map.on('AnnotationClick', this._onAnnotationClick, this); this._map.on('AnnotationSave', this._onAnnotationSave, this); + var that = this; + $.contextMenu({ + selector: '.loleaflet-annotation-content', + className: 'loleaflet-font', + items: { + modify: { + name: _('Modify'), + callback: function (key, options) { + that._onAnnotationModify.call(that, options.$trigger.attr('id')); + } + }, + remove: { + name: _('Remove'), + callback: function (key, options) { + that._onAnnotationRemove.call(that, options.$trigger.attr('id')); + } + } + } + }); }, clear: function () { @@ -55,7 +74,7 @@ L.AnnotationManager = L.Class.extend({ var topRight = this._map.project(this._map.options.maxBounds.getNorthEast()); var annotation = this._items[id]; var point0, point1, point2, point3; - if (annotation) { + if (annotation.id !== id) { this._selected.annotation = annotation; this.layout(); point0 = this._map._docLayer._twipsToPixels(annotation._data.anchorPos); @@ -141,21 +160,17 @@ L.AnnotationManager = L.Class.extend({ this._items[comment.id].focus(); }, - remove: function (annotation) { + remove: function (id) { + this._removeAnchor(id); + this.unselect(); + this._map.removeLayer(this._items[id]); + delete this._items[id]; + this._map.focus(); }, _onAnnotationCancel: function (e) { - if (e.id === -1) { - for (var index in this._anchors) { - if (this._anchors[index].id === e.id) { - this._anchors.splice(index, 1); - break; - } - } - this._map.removeLayer(this._items[e.id]); - this.unselect(); - delete this._items[e.id]; - this._map.focus(); + if (e.id === 'new') { + this.remove(e.id); } }, @@ -163,10 +178,27 @@ L.AnnotationManager = L.Class.extend({ this.select(e.id); }, + _onAnnotationModify: function (id) { + this._items[id].edit(); + this.select(id); + this._items[id].focus(); + }, + + _onAnnotationRemove: function (id) { + this.remove(id); + }, + _onAnnotationSave: function (e) { - this._items[e.id].updateEdit(); - this._items[e.id].show(); this.layout(); + }, + + _removeAnchor: function (id) { + for (var index in this._anchors) { + if (this._anchors[index].id === id) { + this._anchors.splice(index, 1); + break; + } + } } }); @@ -178,7 +210,7 @@ L.Map.include({ textrange: '',
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/errormessages.js |1 + loleaflet/src/core/Socket.js| 21 - 2 files changed, 17 insertions(+), 5 deletions(-) New commits: commit 4dc6b574a02b0598b2e0c042c8b21e4815016e98 Author: Ashod NakashianDate: Sat Jan 28 18:36:17 2017 -0500 wsd: show a different limit message for non-dev builds For now we assume configurations of more than 50 documents are not for dev or demo. This is because loading 50 documents will require a reasonably sized server and is beyond the default of 10. Change-Id: I099206d7d35a88102c1834ea9015b85810a3f190 Reviewed-on: https://gerrit.libreoffice.org/33670 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/dist/errormessages.js b/loleaflet/dist/errormessages.js index 329fa55..d1eccac 100644 --- a/loleaflet/dist/errormessages.js +++ b/loleaflet/dist/errormessages.js @@ -1,6 +1,7 @@ exports.diskfull = _('No disk space left on server, please contact the server administrator to continue.'); exports.emptyhosturl = _('The host URL is empty. The loolwsd server is probably misconfigured, please contact the administrator.'); exports.limitreached = _('This development build is limited to %0 documents, and %1 connections - to avoid the impression that it is suitable for deployment in large enterprises. To find out more about deploying and scaling %2 check out: %3.'); +exports.limitreachedprod = _('This service is limited to %0 documents, and %1 connections total by the admin. This limit has been reached. Please try again later.'); exports.serviceunavailable = _('Service is unavailable. Please try again later and report to your administrator if the issue persists.'); exports.unauthorized = _('Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists.'); exports.wrongwopisrc = _('Wrong WOPISrc, usage: WOPISrc=valid encoded URI, or file_path, usage: file_path=/path/to/doc/'); diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 32ed572..e42e951 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -378,14 +378,25 @@ L.Socket = L.Class.extend({ textMsg = textMsg.substring(6); if (command.errorKind === 'limitreached') { this._map._fatal = true; - textMsg = errorMessages.limitreached; - textMsg = textMsg.replace(/%0/g, command.params[0]); - textMsg = textMsg.replace(/%1/g, command.params[1]); - textMsg = textMsg.replace(/%2/g, (typeof brandProductName !== 'undefined' ? brandProductName : 'LibreOffice Online')); - textMsg = textMsg.replace(/%3/g, (typeof brandProductFAQURL !== 'undefined' ? brandProductFAQURL : 'https://wiki.documentfoundation.org/Development/LibreOffice_Online')); + this._map._active = false; // Practically disconnected. + + // Servers configured for more than 50 documents are not demo/development. + if (parseInt(command.params[0]) > 50) { + textMsg = errorMessages.limitreachedprod; + textMsg = textMsg.replace(/%0/g, command.params[0]); + textMsg = textMsg.replace(/%1/g, command.params[1]); + } + else { + textMsg = errorMessages.limitreached; + textMsg = textMsg.replace(/%0/g, command.params[0]); + textMsg = textMsg.replace(/%1/g, command.params[1]); + textMsg = textMsg.replace(/%2/g, (typeof brandProductName !== 'undefined' ? brandProductName : 'LibreOffice Online')); + textMsg = textMsg.replace(/%3/g, (typeof brandProductFAQURL !== 'undefined' ? brandProductFAQURL : 'https://wiki.documentfoundation.org/Development/LibreOffice_Online')); + } } else if (command.errorKind === 'serviceunavailable') { this._map._fatal = true; + this._map._active = false; // Practically disconnected. textMsg = errorMessages.serviceunavailable; } this._map.fire('error', {msg: textMsg}); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css|9 +++-- loleaflet/src/control/Control.Scroll.js |2 +- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 962cc570cdd20fb5e7142a7ff3538d483b3790ce Author: Pranav KantDate: Mon Jan 16 20:17:34 2017 +0530 loleaflet: More document space, use space reserved for scrollbars Don't give extra pixels to scrollbars and reduce the document area that is visible on the screen. Instead put these scrollbars on top of the content and show them only when user hovers over the scrollbar. Change-Id: I7f7b34d0efde24bfad04324f5dfe3e3e35c752fc diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 787a328..8583902 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -11,12 +11,17 @@ #map { position: absolute; top: 0px; - bottom: 16px; + bottom: 0px; left: 0px; - right: 16px; + right: 0px; z-index: 10; } +.scroll-container .mCSB_scrollTools.mCSB_1_scrollbar { + position: absolute; + z-index: 1000; +} + body { margin: 0; } diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js index 40089a9..8728d88 100644 --- a/loleaflet/src/control/Control.Scroll.js +++ b/loleaflet/src/control/Control.Scroll.js @@ -20,7 +20,7 @@ L.Control.Scroll = L.Control.extend({ var control = this; $('.scroll-container').mCustomScrollbar({ axis: 'yx', - theme: 'dark-thick', + theme: 'minimal-dark', scrollInertia: 0, callbacks:{ onScroll: function() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |4 loleaflet/src/control/Toolbar.js |6 +- 2 files changed, 9 insertions(+), 1 deletion(-) New commits: commit 8afcc582bef39630b6e899bbd79b3f5ca7c348d6 Author: Pranav KantDate: Thu Jan 12 19:10:12 2017 +0530 loleaflet: Avoid a race condition There was a race condition here between our toolbar doing its stuff and loolwsd sending us websocket messages, noticeable on slow networks. Change-Id: I5ae174e94561dd427d22389e443c80b2a6be4ec4 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index b299611..8f15678 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1343,6 +1343,10 @@ function updateCommandValues() { } } +map.on('updatetoolbarcommandvalues', function(e) { + w2ui['toolbar-up'].refresh(); +}); + map.on('updateparts pagenumberchanged', function (e) { if (e.docType === 'text') { var current = e.currentPage; diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index 466d698..8d229f5 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -44,7 +44,11 @@ L.Map.include({ }, getToolbarCommandValues: function (command) { - return this._docLayer._toolbarCommandValues[command]; + if (this._docLayer) { + return this._docLayer._toolbarCommandValues[command]; + } + + return undefined; }, downloadAs: function (name, format, options, id) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet-help.html|2 +- loleaflet/src/map/handler/Map.Keyboard.js |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit e1b7e53b3a6f006eec5728c3ec88079c34b4f3c6 Author: Henry CastroDate: Sat Jan 7 08:44:35 2017 -0400 tdf#103779: Help menu accessibility, part 3 Change shortcut to Ctrl + Shift + ? diff --git a/loleaflet/dist/loleaflet-help.html b/loleaflet/dist/loleaflet-help.html index bfed701..15c79d3 100644 --- a/loleaflet/dist/loleaflet-help.html +++ b/loleaflet/dist/loleaflet-help.html @@ -31,7 +31,7 @@ Cut Ctrl + X Paste as unformatted text Ctrl + Alt + Shift + V Print (Download as PDF) Ctrl + P - Display the Keyboard shortcuts help Ctrl + H + Display the Keyboard shortcuts help Ctrl + Shift + ? diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 77302a8..0da5e09 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -398,7 +398,7 @@ L.Map.Keyboard = L.Handler.extend({ e.originalEvent.preventDefault(); } - if (e.originalEvent.ctrlKey && (e.originalEvent.key === 'h' || e.originalEvent.key === 'H')) { + if (e.originalEvent.ctrlKey && e.originalEvent.shiftKey && e.originalEvent.key === '?') { map.showLOKeyboardHelp(); e.originalEvent.preventDefault(); return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet-help.html|1 + loleaflet/src/map/handler/Map.Keyboard.js |6 ++ 2 files changed, 7 insertions(+) New commits: commit 73cf6f71fbe1ccb1946958b06e8deab16176a82c Author: Henry CastroDate: Fri Jan 6 23:11:48 2017 -0400 tdf#103779: Help menu accessibility, part 2 Add a keyboard shortcut ctrl + h to display the Keyboard shortcuts help diff --git a/loleaflet/dist/loleaflet-help.html b/loleaflet/dist/loleaflet-help.html index 2184635..bfed701 100644 --- a/loleaflet/dist/loleaflet-help.html +++ b/loleaflet/dist/loleaflet-help.html @@ -31,6 +31,7 @@ Cut Ctrl + X Paste as unformatted text Ctrl + Alt + Shift + V Print (Download as PDF) Ctrl + P + Display the Keyboard shortcuts help Ctrl + H diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 84c72d3..77302a8 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -398,6 +398,12 @@ L.Map.Keyboard = L.Handler.extend({ e.originalEvent.preventDefault(); } + if (e.originalEvent.ctrlKey && (e.originalEvent.key === 'h' || e.originalEvent.key === 'H')) { + map.showLOKeyboardHelp(); + e.originalEvent.preventDefault(); + return true; + } + if (e.originalEvent.ctrlKey && (e.originalEvent.key === 'z' || e.originalEvent.key === 'Z')) { this._map._socket.sendMessage('uno .uno:Undo'); e.originalEvent.preventDefault(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 13 - loleaflet/src/map/Map.js |8 +++- 2 files changed, 15 insertions(+), 6 deletions(-) New commits: commit fda2f26df4dbd33541192b4df7dc69a799fee38d Author: Pranav KantDate: Mon Dec 12 13:49:04 2016 +0530 loleaflet: Don't use w2ui directly from loleaflet Use events, 'hidebusy', 'showbusy' to interact with toolbar. In some cases, it may happen that w2ui usage in loleaflet happens before browser loads w2ui.js (as it is in
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |9 + loleaflet/src/control/Control.ContextMenu.js |4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) New commits: commit 33ce6f38e4d2711f9a5a57e8e09a4ac957c16f97 Author: Pranav KantDate: Thu Dec 8 21:58:22 2016 +0530 loleaflet: Check boxes against checked items in context menu Change-Id: I1a51fec67ba79dc2e82cccb54731bfabb9731470 diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index fe40839..a0f3ef7 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -57,3 +57,12 @@ body { .loleaflet-scrolled { overflow: auto; } + +/* Important to override context-menu-icon's font-family here otherwise, jquery-contextmenu.css + * will try to load its own font file which is not available in dist/ */ +.context-menu-icon::before { + font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important; +} +.context-menu-icon-lo-checkmark:before { + content: '\2713'; +} diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js index 60c4a32..1780060 100644 --- a/loleaflet/src/control/Control.ContextMenu.js +++ b/loleaflet/src/control/Control.ContextMenu.js @@ -134,11 +134,11 @@ L.Control.ContextMenu = L.Control.extend({ if (item.checktype === 'checkmark') { if (item.checked === 'true') { - contextMenu[item.command.icon] = 'checkmark'; + contextMenu[item.command]['icon'] = 'lo-checkmark'; } } else if (item.checktype === 'radio') { if (item.checked === 'true') { - contextMenu[item.command.icon] = 'radio'; + contextMenu[item.command]['icon'] = 'radio'; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|8 loleaflet/src/control/Control.Menubar.js |4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) New commits: commit 0e786d14a0681e5ff9e8b421704593972e0c0a27 Author: Andras TimarDate: Mon Dec 5 12:41:47 2016 +0100 disable 'Insert Special Character' for Impress Change-Id: I6c25d2eb68b0f757771a48bd3c732847d28caff7 Reviewed-on: https://gerrit.libreoffice.org/31628 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 7279948..a40c4b0 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -810,8 +810,8 @@ map.on('doclayerinit', function () { case 'presentation': var presentationToolbar = w2ui['presentation-toolbar']; presentationToolbar.show('presentation', 'presentationbreak', 'insertpage', 'duplicatepage', 'deletepage'); - toolbarUp.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); - toolbarUpMore.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); + toolbarUp.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending', 'specialcharacter'); + toolbarUpMore.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending', 'specialcharacter'); statusbar.insert('left', [ {type: 'break', id:'break1'}, {type: 'html', id: 'PageStatus', @@ -819,8 +819,8 @@ map.on('doclayerinit', function () { ]); break; case 'drawing': - toolbarUp.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); - toolbarUpMore.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); + toolbarUp.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending', 'specialcharacter'); + toolbarUpMore.remove('annotation', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending', 'specialcharacter'); break; } toolbarUp.refresh(); diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index e854d5b..4da078a 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -187,9 +187,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}] }, {name: _('Insert'), type: 'menu', menu: [ - {name: _('Image'), id: 'insertgraphic', type: 'action'}, - {type: 'separator'}, - {name: _('Special character...'), id: 'specialcharacter', type: 'action'}] + {name: _('Image'), id: 'insertgraphic', type: 'action'}] }, {name: _('Tables'), type: 'menu', menu: [ {name: _('Insert'), type: 'menu', menu: [ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/admin/adminSettings.html|2 ++ loleaflet/src/admin/AdminSocketSettings.js | 10 ++ 2 files changed, 12 insertions(+) New commits: commit da5ef9b5a29d6373cf4eb0767fae3e3a33698f5d Author: Ashod NakashianDate: Sun Nov 13 23:55:47 2016 -0500 loleaflet: add shutdown command to the admin settings When we add more server controls (restart, f.e.) we will need to move this to a separate page. Also, we need to prompt the admin for reason, which we can broadcast to all users when the server goes down. Change-Id: Ide92e58b5b64a5107b6556aef6b1a88191d5d21b Reviewed-on: https://gerrit.libreoffice.org/30832 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/dist/admin/adminSettings.html b/loleaflet/dist/admin/adminSettings.html index 94ba5b2..d860de2 100644 --- a/loleaflet/dist/admin/adminSettings.html +++ b/loleaflet/dist/admin/adminSettings.html @@ -73,6 +73,8 @@ document.write('
') + + diff --git a/loleaflet/src/admin/AdminSocketSettings.js b/loleaflet/src/admin/AdminSocketSettings.js index 926df06..5f4ba6f 100644 --- a/loleaflet/src/admin/AdminSocketSettings.js +++ b/loleaflet/src/admin/AdminSocketSettings.js @@ -25,6 +25,16 @@ var AdminSocketSettings = AdminSocketBase.extend({ command += ' cpu_stats_interval=' + cpuStatsInterval; socketSettings.send(command); }); + + $('#btnShutdown').click(function() { + vex.dialog.confirm({ + message: _('Are you sure you want to shutdown the server?'), + callback: function(value) { + // TODO: Prompt for reason. + socketSettings.send('shutdown maintenance'); + } + }); + }); }); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js|3 +++ loleaflet/src/control/Control.Menubar.js |7 +-- 2 files changed, 4 insertions(+), 6 deletions(-) New commits: commit d589618bc1c6c73b5fa1711504ca6dcadb0cbe6b Author: Andras TimarDate: Mon Oct 31 14:45:04 2016 +0100 disable zoom for Calc diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index b8d8218..2ef5ccb 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -754,6 +754,9 @@ map.on('doclayerinit', function () { var statusbar = w2ui['toolbar-down']; switch (docType) { case 'spreadsheet': + statusbar.disable('zoomreset'); + statusbar.disable('zoomout'); + statusbar.disable('zoomin'); statusbar.insert('left', [ {type: 'break', id:'break1'}, {type: 'html', id: 'StatusDocPos', diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index ed3fb85..c44f6cd 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -208,12 +208,7 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}] }, - {name: _('View'), type: 'menu', menu: [{name: _('Full screen'), id: 'fullscreen', type: 'action'}, - {type: 'separator'}, - {name: _('Zoom in'), id: 'zoomin', type: 'action'}, - {name: _('Zoom out'), id: 'zoomout', type: 'action'}, - {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}] - }, + {name: _('View'), type: 'menu', menu: [{name: _('Full screen'), id: 'fullscreen', type: 'action'}]}, {name: _('Insert'), type: 'menu', menu: [{name: _('Image'), id: 'insertgraphic', type: 'action'}, {name: _('Comment'), type: 'unocommand', uno: '.uno:InsertAnnotation'}, {type: 'separator'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css|9 loleaflet/src/control/Control.ColumnHeader.js | 11 + loleaflet/src/control/Control.Header.js | 56 ++ loleaflet/src/control/Control.RowHeader.js| 11 + loleaflet/src/layer/tile/CalcTileLayer.js | 19 5 files changed, 106 insertions(+) New commits: commit 3c9eed3bb03880fd0044a361f4f7ca2ed7e31523 Author: Henry CastroDate: Sat Oct 29 15:56:44 2016 -0400 loleaflet: row/column highlighting to reflect the existing selection diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 9548f0d..19147d7 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -108,6 +108,15 @@ overflow: hidden; } +.spreadsheet-header-selected { + background: #3465A4; /* For browsers that do not support gradients */ + background: -webkit-linear-gradient(#3465A4, #729FCF, #004586); + background: -o-linear-gradient(#3465A4, #729FCF, #004586); + background: -moz-linear-gradient(#3465A4, #729FCF, #004586); + background: linear-gradient(#3465A4, #729FCF, #004586); + color: white; + } + .spreadsheet-header-column:hover { background-color: #DDD; } diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index 70fed02..e6e1351 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -19,6 +19,8 @@ L.Control.ColumnHeader = L.Control.Header.extend({ this._map.on('updatescrolloffset', this.setScrollPosition, this); this._map.on('updateviewport', this.setViewPort, this); this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, this); + this._map.on('updateselectionheader', this._onUpdateSelection, this); + this._map.on('clearselectionheader', this._onClearSelection, this); var docContainer = this._map.options.documentContainer; var cornerHeader = L.DomUtil.create('div', 'spreadsheet-header-corner', docContainer.parentElement); L.DomEvent.addListener(cornerHeader, 'click', this._onCornerHeaderClick, this); @@ -144,6 +146,14 @@ L.Control.ColumnHeader = L.Control.Header.extend({ L.DomUtil.setStyle(this._columns, 'left', this._position + 'px'); }, + _onClearSelection: function (e) { + this.clearSelection(this._columns); + }, + + _onUpdateSelection: function (e) { + this.updateSelection(this._columns, e.start.x, e.end.x); + }, + viewRowColumnHeaders: function (e) { this.fillColumns(e.data.columns, e.converter, e.context); }, @@ -158,6 +168,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({ column = L.DomUtil.create('div', 'spreadsheet-header-column', this._columns); text = L.DomUtil.create('div', 'spreadsheet-header-column-text', column); resize = L.DomUtil.create('div', 'spreadsheet-header-column-resize', column); + column.size = columns[iterator].size; var content = columns[iterator].text; text.setAttribute('rel', 'spreadsheet-column-' + content); // for easy addressing text.innerHTML = content; diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js index a3014a1..c56e554 100644 --- a/loleaflet/src/control/Control.Header.js +++ b/loleaflet/src/control/Control.Header.js @@ -9,12 +9,68 @@ L.Control.Header = L.Control.extend({ initialize: function () { this._clicks = 0; + this._selection = {start: -1, end: -1}; }, mouseInit: function (element) { L.DomEvent.on(element, 'mousedown', this._onMouseDown, this); }, + select: function (item) { + if (item && !L.DomUtil.hasClass(item, 'spreadsheet-header-selected')) { + L.DomUtil.addClass(item, 'spreadsheet-header-selected'); + } + }, + + unselect: function (item) { + if (item && L.DomUtil.hasClass(item, 'spreadsheet-header-selected')) { + L.DomUtil.removeClass(item, 'spreadsheet-header-selected'); + } + }, + + clearSelection: function (element) { + var childs = element.children; + for (var iterator = this._selection.start; iterator <= this._selection.end; iterator++) { + this.unselect(childs[iterator]); + } + this._selection.start = this._selection.end = -1; + }, + + updateSelection: function(element, start, end) { + var childs = element.children; +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 17 - loleaflet/src/layer/marker/Cursor.js | 10 + loleaflet/src/layer/tile/TileLayer.js | 60 +- 3 files changed, 84 insertions(+), 3 deletions(-) New commits: commit 49f4e696e517b5f278aab465eebccaae9d8cc675 Author: Pranav KantDate: Thu Oct 20 17:21:50 2016 +0530 loleaflet: Click user item to go to its cursor Change-Id: Iac87da20cfe422000eb9a32ccad50e8483637616 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index dc2b8b5..366e3ec 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1308,11 +1308,24 @@ map.on('statusindicator', function (e) { } }); +function onUseritemClicked(e) { + var viewId = parseInt(e.currentTarget.id.replace('user-', '')); + + if (map._docLayer) { + if (map.getDocType() === 'spreadsheet') { + map._docLayer.goToCellViewCursor(viewId); + } else if (map.getDocType() === 'text') { + map._docLayer.goToViewCursor(viewId); + } + } +} + function getUserItem(viewId, userName, color) { - var html = '' + + var html = '' + '' + '' + userName + '' + - ''; + ''; + return html; } var nUsers = _('%n users'); diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index 1335e8e..0a5e622 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -64,6 +64,16 @@ L.Cursor = L.Layer.extend({ } }, + showCursorHeader: function() { + if (this._cursorHeader) { + L.DomUtil.setStyle(this._cursorHeader, 'visibility', 'visible'); + + setTimeout(L.bind(function() { + L.DomUtil.setStyle(this._cursorHeader, 'visibility', 'hidden'); + }, this), this.options.headerTimeout); + } + }, + _initLayout: function () { this._container = L.DomUtil.create('div', 'leaflet-cursor-container'); if (this.options.header) { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index d8836d5..8eeb44f 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -701,6 +701,43 @@ L.TileLayer = L.GridLayer.extend({ } }, + goToCellViewCursor: function(viewId) { + if (this._cellViewCursors[viewId] && !this._isEmptyRectangle(this._cellViewCursors[viewId].bounds)) { + if (!this._map.getBounds().contains(this._cellViewCursors[viewId].bounds)) { + var mapBounds = this._map.getBounds(); + var scrollX = 0; + var scrollY = 0; + var spacingX = Math.abs(this._cellViewCursors[viewId].bounds.getEast() - this._cellViewCursors[viewId].bounds.getWest()) / 4.0; + var spacingY = Math.abs(this._cellViewCursors[viewId].bounds.getSouth() - this._cellViewCursors[viewId].bounds.getNorth()) / 4.0; + if (this._cellViewCursors[viewId].bounds.getWest() < mapBounds.getWest()) { + scrollX = this._cellViewCursors[viewId].bounds.getWest() - mapBounds.getWest() - spacingX; + } else if (this._cellViewCursors[viewId].bounds.getEast() > mapBounds.getEast()) { + scrollX = this._cellViewCursors[viewId].bounds.getEast() - mapBounds.getEast() + spacingX; + } + + if (this._cellViewCursors[viewId].bounds.getNorth() > mapBounds.getNorth()) { + scrollY = this._cellViewCursors[viewId].bounds.getNorth() - mapBounds.getNorth() + spacingY; + } else if (this._cellViewCursors[viewId].bounds.getSouth() < mapBounds.getSouth()) { + scrollY = this._cellViewCursors[viewId].bounds.getSouth() - mapBounds.getSouth() - spacingY; + } + + if (scrollX !== 0 || scrollY !== 0) { + var newCenter = mapBounds.getCenter(); + newCenter.lat += scrollX; + newCenter.lat += scrollY; + var center = this._map.project(newCenter); + center = center.subtract(this._map.getSize().divideBy(2)); + center.x = Math.round(center.x < 0 ? 0 : center.x);
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css|1 + loleaflet/src/control/Control.ColumnHeader.js |4 ++-- loleaflet/src/control/Control.RowHeader.js|6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) New commits: commit 1d40b1eb79ec93aebc675dae33e0023b1e55220d Author: Henry CastroDate: Fri Oct 14 14:46:46 2016 -0400 loleaflet: fix mouse over text that it changes re-size cursor diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index c119f05..9548f0d 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -185,6 +185,7 @@ margin: 0px; border: 0px; padding: 0px; + overflow: hidden; cursor: pointer; /* Make the text unselectable for all browsers */ diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index 0535b8c..ef67d60 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -142,8 +142,8 @@ L.Control.ColumnHeader = L.Control.Header.extend({ resize.column = iterator + 1; resize.width = width; L.DomUtil.setStyle(column, 'width', width + 'px'); - L.DomUtil.setStyle(text, 'width', width - 6 + 'px'); - L.DomUtil.setStyle(resize, 'width', '6px'); + L.DomUtil.setStyle(text, 'width', width - 3 + 'px'); + L.DomUtil.setStyle(resize, 'width', '3px'); this.mouseInit(resize); } L.DomEvent.addListener(text, 'click', this._onColumnHeaderClick, this); diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js index 28d501e..7406131 100644 --- a/loleaflet/src/control/Control.RowHeader.js +++ b/loleaflet/src/control/Control.RowHeader.js @@ -139,9 +139,9 @@ L.Control.RowHeader = L.Control.Header.extend({ resize.row = iterator + 1; resize.height = height; L.DomUtil.setStyle(row, 'height', height + 'px'); - L.DomUtil.setStyle(text, 'line-height', height + 'px'); - L.DomUtil.setStyle(text, 'height', height - 6 + 'px'); - L.DomUtil.setStyle(resize, 'height', '6px'); + L.DomUtil.setStyle(text, 'line-height', height - 3 + 'px'); + L.DomUtil.setStyle(text, 'height', height - 3 + 'px'); + L.DomUtil.setStyle(resize, 'height', '3px'); this.mouseInit(resize); } L.DomEvent.addListener(text, 'click', this._onRowHeaderClick, this); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css |1 - loleaflet/src/control/Control.Header.js | 17 + 2 files changed, 5 insertions(+), 13 deletions(-) New commits: commit 25dce7a30f5519b2dd6f3316355c9dc1c76ec9ed Author: Henry CastroDate: Wed Oct 12 17:30:52 2016 -0400 loleaflet: column/row re-size cleanup diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 30c992c..c119f05 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -138,7 +138,6 @@ padding: 0px; margin: 0px; height: 100%; - cursor: pointer; overflow: hidden; } diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js index 24ed4f7..a3014a1 100644 --- a/loleaflet/src/control/Control.Header.js +++ b/loleaflet/src/control/Control.Header.js @@ -39,26 +39,19 @@ L.Control.Header = L.Control.extend({ _onMouseMove: function (e) { this._dragging = true; + L.DomEvent.preventDefault(e); var target = e.target || e.srcElement; - if ((L.DomUtil.hasClass(target, 'spreadsheet-header-column-text') || -L.DomUtil.hasClass(target, 'spreadsheet-header-row-text')) && - target.style.cursor != this.options.cursor) { - this._cursor = target.style.cursor; - this._target = target; + if (target.style.cursor !== this.options.cursor && + (L.DomUtil.hasClass(target, 'spreadsheet-header-column-text') || + L.DomUtil.hasClass(target, 'spreadsheet-header-row-text'))) { target.style.cursor = this.options.cursor; } - L.DomEvent.preventDefault(e); - this.onDragMove(this._item, this._start, this._offset, e); }, _onMouseUp: function (e) { - if (this._target) { - this._target.style.cursor = this._oldCursor; - } - L.DomEvent.off(document, 'mousemove', this._onMouseMove, this); L.DomEvent.off(document, 'mouseup', this._onMouseUp, this); @@ -73,7 +66,7 @@ L.Control.Header = L.Control.extend({ setTimeout(L.bind(this.initialize, this), 400); } - this._target = this._cursor = this._item = this._start = this._offset = null; + this._item = this._start = this._offset = null; this._dragging = false; }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |2 +- loleaflet/src/core/LOUtil.js | 20 loleaflet/src/map/Map.js |6 +- 3 files changed, 26 insertions(+), 2 deletions(-) New commits: commit a01d2fc91dfd6ea4ce365d30641fa251d45c8b04 Author: Pranav KantDate: Mon Oct 10 18:00:38 2016 +0530 loleaflet: Restore old coloring algorithm for non-text documents .uno:TrackedChangeAuthors doesn't give correct colors for documents other than writer, lets use our old algorithm for color assignment for these documents. Change-Id: If865788154a80da2637aad84183a0e947bb4b7e8 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 9003281..11281f5 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1346,7 +1346,7 @@ map.on('addview', function(e) { }, 3000); var username = e.username; - var color = L.LOUtil.rgbToHex(e.color); + var color = L.LOUtil.rgbToHex(map.getViewColor(e.viewId)); if (e.viewId === map._docLayer._viewId) { username = _('You'); color = '#000'; diff --git a/loleaflet/src/core/LOUtil.js b/loleaflet/src/core/LOUtil.js index 4ebb9d1..ed6b718 100644 --- a/loleaflet/src/core/LOUtil.js +++ b/loleaflet/src/core/LOUtil.js @@ -3,6 +3,21 @@ */ L.LOUtil = { + // Based on core.git's colordata.hxx: COL_AUTHOR1_DARK...COL_AUTHOR9_DARK + // consisting of arrays of RGB values + // Maybe move the color logic to separate file when it becomes complex + darkColors: [ + [198, 146, 0], + [6, 70, 162], + [87, 157, 28], + [105, 43, 157], + [197, 0, 11], + [0, 128, 128], + [140, 132, 0], + [53, 85, 107], + [209, 118, 0] + ], + startSpinner: function (spinnerCanvas, spinnerSpeed) { var spinnerInterval; spinnerCanvas.width = 50; @@ -28,6 +43,11 @@ L.LOUtil = { return spinnerInterval; }, + getViewIdHexColor: function(viewId) { + var color = this.darkColors[(viewId + 1) % this.darkColors.length]; + return (color[2] | (color[1] << 8) | (color[0] << 16)); + }, + rgbToHex: function(color) { return '#' + ('00' + color.toString(16)).slice(-6); } diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index c6d2f71..70fc83b 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -130,7 +130,7 @@ L.Map = L.Evented.extend({ addView: function(viewid, username, color) { this._viewInfo[viewid] = {'username': username, 'color': color}; - this.fire('addview', {viewId: viewid, username: username, color: color}); + this.fire('addview', {viewId: viewid, username: username}); }, removeView: function(viewid) { @@ -144,6 +144,10 @@ L.Map = L.Evented.extend({ }, getViewColor: function(viewid) { + if (this._docLayer._docType !== 'text') { + return L.LOUtil.getViewIdHexColor(viewid); + } + return this._viewInfo[viewid].color; }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar.css| 16 + loleaflet/dist/toolbar/toolbar.js | 57 +++--- loleaflet/src/layer/tile/TileLayer.js | 10 - 3 files changed, 48 insertions(+), 35 deletions(-) New commits: commit 5891371dcacf04182827317482df6b92700aabbd Author: Pranav KantDate: Sun Sep 25 22:47:59 2016 +0530 loleaflet: Show usercolor in userlist Change-Id: I6be05f36ffc4c00aa986b3873fce1bc5acc6fbf0 diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index aef6e23..d607b39 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -306,3 +306,19 @@ button.leaflet-control-search-next border: 0px; background: rgba(66, 151, 215, 1); } + +tr.useritem:hover { +cursor: default; +background-color: rgba(67, 172, 232, 0.25); +} + +tr.useritem > td { +padding: 7px; +} + +tr.useritem > td.usercolor { +display: inline-block; +top: 5px; +left: 3px; +position: relative; +} diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 2e282e9..b7a02a4 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -461,9 +461,7 @@ $(function () { {type: 'html', id: 'right'}, {type: 'html',id: 'modifiedstatuslabel', html: ''}, {type: 'break'}, - {type: 'menu', id: 'userlist', caption: _('1 user'), items: [ - { id: '-1', text: _('You'), disabled: true }, - ]}, + {type: 'drop', id: 'userlist', text: _('No users'), html: '' }, {type: 'break'}, {type: 'button', id: 'prev', img: 'prev', hint: _('Previous page')}, {type: 'button', id: 'next', img: 'next', hint: _('Next page')}, @@ -474,6 +472,9 @@ $(function () { {type: 'button', id: 'zoomin', img: 'zoomin', hint: _('Zoom in')} ], onClick: function (e) { + if (e.item.id === 'userlist') { + return; + } onClick(e.target, e.item, e.subItem); } }); @@ -1307,18 +1308,26 @@ map.on('statusindicator', function (e) { } }); -function getUserListItem(viewId, userName) { - var userListItem = { id: viewId, text: userName, disabled: true }; - return userListItem; +function getUserItem(viewId, userName, color) { + var html = '' + +'' + +'' + userName + '' + + ''; + return html; } var nUsers = _('%n users'); -function updateUserListCount(userlist) { - var count = userlist.items.length; +function updateUserListCount() { + var userlistItem = w2ui['toolbar-down'].get('userlist'); + var count = $(userlistItem.html).find('#userlist_table tbody tr').length; if (count > 1) { - userlist.caption = nUsers.replace('%n', count); + userlistItem.text = nUsers.replace('%n', count); } else if (count === 1) { - userlist.caption = _('1 user'); + userlistItem.text = _('1 user'); + } else { + userlistItem.text = _('No users'); } + + w2ui['toolbar-down'].refresh(); } map.on('addview', function(e) { @@ -1335,11 +1344,16 @@ map.on('addview', function(e) { userPopupTimeout = null; }, 3000); - var userlist = w2ui['toolbar-down'].get('userlist'); - userlist.items.push(getUserListItem(e.viewId, e.username)); - - updateUserListCount(userlist); - w2ui['toolbar-down'].refresh(); + var username = e.username; + var color = L.LOUtil.getViewIdHexColor(e.viewId); + if (e.viewId === map._docLayer._viewId) { + username = _('You'); + color = '#000'; + } + var userlistItem = w2ui['toolbar-down'].get('userlist'); + var newhtml = $(userlistItem.html).find('#userlist_table tbody').append(getUserItem(e.viewId, username, color)).parent().parent()[0].outerHTML; + userlistItem.html = newhtml; + updateUserListCount(); }); map.on('removeview', function(e) { @@ -1356,16 +1370,9 @@ map.on('removeview', function(e) { userPopupTimeout = null; }, 3000); - var userlist = w2ui['toolbar-down'].get('userlist'); - for (var idx in userlist.items) { - if (userlist.items[idx].id == e.viewId) { - userlist.items.splice(idx, 1); - break; - } - } - - updateUserListCount(userlist); - w2ui['toolbar-down'].refresh(); + var userlistItem = w2ui['toolbar-down'].get('userlist'); + userlistItem.html = $(userlistItem.html).find('#user-' +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css | 16 ++ loleaflet/src/layer/tile/CalcTileLayer.js|7 ++ loleaflet/src/layer/tile/GridLayer.js| 11 loleaflet/src/layer/tile/ImpressTileLayer.js |7 ++ loleaflet/src/layer/tile/TileLayer.js| 71 +-- loleaflet/src/layer/tile/WriterTileLayer.js |9 ++- 6 files changed, 104 insertions(+), 17 deletions(-) New commits: commit 68d3693d977e7a0137599eeba7a9de6cae06a2be Author: László NémethDate: Fri Sep 23 12:19:58 2016 +0200 loleaflet: extend tile debugging - show invalidated rectangles with fading effect - show last tilecombine message and cancelled tile count - show received/requested tile updates - fix popup handling - custom popup style (transparent, big numbers) - clean up diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index 047fa0b..2febea3 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -566,6 +566,22 @@ a.leaflet-control-buttons:hover:first-child { pointer-events: none; } +.debug .leaflet-popup-content { + margin: 1px 1px; + font: 28px/24px Tahoma, Verdana, sans-serif; + line-height: 1; + background: rgba(0, 0, 0, 0); + pointer-events: none; + } + +.debug .leaflet-popup-content-wrapper, +.debug .leaflet-popup-tip { + background: rgba(255, 255, 255, 0); + color: #f70; + box-shadow: none; + pointer-events: none; + } + /* div icon */ .leaflet-div-icon { diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 1d51cf8..a493c7c 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -33,6 +33,9 @@ L.CalcTileLayer = L.TileLayer.extend({ var topLeftTwips = new L.Point(command.x, command.y); var offset = new L.Point(command.width, command.height); var bottomRightTwips = topLeftTwips.add(offset); + if (this._debug) { + this._debugAddInvalidationRectangle(topLeftTwips, bottomRightTwips); + } var invalidBounds = new L.Bounds(topLeftTwips, bottomRightTwips); var visibleTopLeft = this._latLngToTwips(this._map.getBounds().getNorthWest()); var visibleBottomRight = this._latLngToTwips(this._map.getBounds().getSouthEast()); @@ -66,6 +69,7 @@ L.CalcTileLayer = L.TileLayer.extend({ needsNewTiles = true; if (this._debug && this._tiles[key]._debugTile) { this._tiles[key]._debugTile.setStyle({fillOpacity: 0.5}); + this._tiles[key]._debugInvalidateCount++; } } else { @@ -88,6 +92,9 @@ L.CalcTileLayer = L.TileLayer.extend({ 'tileheight=' + this._tileHeightTwips; this._map._socket.sendMessage(message, ''); + if (this._debug) { + this._debugDataTileCombine.setPrefix(message); + } } for (key in this._tileCache) { diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js index 89b71bd..d48aed9 100644 --- a/loleaflet/src/layer/tile/GridLayer.js +++ b/loleaflet/src/layer/tile/GridLayer.js @@ -538,6 +538,10 @@ L.GridLayer = L.Layer.extend({ if (!this._tiles[key].loaded) { L.DomUtil.remove(this._tiles[key].el); delete this._tiles[key]; + if (this._debug && this._debugDataCancelledTiles) { + this._debugCancelledTiles++; + this._debugDataCancelledTiles.setPrefix('Cancelled tiles: ' + this._debugCancelledTiles); + } } } this._emptyTilesCount = 0; @@ -607,6 +611,10 @@ L.GridLayer = L.Layer.extend({ if (!tile.loaded) { L.DomUtil.remove(tile.el); delete this._tiles[key]; + if (this._debug && this._debugDataCancelledTiles) { + this._debugCancelledTiles++; +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/images/document-properties.png |binary loleaflet/dist/toolbar.css|1 + loleaflet/dist/toolbar/toolbar.js |4 loleaflet/src/layer/tile/TileLayer.js | 18 +- 4 files changed, 22 insertions(+), 1 deletion(-) New commits: commit ab780acd0a3b503ec6c4333b400fe9a2e9137d88 Author: Henry CastroDate: Sun Aug 28 08:38:54 2016 -0400 loleaflet: add document repair toolbar item diff --git a/loleaflet/dist/images/document-properties.png b/loleaflet/dist/images/document-properties.png new file mode 100644 index 000..0eadfbf Binary files /dev/null and b/loleaflet/dist/images/document-properties.png differ diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index 13f7f5b..dfb9de3 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -268,6 +268,7 @@ button.leaflet-control-search-next .w2ui-icon.sortascending{ background: url('/loleaflet/dist/images/lc_sortascending.png') no-repeat center !important; } .w2ui-icon.sortdescending{ background: url('/loleaflet/dist/images/lc_sortdescending.png') no-repeat center !important; } .w2ui-icon.selected{ background: url('/loleaflet/dist/images/lc_ok.png') no-repeat center !important; } +.w2ui-icon.repair{ background: url('/loleaflet/dist/images/document-properties.png') no-repeat center !important; } .inserttable-pop { z-index: 10; diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index c12d533..8232486 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -103,6 +103,9 @@ function onClick(id, item, subItem) { map.toggleCommandState(item.uno); } } + else if (id === 'repair') { + map._socket.sendMessage('commandvalues command=.uno:DocumentRepair'); + } else if (id === 'zoomin' && map.getZoom() < map.getMaxZoom()) { map.zoomIn(1); } @@ -344,6 +347,7 @@ $(function () { {type: 'break'}, {type: 'button', id: 'undo', img: 'undo', hint: _('Undo'), uno: 'Undo'}, {type: 'button', id: 'redo', img: 'redo', hint: _('Redo'), uno: 'Redo'}, + {type: 'button', id: 'repair', img: 'repair', hint: _('Document repair')}, {type: 'break'}, {type: 'html', id: 'styles', html: ''}, {type: 'html', id: 'fonts', html: ''}, diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 6c1fe71..d449c74 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -382,7 +382,10 @@ L.TileLayer = L.GridLayer.extend({ _onCommandValuesMsg: function (textMsg) { var obj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); - if (obj.commandName === '.uno:CellCursor') { + if (obj.commandName == '.uno:DocumentRepair') { + this._onDocumentRepair(obj); + } + else if (obj.commandName === '.uno:CellCursor') { this._onCellCursorMsg(obj.commandValues); } else if (this._map.unoToolbarCommands.indexOf(obj.commandName) !== -1) { this._toolbarCommandValues[obj.commandName] = obj.commandValues; @@ -515,6 +518,19 @@ L.TileLayer = L.GridLayer.extend({ this._onUpdateCellCursor(horizontalDirection, verticalDirection); }, + _onDocumentRepair: function (textMsg) { + if (!this._docRepair) { + this._docRepair = L.control.documentRepair(); + } + + if (!this._docRepair.isVisible()) { + this._docRepair.addTo(this._map); + this._docRepair.fillActions(textMsg); + this._map.enable(false); + this._docRepair.show(); + } + }, + _onMousePointerMsg: function (textMsg) { textMsg = textMsg.substring(14); // "mousepointer: " textMsg = L.Cursor.getCustomCursor(textMsg) || textMsg; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src loleaflet/unocommands.js scripts/unocommandsl10n.sh
loleaflet/dist/l10n/uno/af.json |2 +- loleaflet/dist/l10n/uno/am.json |2 +- loleaflet/dist/l10n/uno/an.json |2 +- loleaflet/dist/l10n/uno/ar.json |2 +- loleaflet/dist/l10n/uno/as.json |2 +- loleaflet/dist/l10n/uno/ast.json |2 +- loleaflet/dist/l10n/uno/be.json |2 +- loleaflet/dist/l10n/uno/bg.json |2 +- loleaflet/dist/l10n/uno/bn-IN.json |2 +- loleaflet/dist/l10n/uno/bn.json |2 +- loleaflet/dist/l10n/uno/bo.json |2 +- loleaflet/dist/l10n/uno/br.json |2 +- loleaflet/dist/l10n/uno/brx.json |2 +- loleaflet/dist/l10n/uno/bs.json |2 +- loleaflet/dist/l10n/uno/ca-valencia.json |2 +- loleaflet/dist/l10n/uno/ca.json |2 +- loleaflet/dist/l10n/uno/cs.json |2 +- loleaflet/dist/l10n/uno/cy.json |2 +- loleaflet/dist/l10n/uno/da.json |2 +- loleaflet/dist/l10n/uno/de.json |2 +- loleaflet/dist/l10n/uno/dgo.json |2 +- loleaflet/dist/l10n/uno/dz.json |2 +- loleaflet/dist/l10n/uno/el.json |2 +- loleaflet/dist/l10n/uno/en-GB.json |2 +- loleaflet/dist/l10n/uno/en-ZA.json |2 +- loleaflet/dist/l10n/uno/eo.json |2 +- loleaflet/dist/l10n/uno/es.json |2 +- loleaflet/dist/l10n/uno/et.json |2 +- loleaflet/dist/l10n/uno/eu.json |2 +- loleaflet/dist/l10n/uno/fa.json |2 +- loleaflet/dist/l10n/uno/fi.json |2 +- loleaflet/dist/l10n/uno/fr.json |2 +- loleaflet/dist/l10n/uno/ga.json |2 +- loleaflet/dist/l10n/uno/gd.json |2 +- loleaflet/dist/l10n/uno/gl.json |2 +- loleaflet/dist/l10n/uno/gu.json |2 +- loleaflet/dist/l10n/uno/gug.json |2 +- loleaflet/dist/l10n/uno/he.json |2 +- loleaflet/dist/l10n/uno/hi.json |2 +- loleaflet/dist/l10n/uno/hr.json |2 +- loleaflet/dist/l10n/uno/hu.json |2 +- loleaflet/dist/l10n/uno/id.json |2 +- loleaflet/dist/l10n/uno/is.json |2 +- loleaflet/dist/l10n/uno/it.json |2 +- loleaflet/dist/l10n/uno/ja.json |2 +- loleaflet/dist/l10n/uno/ka.json |2 +- loleaflet/dist/l10n/uno/kk.json |2 +- loleaflet/dist/l10n/uno/km.json |2 +- loleaflet/dist/l10n/uno/kmr-Latn.json|2 +- loleaflet/dist/l10n/uno/kn.json |2 +- loleaflet/dist/l10n/uno/ko.json |2 +- loleaflet/dist/l10n/uno/kok.json |2 +- loleaflet/dist/l10n/uno/ks.json |2 +- loleaflet/dist/l10n/uno/lb.json |2 +- loleaflet/dist/l10n/uno/lo.json |2 +- loleaflet/dist/l10n/uno/lt.json |2 +- loleaflet/dist/l10n/uno/lv.json |2 +- loleaflet/dist/l10n/uno/mai.json |2 +- loleaflet/dist/l10n/uno/mk.json |2 +- loleaflet/dist/l10n/uno/ml.json |2 +- loleaflet/dist/l10n/uno/mn.json |2 +- loleaflet/dist/l10n/uno/mni.json |2 +- loleaflet/dist/l10n/uno/mr.json |2 +- loleaflet/dist/l10n/uno/my.json |2 +- loleaflet/dist/l10n/uno/nb.json |2 +- loleaflet/dist/l10n/uno/ne.json |2 +- loleaflet/dist/l10n/uno/nl.json |2 +- loleaflet/dist/l10n/uno/nn.json |2 +- loleaflet/dist/l10n/uno/nr.json |2 +- loleaflet/dist/l10n/uno/nso.json |2 +- loleaflet/dist/l10n/uno/oc.json |2 +- loleaflet/dist/l10n/uno/om.json |2 +- loleaflet/dist/l10n/uno/or.json |2 +- loleaflet/dist/l10n/uno/pa-IN.json |2 +- loleaflet/dist/l10n/uno/pl.json |2 +- loleaflet/dist/l10n/uno/pt-BR.json |2 +- loleaflet/dist/l10n/uno/pt.json |2 +- loleaflet/dist/l10n/uno/ro.json |2 +- loleaflet/dist/l10n/uno/ru.json |2 +- loleaflet/dist/l10n/uno/rw.json |2 +- loleaflet/dist/l10n/uno/sa-IN.json |2 +- loleaflet/dist/l10n/uno/sat.json |2 +- loleaflet/dist/l10n/uno/sd.json |2 +- loleaflet/dist/l10n/uno/si.json |2 +- loleaflet/dist/l10n/uno/sid.json |2 +- loleaflet/dist/l10n/uno/sk.json |2 +- loleaflet/dist/l10n/uno/sl.json |2 +- loleaflet/dist/l10n/uno/sq.json |2 +- loleaflet/dist/l10n/uno/sr-Latn.json |2 +-
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css|2 ++ loleaflet/src/control/Control.ColumnHeader.js | 17 - loleaflet/src/control/Control.RowHeader.js| 16 3 files changed, 26 insertions(+), 9 deletions(-) New commits: commit 1de001e283a71667d2139e17b35bf2441336836a Author: Henry CastroDate: Fri Aug 12 13:50:16 2016 -0400 loleaflet: fix small column/row resize diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 7927b23..30c992c 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -105,6 +105,7 @@ padding-top: 1px; margin: 0px; height: 100%; + overflow: hidden; } .spreadsheet-header-column:hover { @@ -138,6 +139,7 @@ margin: 0px; height: 100%; cursor: pointer; + overflow: hidden; } .spreadsheet-header-row:hover { diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index a4cb870..b38ea32 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -105,22 +105,29 @@ L.Control.ColumnHeader = L.Control.Header.extend({ column = L.DomUtil.create('div', 'spreadsheet-header-column', this._columns); text = L.DomUtil.create('div', 'spreadsheet-header-column-text', column); resize = L.DomUtil.create('div', 'spreadsheet-header-column-resize', column); - resize.column = iterator + 1; - resize.width = width; var content = columns[iterator].text; text.setAttribute('rel', 'spreadsheet-column-' + content); // for easy addressing text.innerHTML = content; width = Math.round(converter.call(context, twip).x) - 1; if (width === -1) { L.DomUtil.setStyle(column, 'display', 'none'); - } - else { + } else if (width < 10) { + text.column = iterator + 1; + text.width = width; + L.DomUtil.setStyle(column, 'width', width + 'px'); + L.DomUtil.setStyle(column, 'cursor', 'col-resize'); + L.DomUtil.setStyle(text, 'cursor', 'col-resize'); + L.DomUtil.setStyle(resize, 'display', 'none'); + this.mouseInit(text); + } else { + resize.column = iterator + 1; + resize.width = width; L.DomUtil.setStyle(column, 'width', width + 'px'); L.DomUtil.setStyle(text, 'width', width - 3 + 'px'); L.DomUtil.setStyle(resize, 'width', '3px'); + this.mouseInit(resize); } L.DomEvent.addListener(text, 'click', this._onColumnHeaderClick, this); - this.mouseInit(resize); } }, diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js index 658f156..119c020 100644 --- a/loleaflet/src/control/Control.RowHeader.js +++ b/loleaflet/src/control/Control.RowHeader.js @@ -103,23 +103,31 @@ L.Control.RowHeader = L.Control.Header.extend({ row = L.DomUtil.create('div', 'spreadsheet-header-row', this._rows); text = L.DomUtil.create('div', 'spreadsheet-header-row-text', row); resize = L.DomUtil.create('div', 'spreadsheet-header-row-resize', row); - resize.row = iterator + 1; - resize.height = height; var content = rows[iterator].text; text.setAttribute('rel', 'spreadsheet-row-' + content); // for easy addressing text.innerHTML = content; height = Math.round(converter.call(context, twip).y) - 1; if (height === -1) { L.DomUtil.setStyle(row, 'display', 'none'); + } else if (height < 10) { + text.row = iterator + 1; + text.height = height; + L.DomUtil.setStyle(row, 'height', height + 'px'); + L.DomUtil.setStyle(row, 'cursor', 'row-resize'); + L.DomUtil.setStyle(text, 'line-height', height + 'px'); + L.DomUtil.setStyle(text, 'cursor', 'row-resize'); +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css| 68 +++--- loleaflet/src/control/Control.ColumnHeader.js | 15 +++-- loleaflet/src/control/Control.RowHeader.js| 16 +++--- 3 files changed, 70 insertions(+), 29 deletions(-) New commits: commit 3336af0804b919b2441d162626f298c09ddcac16 Author: Henry CastroDate: Thu Aug 4 16:48:47 2016 -0400 loleaflet: add Column/Row cursor resize diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 7537600..7927b23 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -99,24 +99,12 @@ .spreadsheet-header-column { border-right: 1px solid darkgrey; - font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; - display: inline-block; - text-align: center; - text-overflow: ellipsis; - white-space: nowrap; + text-align: left; padding: 0px; padding-top: 1px; margin: 0px; height: 100%; - cursor: pointer; - - /* Make the text unselectable for all browsers */ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; } .spreadsheet-header-column:hover { @@ -146,14 +134,56 @@ .spreadsheet-header-row { border-bottom: 1px solid darkgrey; - font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; + padding: 0px; + margin: 0px; + height: 100%; + cursor: pointer; + } + +.spreadsheet-header-row:hover { + background-color: #DDD; + } +.spreadsheet-header-column-text { + display: inline-block; + vertical-align: top; + font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; text-overflow: ellipsis; - text-align: center; white-space: nowrap; + text-align: center; + height: 100%; + margin: 0px; + border: 0px; padding: 0px; + cursor: pointer; + + /* Make the text unselectable for all browsers */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + } + +.spreadsheet-header-column-resize { + display: inline-block; + vertical-align: top; + cursor: col-resize; + height: 100%; margin: 0px; + border: 0px; + padding: 0px; + } + +.spreadsheet-header-row-text { + font: 12px/1.5 "Segoe UI", Tahoma, Arial, Helvetica, sans-serif; + text-overflow: ellipsis; + white-space: nowrap; + text-align: center; height: 100%; + margin: 0px; + border: 0px; + padding: 0px; cursor: pointer; /* Make the text unselectable for all browsers */ @@ -164,6 +194,10 @@ -ms-user-select: none; } -.spreadsheet-header-row:hover { - background-color: #DDD; +.spreadsheet-header-row-resize { + cursor: row-resize; + height: 100%; + margin: 0px; + border: 0px; + padding: 0px; } diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index a5cfcdc..45d48b5 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -92,24 +92,27 @@ L.Control.ColumnHeader = L.Control.extend({ }, fillColumns: function (columns, converter, context) { - var iterator, twip, width, text; + var iterator, twip, width, column, text, resize; this.clearColumns(); for (iterator = 0; iterator < columns.length; iterator++) { width = columns[iterator].size - (iterator > 0 ? columns[iterator - 1].size : 0); twip = new L.Point(width, width); - text = L.DomUtil.create('div', 'spreadsheet-header-column', this._columns); + column = L.DomUtil.create('div', 'spreadsheet-header-column', this._columns); + text = L.DomUtil.create('div', 'spreadsheet-header-column-text', column); + resize = L.DomUtil.create('div', 'spreadsheet-header-column-resize', column); var content = columns[iterator].text; text.setAttribute('rel', 'spreadsheet-column-' + content); // for easy addressing text.innerHTML = content; - width = Math.round(converter.call(context, twip).x) - 1 + 'px'; - if (width === '-1px') { + width = Math.round(converter.call(context, twip).x) - 1; + if (width === -1) { L.DomUtil.setStyle(text, 'display', 'none'); } else { -
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |7 --- loleaflet/src/control/Styles.js |8 2 files changed, 15 deletions(-) New commits: commit 1a6b102469b6ccacad879a40f91a240843892c74 Author: Henry CastroDate: Sun Jul 3 10:46:33 2016 -0400 loleaflet: remove status bar item 'Signature' They always report the same value diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 5a07699..7484b57 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -664,8 +664,6 @@ map.on('doclayerinit', function () { {type: 'html', id: 'StatusSelectionMode', html: '' }, //{type: 'break', id:'break6'}, //{type: 'html', id: 'ModifiedStatus', html: '' }, - {type: 'break', id:'break7'}, - {type: 'html', id: 'Signature', html: '' }, {type: 'break', id:'break8'}, {type: 'html', id: 'StateTableCell', html: '' }, //{type: 'break', id:'break9'}, @@ -691,8 +689,6 @@ map.on('doclayerinit', function () { {type: 'html', id: 'SelectionMode', html: '' }, //{type: 'break', id:'break7'}, //{type: 'html', id: 'ModifiedStatus', html: '' }, - {type: 'break', id:'break8'}, - {type: 'html', id: 'Signature', html: '' }, ]) statusbar.refresh(); break; @@ -837,9 +833,6 @@ map.on('commandstatechanged', function (e) { commandName === '.uno:SelectionMode') { $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state] : ''); } - else if (commandName === '.uno:Signature') { - $('#Signature').html(state ? L.Styles.signatureState[state] : ''); - } else if (commandName === '.uno:Position' || commandName === '.uno:StateTableCell' || commandName === '.uno:StatusBarFunc' || diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js index a7324b8..7cd3feb 100644 --- a/loleaflet/src/control/Styles.js +++ b/loleaflet/src/control/Styles.js @@ -329,12 +329,4 @@ L.Styles = { 'Adding selection', 'Block selection' ], - - signatureState : { - '-1' : 'The document is not signed.', - '0' : 'The document signature is OK.', - '1' : 'The document signature does not match the document content', - '2' : 'The document signature is OK, but the certificates could not be validated.', - '3' : 'The document signature and the certificate are OK' - }, }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 32 loleaflet/src/control/Styles.js |2 +- 2 files changed, 17 insertions(+), 17 deletions(-) New commits: commit b3ff83251fa665b5d5c6a1fc22cae6b286e8dc81 Author: Henry CastroDate: Sat Jul 2 14:33:50 2016 -0400 loleaflet: replace '_' for ' ', to avoid ugly effect diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index d5d1ce0..426888c 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -653,25 +653,25 @@ map.on('doclayerinit', function () { case 'spreadsheet': statusbar.insert('left', [ {type: 'break', id:'break1'}, - {type: 'html', id: 'StatusDocPos', html: '_' }, + {type: 'html', id: 'StatusDocPos', html: '' }, {type: 'break', id:'break2'}, - {type: 'html', id: 'RowColSelCount', html: '_' }, + {type: 'html', id: 'RowColSelCount', html: '' }, {type: 'break', id:'break3'}, - {type: 'html', id: 'SatusPageStyle', html: '_' }, + {type: 'html', id: 'SatusPageStyle', html: '' }, {type: 'break', id:'break4'}, - {type: 'html', id: 'InsertMode', html: '_' }, + {type: 'html', id: 'InsertMode', html: '' }, {type: 'break', id:'break5'}, - {type: 'html', id: 'StatusSelectionMode', html: '_' }, + {type: 'html', id: 'StatusSelectionMode', html: '' }, //{type: 'break', id:'break6'}, - //{type: 'html', id: 'ModifiedStatus', html: '_' }, + //{type: 'html', id: 'ModifiedStatus', html: '' }, {type: 'break', id:'break7'}, - {type: 'html', id: 'Signature', html: '_' }, + {type: 'html', id: 'Signature', html: '' }, {type: 'break', id:'break8'}, - {type: 'html', id: 'StateTableCell', html: '_' }, + {type: 'html', id: 'StateTableCell', html: '' }, //{type: 'break', id:'break9'}, - //{type: 'html', id: 'ZoomSlider', html: '_' }, + //{type: 'html', id: 'ZoomSlider', html: '' }, //{type: 'break', id:'break10'}, - //{type: 'html', id: 'Zoom', html: '_' }, + //{type: 'html', id: 'Zoom', html: '' }, ]) statusbar.refresh(); break; @@ -794,22 +794,22 @@ map.on('commandstatechanged', function (e) { } } else if (commandName === '.uno:StatusDocPos') { - $('#StatusDocPos').html(state ? state : '_'); + $('#StatusDocPos').html(state ? state : ''); } else if (commandName === '.uno:RowColSelCount') { - $('#RowColSelCount').html(state ? state : '_'); + $('#RowColSelCount').html(state ? state : ''); } else if (commandName === '.uno:StatusPageStyle') { - $('#StatusPageStyle').html(state ? state : '_'); + $('#StatusPageStyle').html(state ? state : ''); } else if (commandName === '.uno:InsertMode') { - $('#InsertMode').html(state ? L.Styles.insertMode[state] : '_'); + $('#InsertMode').html(state ? L.Styles.insertMode[state] : ''); } else if (commandName === '.uno:StatusSelectionMode') { - $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state] : '_'); + $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state] : ''); } else if (commandName === '.uno:Signature') { - $('#Signature').html(state ? L.Styles.signatureState[state] : '_'); + $('#Signature').html(state ? L.Styles.signatureState[state] : ''); } else if (commandName === '.uno:Position' || commandName === '.uno:StateTableCell' || diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js index 206bae8..a7324b8 100644 --- a/loleaflet/src/control/Styles.js +++ b/loleaflet/src/control/Styles.js @@ -327,7 +327,7 @@ L.Styles = { 'Standard selection', 'Extending selection', 'Adding selection', - 'Selección de bloque' + 'Block selection' ], signatureState : { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 59 ++ loleaflet/src/control/Styles.js | 22 +- 2 files changed, 80 insertions(+), 1 deletion(-) New commits: commit cc8f9f4c64154ec33aedb42384fff5848cee18c6 Author: Henry CastroDate: Thu Jun 30 18:24:01 2016 -0400 loleaflet: add status bar items for Calc diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index e0a4255..d5d1ce0 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -647,6 +647,39 @@ map.on('doclayerinit', function () { toolbar.hide('annotation'); } } + + var statusbar = w2ui['toolbar-down']; + switch (docType) { + case 'spreadsheet': + statusbar.insert('left', [ + {type: 'break', id:'break1'}, + {type: 'html', id: 'StatusDocPos', html: '_' }, + {type: 'break', id:'break2'}, + {type: 'html', id: 'RowColSelCount', html: '_' }, + {type: 'break', id:'break3'}, + {type: 'html', id: 'SatusPageStyle', html: '_' }, + {type: 'break', id:'break4'}, + {type: 'html', id: 'InsertMode', html: '_' }, + {type: 'break', id:'break5'}, + {type: 'html', id: 'StatusSelectionMode', html: '_' }, + //{type: 'break', id:'break6'}, + //{type: 'html', id: 'ModifiedStatus', html: '_' }, + {type: 'break', id:'break7'}, + {type: 'html', id: 'Signature', html: '_' }, + {type: 'break', id:'break8'}, + {type: 'html', id: 'StateTableCell', html: '_' }, + //{type: 'break', id:'break9'}, + //{type: 'html', id: 'ZoomSlider', html: '_' }, + //{type: 'break', id:'break10'}, + //{type: 'html', id: 'Zoom', html: '_' }, + ]) + statusbar.refresh(); + break; + case 'text': + break; + case 'presentation': + break; + } }); map.on('commandstatechanged', function (e) { @@ -760,6 +793,32 @@ map.on('commandstatechanged', function (e) { $('#modifiedstatuslabel').html(_('Document saved')); } } + else if (commandName === '.uno:StatusDocPos') { + $('#StatusDocPos').html(state ? state : '_'); + } + else if (commandName === '.uno:RowColSelCount') { + $('#RowColSelCount').html(state ? state : '_'); + } + else if (commandName === '.uno:StatusPageStyle') { + $('#StatusPageStyle').html(state ? state : '_'); + } + else if (commandName === '.uno:InsertMode') { + $('#InsertMode').html(state ? L.Styles.insertMode[state] : '_'); + } + else if (commandName === '.uno:StatusSelectionMode') { + $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state] : '_'); + } + else if (commandName === '.uno:Signature') { + $('#Signature').html(state ? L.Styles.signatureState[state] : '_'); + } + else if (commandName === '.uno:Position' || +commandName === '.uno:StateTableCell' || +commandName === '.uno:StatusBarFunc' || +commandName === '.uno:Size') { + if (state) { + $('#StateTableCell').html(state); + } + } var toolbarUpMore = w2ui['toolbar-up-more']; var id = commandName.toLowerCase().substr(5); diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js index 609dd88..206bae8 100644 --- a/loleaflet/src/control/Styles.js +++ b/loleaflet/src/control/Styles.js @@ -316,5 +316,25 @@ L.Styles = { {id: 28, text: 'Vertical Title, Vertical Text'}, {id: 29, text: 'Title, Vertical Text'}, {id: 30, text: 'Title, Vertical Text, Clipart'} - ] + ], + + insertMode : { + 'true' : 'Insert', + 'false' : 'Overwrite' + }, + + selectionMode : [ + 'Standard selection', + 'Extending selection', + 'Adding selection', + 'Selección de bloque' + ], + + signatureState : { + '-1' : 'The document is not signed.', + '0' : 'The document signature is OK.', + '1' : 'The document signature does not match the document content', + '2' : 'The document signature is OK, but the certificates could not be validated.', + '3' :
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src loolwsd/ClientSession.cpp
loleaflet/dist/loleaflet.html |2 +- loleaflet/src/core/Socket.js | 12 loolwsd/ClientSession.cpp |6 +- 3 files changed, 14 insertions(+), 6 deletions(-) New commits: commit 8bba9da761af5c2b253174128e380936036dad13 Author: Pranav KantDate: Tue Jun 21 22:11:33 2016 +0530 Make new version string as a JSON string ... easy to differentiate on client side among various version info parts, especially for LOKit version information. Change-Id: I4ba18c60367fb9166462b535bc46953a82a8435d diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index 0a1bb9a..501dbc3 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -139,7 +139,7 @@ About LibreOffice Online - This version of LibreOffice Online is powered by + This version of LibreOffice Online is powered by LOOLWSD diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 08402ab..f8b5564 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -127,16 +127,20 @@ L.Socket = L.Class.extend({ var command = this.parseServerCmd(textMsg); if (textMsg.startsWith('loolserver ')) { // This must be the first message, unless we reconnect. - var versionStr = textMsg.split(' '); - $('#loolwsd-version').text(versionStr[1] + ' ' + versionStr[2]); + var loolwsdVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); + $('#loolwsd-version').text(loolwsdVersionObj.Version + + ' (git hash: ' + loolwsdVersionObj.Hash + ')'); // TODO: For now we expect perfect match in protocol versions - if (versionStr[3] !== this.ProtocolVersionNumber) { + if (loolwsdVersionObj.Protocol !== this.ProtocolVersionNumber) { this.fire('error', {msg: _('Unsupported server version.')}); } } else if (textMsg.startsWith('lokitversion ')) { - $('#lokit-version').text(textMsg.substring(13)); + var lokitVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); + $('#lokit-version').text(lokitVersionObj.ProductName + ' ' + +lokitVersionObj.ProductVersion + lokitVersionObj.ProductExtension + +' (git hash: ' + lokitVersionObj.BuildId.substring(0, 7) + ')'); } else if (textMsg.startsWith('error:') && command.errorCmd === 'load') { this.close(); diff --git a/loolwsd/ClientSession.cpp b/loolwsd/ClientSession.cpp index ad73943..e23272d 100644 --- a/loolwsd/ClientSession.cpp +++ b/loolwsd/ClientSession.cpp @@ -81,7 +81,11 @@ bool ClientSession::_handleInput(const char *buffer, int length) // Send LOOL version information std::string version, hash; Util::getVersionInfo(version, hash); -sendTextFrame("loolserver " + version + " " + hash + " " + GetProtocolVersion()); +std::string versionStr = +"{ \"Version\": \"" + version + "\", " + +"\"Hash\": \"" + hash + "\", " + +"\"Protocol\": \"" + GetProtocolVersion() + "\" }"; +sendTextFrame("loolserver " + versionStr); // Send LOKit version information sendTextFrame("lokitversion " + LOOLWSD::LOKitVersion); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js| 16 +--- loleaflet/src/control/Control.Menubar.js | 25 + loleaflet/src/control/Toolbar.js | 27 +++ 3 files changed, 37 insertions(+), 31 deletions(-) New commits: commit b460769eedd47cdbe3694db140acdafa61f5d86f Author: Pranav KantDate: Tue Jun 21 19:16:20 2016 +0530 loleaflet: 'Keyboard shortcuts' in new 'Help' menubar item Change-Id: I0a924505970e9ed13ea45ebc85ef14a618646b2d diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 67f7ee3..9417931 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -211,21 +211,7 @@ function onClick(id) { resizeToolbar(); } else if (id === 'help') { - var w = window.innerWidth / 2; - var h = window.innerHeight / 2; - $.modal('', { - overlayClose:true, - opacity: 80, - overlayCss: { - backgroundColor : '#000' - }, - containerCss: { - overflow : 'hidden', - backgroundColor : '#fff', - padding : '20px', - border : '2px solid #000' - } - }); + map.showLOKeyboardHelp(); } else if (id === 'close') { window.parent.postMessage('close', '*'); diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 8ac4e25..b62a1a2 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -46,7 +46,8 @@ L.Control.Menubar = L.Control.extend({ {name: _('Cell'), type: 'unocommand', uno: '.uno:EntireCell'}]}, {name: _('Merge cells'), type: 'unocommand', uno: '.uno:MergeCells'}] }, - {name: _('Help'), type: 'menu', menu: [{name: _('About'), id: 'about', type: 'action'}] + {name: _('Help'), type: 'menu', menu: [{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, + {name: _('About'), id: 'about', type: 'action'}] } ], @@ -90,7 +91,8 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}] }, - {name: _('Help'), type: 'menu', menu: [{name: _('About'), id: 'about', type: 'action'}] + {name: _('Help'), type: 'menu', menu: [{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, + {name: _('About'), id: 'about', type: 'action'}] } ], @@ -128,7 +130,8 @@ L.Control.Menubar = L.Control.extend({ {name: _('Delete row'), type: 'unocommand', uno: '.uno:DeleteRows'}, {name: _('Delete column'), type: 'unocommand', uno: '.uno:DeleteColumns'}] }, - {name: _('Help'), type: 'menu', menu: [{name: _('About'), id: 'about', type: 'action'}] + {name: _('Help'), type: 'menu', menu: [{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, + {name: _('About'), id: 'about', type: 'action'}] } ], @@ -298,19 +301,9 @@ L.Control.Menubar = L.Control.extend({ callback: this._onDeleteSlide }, this); } else if (id === 'about') { - $('#about-dialog').modal({ - overlayClose:true, - opacity: 80, - overlayCss: { - backgroundColor : '#000' - }, - containerCss: { - overflow :
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.html| 21 + loleaflet/src/control/Control.Menubar.js | 21 + loleaflet/src/core/Socket.js | 12 +--- 3 files changed, 51 insertions(+), 3 deletions(-) New commits: commit 90aee41c7019b1cf9c4d6fa0258ad1feb6f61ff0 Author: Pranav KantDate: Tue Jun 21 15:05:11 2016 +0530 loleaflet: Dialog to show loolwsd, lokit version information Change-Id: Ie05f0597d3464b5e7705bd1d1ff4ab5c03af013f diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index a9f6613..0a1bb9a 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -136,5 +136,26 @@ + + About LibreOffice Online + + This version of LibreOffice Online is powered by + +LOOLWSD + + + +LOKit + + + + + +var translatableContent = document.getElementsByClassName("translatable"); +for (var i=0; i < translatableContent.length; i++) { +translatableContent[i].innerHTML = translatableContent[i].innerHTML.toLocaleString(); +} + + diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 9bdfba6..8ac4e25 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -4,6 +4,7 @@ /* global $ _ map title vex */ L.Control.Menubar = L.Control.extend({ + // TODO: Some mechanism to stop the need to copy duplicate menus (eg. Help) options: { text: [ {name: _('File'), type: 'menu', menu: [{name: _('Save'), type: 'unocommand', uno: '.uno:Save'}, @@ -44,6 +45,8 @@ L.Control.Menubar = L.Control.extend({ {name: _('Column'), type: 'unocommand', uno: '.uno:EntireColumn'}, {name: _('Cell'), type: 'unocommand', uno: '.uno:EntireCell'}]}, {name: _('Merge cells'), type: 'unocommand', uno: '.uno:MergeCells'}] + }, + {name: _('Help'), type: 'menu', menu: [{name: _('About'), id: 'about', type: 'action'}] } ], @@ -86,6 +89,8 @@ L.Control.Menubar = L.Control.extend({ {name: _('Delete slide'), id: 'deletepage', type: 'action'}, {type: 'separator'}, {name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}] + }, + {name: _('Help'), type: 'menu', menu: [{name: _('About'), id: 'about', type: 'action'}] } ], @@ -122,6 +127,8 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {name: _('Delete row'), type: 'unocommand', uno: '.uno:DeleteRows'}, {name: _('Delete column'), type: 'unocommand', uno: '.uno:DeleteColumns'}] + }, + {name: _('Help'), type: 'menu', menu: [{name: _('About'), id: 'about', type: 'action'}] } ], @@ -290,6 +297,20 @@ L.Control.Menubar = L.Control.extend({ message: _('Are you sure you want to delete this slide?'), callback: this._onDeleteSlide }, this); + } else if (id === 'about') { + $('#about-dialog').modal({ + overlayClose:true, + opacity: 80, + overlayCss: { + backgroundColor : '#000' + }, + containerCss: { + overflow : 'hidden', + backgroundColor : '#fff', + padding : '20px', + border : '2px solid #000' +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 51 +++--- loleaflet/src/control/Toolbar.js |7 +++- loleaflet/src/map/handler/Map.Keyboard.js |3 + 3 files changed, 48 insertions(+), 13 deletions(-) New commits: commit 26d5614b897f68395567e9cfa0d727ef79208b65 Author: Pranav KantDate: Wed Jun 1 13:18:22 2016 +0530 loleaflet: bccu#1777: bccu#1555: formula bar fixes * Use new param DontCommit in .uno:EnterString to not trigger recalculation until enter is pressed. * On pressing 'ESC', reset the current content * Range selection is now possible when formula is entered in * formula bar * Forward 'enter' key events to `map` from formula bar Change-Id: I073eca2fa08520faa9f679b1c986e10805da0ad6 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 58605f6..67f7ee3 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -185,11 +185,19 @@ function onClick(id) { map.cellEnterString(L.DomUtil.get('formulaInput').value); } else if (id === 'cancelformula') { - L.DomUtil.get('formulaInput').value = ''; - map.cellEnterString(L.DomUtil.get('formulaInput').value); + map.sendUnoCommand('.uno:Cancel'); + w2ui['formulabar'].hide('acceptformula', 'cancelformula'); + w2ui['formulabar'].show('sum', 'function'); } else if (id === 'acceptformula') { - map.cellEnterString(L.DomUtil.get('formulaInput').value); + // focus on map, and press enter + map.focus(); + map._docLayer._postKeyboardEvent('input', +map.keyboard.keyCodes.enter, + map.keyboard._toUNOKeyCode(map.keyboard.keyCodes.enter)); + + w2ui['formulabar'].hide('acceptformula', 'cancelformula'); + w2ui['formulabar'].show('sum', 'function'); } else if (id === 'more') { $('#toolbar-up-more').toggle(); @@ -397,7 +405,7 @@ $(function () { {type: 'button', id: 'function', img: 'equal', hint: _('Function')}, {type: 'button', hidden: true, id: 'cancelformula', img: 'cancel', hint: _('Cancel')}, {type: 'button', hidden: true, id: 'acceptformula', img: 'accepttrackedchanges', hint: _('Accept')}, - {type: 'html', id: 'formula', html: ''} ], onClick: function (e) { @@ -593,8 +601,23 @@ function onInsertFile() { } } -function onFormulaInput() { - map.cellEnterString(L.DomUtil.get('formulaInput').value); +function onFormulaInput(e) { + // keycode = 13 is 'enter' + if (e.keyCode === 13) { + // formula bar should not have focus anymore + map.focus(); + + // forward the 'enter' keystroke to map to deal with the formula entered + var data = { + originalEvent: e + }; + map.fire('keypress', data); + } else if (e.keyCode === 27) { // 27 = esc key + map.sendUnoCommand('.uno:Cancel'); + map.focus(); + } else { + map.cellEnterString(L.DomUtil.get('formulaInput').value); + } } function onFormulaBarFocus() { @@ -606,11 +629,17 @@ function onFormulaBarFocus() { } function onFormulaBarBlur() { - var formulabar = w2ui.formulabar; - formulabar.show('sum'); - formulabar.show('function'); - formulabar.hide('cancelformula'); - formulabar.hide('acceptformula'); + // The timeout is needed because we want 'click' event on 'cancel', + // 'accept' button to act before we hide these buttons because + // once hidden, click event won't be processed. + // TODO: Some better way to do it ? + setTimeout(function() { + var formulabar = w2ui.formulabar; + formulabar.show('sum'); + formulabar.show('function'); + formulabar.hide('cancelformula'); + formulabar.hide('acceptformula'); + }, 250); } map.on('updatepermission', function () { diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index aff5e3f..cee4561 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -123,9 +123,14 @@ L.Map.include({ 'StringName': { type: 'string', value: string + }, + 'DontCommit': { + type: 'boolean', + value: true } }; - this._socket.sendMessage('uno .uno:EnterString
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/l10n/uno/af.json |2 +- loleaflet/dist/l10n/uno/am.json |2 +- loleaflet/dist/l10n/uno/an.json |2 +- loleaflet/dist/l10n/uno/ar.json |2 +- loleaflet/dist/l10n/uno/as.json |2 +- loleaflet/dist/l10n/uno/ast.json |2 +- loleaflet/dist/l10n/uno/be.json |2 +- loleaflet/dist/l10n/uno/bg.json |2 +- loleaflet/dist/l10n/uno/bn-IN.json |2 +- loleaflet/dist/l10n/uno/bn.json |2 +- loleaflet/dist/l10n/uno/bo.json |2 +- loleaflet/dist/l10n/uno/br.json |2 +- loleaflet/dist/l10n/uno/brx.json |2 +- loleaflet/dist/l10n/uno/bs.json |2 +- loleaflet/dist/l10n/uno/ca-valencia.json |2 +- loleaflet/dist/l10n/uno/ca.json |2 +- loleaflet/dist/l10n/uno/cs.json |2 +- loleaflet/dist/l10n/uno/cy.json |2 +- loleaflet/dist/l10n/uno/da.json |2 +- loleaflet/dist/l10n/uno/de.json |2 +- loleaflet/dist/l10n/uno/dgo.json |2 +- loleaflet/dist/l10n/uno/dz.json |2 +- loleaflet/dist/l10n/uno/el.json |2 +- loleaflet/dist/l10n/uno/en-GB.json |2 +- loleaflet/dist/l10n/uno/en-ZA.json |2 +- loleaflet/dist/l10n/uno/eo.json |2 +- loleaflet/dist/l10n/uno/es.json |2 +- loleaflet/dist/l10n/uno/et.json |2 +- loleaflet/dist/l10n/uno/eu.json |2 +- loleaflet/dist/l10n/uno/fa.json |2 +- loleaflet/dist/l10n/uno/fi.json |2 +- loleaflet/dist/l10n/uno/fr.json |2 +- loleaflet/dist/l10n/uno/ga.json |2 +- loleaflet/dist/l10n/uno/gd.json |2 +- loleaflet/dist/l10n/uno/gl.json |2 +- loleaflet/dist/l10n/uno/gu.json |2 +- loleaflet/dist/l10n/uno/gug.json |2 +- loleaflet/dist/l10n/uno/he.json |2 +- loleaflet/dist/l10n/uno/hi.json |2 +- loleaflet/dist/l10n/uno/hr.json |2 +- loleaflet/dist/l10n/uno/hu.json |2 +- loleaflet/dist/l10n/uno/id.json |2 +- loleaflet/dist/l10n/uno/is.json |2 +- loleaflet/dist/l10n/uno/it.json |2 +- loleaflet/dist/l10n/uno/ja.json |2 +- loleaflet/dist/l10n/uno/ka.json |2 +- loleaflet/dist/l10n/uno/kk.json |2 +- loleaflet/dist/l10n/uno/km.json |2 +- loleaflet/dist/l10n/uno/kmr-Latn.json|2 +- loleaflet/dist/l10n/uno/kn.json |2 +- loleaflet/dist/l10n/uno/ko.json |2 +- loleaflet/dist/l10n/uno/kok.json |2 +- loleaflet/dist/l10n/uno/ks.json |2 +- loleaflet/dist/l10n/uno/lo.json |2 +- loleaflet/dist/l10n/uno/lt.json |2 +- loleaflet/dist/l10n/uno/lv.json |2 +- loleaflet/dist/l10n/uno/mai.json |2 +- loleaflet/dist/l10n/uno/mk.json |2 +- loleaflet/dist/l10n/uno/ml.json |2 +- loleaflet/dist/l10n/uno/mn.json |2 +- loleaflet/dist/l10n/uno/mni.json |2 +- loleaflet/dist/l10n/uno/mr.json |2 +- loleaflet/dist/l10n/uno/my.json |2 +- loleaflet/dist/l10n/uno/nb.json |2 +- loleaflet/dist/l10n/uno/ne.json |2 +- loleaflet/dist/l10n/uno/nl.json |2 +- loleaflet/dist/l10n/uno/nn.json |2 +- loleaflet/dist/l10n/uno/nr.json |2 +- loleaflet/dist/l10n/uno/nso.json |2 +- loleaflet/dist/l10n/uno/oc.json |2 +- loleaflet/dist/l10n/uno/om.json |2 +- loleaflet/dist/l10n/uno/or.json |2 +- loleaflet/dist/l10n/uno/pa-IN.json |2 +- loleaflet/dist/l10n/uno/pl.json |2 +- loleaflet/dist/l10n/uno/pt-BR.json |2 +- loleaflet/dist/l10n/uno/pt.json |2 +- loleaflet/dist/l10n/uno/ro.json |2 +- loleaflet/dist/l10n/uno/ru.json |2 +- loleaflet/dist/l10n/uno/rw.json |2 +- loleaflet/dist/l10n/uno/sa-IN.json |2 +- loleaflet/dist/l10n/uno/sat.json |2 +- loleaflet/dist/l10n/uno/sd.json |2 +- loleaflet/dist/l10n/uno/si.json |2 +- loleaflet/dist/l10n/uno/sid.json |2 +- loleaflet/dist/l10n/uno/sk.json |2 +- loleaflet/dist/l10n/uno/sl.json |2 +- loleaflet/dist/l10n/uno/sq.json |2 +- loleaflet/dist/l10n/uno/sr-Latn.json |2 +- loleaflet/dist/l10n/uno/sr.json |2 +-
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |2 +- loleaflet/src/control/Styles.js |6 +- 2 files changed, 2 insertions(+), 6 deletions(-) New commits: commit 1395d604dd2b071f052c42b89866d33e0d43764e Author: Andras TimarDate: Mon May 30 00:13:19 2016 +0200 loleaflet: bccu#1804 related: do not try to localize user defined style names diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index e5f77a2..58605f6 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -850,7 +850,7 @@ map.on('updatetoolbarcommandvalues', function (e) { localeStyle = 'Outline'.toLocaleString() + ' ' + outlineLevel; } else { localeStyle = L.Styles.styleMappings[style]; - localeStyle = localeStyle === undefined ? style.toLocaleString() : localeStyle.toLocaleString(); + localeStyle = localeStyle === undefined ? style : localeStyle.toLocaleString(); } data = data.concat({id: style, text: localeStyle}); diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js index 1dda56b..609dd88 100644 --- a/loleaflet/src/control/Styles.js +++ b/loleaflet/src/control/Styles.js @@ -276,11 +276,7 @@ L.Styles = { 'List 2':'List 2', 'List 3':'List 3', 'List 4':'List 4', - 'List 5':'List 5', - 'New Chapter':'New Chapter', - 'Guide Name':'Guide Name', - 'Heading Note':'Heading Note', - 'Text Note':'Text Note' + 'List 5':'List 5' }, // For impress documents, LOK STATE_CHANGED callback return these internal names ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |3 ++- loleaflet/src/control/Styles.js |6 +- 2 files changed, 7 insertions(+), 2 deletions(-) New commits: commit 2731e1fc0226f180a170860da26027028b655e2d Author: Henry CastroDate: Sun May 29 17:17:25 2016 -0400 loleaflet: bccu#1804 Style listbox does not get css styling diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index eeb79d9..e5f77a2 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -849,7 +849,8 @@ map.on('updatetoolbarcommandvalues', function (e) { var outlineLevel = style.split('outline')[1]; localeStyle = 'Outline'.toLocaleString() + ' ' + outlineLevel; } else { - localeStyle = L.Styles.styleMappings[style].toLocaleString(); + localeStyle = L.Styles.styleMappings[style]; + localeStyle = localeStyle === undefined ? style.toLocaleString() : localeStyle.toLocaleString(); } data = data.concat({id: style, text: localeStyle}); diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js index 609dd88..1dda56b 100644 --- a/loleaflet/src/control/Styles.js +++ b/loleaflet/src/control/Styles.js @@ -276,7 +276,11 @@ L.Styles = { 'List 2':'List 2', 'List 3':'List 3', 'List 4':'List 4', - 'List 5':'List 5' + 'List 5':'List 5', + 'New Chapter':'New Chapter', + 'Guide Name':'Guide Name', + 'Heading Note':'Heading Note', + 'Text Note':'Text Note' }, // For impress documents, LOK STATE_CHANGED callback return these internal names ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 20 loleaflet/src/control/Styles.js | 21 - loleaflet/src/control/Toolbar.js | 14 ++ 3 files changed, 38 insertions(+), 17 deletions(-) New commits: commit b1172c6b2463dc8c80f336edc0feadfe85fd3408 Author: Henry CastroDate: Thu May 26 21:37:09 2016 -0400 loleaflet: bccu#1799 Apply Styles does not work in Presentation diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 117a75f..3fb3da7 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -377,7 +377,7 @@ function onStyleSelect (e) { map.applyStyle(style, 'CellStyles'); } else if (map.getDocType() === 'presentation' || map.getDocType() === 'drawing') { - map.applyStyle(style, 'Default'); + map.applyLayout(style); } map.focus(); } @@ -718,21 +718,9 @@ map.on('updatetoolbarcommandvalues', function (e) { styles = e.commandValues.CellStyles; } else if (map.getDocType() === 'presentation' || map.getDocType() === 'drawing') { - Object.keys(e.commandValues).forEach(function(style) { - switch (style) { - case 'graphics': - case 'table': - case 'cell': - case 'Commands': - break; - - default: - if ( styles.length === 0 ) { - styles = e.commandValues[style]; - } - break; - } - }); + L.Styles.impressLayout.forEach(function(layout) { + data = data.concat({id: layout.id, text: layout.text}); + }, this); } if (topStyles.length > 0) { diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js index 124d652..0f396f4 100644 --- a/loleaflet/src/control/Styles.js +++ b/loleaflet/src/control/Styles.js @@ -297,5 +297,24 @@ L.Styles = { 'Hintergrund':'background', 'Hintergrundobjekte':'backgroundobjects', 'Notizen':'notes' - } + }, + + impressLayout : [ + {id: 0, text: 'Title Slide'}, + {id: 1, text: 'Title, Content'}, + {id: 3, text: 'Title and 2 Content'}, + {id: 19, text: 'Title Only'}, + {id: 20, text: 'Blank Slide'}, + {id: 32, text: 'Centered Text'}, + {id: 12, text: 'Title, Content and 2 Content'}, + {id: 15, text: 'Title, 2 Content and Content'}, + {id: 16, text: 'Title, 2 Content over Content'}, + {id: 14, text: 'Title, Content over Content'}, + {id: 18, text: 'Title, 4 Content'}, + {id: 34, text: 'Title, 6 Content'}, + {id: 27, text: 'Vertical Title, Text, Chart'}, + {id: 28, text: 'Vertical Title, Vertical Text'}, + {id: 29, text: 'Title, Vertical Content'}, + {id: 30, text: 'Title, 2 Vertical Content'} + ] }; diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index 9ebdd4e..aff5e3f 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -85,6 +85,20 @@ L.Map.include({ } }, + applyLayout: function (layout) { + if (!layout) { + this.fire('error', {cmd: 'setLayout', kind: 'incorrectparam'}); + return; + } + if (this._permission === 'edit') { + var msg = 'uno .uno:AssignLayout {' + + '"WhatPage":{"type":"unsigned short", "value": "' + this.getCurrentPartNumber() + '"},' + + '"WhatLayout":{"type":"unsigned short", "value": "' + layout + '"}' + + '}'; + this._socket.sendMessage(msg); + } + }, + sendUnoCommand: function (command, json) { if (this._permission === 'edit') { this._socket.sendMessage('uno ' + command + (json ? ' ' + JSON.stringify(json) : '')); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/toolbar/toolbar.js |2 +- loleaflet/src/dom/Draggable.js|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 2bc0f09a227220656ea45d8da3f5c9786d10db2a Author: Christian LohmaierDate: Mon May 23 15:12:00 2016 +0200 typo: horizontaly → horizontally diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index d3bc568..ad13560 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -34,7 +34,7 @@ $(function () { { type: 'button', id: 'backcolor', img: 'backcolor', hint: _("Highlighting") }, { type: 'break' }, { type: 'button', id: 'alignleft', img: 'alignleft', hint: _("Align left"), uno: 'LeftPara', unosheet: 'HorizontalAlignment {"HorizontalAlignment":{"type":"unsigned short", "value":"1"}}' }, - { type: 'button', id: 'alignhorizontal', img: 'alignhorizontal', hint: _("Center horizontaly"), uno: 'CenterPara', unosheet: 'HorizontalAlignment {"HorizontalAlignment":{"type":"unsigned short", "value":"2"}}' }, + { type: 'button', id: 'alignhorizontal', img: 'alignhorizontal', hint: _("Center horizontally"), uno: 'CenterPara', unosheet: 'HorizontalAlignment {"HorizontalAlignment":{"type":"unsigned short", "value":"2"}}' }, { type: 'button', id: 'alignright', img: 'alignright', hint: _("Align right"), uno: 'RightPara', unosheet: 'HorizontalAlignment {"HorizontalAlignment":{"type":"unsigned short", "value":"3"}}' }, { type: 'button', id: 'alignblock', img: 'alignblock', hint: _("Justified"), uno: 'JustifyPara', unosheet: 'HorizontalAlignment {"HorizontalAlignment":{"type":"unsigned short", "value":"4"}}' }, { type: 'break' }, diff --git a/loleaflet/src/dom/Draggable.js b/loleaflet/src/dom/Draggable.js index aebaf11..9924510 100644 --- a/loleaflet/src/dom/Draggable.js +++ b/loleaflet/src/dom/Draggable.js @@ -104,7 +104,7 @@ L.Draggable = L.Evented.extend({ offset = offset.add(correction); } if (this._map.getDocSize().x < this._map.getSize().x) { - // don't pan horizontaly when the document fits in the viewing + // don't pan horizontally when the document fits in the viewing // area horizontally (docWidth < viewAreaWidth) offset.x = 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src scripts/unocommandsl10n.sh
loleaflet/dist/l10n/uno/ab.json |1 + loleaflet/dist/l10n/uno/af.json |1 + loleaflet/dist/l10n/uno/am.json |1 + loleaflet/dist/l10n/uno/an.json |1 + loleaflet/dist/l10n/uno/ar.json |1 + loleaflet/dist/l10n/uno/as.json |1 + loleaflet/dist/l10n/uno/ast.json |1 + loleaflet/dist/l10n/uno/az.json |1 + loleaflet/dist/l10n/uno/be.json |1 + loleaflet/dist/l10n/uno/bg.json |1 + loleaflet/dist/l10n/uno/bn-IN.json |1 + loleaflet/dist/l10n/uno/bn.json |1 + loleaflet/dist/l10n/uno/bo.json |1 + loleaflet/dist/l10n/uno/br.json |1 + loleaflet/dist/l10n/uno/brx.json |1 + loleaflet/dist/l10n/uno/bs.json |1 + loleaflet/dist/l10n/uno/ca-valencia.json |1 + loleaflet/dist/l10n/uno/ca.json |1 + loleaflet/dist/l10n/uno/cs.json |1 + loleaflet/dist/l10n/uno/cy.json |1 + loleaflet/dist/l10n/uno/da.json |1 + loleaflet/dist/l10n/uno/de.json |1 + loleaflet/dist/l10n/uno/dgo.json |1 + loleaflet/dist/l10n/uno/dz.json |1 + loleaflet/dist/l10n/uno/el.json |1 + loleaflet/dist/l10n/uno/en-GB.json |1 + loleaflet/dist/l10n/uno/en-ZA.json |1 + loleaflet/dist/l10n/uno/eo.json |1 + loleaflet/dist/l10n/uno/es.json |1 + loleaflet/dist/l10n/uno/et.json |1 + loleaflet/dist/l10n/uno/eu.json |1 + loleaflet/dist/l10n/uno/fa.json |1 + loleaflet/dist/l10n/uno/fi.json |1 + loleaflet/dist/l10n/uno/fr.json |1 + loleaflet/dist/l10n/uno/ga.json |1 + loleaflet/dist/l10n/uno/gd.json |1 + loleaflet/dist/l10n/uno/gl.json |1 + loleaflet/dist/l10n/uno/gu.json |1 + loleaflet/dist/l10n/uno/gug.json |1 + loleaflet/dist/l10n/uno/he.json |1 + loleaflet/dist/l10n/uno/hi.json |1 + loleaflet/dist/l10n/uno/hr.json |1 + loleaflet/dist/l10n/uno/hu.json |1 + loleaflet/dist/l10n/uno/id.json |1 + loleaflet/dist/l10n/uno/is.json |1 + loleaflet/dist/l10n/uno/it.json |1 + loleaflet/dist/l10n/uno/ja.json |1 + loleaflet/dist/l10n/uno/jv.json |1 + loleaflet/dist/l10n/uno/ka.json |1 + loleaflet/dist/l10n/uno/kk.json |1 + loleaflet/dist/l10n/uno/kl.json |1 + loleaflet/dist/l10n/uno/km.json |1 + loleaflet/dist/l10n/uno/kmr-Latn.json|1 + loleaflet/dist/l10n/uno/kn.json |1 + loleaflet/dist/l10n/uno/ko.json |1 + loleaflet/dist/l10n/uno/kok.json |1 + loleaflet/dist/l10n/uno/ks.json |1 + loleaflet/dist/l10n/uno/ky.json |1 + loleaflet/dist/l10n/uno/lb.json |1 + loleaflet/dist/l10n/uno/lo.json |1 + loleaflet/dist/l10n/uno/lt.json |1 + loleaflet/dist/l10n/uno/lv.json |1 + loleaflet/dist/l10n/uno/mai.json |1 + loleaflet/dist/l10n/uno/mk.json |1 + loleaflet/dist/l10n/uno/ml.json |1 + loleaflet/dist/l10n/uno/mn.json |1 + loleaflet/dist/l10n/uno/mni.json |1 + loleaflet/dist/l10n/uno/mr.json |1 + loleaflet/dist/l10n/uno/my.json |1 + loleaflet/dist/l10n/uno/nb.json |1 + loleaflet/dist/l10n/uno/ne.json |1 + loleaflet/dist/l10n/uno/nl.json |1 + loleaflet/dist/l10n/uno/nn.json |1 + loleaflet/dist/l10n/uno/nr.json |1 + loleaflet/dist/l10n/uno/nso.json |1 + loleaflet/dist/l10n/uno/oc.json |1 + loleaflet/dist/l10n/uno/om.json |1 + loleaflet/dist/l10n/uno/or.json |1 + loleaflet/dist/l10n/uno/pa-IN.json |1 + loleaflet/dist/l10n/uno/pl.json |1 + loleaflet/dist/l10n/uno/pt-BR.json |1 + loleaflet/dist/l10n/uno/pt.json |1 + loleaflet/dist/l10n/uno/ro.json |1 + loleaflet/dist/l10n/uno/ru.json |1 + loleaflet/dist/l10n/uno/rw.json |1 + loleaflet/dist/l10n/uno/sa-IN.json |1 + loleaflet/dist/l10n/uno/sah.json |1 + loleaflet/dist/l10n/uno/sat.json |1 + loleaflet/dist/l10n/uno/sd.json |1 + loleaflet/dist/l10n/uno/si.json |1 + loleaflet/dist/l10n/uno/sid.json |
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css| 50 +++--- loleaflet/dist/toolbar.css|2 - loleaflet/src/control/Control.Tabs.js |6 ++-- 3 files changed, 32 insertions(+), 26 deletions(-) New commits: commit 2c5c0d056b17dd45cd1523bc8e8638fecf95f6da Author: Jan HolesovskyDate: Mon Apr 25 19:05:01 2016 +0200 loleaflet: Many visual improvements in the spreadsheet. Sheet buttons better aligned, no overlaps in sheet scrolling buttons, more consistent colors, no remnants of scrollbars, etc. diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 8278234..aabd15e 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -2,47 +2,53 @@ border-top: 1px solid #B6B6B6 !important; top: 100px !important; left: 50px !important; - bottom: 49px !important; + bottom: 56px !important; } .spreadsheet-tab { margin: 0; padding: 0; left: 108px; - bottom: 34px; + right: 0; + bottom: 33px; position: absolute; cursor: pointer; - height: 20px; - width: 90%; + height: 24px; overflow-x: hidden; white-space: nowrap; - } -.spreadsheet-tab-scroll { - width: 90%; - overflow-x: auto; + background-color: #efefef; } +.spreadsheet-tab-scroll { + width: 100%; + height: 100%; + overflow: auto; + padding-bottom: 20px; /* to hide the scroolbar */ -.spreadsheet-tab li { - margin: 0; - padding: 0; - margin-left: 2px; + margin-left: 6px; } +.spreadsheet-context-menu { + margin: 0px; + margin-right: 3px; + padding-left: 7px; + padding-right: 7px; + padding-top: 1px; + padding-bottom: 1px; -.spreadsheet-tab li { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; display: inline-block; - border: #B9B9B9 1px solid; - background: #A8A8A8; - color: #FF; - text-decoration: none; + border: 1px solid darkgrey; + background-color: lightgrey; } -.spreadsheet-tab li.selected { - background: #FF; - color: #7E7E7E; - border-top: #FFF 1px solid; +.spreadsheet-context-menu-selected { + background: white; + border-top: 1px solid lightgrey; + border-left: 1px solid lightgrey; + border-right: 1px solid lightgrey; + border-bottom: 1px solid lightgrey; } .spreadsheet-header-corner { @@ -125,7 +131,7 @@ left: 0; top: 100px; width: 48px; - bottom: 54px; + bottom: 57px; overflow: hidden; } diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index c6abe47..3c70486 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -36,7 +36,7 @@ #spreadsheet-toolbar { left: 0; text-align: center; -bottom: 29px; +bottom: 33px; padding: 0; position: absolute; } diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js index e44e9d9..7fdc3e3 100644 --- a/loleaflet/src/control/Control.Tabs.js +++ b/loleaflet/src/control/Control.Tabs.js @@ -85,7 +85,7 @@ L.Control.Tabs = L.Control.extend({ for (var i = 0; i < parts; i++) { var id = 'spreadsheet-tab' + i; - var tab = L.DomUtil.create('li', 'spreadsheet-context-menu', ssTabScroll); + var tab = L.DomUtil.create('div', 'spreadsheet-context-menu', ssTabScroll); tab.innerHTML = e.partNames[i]; tab.id = id; @@ -99,9 +99,9 @@ L.Control.Tabs = L.Control.extend({ } for (var key in this._spreadsheetTabs) { var part = parseInt(key.match(/\d+/g)[0]); - L.DomUtil.removeClass(this._spreadsheetTabs[key], 'selected'); + L.DomUtil.removeClass(this._spreadsheetTabs[key], 'spreadsheet-context-menu-selected'); if (part === selectedPart) { - L.DomUtil.addClass(this._spreadsheetTabs[key], 'selected'); + L.DomUtil.addClass(this._spreadsheetTabs[key], 'spreadsheet-context-menu-selected'); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css | 10 loleaflet/dist/loading.html| 35 + loleaflet/src/map/handler/Map.SlideShow.js |8 +- 3 files changed, 52 insertions(+), 1 deletion(-) New commits: commit a06974e2b3e7c8186d2c599576021c927effad6c Author: Henry CastroDate: Wed Apr 6 15:23:50 2016 -0400 loleaflet: add loading spinner to slide show diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index 0fa0e5b..400246f 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -697,3 +697,13 @@ a.leaflet-control-buttons:hover:first-child { .leaflet-progress-label { text-align: center; } + +.leaflet-slideshow { + background: #FF; + } + +.leaflet-slideshow-spinner { + background-image: url(images/spinner.gif); + background-repeat: no-repeat; + background-position: center center; + } diff --git a/loleaflet/dist/loading.html b/loleaflet/dist/loading.html new file mode 100644 index 000..8c5cf1e --- /dev/null +++ b/loleaflet/dist/loading.html @@ -0,0 +1,35 @@ + + + + + + + .body { +background: #FF; + } + .spinner + { +position: absolute; +text-align: center; +margin: auto; +top: 0; +right: 0; +bottom: 0; +left: 0; +width: 100px; +height: 100px; + } + .spinner img { +display: block; +margin-left: auto; +margin-right: auto; + } + + + + + + Loading... + + + diff --git a/loleaflet/src/map/handler/Map.SlideShow.js b/loleaflet/src/map/handler/Map.SlideShow.js index 287699f..4b32b97 100644 --- a/loleaflet/src/map/handler/Map.SlideShow.js +++ b/loleaflet/src/map/handler/Map.SlideShow.js @@ -22,8 +22,14 @@ L.Map.SlideShow = L.Handler.extend({ this._map.off('slidedownloadready', this._onSlideDownloadReady, this); }, + _onIframeLoaded: function (e) { + L.DomUtil.removeClass(this._slideShow, 'leaflet-slidshow-spinner'); + }, + _onFullScreen: function () { - this._slideShow = L.DomUtil.create('iframe', '', this._map._container); + this._slideShow = L.DomUtil.create('iframe', 'leaflet-slideshow leaflet-slidshow-spinner', this._map._container); + this._slideShow.src = this._map.options.webserver + '/loleaflet/dist/loading.html'; + this._slideShow.onload = L.bind(this._onIframeLoaded, this); if (this._slideShow.requestFullscreen) { this._slideShow.requestFullscreen(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/images/spinner.gif |binary loleaflet/dist/leaflet.css| 12 ++ loleaflet/src/layer/marker/ProgressOverlay.js | 51 ++ loleaflet/src/map/Map.js | 30 +++ 4 files changed, 70 insertions(+), 23 deletions(-) New commits: commit ab0429622eb2310c879ad15e6e210b3b54074326 Author: Henry CastroDate: Wed Apr 6 09:14:54 2016 -0400 loleflet: rework progress bar diff --git a/loleaflet/dist/images/spinner.gif b/loleaflet/dist/images/spinner.gif new file mode 100644 index 000..318c372 Binary files /dev/null and b/loleaflet/dist/images/spinner.gif differ diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index 5d48932..0fa0e5b 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -685,3 +685,15 @@ a.leaflet-control-buttons:hover:first-child { color: rgba(0, 0, 0, 0.7); text-shadow: 0 1px rgba(255, 255, 255, 0.4); } + +.leaflet-progress-spinner { + background-image: url(images/spinner.gif); + background-repeat: no-repeat; + background-position: center center; + width: 100%; + height: 48px; + } + +.leaflet-progress-label { + text-align: center; + } diff --git a/loleaflet/src/layer/marker/ProgressOverlay.js b/loleaflet/src/layer/marker/ProgressOverlay.js index 055f7dd..1212618 100644 --- a/loleaflet/src/layer/marker/ProgressOverlay.js +++ b/loleaflet/src/layer/marker/ProgressOverlay.js @@ -7,33 +7,43 @@ L.ProgressOverlay = L.Layer.extend({ initialize: function (latlng, size) { this._latlng = L.latLng(latlng); this._size = size; + this._initLayout(); }, onAdd: function () { - this._initLayout(); - this.update(); + if (this._container) { + this.getPane().appendChild(this._container); + this.update(); + } + + this._map.on('moveend', this.update, this); }, onRemove: function () { - L.DomUtil.remove(this._container); + if (this._container) { + this.getPane().removeChild(this._container); + } }, update: function () { - if (this._container) { - var offset = this._size.divideBy(2, true); - var pos = this._map.latLngToLayerPoint(this._latlng).round(); - this._setPos(pos.subtract(offset)); + if (this._container && this._map) { + var origin = new L.Point(0, 0); + var paneOffset = this._map.layerPointToContainerPoint(origin); + var sizeOffset = this._size.divideBy(2, true); + var position = this._map.latLngToLayerPoint(this._latlng).round(); + this._setPos(position.subtract(paneOffset).subtract(sizeOffset)); } - return this; }, _initLayout: function () { this._container = L.DomUtil.create('div', 'leaflet-progress-layer'); + this._spinner = L.DomUtil.create('div', 'leaflet-progress-spinner', this._container); + this._label = L.DomUtil.create('div', 'leaflet-progress-label', this._container); this._progress = L.DomUtil.create('div', 'leaflet-progress', this._container); this._bar = L.DomUtil.create('span', '', this._progress); - this._label = L.DomUtil.create('span', '', this._bar); + this._value = L.DomUtil.create('span', '', this._bar); - L.DomUtil.setStyle(this._label, 'line-height', this._size.y + 'px'); + L.DomUtil.setStyle(this._value, 'line-height', this._size.y + 'px'); this._container.style.width = this._size.x + 'px'; this._container.style.height = this._size.y + 'px'; @@ -41,19 +51,30 @@ L.ProgressOverlay = L.Layer.extend({ L.DomEvent .disableClickPropagation(this._progress) .disableScrollPropagation(this._container); - - if (this._container) { - this.getPane().appendChild(this._container); - } }, _setPos: function (pos) { L.DomUtil.setPosition(this._container, pos); }, + setLabel: function (label) { + if (this._label.innerHTML !== label) { + this._label.innerHTML = label; + } + }, + + setBar: function (bar) { + if (bar) { + this._progress.style.visibility = ''; + } + else { + this._progress.style.visibility = 'hidden'; + } + }, +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src loolwsd/AdminModel.cpp loolwsd/AdminModel.hpp
loleaflet/dist/admin/admin.html |1 loleaflet/src/admin/AdminSocketAnalytics.js |2 - loleaflet/src/admin/AdminSocketOverview.js | 35 loleaflet/src/admin/Util.js | 33 +- loolwsd/AdminModel.cpp |4 ++- loolwsd/AdminModel.hpp |2 + 6 files changed, 69 insertions(+), 8 deletions(-) New commits: commit 28cf20b0913dc3ad95a4e695e7f94f95080a5bdd Author: Pranav KantDate: Fri Apr 1 13:20:14 2016 +0530 bccu#1640: Add elapsed time field to admin console Time increment is handled on client-side, server only sends the elapsed time during first page-load. Change-Id: I73e98fd95ca9f391b625a8dcfc7e3490878c6a40 diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/dist/admin/admin.html index 4fc7567..5663b80 100644 --- a/loleaflet/dist/admin/admin.html +++ b/loleaflet/dist/admin/admin.html @@ -101,6 +101,7 @@ Document Number of views Memory consumed + Elapsed time diff --git a/loleaflet/src/admin/AdminSocketAnalytics.js b/loleaflet/src/admin/AdminSocketAnalytics.js index fa25324..4f93626 100644 --- a/loleaflet/src/admin/AdminSocketAnalytics.js +++ b/loleaflet/src/admin/AdminSocketAnalytics.js @@ -92,7 +92,7 @@ var AdminSocketAnalytics = AdminSocketBase.extend({ this._d3yAxis = d3.svg.axis() .scale(this._yScale) .tickFormat(function (d) { - return Util.humanize(d); + return Util.humanizeMem(d); }) .orient('left'); diff --git a/loleaflet/src/admin/AdminSocketOverview.js b/loleaflet/src/admin/AdminSocketOverview.js index afced98..5bcb54e 100644 --- a/loleaflet/src/admin/AdminSocketOverview.js +++ b/loleaflet/src/admin/AdminSocketOverview.js @@ -10,6 +10,8 @@ var AdminSocketOverview = AdminSocketBase.extend({ _basicStatsIntervalId: 0, + _docElapsedTimeIntervalId: 0, + _getBasicStats: function() { this.socket.send('total_mem'); this.socket.send('active_docs_count'); @@ -27,6 +29,15 @@ var AdminSocketOverview = AdminSocketBase.extend({ return socketOverview._getBasicStats(); }, 5000); + this._docElapsedTimeIntervalId = + setInterval(function() { + $('td.elapsed_time').each(function() { + var newSecs = parseInt($(this).val()) + 1; + $(this).val(newSecs); + $(this).html(Util.humanizeSecs(newSecs)); + }); + }, 1000); + // Allow table rows to have a context menu for terminating sessions $('body').on('contextmenu', 'table tr', function(ev) { $('#rowContextMenu').css({ @@ -67,9 +78,9 @@ var AdminSocketOverview = AdminSocketBase.extend({ var tableContainer = document.getElementById('doclist'); var rowContainer; - var pidEle, urlEle, viewsEle, memEle, docEle; + var pidEle, urlEle, viewsEle, memEle, sDocTimeEle, docEle; var nViews, nTotalViews; - var docProps, sPid, sUrl, sViews, sMem; + var docProps, sPid, sUrl, sViews, sMem, sDocTime; if (textMsg.startsWith('documents')) { var documents = textMsg.substring('documents'.length); documents = documents.trim().split('\n'); @@ -82,6 +93,7 @@ var AdminSocketOverview = AdminSocketBase.extend({ sUrl = docProps[1]; sViews = docProps[2]; sMem = docProps[3]; + sDocTime = docProps[4]; if (sUrl === '0') { continue; } @@ -103,8 +115,14 @@ var AdminSocketOverview = AdminSocketBase.extend({ rowContainer.appendChild(viewsEle); memEle = document.createElement('td'); - memEle.innerHTML = Util.humanize(parseInt(sMem)); + memEle.innerHTML = Util.humanizeMem(parseInt(sMem)); rowContainer.appendChild(memEle); + + sDocTimeEle = document.createElement('td'); + sDocTimeEle.className = 'elapsed_time'; + sDocTimeEle.value = parseInt(sDocTime); + sDocTimeEle.innerHTML = Util.humanizeSecs(sDocTime); +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/spreadsheet.css| 25 + loleaflet/src/control/Control.ColumnHeader.js | 47 +- loleaflet/src/control/Control.RowHeader.js| 28 +++ 3 files changed, 99 insertions(+), 1 deletion(-) New commits: commit b881e986d803f51b187212c09e43da65e7351634 Author: Pranav KantDate: Fri Mar 11 20:16:15 2016 +0530 loleaflet: Column and row headers are selectable now ... with multi-select shift and ctrl key behavior like desktop calc version. Change-Id: I574037f984ee1844773b0fb8c90c5bb1c079188b diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css index 665c7fe..1ccfb1e 100644 --- a/loleaflet/dist/spreadsheet.css +++ b/loleaflet/dist/spreadsheet.css @@ -50,6 +50,7 @@ border-right: 1px solid darkgrey; border-bottom: 1px solid darkgrey; background-color: lightgrey; + cursor: pointer; position: absolute; padding: 0px; @@ -98,6 +99,18 @@ padding: 0px; margin: 0px; height: 100%; + cursor: pointer; + + /* Make the text unselectable for all browsers */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + } + +.spreadsheet-header-column:hover { + background-color: #DDD; } .spreadsheet-header-rows-container { @@ -134,4 +147,16 @@ padding: 0px; margin: 0px; height: 100%; + cursor: pointer; + + /* Make the text unselectable for all browsers */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + } + +.spreadsheet-header-row:hover { +background-color: #DDD; } diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index 0091893..9a0cd16 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -2,6 +2,7 @@ * Control.ColumnHeader */ +/* global $ */ L.Control.ColumnHeader = L.Control.extend({ onAdd: function (map) { map.on('updatepermission', this._onUpdatePermission, this); @@ -15,7 +16,8 @@ L.Control.ColumnHeader = L.Control.extend({ this._map.on('updateviewport', this.setViewPort, this); this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, this); var docContainer = this._map.options.documentContainer; - L.DomUtil.create('div', 'spreadsheet-header-corner', docContainer.parentElement); + var cornerHeader = L.DomUtil.create('div', 'spreadsheet-header-corner', docContainer.parentElement); + L.DomEvent.addListener(cornerHeader, 'click', this._onCornerHeaderClick, this); var headersContainer = L.DomUtil.create('div', 'spreadsheet-header-columns-container', docContainer.parentElement); this._columns = L.DomUtil.create('div', 'spreadsheet-header-columns', headersContainer); @@ -71,7 +73,50 @@ L.Control.ColumnHeader = L.Control.extend({ else { L.DomUtil.setStyle(text, 'width', width); } + + L.DomEvent.addListener(text, 'click', this._onColumnHeaderClick, this); + } + }, + + _colAlphaToNumber: function(alpha) { + var res = 0; + var offset = 'A'.charCodeAt(); + for (var i = 0; i < alpha.length; i++) { + var chr = alpha[alpha.length - i - 1]; + res += (chr.charCodeAt() - offset + 1) * Math.pow(26, i); } + + return res; + }, + + _onColumnHeaderClick: function (e) { + var colAlpha = e.target.getAttribute('rel').split('spreadsheet-column-')[1]; + var colNumber = this._colAlphaToNumber(colAlpha); + + var modifier = 0; + if (e.shiftKey) { + modifier += this._map.keyboard.keyModifier.shift; + } + if (e.ctrlKey) { + modifier += this._map.keyboard.keyModifier.ctrl; + } + + var command = { + Col: { + type: 'unsigned short', + value: parseInt(colNumber - 1) + }, + Modifier: { + type: 'unsigned short', + value: modifier + } + }; + + this._map.sendUnoCommand('.uno:SelectColumn ', command); + }, + + _onCornerHeaderClick: function() { +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.html |2 +- loleaflet/src/core/Socket.js |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 83880c454fb1694ec4e00c4f7bd7f75ef8727c71 Author: Ashod NakashianDate: Tue Mar 8 19:18:32 2016 -0500 loleaflet: removed unnecessary token parameter sent to WSD Change-Id: Ibdef21665fcbf65c95870c8711321f63f7098596 Reviewed-on: https://gerrit.libreoffice.org/23050 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index c001d1f..53045eb 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -280,7 +280,7 @@ } document.title = fileName; var map = L.map('map', { -server: host, + server: host, doc: filePath, permission: permission, timestamp: timestamp, diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index f3c7dd7..d1d5ad9 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -9,7 +9,7 @@ L.Socket = L.Class.extend({ initialize: function (map) { this._map = map; try { - this.socket = new WebSocket(map.options.server + '/?token=' + map.options.token); + this.socket = new WebSocket(map.options.server); } catch (e) { this.fire('error', {msg: _('Socket connection error'), cmd: 'socket', kind: 'failed', id: 3}); return null; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/admin.html |6 ++--- loleaflet/src/admin.js| 47 +- 2 files changed, 45 insertions(+), 8 deletions(-) New commits: commit 943d9a517e29756856d731fa039023ff15d24c0f Author: Pranav KantDate: Sat Mar 5 00:22:50 2016 +0530 loleaflet: Add total memory, active users, active/open docs Change-Id: Ie92ca10d9fb892daf45c17edd58b464c9f7cc09b Reviewed-on: https://gerrit.libreoffice.org/22990 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/admin.html b/loleaflet/dist/admin.html index 07bc074..806d54d 100644 --- a/loleaflet/dist/admin.html +++ b/loleaflet/dist/admin.html @@ -82,15 +82,15 @@ - 0 + 0 Users online - 0 + 0 Documents opened - 0 + 0 Memory consumed diff --git a/loleaflet/src/admin.js b/loleaflet/src/admin.js index cfe5ee1..64d5e56 100644 --- a/loleaflet/src/admin.js +++ b/loleaflet/src/admin.js @@ -138,6 +138,7 @@ Base = Base.extend({ } }); + /* Abstract class */ @@ -154,10 +155,10 @@ var AdminSocketBase = Base.extend({ // onSocketMessage and onSocketOpen. if (typeof this.onSocketMessage === 'function' && typeof this.onSocketOpen === 'function') { this.socket = new WebSocket(host); - this.socket.onopen = this.onSocketOpen; - this.socket.onclose = this.onSocketClose; - this.socket.onmessage = this.onSocketMessage; - this.socket.onerror = this.onSocketError; + this.socket.onopen = this.onSocketOpen.bind(this); + this.socket.onclose = this.onSocketClose.bind(this); + this.socket.onmessage = this.onSocketMessage.bind(this); + this.socket.onerror = this.onSocketError.bind(this); this.socket.binaryType = 'arraybuffer'; } }, @@ -190,8 +191,23 @@ var AdminSocketOverview = AdminSocketBase.extend({ this.base(host); }, + _basicStatsIntervalId: 0, + + _getBasicStats: function() { + this.socket.send('total_mem'); + this.socket.send('active_docs_count'); + this.socket.send('active_users_count'); + }, + onSocketOpen: function() { - this.send('documents'); + this.socket.send('documents'); + + this._getBasicStats(); + var socketOverview = this; + this._basicStatsIntervalId = + setInterval(function() { + return socketOverview._getBasicStats(); + }, 5000); }, onSocketMessage: function(e) { @@ -240,11 +256,15 @@ var AdminSocketOverview = AdminSocketBase.extend({ var sPid = textMsg.substring('addview'.length).trim().split(' ')[0]; var nViews = parseInt(document.getElementById('docview' + sPid).innerHTML); document.getElementById('docview' + sPid).innerHTML = nViews + 1; + var nTotalViews = parseInt(document.getElementById('active_users_count').innerHTML); + document.getElementById('active_users_count').innerHTML = nTotalViews + 1; } else if (textMsg.startsWith('rmview')) { var sPid = textMsg.substring('addview'.length).trim().split(' ')[0]; var nViews = parseInt(document.getElementById('docview' + sPid).innerHTML); document.getElementById('docview' + sPid).innerHTML = nViews - 1; + var nTotalViews = parseInt(document.getElementById('active_users_count').innerHTML); + document.getElementById('active_users_count').innerHTML = nTotalViews - 1; } else if (textMsg.startsWith('document')) { textMsg = textMsg.substring('document'.length); @@ -276,6 +296,19 @@ var AdminSocketOverview = AdminSocketBase.extend({ var memEle = document.createElement('td'); memEle.innerHTML = sMem; rowContainer.appendChild(memEle); + + var totalUsersEle = document.getElementById('active_docs_count'); + totalUsersEle.innerHTML = parseInt(totalUsersEle.innerHTML) + 1; + } + else if (textMsg.startsWith('total_mem') || + textMsg.startsWith('active_docs_count') || + textMsg.startsWith('active_users_count')) + { +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/l10n/styles-localizations.json |1 loleaflet/dist/l10n/styles/libreoffice-styles.json | 271 + loleaflet/src/control/Control.Styles.js| 40 +-- 3 files changed, 297 insertions(+), 15 deletions(-) New commits: commit 9d7aea26b922b8c4f3b6665ac38d0c38973fe78e Author: Pranav KantDate: Mon Feb 22 22:36:22 2016 +0530 loleaflet: Add programmatic -> UI names mapping to l10n framework Since the data scraped from the LO translation module is a mapping between the UI names (not internal ones) to different languages, the plan is to first set the locale explicitly to 'libreoffice' so that l10n framework gives us corresponding UI names from programmatic names, and then to use the specified locale to translate these UI names to respective languages. Change-Id: I64f7c9b4927e5effe328cb7b42582b45d44167d9 Reviewed-on: https://gerrit.libreoffice.org/22813 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/l10n/styles-localizations.json b/loleaflet/dist/l10n/styles-localizations.json index 6fb0947..b0aedfd 100644 --- a/loleaflet/dist/l10n/styles-localizations.json +++ b/loleaflet/dist/l10n/styles-localizations.json @@ -1,4 +1,5 @@ { +"libreoffice": "/loleaflet/dist/l10n/styles/libreoffice-styles.json", "en": false, "ab": "/loleaflet/dist/l10n/styles/ab.json", "af": "/loleaflet/dist/l10n/styles/af.json", diff --git a/loleaflet/dist/l10n/styles/libreoffice-styles.json b/loleaflet/dist/l10n/styles/libreoffice-styles.json new file mode 100644 index 000..54fb938 --- /dev/null +++ b/loleaflet/dist/l10n/styles/libreoffice-styles.json @@ -0,0 +1,271 @@ +{"Default":"Default", +"Result":"Result", +"Result2":"Result2", +"Heading":"Heading", +"Heading1":"Heading1", +"Default":"Default", +"Report":"Report", +"standard":"Default", +"objectwitharrow":"Object with arrow", +"objectwithshadow":"Object with shadow", +"objectwithoutfill":"Object without fill", +"Object with no fill and no line":"Object with no fill and no line", +"text":"Text", +"textbody":"Text body", +"textbodyjustfied":"Text body justified", +"textbodyindent":"First line indent", +"title":"Title", +"title1":"Title1", +"title2":"Title2", +"headline":"Heading", +"headline1":"Heading1", +"headline2":"Heading2", +"measure":"Dimension Line", +"Normal":"Normal", +"Heading 1":"Heading 1", +"Heading 2":"Heading 2", +"Heading 3":"Heading 3", +"Numbering Symbols":"Numbering Symbols", +"Bullets":"Bullets", +"Table Contents":"Table Contents", +"Quotations":"Quotations", +"Index":"Index", +"Caption":"Caption", +"List":"List", +"Text Body":"Text Body", +"default":"default", +"gray1":"gray1", +"gray2":"gray2", +"gray3":"gray3", +"bw1":"bw1", +"bw2":"bw2", +"bw3":"bw3", +"orange1":"orange1", +"orange2":"orange2", +"orange3":"orange3", +"turquoise1":"turquoise1", +"turquoise2":"turquoise2", +"turquoise3":"turquoise3", +"blue1":"blue1", +"blue2":"blue2", +"blue3":"blue3", +"sun1":"sun1", +"sun2":"sun2", +"sun3":"sun3", +"earth1":"earth1", +"earth2":"earth2", +"earth3":"earth3", +"green1":"green1", +"green2":"green2", +"green3":"green3", +"seetang1":"seetang1", +"seetang2":"seetang2", +"seetang3":"seetang3", +"lightblue1":"lightblue1", +"lightblue2":"lightblue2", +"lightblue3":"lightblue3", +"yellow1":"yellow1", +"yellow2":"yellow2", +"yellow3":"yellow3", +"default":"default", +"bw":"bw", +"orange":"orange", +"turquoise":"turquoise", +"blue":"blue", +"sun":"sun", +"earth":"earth", +"green":"green", +"seetang":"seetang", +"lightblue":"lightblue", +"yellow":"yellow", +"background":"Background", +"backgroundobjects":"Background objects", +"notes":"Notes", +"outline1":"Outline 1", +"outline2":"Outline 2", +"outline3":"Outline 3", +"outline4":"Outline 4", +"outline5":"Outline 5", +"outline6":"Outline 6", +"outline7":"Outline 7", +"outline8":"Outline 8", +"outline9":"Outline 9", +"subtitle":"Subtitle", +"title":"Title", +"Clear formatting":"Clear formatting", +"Default Style":"Default Style", +"Bullet Symbols":"Bullets", +"Numbering Symbols":"Numbering Symbols", +"Footnote Symbol":"Footnote Characters", +"Page Number":"Page Number", +"Caption characters":"Caption Characters", +"Drop Caps":"Drop Caps", +"Internet link":"Internet Link", +"Visited Internet Link":"Visited Internet Link", +"Placeholder":"Placeholder", +"Index Link":"Index Link", +"Endnote Symbol":"Endnote Characters", +"Line numbering":"Line Numbering", +"Main index entry":"Main Index Entry", +"Footnote anchor":"Footnote Anchor", +"Endnote anchor":"Endnote Anchor", +"Rubies":"Rubies", +"Vertical Numbering Symbols":"Vertical Numbering Symbols", +"Emphasis":"Emphasis", +"Citation":"Quotation", +"Strong Emphasis":"Strong Emphasis", +"Source Text":"Source Text", +"Example":"Example", +"User Entry":"User Entry", +"Variable":"Variable", +"Definition":"Definition", +"Teletype":"Teletype",
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/images/sc_firstrecord.png |binary loleaflet/dist/images/sc_lastrecord.png |binary loleaflet/dist/images/sc_nextrecord.png |binary loleaflet/dist/images/sc_prevrecord.png |binary loleaflet/dist/loleaflet.html| 22 ++--- loleaflet/dist/spreadsheet.css | 15 +--- loleaflet/dist/toolbar/toolbar.js| 38 +++ loleaflet/src/control/Control.Tabs.js|6 8 files changed, 73 insertions(+), 8 deletions(-) New commits: commit 02f6f0d6fada3416fd948fe9834a060235c28406 Author: Faruk UzunDate: Mon Feb 22 11:36:45 2016 +0200 loleaflet: bccu#1456 fix spreadsheet tabs Adds a custom navigation for spreadsheet-tabs Change-Id: I57d9ef1ff9466c18c9edca849519bbe2af5826ab Reviewed-on: https://gerrit.libreoffice.org/22610 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/images/sc_firstrecord.png b/loleaflet/dist/images/sc_firstrecord.png new file mode 100644 index 000..4871713 Binary files /dev/null and b/loleaflet/dist/images/sc_firstrecord.png differ diff --git a/loleaflet/dist/images/sc_lastrecord.png b/loleaflet/dist/images/sc_lastrecord.png new file mode 100644 index 000..e723613 Binary files /dev/null and b/loleaflet/dist/images/sc_lastrecord.png differ diff --git a/loleaflet/dist/images/sc_nextrecord.png b/loleaflet/dist/images/sc_nextrecord.png new file mode 100644 index 000..1983927 Binary files /dev/null and b/loleaflet/dist/images/sc_nextrecord.png differ diff --git a/loleaflet/dist/images/sc_prevrecord.png b/loleaflet/dist/images/sc_prevrecord.png new file mode 100644 index 000..be8ca97 Binary files /dev/null and b/loleaflet/dist/images/sc_prevrecord.png differ diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index 1fcd107..4d23a11 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -68,7 +68,7 @@ - +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/cursors/fill.cur |binary loleaflet/dist/cursors/fill.png |binary loleaflet/src/layer/marker/Cursor.js | 36 ++ loleaflet/src/layer/tile/TileLayer.js |5 +++- 4 files changed, 40 insertions(+), 1 deletion(-) New commits: commit e6d10469eead57765edf63796ceb46a97bc3c932 Author: Marco CecchettiDate: Mon Feb 1 18:39:07 2016 +0100 loleaflet - in highlighting mode a custom cursor is used When the user clicks on the background text color control while editing a text document, loleaflet enter in highlighting mode (exactly as Wrieter does). In order to notify that loleaflet has switched to highlighting mode the cursor changes is shape to a small bottle in the act of dropping ink. Change-Id: Ic9a5a636df9fd6071e38edc7e0fc2e11e037a517 diff --git a/loleaflet/dist/cursors/fill.cur b/loleaflet/dist/cursors/fill.cur new file mode 100644 index 000..78f5fad Binary files /dev/null and b/loleaflet/dist/cursors/fill.cur differ diff --git a/loleaflet/dist/cursors/fill.png b/loleaflet/dist/cursors/fill.png new file mode 100644 index 000..220641b Binary files /dev/null and b/loleaflet/dist/cursors/fill.png differ diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index b4cd5f1..f98e323 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -90,3 +90,39 @@ L.Cursor = L.Layer.extend({ L.cursor = function (latlng, options) { return new L.Cursor(latlng, options); }; + +L.Cursor.imagePath = (function () { + var scripts = document.getElementsByTagName('script'), + leafletRe = /[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/; + + var i, len, src, path; + + for (i = 0, len = scripts.length; i < len; i++) { + src = scripts[i].src; + + if (src.match(leafletRe)) { + path = src.split(leafletRe)[0]; + return (path ? path + '/' : '') + 'cursors'; + } + } +}()); + +L.Cursor.getCustomCursor = function( cursorName ) { + var customCursor, + isCustomCursor = true, + top = 0, + left = 0; + + if ( cursorName === 'fill' ) { + top = 16; left = 7; + } else { + isCustomCursor = false; + } + + if (isCustomCursor) { + customCursor = L.Browser.ie ? // IE10 does not like item with left/top position in the url list + 'url(' + L.Cursor.imagePath + '/' + cursorName + '.cur), default' : + 'url(' + L.Cursor.imagePath + '/' + cursorName + '.png) ' + left + ' ' + top + ', default'; + } + return customCursor +}; diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 71855f5..fc46e6e 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -440,7 +440,10 @@ L.TileLayer = L.GridLayer.extend({ _onMousePointerMsg: function (textMsg) { textMsg = textMsg.substring(14); // "mousepointer: " - this._map._container.style.cursor = textMsg; + textMsg = L.Cursor.getCustomCursor(textMsg) || textMsg; + if (this._map._container.style.cursor != textMsg) { + this._map._container.style.cursor = textMsg; + } }, _onHyperlinkClickedMsg: function (textMsg) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css | 34 - loleaflet/src/control/Control.RowHeader.js | 34 - 2 files changed, 25 insertions(+), 43 deletions(-) New commits: commit a29a9d37d63ae16f5246eaafba03d5bd676324e2 Author: Jan HolesovskyDate: Fri Jan 15 14:38:48 2016 +0100 loleaflet: Simlify & beautify the row headers. diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index 858809f..ddb5af4 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -727,25 +727,22 @@ a.leaflet-control-buttons:hover:first-child { margin: 0px; } -.spreadsheet-table-row-cell-text { - text-overflow: ellipsis; - white-space: nowrap; - padding: 0px; - margin: 0px; - height: 100%; - } +.spreadsheet-rows-container { + border-top: 1px solid darkgrey; + border-left: 1px solid darkgrey; + border-right: 1px solid darkgrey; + border-bottom: 1px solid darkgrey; + background-color: lightgrey; -.spreadsheet-container-row { position: absolute; left: 0; top: 100px; - width: 50px; + width: 48px; bottom: 20px; overflow: hidden; } -.spreadsheet-table-row { - table-layout: fixed; +.spreadsheet-rows { width: 100%; height: 100%; border-spacing: 0px !important; @@ -754,16 +751,15 @@ a.leaflet-control-buttons:hover:first-child { padding: 0px; } -.spreadsheet-table-row-cell { - border-top: 0px; - border-left: 1px solid black; - border-right: 1px solid black; - border-bottom: 1px solid black; - background-color: darkgrey; - font-size: 90%; +.spreadsheet-row { + border-bottom: 1px solid darkgrey; + + text-overflow: ellipsis; + white-space: nowrap; padding: 0px; + padding-left: 8px; margin: 0px; - overflow: hidden; + height: 100%; } .slide-show { diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js index 2aef1da..c853280 100644 --- a/loleaflet/src/control/Control.RowHeader.js +++ b/loleaflet/src/control/Control.RowHeader.js @@ -15,23 +15,18 @@ L.Control.RowHeader = L.Control.extend({ this._map.on('updateviewport', this.setViewPort, this); this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, this); var docContainer = this._map.options.documentContainer; - var divRowHeader = L.DomUtil.create('div', 'spreadsheet-container-row', docContainer.parentElement); - this._table = L.DomUtil.create('table', 'spreadsheet-table-row', divRowHeader); - this._rows = L.DomUtil.create('tbody', '', this._table); + var headersContainer = L.DomUtil.create('div', 'spreadsheet-rows-container', docContainer.parentElement); + this._rows = L.DomUtil.create('div', 'spreadsheet-rows', headersContainer); this._position = 0; this._totalHeight = 0; this._viewPort = 0; - - // dummy initial row header - var trRow = L.DomUtil.create('tr', '', this._rows); - var thRow = L.DomUtil.create('th', 'spreadsheet-table-row-cell', trRow); - L.DomUtil.create('div', 'spreadsheet-table-row-cell-text', thRow); }, clearRows: function () { - L.DomUtil.remove(this._rows); - this._rows = L.DomUtil.create('tbody', '', this._table); + while (this._rows.firstChild) { + this._rows.removeChild(this._rows.firstChild); + } }, setViewPort: function(e) { @@ -42,7 +37,7 @@ L.Control.RowHeader = L.Control.extend({ setScrollPosition: function (e) { var position = -e.y; this._position = Math.min(0, position); - L.DomUtil.setStyle(this._table, 'top', this._position + 'px'); + L.DomUtil.setStyle(this._rows, 'top', this._position + 'px'); }, offsetScrollPosition: function (e) { @@ -50,7 +45,7 @@ L.Control.RowHeader = L.Control.extend({ this._position = Math.min(0, Math.max(this._position - offset, -(this._totalHeight - this._viewPort))); - L.DomUtil.setStyle(this._table, 'top', this._position + 'px'); + L.DomUtil.setStyle(this._rows, 'top', this._position + 'px'); }, viewRowColumnHeaders: function (e) { @@ -58,27 +53,18 @@ L.Control.RowHeader = L.Control.extend({ }, fillRows: function (rows, converter, context) { - var iterator, twip, height, row, cell, text; + var iterator, twip, height, text; this.clearRows(); for (iterator = 0; iterator <
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css|9 ++- loleaflet/src/control/Control.PartsPreview.js | 62 -- 2 files changed, 47 insertions(+), 24 deletions(-) New commits: commit 449022730bdfe29e7f964cb2cb0e3e05741185d4 Author: Ozcan EsenDate: Sat Dec 12 18:27:46 2015 +0200 change the border style of the selected preview Change-Id: I0d163c0a68dbc532db08ed8735a4cdb7107ec8e5 diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index d31be8a..8472eb3 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -709,13 +709,13 @@ a.leaflet-control-buttons:hover:first-child { top: 70px; left: 0px; bottom: 0px; - max-width: 195px; + max-width: 205px; overflow: hidden; border-top: 2px solid #B6B6B6; } .preview-frame { - max-width: 180px; + max-width: 190px; white-space: nowrap; text-align: center; margin: 1em 0; } @@ -730,8 +730,13 @@ a.leaflet-control-buttons:hover:first-child { vertical-align: middle; max-width: 180px; cursor: pointer; + border: 2px solid #dfdfdf; } +.preview-img-selected { + border-color: #00; +} + .spreadsheet-document { border-top: 1px solid #B6B6B6 !important; top: 100px !important; diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 82aeda3..30989e3 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -22,34 +22,52 @@ L.Control.PartsPreview = L.Control.extend({ _updateDisabled: function (e) { var parts = e.parts; + var selectedPart = e.selectedPart; var docType = e.docType; if (docType === 'text') { return; } - if (!this._previewInitialized && docType === 'presentation') { - // make room for the preview - var docContainer = this._map.options.documentContainer; - L.DomUtil.addClass(docContainer, 'parts-preview-document'); - setTimeout(L.bind(function () { - this._map.invalidateSize(); - $('.scroll-container').mCustomScrollbar('update'); - }, this), 500); - for (var i = 0; i < parts; i++) { - var id = 'preview-tile' + i; - var frame = L.DomUtil.create('div', 'preview-frame', this._partsPreviewCont); - L.DomUtil.create('span', 'preview-helper', frame); - var img = L.DomUtil.create('img', 'preview-img', frame); - img.id = id; - this._previewTiles[id] = img; - L.DomEvent - .on(img, 'click', L.DomEvent.stopPropagation) - .on(img, 'click', L.DomEvent.stop) - .on(img, 'click', this._setPart, this) - .on(img, 'click', this._refocusOnMap, this); - this._map.getPreview(i, i, 180, 180, {autoUpdate: this.options.autoUpdate}); + if (docType === 'presentation') { + if (!this._previewInitialized) + { + // make room for the preview + var docContainer = this._map.options.documentContainer; + L.DomUtil.addClass(docContainer, 'parts-preview-document'); + setTimeout(L.bind(function () { + this._map.invalidateSize(); + $('.scroll-container').mCustomScrollbar('update'); + }, this), 500); + for (var i = 0; i < parts; i++) { + var id = 'preview-tile' + i; + var frame = L.DomUtil.create('div', 'preview-frame', this._partsPreviewCont); + L.DomUtil.create('span', 'preview-helper', frame); + var imgClassName = 'preview-img'; + if (i == 0) { + imgClassName += ' preview-img-selected'; + } + var img = L.DomUtil.create('img', imgClassName, frame); + img.id = id; + this._previewTiles[id] = img; +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css|8 loleaflet/src/control/Control.PartsPreview.js |2 +- loleaflet/src/control/Control.Tabs.js |2 +- 3 files changed, 10 insertions(+), 2 deletions(-) New commits: commit 0bdc175725b691d4edffdb72d37fdf454a4eef2d Author: Mihai VargaDate: Mon Nov 2 15:13:09 2015 +0200 loleaflet: handle spreadsheet tabs and slide previews with css diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index b1a3dac..033e8ab 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -699,6 +699,10 @@ a.leaflet-control-buttons:hover:first-child { border: none; } +.parts-preview-document { + left: 195px !important; +} + .parts-preview { background: #DFDFDF; position: absolute; @@ -728,6 +732,10 @@ a.leaflet-control-buttons:hover:first-child { cursor: pointer; } +.spreadsheet-document { + bottom: 20px !important; +} + .spreadsheet-tab { margin: 0; padding: 0; diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 2a6c5ad..1db67a7 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -29,7 +29,7 @@ L.Control.PartsPreview = L.Control.extend({ if (!this._previewInitialized && docType === 'presentation') { // make room for the preview var docContainer = L.DomUtil.get('document-container'); - L.DomUtil.setStyle(docContainer, 'left', '195px'); + L.DomUtil.addClass(docContainer, 'parts-preview-document'); setTimeout(L.bind(function () { this._map.invalidateSize(); $('.scroll-container').mCustomScrollbar('update'); diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js index b5ce57d..68d2519 100644 --- a/loleaflet/src/control/Control.Tabs.js +++ b/loleaflet/src/control/Control.Tabs.js @@ -25,7 +25,7 @@ L.Control.Tabs = L.Control.extend({ if (!this._tabsInitialized) { // make room for the preview var docContainer = L.DomUtil.get('document-container'); - L.DomUtil.setStyle(docContainer, 'bottom', '20px'); + L.DomUtil.addClass(docContainer, 'spreadsheet-document'); setTimeout(L.bind(function () { this._map.invalidateSize(); $('.scroll-container').mCustomScrollbar('update'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css| 17 + loleaflet/src/layer/marker/Icon.js| 10 -- loleaflet/src/layer/tile/TileLayer.js | 10 -- 3 files changed, 29 insertions(+), 8 deletions(-) New commits: commit 97fcf892c2213eb09480f16a8cd6bea7b5fa5954 Author: Mihai VargaDate: Mon Aug 31 15:10:21 2015 +0300 loleaflet: modifiable selection handles diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index 0ec0399..7923877 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -40,6 +40,23 @@ .leaflet-marker-shadow { display: block; } + +.leaflet-selection-marker-start { + margin-left: -28px; + margin-top: -2px; + width: 30px; + height: 44px; + background-image: url(images/handle_start.png); + } + +.leaflet-selection-marker-end { + margin-left: -2px; + margin-top: -2px; + width: 30px; + height: 44px; + background-image: url(images/handle_end.png); + } + /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ .leaflet-container svg, diff --git a/loleaflet/src/layer/marker/Icon.js b/loleaflet/src/layer/marker/Icon.js index 58d5fd3..b50ca13 100644 --- a/loleaflet/src/layer/marker/Icon.js +++ b/loleaflet/src/layer/marker/Icon.js @@ -15,6 +15,7 @@ L.Icon = L.Class.extend({ shadowSize: (Point) shadowAnchor: (Point) className: (String) + asDiv: (Boolean) (optional, creates the icon as a div) }, */ @@ -33,14 +34,19 @@ L.Icon = L.Class.extend({ _createIcon: function (name, oldIcon) { var src = this._getIconUrl(name); - if (!src) { + if (!src && !this.options.asDiv) { if (name === 'icon') { throw new Error('iconUrl not set in Icon options (see the docs).'); } return null; } - var img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null); + if (this.options.asDiv) { + var img = document.createElement('div'); + } + else { + img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null); + } this._setIconStyles(img, name); return img; diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 1e17486..2f0330a 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -76,18 +76,16 @@ L.TileLayer = L.GridLayer.extend({ // Handle start marker this._startMarker = L.marker(new L.LatLng(0, 0), { icon: L.icon({ - iconUrl: L.Icon.Default.imagePath + '/handle_start.png', - iconSize: [30, 44], - iconAnchor: [28, 2] + className: 'leaflet-selection-marker-start', + asDiv: true }), draggable: true }); // Handle end marker this._endMarker = L.marker(new L.LatLng(0, 0), { icon: L.icon({ - iconUrl: L.Icon.Default.imagePath + '/handle_end.png', - iconSize: [30, 44], - iconAnchor: [2, 2] + className: 'leaflet-selection-marker-end', + asDiv: true }), draggable: true }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css |7 +-- loleaflet/src/map/Map.js |6 +- 2 files changed, 6 insertions(+), 7 deletions(-) New commits: commit c3d0248819054d91d4fe457843338b186268ed69 Author: Mihai Varga mihai.va...@collabora.com Date: Thu Aug 20 17:23:02 2015 +0300 loleaflet: fixed the iframe visibility diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index 7e045b3..0ec0399 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -69,7 +69,10 @@ -moz-user-select: none; } -.leaflet-pane { z-index: 4; } +.leaflet-pane { + z-index: 10; + position: relative; + } .leaflet-tile-pane{ z-index: 2; } .leaflet-overlay-pane { z-index: 4; } @@ -678,7 +681,7 @@ a.leaflet-control-buttons:hover:first-child { width: 100%; height: 100%; z-index: 0; -visibility: hidden; +border: none; } .parts-preview { diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index eb2e4c7..c5a3cad 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -597,11 +597,7 @@ L.Map = L.Evented.extend({ L.DomEvent[onOff](this._textArea, 'copy keydown keypress keyup', this._handleDOMEvent, this); if (this.options.trackResize) { - var target = window; - if (window.opener) { - target = this._resizeDetector.contentWindow; - } - L.DomEvent[onOff](target, 'resize', this._onResize, this); + L.DomEvent[onOff](this._resizeDetector.contentWindow, 'resize', this._onResize, this); } }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css |5 + loleaflet/src/control/Permission.js |7 --- 2 files changed, 1 insertion(+), 11 deletions(-) New commits: commit cd598cd1060d0f891a044858f517f19fa5e9e34b Author: Mihai Varga mihai.va...@collabora.com Date: Thu Aug 6 18:06:29 2015 +0300 loleaflet: always use text cursor except when dragging diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index da34f0c..2c8beca 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -180,7 +180,7 @@ cursor: pointer; } .leaflet-container { - cursor: pointer; + cursor: text; } .leaflet-crosshair, .leaflet-crosshair .leaflet-interactive { @@ -196,9 +196,6 @@ cursor: -webkit-grabbing; cursor:-moz-grabbing; } -.leaflet-editmode { -cursor: text; -} /* visual tweaks */ diff --git a/loleaflet/src/control/Permission.js b/loleaflet/src/control/Permission.js index 9950612..8d80993 100644 --- a/loleaflet/src/control/Permission.js +++ b/loleaflet/src/control/Permission.js @@ -4,10 +4,8 @@ L.Map.include({ setPermission: function (perm) { this._docLayer._permission = perm; - var className = 'leaflet-editmode'; if (perm === 'edit') { this.dragging.disable(); - L.DomUtil.addClass(this._container, className); } else if (perm === 'view' || perm === 'readonly') { this.dragging.enable(); @@ -15,7 +13,6 @@ L.Map.include({ this._docLayer._onUpdateCursor(); this._docLayer._clearSelections(); this._docLayer._onUpdateTextSelection(); - L.DomUtil.removeClass(this._container, className); } this.fire('updatepermission', {perm : perm}); }, @@ -24,17 +21,13 @@ L.Map.include({ if (this._docLayer._permission === 'edit') { return; } - var className = 'leaflet-editmode'; this.dragging.disable(); - L.DomUtil.addClass(this._container, className); }, disableSelection: function () { if (this._docLayer._permission === 'edit') { return; } - var className = 'leaflet-editmode'; this.dragging.enable(); - L.DomUtil.removeClass(this._container, className); } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css | 23 --- loleaflet/src/layer/marker/Cursor.js | 14 +- 2 files changed, 17 insertions(+), 20 deletions(-) New commits: commit b159241e77e19ec7ec301da5e1a74c8b2b2ddd90 Author: Mihai Varga mihai.va...@collabora.com Date: Thu Jul 16 17:33:18 2015 +0300 loleaflet: the cursor now has the same width (2px) diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index a3d1ca5..5cac88f 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -590,7 +590,8 @@ a.leaflet-control-buttons:hover { } .blinking-cursor { - color: #2E3D48; + background: black; + width: 2px; pointer-events: none; -webkit-animation: 1s blink step-end 0s infinite; -moz-animation: 1s blink step-end 0s infinite; @@ -601,46 +602,46 @@ a.leaflet-control-buttons:hover { @keyframes blink { from, to { -color: black; +background: black; } 50% { -color: transparent; +background: transparent; } } @-moz-keyframes blink { from, to { -color: black; +background: black; } 50% { -color: transparent; +background: transparent; } } @-webkit-keyframes blink { from, to { -color: black; +background: black; } 50% { -color: transparent; +background: transparent; } } @-ms-keyframes blink { from, to { -color: black; +background: black; } 50% { -color: transparent; +background: transparent; } } @-o-keyframes blink { from, to { -color: black; +background: black; } 50% { -color: transparent; +background: transparent; } } diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index cbe683d..b4cd5f1 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -49,13 +49,11 @@ L.Cursor = L.Layer.extend({ _initLayout: function () { this._container = L.DomUtil.create('div', 'leaflet-cursor'); - - //span class=blinking-cursor|/span - this._span = L.DomUtil.create('span', 'blinking-cursor', this._container); - this._span.innerHTML = '|'; + // a black rectangle + this._cursor = L.DomUtil.create('div', 'blinking-cursor', this._container); L.DomEvent - .disableClickPropagation(this._span) + .disableClickPropagation(this._cursor) .disableScrollPropagation(this._container); if (this._container) { @@ -84,10 +82,8 @@ L.Cursor = L.Layer.extend({ }, setSize: function (size) { - this._container.style.lineHeight = size.y + 'px'; - this._span.style.fontSize = size.y - 2 + 'px'; - this._container.style.left = '-' + (this._container.clientWidth - size.x)/2 + 'px'; - this._container.style.top = '-' + (this._container.clientHeight - size.y - 2)/2 + 'px'; + this._cursor.style.height = size.y + 'px'; + this._container.style.top = '-' + (this._container.clientHeight - size.y - 2) / 2 + 'px'; } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css|1 - loleaflet/src/layer/tile/TileLayer.js | 14 +++--- loleaflet/src/map/Map.js |2 +- loleaflet/src/map/handler/Map.Keyboard.js |8 4 files changed, 12 insertions(+), 13 deletions(-) New commits: commit 9a3e71bad8a415d026547d6650a0736a4538a2ec Author: Mihai Varga mihai.va...@collabora.com Date: Fri Jun 26 19:20:21 2015 +0300 Keyboard input is handled in a hidden textarea We now have a hidden text area where the user's input actually goes, but it also fires events that are caught by leaflet and are sent to the server diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index 3c03665..25038ee 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -623,7 +623,6 @@ width: 0px; height: 0px; z-index: 100; - display: none; opacity: 0; } #clipboard { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index d46617d..36e416e 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -154,6 +154,8 @@ L.TileLayer = L.GridLayer.extend({ }), draggable: true }); + this._textArea = L.DomUtil.get('clipboard'); + this._textArea.focus(); }, _initDocument: function () { @@ -699,6 +701,7 @@ L.TileLayer = L.GridLayer.extend({ if (this._endMarker._icon) { L.DomUtil.removeClass(this._endMarker._icon, 'leaflet-not-clickable'); } + this._textArea.focus(); } else if (e.type === 'mousemove' this._selecting) { if (this._holdStart) { @@ -767,6 +770,14 @@ L.TileLayer = L.GridLayer.extend({ return; } + if (e.originalEvent.ctrlKey) { + // we prepare for a copy event + this._textArea.value = 'dummy text'; + this._textArea.focus(); + this._textArea.select(); + return; + } + var charCode = e.originalEvent.charCode; var keyCode = e.originalEvent.keyCode; if (e.type === 'keypress') { @@ -903,9 +914,6 @@ L.TileLayer = L.GridLayer.extend({ } else { e.clipboardData.setData('text/plain', this._selectionTextContent); - var clipboardContainer = L.DomUtil.get('clipboard-container'); - L.DomUtil.setStyle(clipboardContainer, 'display', 'none'); - this._map._container.focus(); } } }); diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 85ab119..4f25698 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -584,7 +584,7 @@ L.Map = L.Evented.extend({ L.DomEvent[onOff](this._container, 'click dblclick mousedown mouseup ' + 'mouseover mouseout mousemove contextmenu keydown keypress keyup', this._handleDOMEvent, this); - L.DomEvent[onOff](L.DomUtil.get('clipboard'), 'copy', this._handleDOMEvent, this); + L.DomEvent[onOff](L.DomUtil.get('clipboard'), 'copy keydown keypress keyup', this._handleDOMEvent, this); if (this.options.trackResize) { L.DomEvent[onOff](window, 'resize', this._onResize, this); diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index afc0763..e524ce8 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -125,14 +125,6 @@ L.Map.Keyboard = L.Handler.extend({ }, _onKeyDown: function (e) { - if (e.ctrlKey) { - var clipboardContainer = L.DomUtil.get('clipboard-container'); - var textArea = L.DomUtil.get('clipboard'); - L.DomUtil.setStyle(clipboardContainer, 'display', 'inline'); - textArea.value = 'dummy text'; - textArea.focus(); - textArea.select(); - } if (this._map._bDisableKeyboard || e.altKey || e.ctrlKey || e.metaKey) { return; } var key = e.keyCode, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css|3 +++ loleaflet/src/layer/tile/TileLayer.js | 12 2 files changed, 15 insertions(+) New commits: commit e901c6fe3460e2fb7a489cb35dda78e484d88df4 Author: Mihai Varga mihai.va...@collabora.com Date: Fri Jun 26 12:43:57 2015 +0300 Set marker not clickable during mouse selection diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index f161094..3c03665 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -504,6 +504,9 @@ border: 1px solid #999; } +.leaflet-not-clickable { + pointer-events: none; + } /* div icon */ diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 8b58104..15b2d8b 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -693,6 +693,12 @@ L.TileLayer = L.GridLayer.extend({ this._postMouseEvent('buttonup', mousePos.x, mousePos.y, 1); this._editMode = true; + if (this._startMarker._icon) { + L.DomUtil.removeClass(this._startMarker._icon, 'leaflet-not-clickable'); + } + if (this._endMarker._icon) { + L.DomUtil.removeClass(this._endMarker._icon, 'leaflet-not-clickable'); + } } else if (e.type === 'mousemove' this._selecting) { if (this._holdStart) { @@ -704,6 +710,12 @@ L.TileLayer = L.GridLayer.extend({ } mousePos = this._latLngToTwips(e.latlng); this._postMouseEvent('move', mousePos.x, mousePos.y, 1); + if (this._startMarker._icon) { + L.DomUtil.addClass(this._startMarker._icon, 'leaflet-not-clickable'); + } + if (this._endMarker._icon) { + L.DomUtil.addClass(this._endMarker._icon, 'leaflet-not-clickable'); + } } else if (e.type === 'dblclick') { mousePos = this._latLngToTwips(e.latlng); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/images/handle_end.png |binary loleaflet/dist/images/handle_start.png |binary loleaflet/src/layer/tile/TileLayer.js | 91 - 3 files changed, 90 insertions(+), 1 deletion(-) New commits: commit bf17fde478bd805fdf0c6d31a40f7401b5a3ce81 Author: Henry Castro hcas...@collabora.com Date: Thu Jun 18 21:10:38 2015 -0400 loleaflet: grow / shrink the text selection. diff --git a/loleaflet/dist/images/handle_end.png b/loleaflet/dist/images/handle_end.png new file mode 100644 index 000..32b77df Binary files /dev/null and b/loleaflet/dist/images/handle_end.png differ diff --git a/loleaflet/dist/images/handle_start.png b/loleaflet/dist/images/handle_start.png new file mode 100644 index 000..cf12a0d Binary files /dev/null and b/loleaflet/dist/images/handle_start.png differ diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index a84ee45..c2dedba 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -62,10 +62,33 @@ L.TileLayer = L.GridLayer.extend({ this._bCursorVisible = true; // Rectangle graphic selection this._aGraphicSelection = new L.LatLngBounds( new L.LatLng(0, 0), new L.LatLng(0, 0) ); + // Position and size of the selection start (as if there would be a cursor caret there). + this._aTextSelectionStart = new L.LatLngBounds( new L.LatLng(0, 0), new L.LatLng(0, 0) ); + // Position and size of the selection end. + this._aTextSelectionEnd = new L.LatLngBounds( new L.LatLng(0, 0), new L.LatLng(0, 0) ); + // Cursor marker this._cursorMarker = null; // Graphic marker this._graphicMarker = null; + // Handle start marker + this._startMarker = L.marker( new L.LatLng(0,0), { + icon: L.icon({ + iconUrl: L.Icon.Default.imagePath + '/handle_start.png', + iconSize: [30, 44], + iconAnchor: [28, 2] + }), + draggable: true + }); + // Handle end marker + this._endMarker = L.marker( new L.LatLng(0,0), { + icon: L.icon({ + iconUrl: L.Icon.Default.imagePath + '/handle_end.png', + iconSize: [30, 44], + iconAnchor: [2, 2] + }), + draggable: true + }); }, _initDocument: function () { @@ -86,6 +109,8 @@ L.TileLayer = L.GridLayer.extend({ this._onMouseEvent, this); this._map.on('viewmode editmode', this._updateEditViewMode, this); this._map.on('drag', this._updateScrollOffset, this); + this._startMarker.on('dragend', this._onDragEndHandler, this); + this._endMarker.on('dragend', this._onDragEndHandler, this); }, getEvents: function () { @@ -168,6 +193,32 @@ L.TileLayer = L.GridLayer.extend({ this._bCursorOverlayVisible = true; this._onUpdateCursor(); } + else if (textMsg.startsWith('textselectionstart:')) { + strTwips = textMsg.match(/\d+/g); + if (strTwips != null) { + var topLeftTwips = new L.Point(parseInt(strTwips[0]), parseInt(strTwips[1])); + var offset = new L.Point(parseInt(strTwips[2]), parseInt(strTwips[3])); + var bottomRightTwips = topLeftTwips.add(offset); + this._aTextSelectionStart = new L.LatLngBounds( + this._twipsToLatLng(topLeftTwips, this._map.getZoom()), + this._twipsToLatLng(bottomRightTwips, this._map.getZoom())); + } + else + this._aTextSelectionStart = new L.LatLngBounds( new L.LatLng(0, 0), new L.LatLng(0, 0) ); + } + else if (textMsg.startsWith('textselectionend:')) { + strTwips = textMsg.match(/\d+/g); + if (strTwips != null) { + var topLeftTwips = new L.Point(parseInt(strTwips[0]), parseInt(strTwips[1])); + var offset = new L.Point(parseInt(strTwips[2]), parseInt(strTwips[3])); + var bottomRightTwips = topLeftTwips.add(offset); + this._aTextSelectionEnd = new L.LatLngBounds( +
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css|7 -- loleaflet/src/layer/marker/Cursor.js | 35 ++ loleaflet/src/layer/tile/TileLayer.js |8 +-- 3 files changed, 18 insertions(+), 32 deletions(-) New commits: commit 007ebda88c0bb42f6fc86de3c9bbcfc82209e13c Author: Henry Castro hcas...@collabora.com Date: Sat Jun 6 18:17:37 2015 -0400 Fixed cursor position. diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index dbf8e53..346d9e5 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -555,9 +555,12 @@ } +.leaflet-cursor { + position: absolute; + text-align: center; +} + .blinking-cursor { - font-weight: 100; - font-size: 20px; color: #2E3D48; -webkit-animation: 1s blink step-end infinite; -moz-animation: 1s blink step-end infinite; diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index 3ffce81..d40ffa5 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -5,7 +5,6 @@ L.Cursor = L.Layer.extend({ options: { - zIndexOffset: 0, opacity: 1 }, @@ -40,11 +39,6 @@ L.Cursor = L.Layer.extend({ return this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng}); }, - setZIndexOffset: function (offset) { - this.options.zIndexOffset = offset; - return this.update(); - }, - update: function () { if (this._container) { var pos = this._map.latLngToLayerPoint(this._latlng).round(); @@ -54,14 +48,14 @@ L.Cursor = L.Layer.extend({ }, _initLayout: function () { - this._container = L.DomUtil.create('div', 'leaflet-popup'); + this._container = L.DomUtil.create('div', 'leaflet-cursor'); //span class=blinking-cursor|/span - var span = L.DomUtil.create('span', 'blinking-cursor', this._container); - span.innerHTML = '|'; + this._span = L.DomUtil.create('span', 'blinking-cursor', this._container); + this._span.innerHTML = '|'; L.DomEvent - .disableClickPropagation(span) + .disableClickPropagation(this._span) .disableScrollPropagation(this._container); if (this._container) { @@ -73,18 +67,6 @@ L.Cursor = L.Layer.extend({ L.DomUtil.setPosition(this._container, pos); this._zIndex = pos.y + this.options.zIndexOffset; - - this._resetZIndex(); - }, - - _updateZIndex: function (offset) { - this._icon.style.zIndex = this._zIndex + offset; - }, - - _animateZoom: function (opt) { - var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round(); - - this._setPos(pos); }, setOpacity: function (opacity) { @@ -101,12 +83,9 @@ L.Cursor = L.Layer.extend({ L.DomUtil.setOpacity(this._container, opacity); }, - _bringToFront: function () { - this._updateZIndex(this.options.riseOffset); - }, - - _resetZIndex: function () { - this._updateZIndex(0); + setSize: function (size) { + this._container.style.lineHeight = size.y + 'px'; + this._span.style.fontSize = size.y - 2 + 'px'; } }); diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index d636ce6..65d8a02 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -707,9 +707,13 @@ L.TileLayer = L.GridLayer.extend({ if (this._cursorMarker) this._map.removeLayer(this._cursorMarker); - var latlngs = L.rectangle(this._cursorBounds).getLatLngs(); - this._cursorMarker = L.cursor(latlngs[2], {color: 'red'}); + var pixBounds = L.bounds(this._map.latLngToLayerPoint(this._cursorBounds.getSouthWest()), + this._map.latLngToLayerPoint(this._cursorBounds.getNorthEast())); + var latBounds = L.rectangle(this._cursorBounds).getLatLngs(); + + this._cursorMarker = L.cursor(latBounds[2], {color: 'red'}); this._map.addLayer(this._cursorMarker); + this._cursorMarker.setSize(pixBounds.getSize()); } else { if (this._cursorMarker) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
loleaflet/dist/leaflet.css|4 +++- loleaflet/src/control/Control.EditView.js |3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 1d34f8f0a8d5190277b0468e4fa3b22ad4817b29 Author: Mihai Varga mihai.va...@collabora.com Date: Thu May 28 17:43:53 2015 +0300 Set pointer cursor in viewmode diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css index cd63ccd..8aa8aed 100644 --- a/loleaflet/dist/leaflet.css +++ b/loleaflet/dist/leaflet.css @@ -198,7 +198,9 @@ cursor: -webkit-grabbing; cursor:-moz-grabbing; } - +.leaflet-viewmode { +cursor: pointer; +} /* visual tweaks */ diff --git a/loleaflet/src/control/Control.EditView.js b/loleaflet/src/control/Control.EditView.js index 248c341..2baf269 100644 --- a/loleaflet/src/control/Control.EditView.js +++ b/loleaflet/src/control/Control.EditView.js @@ -19,11 +19,14 @@ L.Control.EditViewSwitch = L.Control.extend({ }, _onChange: function() { +var className = 'leaflet-viewmode'; if (this._checkBox.checked) { this._map.fire('viewmode'); +L.DomUtil.addClass(this._map._container, className); } else { this._map.fire('editmode'); +L.DomUtil.removeClass(this._map._container, className); } } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits