[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/loleaflet.css |1 + 1 file changed, 1 insertion(+) New commits: commit e7fb7202cba67069b002266a36c29ddc28eeb558 Author: Pranav Kant Date: Sat Feb 24 14:56:51 2018 +0530 loleaflet: Keep the cursor 'default' by default Change-Id: I88e18f7ce08612837dd99df3f9d08b4561007371 Reviewed-on: https://gerrit.libreoffice.org/50275 Reviewed-by: Aron Budea Tested-by: Aron Budea (cherry picked from commit fb22b1d97ff14fea4731c37a8e4807b88c7b59ee) Signed-off-by: Andras Timar diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index a0604c5f2..ef8b0f5b2 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -28,6 +28,7 @@ left: 0px; right: 0px; z-index: 10; + cursor: default; } .scroll-container .mCSB_scrollTools.mCSB_1_scrollbar { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/loleaflet.html |2 ++ 1 file changed, 2 insertions(+) New commits: commit e5b42441f328841ceb81e2836fe35c7cb1c6a683 Author: Tor Lillqvist Date: Tue Jan 16 14:16:06 2018 +0200 Add closing tag that was accidentally removed in 328df11a689684be0e13b1778b67d5a7648e9989 Change-Id: I0d0c1eda84f421838c55c223731898167f497ec7 (cherry picked from commit 149714f5b3cd7fff87da08ba0ab2554cc78071e5) Signed-off-by: Andras Timar diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index 5d3ccd8a..2b867475 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -23,6 +23,8 @@ + +
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit 69ff4e528ffa12c09d56d7d4677c754acc6ce31f Author: Henry Castro Date: Thu Nov 16 22:29:39 2017 -0400 loleaflet: fix when the status bar items are refreshed The w2ui toolbar refreshes the html type of its data, not the element generated Change-Id: I9b53ac0b98195961accce8be554c7bbfff19c644 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 663a4937..8f3137c6 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1232,36 +1232,36 @@ map.on('commandstatechanged', function (e) { } } else if (commandName === '.uno:LanguageStatus') { - updateToolbarItem(statusbar, 'LanguageStatus', $('#LanguageStatus').html(_(state)).html()); + updateToolbarItem(statusbar, 'LanguageStatus', $('#LanguageStatus').html(_(state)).parent().html()); } else if (commandName === '.uno:ModifiedStatus') { var modifiedStatus = e.state === 'true'; var html; if (modifiedStatus) { - html = $('#modifiedstatuslabel').html('').html(); + html = $('#modifiedstatuslabel').html('').parent().html(); } else { - html = $('#modifiedstatuslabel').html(_('Document saved')).html(); + html = $('#modifiedstatuslabel').html(_('Document saved')).parent().html(); } updateToolbarItem(statusbar, 'modifiedstatuslabel', html); } else if (commandName === '.uno:StatusDocPos') { state = toLocalePattern('Sheet %1 of %2', 'Sheet (\\d+) of (\\d+)', state, '%1', '%2'); - updateToolbarItem(statusbar, 'StatusDocPos', $('#StatusDocPos').html(state ? state : ' ').html()); + updateToolbarItem(statusbar, 'StatusDocPos', $('#StatusDocPos').html(state ? state : ' ').parent().html()); } else if (commandName === '.uno:RowColSelCount') { state = toLocalePattern('$1 rows, $2 columns selected', '(\\d+) rows, (\\d+) columns selected', state, '$1', '$2'); - updateToolbarItem(statusbar, 'RowColSelCount', $('#RowColSelCount').html(state ? state : ' ').html()); + updateToolbarItem(statusbar, 'RowColSelCount', $('#RowColSelCount').html(state ? state : ' ').parent().html()); } else if (commandName === '.uno:InsertMode') { - updateToolbarItem(statusbar, 'InsertMode', $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : ' ').html()); + updateToolbarItem(statusbar, 'InsertMode', $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : ' ').parent().html()); } else if (commandName === '.uno:StatusSelectionMode' || commandName === '.uno:SelectionMode') { - updateToolbarItem(statusbar, 'StatusSelectionMode', $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state].toLocaleString() : ' ').html()); + updateToolbarItem(statusbar, 'StatusSelectionMode', $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state].toLocaleString() : ' ').parent().html()); } else if (commandName == '.uno:StateTableCell') { - updateToolbarItem(statusbar, 'StateTableCell', $('#StateTableCell').html(state ? state : ' ').html()); + updateToolbarItem(statusbar, 'StateTableCell', $('#StateTableCell').html(state ? state : ' ').parent().html()); } else if (commandName === '.uno:StatusBarFunc') { if (state) { @@ -1270,15 +1270,15 @@ map.on('commandstatechanged', function (e) { } else if (commandName === '.uno:StatePageNumber') { state = toLocalePattern('Page %1 of %2', 'Page (\\d+) of (\\d+)', state, '%1', '%2'); - updateToolbarItem(statusbar, 'StatePageNumber', $('#StatePageNumber').html(state ? state : ' ').html()); + updateToolbarItem(statusbar, 'StatePageNumber', $('#StatePageNumber').html(state ? state : ' ').parent().html()); } else if (commandName === '.uno:StateWordCount') { state = toLocalePattern('%1 words, %2 characters', '([\\d,]+) words, ([\\d,]+) characters', state, '%1', '%2'); - updateToolbarItem(statusbar, 'StateWordCount', $('#StateWordCount').html(state ? state : ' ').html()); + updateToolbarItem(statusbar, 'StateWordCount', $('#StateWordCount').html(state ? state : ' ').parent().html()); } else if (commandName === '.uno:PageStatus') { state = toLocalePattern('Slide %1 of %2', 'Slide (\\d+) of (\\d+)', sta
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 72a7b95261fbfd3aeb7fcb87c3641bbd367187c7 Author: Jan Holesovsky Date: Wed Nov 8 19:36:15 2017 +0100 Save As: Don't save the document several times. Also don't perform the save as when the document name hasn't changed. Change-Id: I4fb7e0abd73996e90107b301a09b8703b66e80f9 Reviewed-on: https://gerrit.libreoffice.org/44504 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 1e1a89f5..663a4937 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -776,7 +776,7 @@ function onSearchKeyPress(e) { function documentNameConfirm() { var value = $('#document-name-input').val(); - if (value !== null && value != '') { + if (value !== null && value != '' && value != map['wopi'].BaseFileName) { map.saveAs(value); } map._onGotFocus(); @@ -795,6 +795,11 @@ function onDocumentNameKeyPress(e) { } } +function onDocumentNameFocus() { + // hide the caret in the main document + map._onLostFocus(); +} + function sortFontSizes() { var oldVal = $('.fontsizes-select').val(); var selectList = $('.fontsizes-select option'); @@ -992,9 +997,9 @@ map.on('wopiprops', function(e) { // Save As allowed $('#document-name-input').prop('disabled', false); $('#document-name-input').addClass('editable'); - $('#document-name-input').on('keypress', onDocumentNameKeyPress); - $('#document-name-input').on('focus', function() { map._onLostFocus(); /* hide the caret in the main document */ }); - $('#document-name-input').on('blur', documentNameCancel); + $('#document-name-input').off('keypress', onDocumentNameKeyPress).on('keypress', onDocumentNameKeyPress); + $('#document-name-input').off('focus', onDocumentNameFocus).on('focus', onDocumentNameFocus); + $('#document-name-input').off('blur', documentNameCancel).on('blur', documentNameCancel); } else { $('#document-name-input').prop('disabled', true); $('#document-name-input').removeClass('editable'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/src wsd/DocumentBroker.cpp
loleaflet/dist/loleaflet.html |2 + loleaflet/dist/toolbar.css| 25 ++ loleaflet/dist/toolbar/toolbar.js | 37 ++ loleaflet/src/map/handler/Map.WOPI.js |2 + wsd/DocumentBroker.cpp|1 5 files changed, 67 insertions(+) New commits: commit 41dfc1ab2c4006c5c38dfa10550e218442154e54 Author: Jan Holesovsky Date: Tue Oct 31 17:58:58 2017 +0100 Save As: UI for changing the document name. Change-Id: I23aba95ff0f8d867b021ba3cf0a6bc5eb4754f9d Reviewed-on: https://gerrit.libreoffice.org/44282 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index 13e60e54..5d3ccd8a 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -53,6 +53,8 @@ + + diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index 0b65e88f..6564ae95 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -72,6 +72,31 @@ width: 700px; } +#document-name-input { +position: fixed; +z-index: 1050; +right: 35px; +top: 2px; +width: 200px; +font-size: 16px; +//font-weight: bold; +border: 1px solid transparent; +background-color: transparent; +} + +#document-name-input.editable:focus { +border: 1px solid #bb; +background-color: white; +} + +#document-name-input.editable:hover { +border: 1px solid #bb; +background-color: white; +background-image: url('../images/lc_editdoc.svg'); +background-position: right; +background-repeat: no-repeat; +} + #closebuttonwrapper { position: fixed; z-index: 1050; diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index ea7e567b..1e1a89f5 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -774,6 +774,27 @@ function onSearchKeyPress(e) { } } +function documentNameConfirm() { + var value = $('#document-name-input').val(); + if (value !== null && value != '') { + map.saveAs(value); + } + map._onGotFocus(); +} + +function documentNameCancel() { + $('#document-name-input').val(map['wopi'].BaseFileName); + map._onGotFocus(); +} + +function onDocumentNameKeyPress(e) { + if (e.keyCode === 13) { // Enter key + documentNameConfirm(); + } else if (e.keyCode === 27) { // Escape key + documentNameCancel(); + } +} + function sortFontSizes() { var oldVal = $('.fontsizes-select').val(); var selectList = $('.fontsizes-select option'); @@ -963,6 +984,22 @@ map.on('wopiprops', function(e) { evt.preventDefault(); }); } + if (e.BaseFileName !== null) { + // set the document name into the name field + $('#document-name-input').val(e.BaseFileName); + } + if (e.UserCanNotWriteRelative === false) { + // Save As allowed + $('#document-name-input').prop('disabled', false); + $('#document-name-input').addClass('editable'); + $('#document-name-input').on('keypress', onDocumentNameKeyPress); + $('#document-name-input').on('focus', function() { map._onLostFocus(); /* hide the caret in the main document */ }); + $('#document-name-input').on('blur', documentNameCancel); + } else { + $('#document-name-input').prop('disabled', true); + $('#document-name-input').removeClass('editable'); + $('#document-name-input').off('keypress', onDocumentNameKeyPress); + } }); map.on('doclayerinit', function () { diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js index e2a3840d..f06e30fc 100644 --- a/loleaflet/src/map/handler/Map.WOPI.js +++ b/loleaflet/src/map/handler/Map.WOPI.js @@ -8,6 +8,7 @@ L.Map.WOPI = L.Handler.extend({ // So use '*' because we still needs to send 'close' message to the parent frame which // wouldn't be possible otherwise. PostMessageOrigin: '*', + BaseFileName: '', DocumentLoadedTime: false, HidePrintOption: false, HideSaveOption: false, @@ -61,6 +62,7 @@ L.Map.WOPI = L.Handler.extend({ this.PostMessageOrigin = wopiInfo['PostMessageOrigin']; } + this.BaseFileName = wopiInfo['BaseFileName']; this.HidePrintOption = !!wopiInfo['HidePrintOption']; this.HideSaveOption = !!wopiInfo['HideSaveOption']; this.HideExportOption = !!wopiInfo['HideExportOption']; diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 966c3184..a6a91c1a 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -438,6 +438,7 @@ bool Docume
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) New commits: commit 09e997f583e8a38134519e3f8423e7dd936c679e Author: Henry Castro Date: Wed Oct 4 09:39:50 2017 -0400 loleaflet: fix statusbar items when refreshed when the statusbar is refreshed the items are restored to according to html property Change-Id: I79f77c5ab4932c10d10dd9780cbd6e6a9b132a38 Reviewed-on: https://gerrit.libreoffice.org/43391 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 66a4b064..2f2eb146 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -701,6 +701,13 @@ function toLocalePattern (pattern, regex, text, sub1, sub2) { return text; } +function updateToolbarItem(toolbar, id, html) { + var item = toolbar.get(id); + if (item) { + item.html = html; + } +} + function unoCmdToToolbarId(commandname) { var id = commandname.toLowerCase().substr(5); @@ -736,6 +743,7 @@ function selectItem(item, func) item.current = index; } } + function onSearch(e) { var toolbar = w2ui['toolbar-down']; // conditionally disabling until, we find a solution for tdf#108577 @@ -1004,7 +1012,7 @@ map.on('doclayerinit', function () { toolbarUp.remove('wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); toolbarUpMore.remove('wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending'); statusbar.insert('left', [ - {type: 'break', id:'break1'}, + {type: 'break', id: 'break1'}, {type: 'html', id: 'StatePageNumber', html: ' ' }, {type: 'break', id:'break2'}, @@ -1014,7 +1022,7 @@ map.on('doclayerinit', function () { {type: 'html', id: 'InsertMode', html: ' ' }, {type: 'break', id:'break6'}, - {type: 'html', id: 'SelectionMode', + {type: 'html', id: 'StatusSelectionMode', html: ' ' }, {type: 'break', id:'break7'}, {type: 'html', id: 'LanguageStatus', @@ -1179,34 +1187,36 @@ map.on('commandstatechanged', function (e) { } } else if (commandName === '.uno:LanguageStatus') { - $('#LanguageStatus').html(_(state)); + updateToolbarItem(statusbar, 'LanguageStatus', $('#LanguageStatus').html(_(state)).html()); } else if (commandName === '.uno:ModifiedStatus') { var modifiedStatus = e.state === 'true'; + var html; if (modifiedStatus) { - $('#modifiedstatuslabel').html(''); + html = $('#modifiedstatuslabel').html('').html(); } else { - $('#modifiedstatuslabel').html(_('Document saved')); + html = $('#modifiedstatuslabel').html(_('Document saved')).html(); } + updateToolbarItem(statusbar, 'modifiedstatuslabel', html); } else if (commandName === '.uno:StatusDocPos') { state = toLocalePattern('Sheet %1 of %2', 'Sheet (\\d+) of (\\d+)', state, '%1', '%2'); - $('#StatusDocPos').html(state ? state : ' '); + updateToolbarItem(statusbar, 'StatusDocPos', $('#StatusDocPos').html(state ? state : ' ').html()); } else if (commandName === '.uno:RowColSelCount') { state = toLocalePattern('$1 rows, $2 columns selected', '(\\d+) rows, (\\d+) columns selected', state, '$1', '$2'); - $('#RowColSelCount').html(state ? state : ' '); + updateToolbarItem(statusbar, 'RowColSelCount', $('#RowColSelCount').html(state ? state : ' ').html()); } else if (commandName === '.uno:InsertMode') { - $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : ' '); + updateToolbarItem(statusbar, 'InsertMode', $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : ' ').html()); } else if (commandName === '.uno:StatusSelectionMode' || com
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 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 b330106bec0b60f3cdd119ba6153816858043961 Author: Henry Castro Date: Sat Oct 21 13:42:35 2017 -0400 loleaflet: enable Calc spell checking Change-Id: I9293335e1da7a3ad35d6ed03caf8289e2f26d066 Reviewed-on: https://gerrit.libreoffice.org/43702 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 2f2eb146..ea7e567b 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -986,6 +986,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 c14cd1fa..6e9de55b 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -300,7 +300,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: Branch 'distro/collabora/collabora-online-2-1' - 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 ef7aa17eb7677fe19033a3bd5f21b01f546f72b0 Author: Henry Castro Date: Fri Oct 13 20:59:19 2017 -0400 loleaflet: enable Impress spell checking Change-Id: Ie4ae3f683bc55f7ca67b01e65dafea9746784b5a Reviewed-on: https://gerrit.libreoffice.org/43389 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 5faa4fa6..66a4b064 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1039,6 +1039,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 7576b524..ef895d1f 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -245,7 +245,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: Branch 'distro/collabora/collabora-online-2-1' - 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 f844604a92c3da744c4b08c08d7662fc8146fcc6 Author: Andras Timar Date: Wed Oct 4 13:29:20 2017 +0200 loleaflet: enable l10n of language names Change-Id: Idd8b1b0bb081d718cf8d36c60ce6e293bd818fc6 Reviewed-on: https://gerrit.libreoffice.org/43132 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 33867ca9..5faa4fa6 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1176,7 +1176,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 1ab60a1d..9705b85f 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -363,9 +363,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: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit a391adcd813ff31a420a82d3bf8c8258171c6d92 Author: Aron Budea Date: Wed Oct 4 03:48:31 2017 +0200 Status bar function: first make it work properly The way the parameter was interpreted changed with this core commit: 7bc97db5b972f27693161beb9182f8a5850f5551 For now let's make single function work again. Change-Id: I6e8ebb4cc7a272c53aa3e44066df7a62ab89d8ab Reviewed-on: https://gerrit.libreoffice.org/43126 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 09c81ccc..33867ca9 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -984,15 +984,15 @@ map.on('doclayerinit', function () { {type: 'break', id:'break8'}, {type: 'html', id: 'StateTableCell', html: ' ' }, - {type: 'menu', id: 'StateTableCellMenu', caption: '', current: 7, items: [ - { func: '1', text: _('Average'), icon: ''}, - { func: '3', text: _('CountA'), icon: ''}, - { func: '2', text: _('Count'), icon: ''}, - { func: '4', text: _('Maximum'), icon: ''}, - { func: '5', text: _('Minimum'), icon: ''}, - { func: '9', text: _('Sum'), icon: ''}, - { func: '12', text: _('Selection count'), icon: ''}, - { func: '16', text: _('None'), icon: 'selected'}, + {type: 'menu', id: 'StateTableCellMenu', caption: '', current: 5, items: [ + { func: '2', text: _('Average'), icon: ''}, + { func: '8', text: _('CountA'), icon: ''}, + { func: '4', text: _('Count'), icon: ''}, + { func: '16', text: _('Maximum'), icon: ''}, + { func: '32', text: _('Minimum'), icon: ''}, + { func: '512', text: _('Sum'), icon: 'selected'}, + { func: '8192', text: _('Selection count'), icon: ''}, + { func: '1', text: _('None'), icon: ''}, ]}, ]); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 747350d34a0cd70d85e18ee8abb1df93a50eeaf3 Author: Michael Meeks Date: Mon Oct 2 20:52:09 2017 +0100 Pre-select search text if present on a new ctrl-f. Change-Id: Idec7c3e3a419bb26f951872932c8c2c7de69b68f Reviewed-on: https://gerrit.libreoffice.org/43055 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index e540f608..0cd61a09 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1571,7 +1571,9 @@ map.on('updatepermission', function (e) { map.on('keydown', function (e) { if (e.originalEvent.ctrlKey && !e.originalEvent.altKey && (e.originalEvent.key === 'f' || e.originalEvent.key === 'F')) { - L.DomUtil.get('search-input').focus(); + var entry = L.DomUtil.get('search-input'); + entry.focus(); + entry.select(); e.originalEvent.preventDefault(); } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 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 dcdaa19458166ff1989935bc5aebb3dd401875f1 Author: Marco Cecchetti Date: 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 fbb9322a..b48487b8 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -941,6 +941,9 @@ map.on('wopiprops', function(e) { w2ui['toolbar-up'].hide('save'); w2ui['toolbar-up'].hide('savebreak'); } + if (e.HideExportOption) { + w2ui['presentation-toolbar'].hide('presentation', 'presentationbreak'); + } if (e.DisableCopy) { $('input#formulaInput').bind('copy', function(evt) { evt.preventDefault(); @@ -1020,7 +1023,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 fdd63bcd..70616749 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -222,7 +222,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: [ @@ -719,6 +719,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: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar.css | 10 ++ 1 file changed, 10 insertions(+) New commits: commit d09e5c0ad665d220d6d6693ad04a2294632eeacc Author: Pranav Kant Date: Fri Aug 4 17:41:54 2017 +0530 loleaflet: Explicitly mention z-index to please MS Edge 40 This is not required in any other browser, but Edge 40 requires it otherwise the popup window upon clicking the combo box goes behind the main #map element. Change-Id: Ie95263f08c8af27b16a56ba2c3c7a9faa308400a (cherry picked from commit 341c07b64f1012731b6d337929b120640d2474be) Reviewed-on: https://gerrit.libreoffice.org/40766 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index ab8894ca..0b65e88f 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -42,6 +42,16 @@ width: 100%; } +/* For MS Edge 40, the select2 combo boxes need to have higher z-index than #map + * Ideal would be to add the class to select2-container , but + * https://github.com/select2/select2/issues/285 + * So, for now just define the z-index here separately for the same class that select2 uses + * as a container + */ +.select2-container { +z-index: 11; +} + /* center the toolbar */ #tb_presentation-toolbar_item_left { width: 50%; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/admin/admin.html |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8a05ff490767f66ea363982e5b94fe7750a34bd3 Author: Pranav Kant Date: Thu Jun 8 16:44:38 2017 +0530 admin-console: Spread the tabbed view to full width (cherry picked from commit e554fa4ba6a366358aa4fb79214ff69bb368c753) Change-Id: Ibbd3d83585a5018c80ab23567745d99b248edc82 Reviewed-on: https://gerrit.libreoffice.org/38571 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/dist/admin/admin.html index 2409e4f2..0b5cde72 100644 --- a/loleaflet/dist/admin/admin.html +++ b/loleaflet/dist/admin/admin.html @@ -77,7 +77,7 @@ document.write(l10nstrings.strMemoryConsumed) - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/src wsd/Admin.cpp wsd/Admin.hpp wsd/AdminModel.cpp wsd/AdminModel.hpp wsd/ClientSession.hpp
loleaflet/dist/admin/bootstrap/dashboard.css | 12 ++ loleaflet/src/admin/AdminSocketOverview.js | 53 ++- wsd/Admin.cpp|6 +-- wsd/Admin.hpp|2 - wsd/AdminModel.cpp | 46 +-- wsd/AdminModel.hpp | 10 +++-- wsd/ClientSession.hpp|2 - wsd/DocumentBroker.cpp |2 - 8 files changed, 97 insertions(+), 36 deletions(-) New commits: commit da9baa4997e3414b4d01e58628e047ebf7c5236b Author: Aditya Dewan Date: 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 (cherry picked from commit 41ed318de8c1ebb5c2d707b6fb12a9c9b5440407) Reviewed-on: https://gerrit.libreoffice.org/39700 Reviewed-by: Michael Meeks Tested-by: Michael Meeks (cherry picked from commit df90eecdd194f4d5c59ced4193cfb876025016af) Reviewed-on: https://gerrit.libreoffice.org/39764 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]);
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit be910e7325ee48a036d6f9987b875ccd705887a3 Author: Ashod Nakashian Date: Mon Jun 19 01:20:34 2017 -0400 loleaflet: Allow users to repair at all times Since during an edit conflict the undo/redo buttons are dissabled (for the user who can't undo/redo anymore) disabling the repair button robs them of the ability to repair the document to an earlier state (i.e. before the conflict). This enables the repair button as soon as either the undo or redo is enabled, whereupon it remains enabled for the duration of the session. Change-Id: Ibaf257155f721e2cef596e965d8812d381ab3a5b Reviewed-on: https://gerrit.libreoffice.org/38942 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 323e2789b9e82e0d600d39d0697d40f6014f54d7) Reviewed-on: https://gerrit.libreoffice.org/38943 Reviewed-by: pranavk Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index e227c074..94b17e42 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1224,9 +1224,7 @@ map.on('commandstatechanged', function (e) { } if (id === 'undo' || id === 'redo') { - if (toolbar.get('undo').disabled && toolbar.get('redo').disabled) { - toolbar.disable('repair'); - } else { + if (!toolbar.get('undo').disabled || !toolbar.get('redo').disabled) { toolbar.enable('repair'); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 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 90d4ce9b86bc6283c56ef01a2e7703301a5be30f Author: Pranav Kant Date: 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 (cherry picked from commit b4ff02cacd7bd332f1e3d0074f333dea667c079d) Reviewed-on: https://gerrit.libreoffice.org/38736 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky 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: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/src
loleaflet/dist/menubar.css |5 ++- loleaflet/src/control/Control.Menubar.js | 50 ++- loleaflet/src/map/handler/Map.WOPI.js| 46 3 files changed, 67 insertions(+), 34 deletions(-) New commits: commit 4d481791517bcba0cfc6599248c68077c5d166ac Author: Pranav Kant Date: Tue Jun 13 15:23:21 2017 +0530 loleaflet: Add button to menu bar if toolbar doesn't exist ... in case of Insert_Button PostMessage API when the document is loaded in readonly mode. Change-Id: I65a316d0b3cf22751a6926bc7aa430a249be5244 (cherry picked from commit caa4aa12c7beeb112dbd58222bd5928326e7e101) Reviewed-on: https://gerrit.libreoffice.org/38731 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/menubar.css b/loleaflet/dist/menubar.css index eb115d77..9d57445b 100644 --- a/loleaflet/dist/menubar.css +++ b/loleaflet/dist/menubar.css @@ -223,7 +223,10 @@ */ #menu-closedocument.readonly { display: block; - top: 3px; /* This is not a menu, plain action, but we want it to appear like a menu */ +} + +.readonly { + top: 3px; } } diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 6974935c..0bf811d3 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -2,7 +2,7 @@ * Control.Menubar */ -/* global $ _ map title vex revHistoryEnabled closebutton */ +/* global $ _ map title vex revHistoryEnabled closebutton L */ L.Control.Menubar = L.Control.extend({ // TODO: Some mechanism to stop the need to copy duplicate menus (eg. Help) options: { @@ -298,6 +298,25 @@ L.Control.Menubar = L.Control.extend({ this._menubarCont = L.DomUtil.get('main-menu'); map.on('doclayerinit', this._onDocLayerInit, this); + map.on('addmenu', this._addMenu, this); + }, + + _addMenu: function(e) { + var alreadyExists = L.DomUtil.get('menu-' + e.id); + if (alreadyExists) + return; + + var liItem = L.DomUtil.create('li', ''); + liItem.id = 'menu-' + e.id; + if (map._permission === 'readonly') { + L.DomUtil.addClass(liItem, 'readonly'); + } + var aItem = L.DomUtil.create('a', '', liItem); + $(aItem).text(e.label); + $(aItem).data('id', e.id); + $(aItem).data('type', 'action'); + $(aItem).data('postmessage', 'true'); + this._menubarCont.insertBefore(liItem, this._menubarCont.firstChild); }, _onDocLayerInit: function() { @@ -418,7 +437,8 @@ L.Control.Menubar = L.Control.extend({ }); }, - _executeAction: function(id) { + _executeAction: function(item) { + var id = $(item).data('id'); if (id === 'save') { map.save(true, true); } else if (id === 'print') { @@ -431,7 +451,7 @@ L.Control.Menubar = L.Control.extend({ fileName = fileName === '' ? 'document' : fileName; map.downloadAs(fileName + '.' + format, format); } else if (id === 'findandreplace') { - findReplaceContent = + var findReplaceContent = '\ \ \ @@ -462,7 +482,7 @@ L.Control.Menubar = L.Control.extend({ $.extend({}, vex.dialog.buttons.replace, { text: _('Replace'), click: function($vexContent, e) { - $vexContent.data().vex.option = 'replace' + $vexContent.data().vex.option = 'replace'; }}), $.extend({}, vex.dialog.buttons.replaceAll, { text: _('Replace All'), @@ -509,8 +529,8 @@ L.Control.Menubar = L.Control.extend({ xPos = e.pageX; yPos = e.pageY; if (selected !== null) { - isOutVert = (yPos - yElem >= 0 && (yPos - yElem + selected.offsetHeight) <= maxH); - isOutHor = (xPos - xElem >= 0 && (xPos - xElem + selected.offsetWidth) <= maxW); + var isOutVert = (yPos - yElem >= 0 && (yPos - yElem + selected.offsetHeight) <= maxH); +
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/reference.html loleaflet/src
loleaflet/dist/toolbar/toolbar.js | 22 ++--- loleaflet/reference.html | 33 ++ loleaflet/src/map/handler/Map.WOPI.js | 42 -- 3 files changed, 91 insertions(+), 6 deletions(-) New commits: commit ea4fd75716ad01f73a12201246d6754e307e8e6e Author: Pranav Kant Date: Wed Jun 7 12:57:07 2017 +0530 Allow adding custom buttons to our toolbar from host; save result resp. ... with no functionality attached to it except notifying the WOPI host that button was clicked. Host is supposed to do the action thereafter itself. Also, notify the host when a save succeeds or fails. Change-Id: I0daa2690af2259233840ea7ab4326b9b80d5fa87 (cherry picked from commit 3867bbe56ecceab8e0d3e4f1c85b83de08000f17) Reviewed-on: https://gerrit.libreoffice.org/38491 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 53edf075..e227c074 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -210,7 +210,11 @@ function onClick(id, item, subItem) { if (item.disabled) { return; } - if (item.uno) { + + if (item.postmessage && item.type === 'button') { + map.fire('postMessage', {msgId: 'Clicked_Button', args: {Id: item.id} }); + } + else if (item.uno) { if (item.unosheet && map.getDocType() === 'spreadsheet') { map.toggleCommandState(item.unosheet); } @@ -1407,9 +1411,19 @@ map.on('updateparts pagenumberchanged', function (e) { map.on('commandresult', function (e) { var commandName = e.commandName; - if (commandName === '.uno:Save' && e.success === true) { - // Saved a new version; the document is modified. - map._everModified = true; + if (commandName === '.uno:Save') { + if (e.success) { + // Saved a new version; the document is modified. + map._everModified = true; + } + var postMessageObj = { + success: e.success + }; + if (!e.success) { + // add the result reason string if failed + postMessageObj['result'] = e.result && e.result.value; + } + map.fire('postMessage', {msgId: 'Action_Save_Resp', args: postMessageObj}); } else if ((commandName === '.uno:Undo' || commandName === '.uno:Redo') && e.success === true && e.result.value && !isNaN(e.result.value)) { /*UNDO_CONFLICT*/ diff --git a/loleaflet/reference.html b/loleaflet/reference.html index 0db570d3..8276ab70 100644 --- a/loleaflet/reference.html +++ b/loleaflet/reference.html @@ -2896,6 +2896,7 @@ WOPI host to editor DontTerminateEdit:DontSaveIfUnmodified: + Notify: Saves the document. DontTerminateEdit is relevant for spreadsheets where saving @@ -2905,6 +2906,9 @@ WOPI host to editor DontSaveIfUnmodified prevents loolwsd to save the file back to storage if document is unmodified (only cursor position changed etc.) but still saved. This can be helpful to prevent creating unnecessary file revisions. + Notify when present and set to true notifies the + host when document is saved. See Action_Save_Resp + for details. @@ -2927,6 +2931,35 @@ WOPI host to editor +Actions response +(WOPI editor to host) + + + MessageId + Values + Description + + + Action_Save_Resp + + success: + result: + + Acknowledgement when save finishes. + success tells if LOOL was able to save the document + successfully. When this is false, then another + parameter, result is present which contains the + reason that document was not saved. + In case, document was not saved because it was not modified, + then this parameter contains the string 'unmodified'. In this + case, WOPI hosts can be sure that there are no changes pending + in the document to be saved to the storage. + This response is only emitted if Notify parameter + is mentioned by Action_Save PostMessage API. + + + + Marker diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js index fcb454ec..d187e2a6 100644 --
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/errormessages.js |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit be3553b47ce1406a1156655865a3e894f02d28e2 Author: Pranav Kant Date: Tue Jun 6 20:23:34 2017 +0530 Some error strings tweaks (cherry picked from commit 4711debd9a9c640a6f271f90a7151a6f1ec7de79) Conflicts: loleaflet/dist/errormessages.js Change-Id: I4f51ad2a3957f8d9bf2d41030342d208bd7529fa Reviewed-on: https://gerrit.libreoffice.org/38483 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/errormessages.js b/loleaflet/dist/errormessages.js index 8ea1185c..dc9ed7f0 100644 --- a/loleaflet/dist/errormessages.js +++ b/loleaflet/dist/errormessages.js @@ -12,6 +12,7 @@ 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.') + saveunauthorized: _('Document cannot be saved due to expired or invalid access token.'), + savefailed: _('Document cannot be saved. Check your permissions or contact the storage server administrator.'), + documentconflict: _('Document has been changed in storage outside WOPI.') }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 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 3e7a379aab0eb6e622b43e7898c3133c8abd52c3 Author: Jan Holesovsky Date: 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/38511 Reviewed-by: pranavk Tested-by: pranavk 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 87d224e7..6974935c 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -470,13 +470,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: Branch 'distro/collabora/collabora-online-2-1' - 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 781aceedeb4da4a7ffc878f3ce518655d01708e3 Author: Aditya Dewan Date: Thu Jun 1 02:57:16 2017 +0530 tdf#97020 Adding find&replace functionality Change-Id: I4d8d22368e6f8ee85873c86f9e80fbdffc2ad17a Reviewed-on: https://gerrit.libreoffice.org/38287 Reviewed-by: pranavk Tested-by: pranavk (cherry picked from commit ccca292d7d50c7bbb0a5bdf29ac9981be07c41c1) Reviewed-on: https://gerrit.libreoffice.org/38439 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky 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 755c5fd8..53edf075 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -737,7 +737,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'); @@ -1236,8 +1236,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\ + \ + \ + \ + \ + \ + \ + \ +
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |6 -- 1 file changed, 6 deletions(-) New commits: commit ddc2b0c60129fb814b180c02d10831839dd1482f Author: Pranav Kant Date: Mon Jun 5 15:40:08 2017 +0530 This should be obsolete after PostMessage API and WOPI In richdocuments, it was added in aa0a8f666ada8f1d1edae17b906089cc03ba473d and then removed in 87f7720d12e130bd1c3cd9306ad1b1f4d784f9e6 It was added firstly way before WOPI was even there. But now since we have WOPI, we wouldn't need it. Change-Id: I786a3f7b2103a43995a70b53438d88a829d13265 Reviewed-on: https://gerrit.libreoffice.org/38435 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 060c4562..755c5fd8 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1408,12 +1408,6 @@ map.on('commandresult', function (e) { if (commandName === '.uno:Save' && e.success === true) { // Saved a new version; the document is modified. map._everModified = true; - - // owncloud integration - //FIXME: CSP Violation. - //if (typeof window.parent.documentsMain !== 'undefined') { - // window.parent.documentsMain.saveDocumentBack(); - // } } else if ((commandName === '.uno:Undo' || commandName === '.uno:Redo') && e.success === true && e.result.value && !isNaN(e.result.value)) { /*UNDO_CONFLICT*/ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist wsd/ClientSession.cpp
loleaflet/dist/toolbar/toolbar.js | 10 +++--- wsd/ClientSession.cpp |1 + 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 5bdc1e273f43faa892de8e9f25f6a330c9613525 Author: Ashod Nakashian Date: Sun Jun 4 23:40:18 2017 -0400 Set EverModified on saving the document When saving while editing a cell, the document is saved with the new cell contents (as the cell editing is interrupted and applied), but the modified status is not published to the client (loleaflet). This has the unfortunate side-effect that the EverModified flag is not set in this scenario. To avoid this, this patch sets the EverModified upon successful saving. This is easier than forcing LO Core to emit ModifiedStatus=true in the scenario above. Though it suffers from the false-positive result when the user forces a save. Although this is probably defensible, since technically the document changes upon saving (though not the content if there was nothing new to save). On the other hand, it's less harmful to signal modification due to save than to ignore genuine modification to the document. Change-Id: I7ccba62731f534b69819f7924eeb9231d874c111 Reviewed-on: https://gerrit.libreoffice.org/38398 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 80b6e9782421223f7abf84f4eb7e4c824804f67f) Reviewed-on: https://gerrit.libreoffice.org/38399 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index a035ba3e..060c4562 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1406,10 +1406,14 @@ map.on('commandresult', function (e) { var commandName = e.commandName; if (commandName === '.uno:Save' && e.success === true) { + // Saved a new version; the document is modified. + map._everModified = true; + // owncloud integration - if (typeof window.parent.documentsMain !== 'undefined') { - window.parent.documentsMain.saveDocumentBack(); - } + //FIXME: CSP Violation. + //if (typeof window.parent.documentsMain !== 'undefined') { + // window.parent.documentsMain.saveDocumentBack(); + // } } else if ((commandName === '.uno:Undo' || commandName === '.uno:Redo') && e.success === true && e.result.value && !isNaN(e.result.value)) { /*UNDO_CONFLICT*/ diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp index a65959b8..ed15e8c1 100644 --- a/wsd/ClientSession.cpp +++ b/wsd/ClientSession.cpp @@ -542,6 +542,7 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt // Save to Storage and log result. std::string id = getId(); docBroker->saveToStorage(id, success, result); +forwardToClient(payload); return true; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar.css| 16 loleaflet/dist/toolbar/toolbar.js | 12 +++- 2 files changed, 23 insertions(+), 5 deletions(-) New commits: commit c58496282cf8595ac07914ea991a5fa2975b6de2 Author: Ashod Nakashian Date: Thu Jun 1 00:16:53 2017 -0400 loleaflet: user avatar-specific css for the user list Change-Id: I5540c3267efcb23513d7df25427af8a8ff0d8909 Reviewed-on: https://gerrit.libreoffice.org/38304 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index 70e091ad..656c9800 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -335,3 +335,19 @@ tr.useritem > td.usercolor { left: 3px; position: relative; } + +tr.useritem-avatar:hover { +cursor: default; +background-color: rgba(67, 172, 232, 0.25); +} + +tr.useritem-avatar > td { +padding: 7px; +} + +tr.useritem-avatar > td.usercolor { +display: inline-block; +top: 0px; +left: 3px; +position: relative; +} diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index b581d48b..a035ba3e 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1551,13 +1551,15 @@ function onUseritemClicked(e) { } function getUserItem(viewId, userName, extraInfo, color) { - var html = '' + -' ' + className = 'useritem-avatar'; } - else { - html += '">'; + + var html = '' + +''; + if (extraInfo !== undefined && extraInfo.avatar !== undefined) { + html += '' } // TODO: Add mail and other links as sub-menu. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 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 82002362ba92ae9e596cc7f490e6a76b890e7dee Author: Ashod Nakashian Date: 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 (cherry picked from commit d0ac8a4b969d05d474170b2d06d601d54eb8ab26) Reviewed-on: https://gerrit.libreoffice.org/38139 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index ba7aa208..833b13d7 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1550,10 +1550,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; @@ -1602,7 +1611,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 090bafab..65575f0d 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, 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: Branch 'distro/collabora/collabora-online-2-1' - 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 43da694acab846eec14b3013da6449d5e24765bf Author: Pranav Kant Date: Wed May 31 11:51:12 2017 +0530 Handle WOPI PutFile unauthorized access token Change-Id: I29ee8cc0c9f3ea42f70628eca6f74d161d1a38f9 (cherry picked from commit d840e8720a2ba45ae981b53e5a06b4d28f847314) Reviewed-on: https://gerrit.libreoffice.org/38259 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky 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 5b15fff1..1e4870e1 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -642,6 +642,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 e05641b6..4e6e6567 100644 --- a/wsd/Storage.cpp +++ b/wsd/Storage.cpp @@ -660,6 +660,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 6613fbbc..d0dff593 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: Branch 'distro/collabora/collabora-online-2-1' - 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 460196beaeb5b3aa4e47f8b158aab3b91aeaa839 Author: Pranav Kant Date: 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 (cherry picked from commit ac8e458bda37a17e289ee2da71a59b234db5e753) Reviewed-on: https://gerrit.libreoffice.org/38258 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 42069afd..ba7aa208 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: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f576c195f6e2271ab38b3819fc3f4761e72f7e0e Author: Henry Castro Date: Tue May 23 16:35:37 2017 -0400 loleaflet: fix undo repair document popup UNDO_CONFLICT was intented to notify views, but the constant value changed with latest patch upstream Change-Id: I09062725539df3d974a47d89374d822d1d852770 Reviewed-on: https://gerrit.libreoffice.org/38110 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index ca6fea60..42069afd 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1412,7 +1412,7 @@ map.on('commandresult', function (e) { } } else if ((commandName === '.uno:Undo' || commandName === '.uno:Redo') && - e.success === true && e.result.value && e.result.value === '130') { /*UNDO_CONFLICT*/ + e.success === true && e.result.value && !isNaN(e.result.value)) { /*UNDO_CONFLICT*/ $('#tb_toolbar-up_item_repair').w2overlay({ html: '' + _('Conflict Undo/Redo with multiple users. Please use document repair to resolve') + ''}); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |1 + 1 file changed, 1 insertion(+) New commits: commit 7e864dcfe57f45fcf5bb3d424ecee1f0ba31bd66 Author: Marco Cecchetti Date: Tue May 23 15:20:34 2017 +0200 loleaflet: calc: styles are visible in fonts dropdown Change-Id: Ia909ed9f35d6a1c80f6696abeddefe2d4ad2d6a0 Reviewed-on: https://gerrit.libreoffice.org/38003 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 11ad3244..ca6fea60 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1316,6 +1316,7 @@ function updateCommandValues() { if (typeof commandValues === 'undefined') { return; } + data = []; // reset data in order to avoid that the font select box is populated with styles, too. // Old browsers like IE11 et al don't like Object.keys with // empty arguments if (typeof commandValues === 'object') { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/main.js loleaflet/src wsd/DocumentBroker.cpp wsd/Exceptions.hpp wsd/LOOLWSD.cpp wsd/Storage.
loleaflet/dist/errormessages.js |5 ++-- loleaflet/main.js |2 - loleaflet/src/core/Socket.js | 21 -- loleaflet/src/map/handler/Map.WOPI.js |6 +++-- wsd/DocumentBroker.cpp|5 +++- wsd/Exceptions.hpp| 16 +++--- wsd/LOOLWSD.cpp | 10 ++-- wsd/Storage.cpp | 38 +++--- 8 files changed, 71 insertions(+), 32 deletions(-) New commits: commit 0c609596fbab743de7a8f023c0071d870404c193 Author: Pranav Kant Date: Fri May 19 11:43:43 2017 +0530 wsd: Fail gracefully when storage misbehaves When WOPI's CheckFileInfo or GetFile responds with status code other than HTTP 200, show a message to the user indicating some problem in the storage. Currently, we open an empty document if storage doesn't return a document which surely is not correct. Mention the storage server address when asking user to contact the server administrator to be more friendly. Combination of following cherry-picks from master: (cherry picked from commit 2e9e6a753d9721dc6776362d34350380f797dab0) (cherry picked from commit bcf958c50056637d4899fc9cd38b87a15dfa57b0) (cherry picked from commit aed840ea04ce2e7ae120698f50e78268b542db12) (cherry picked from commit 1ea87b627e077590c6eefa455ce3c8f7d0564068) Change-Id: I7e2455d3c4da8be2c476460b94812174c34fe529 Reviewed-on: https://gerrit.libreoffice.org/37903 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/errormessages.js b/loleaflet/dist/errormessages.js index d1eccac1..89f31fc7 100644 --- a/loleaflet/dist/errormessages.js +++ b/loleaflet/dist/errormessages.js @@ -10,6 +10,7 @@ exports.sessionexpired = _('Your session has been expired. Further changes to do exports.faileddocloading = _('Failed to load the document. Please ensure the file type is supported and not corrupted, and try again.'); exports.storage = { - savediskfull: _('Save failed due to no disk space left on storage server. Document will now be read-only. Please contact the server administrator to continue editing.'), - savefailed: _('Document cannot be saved to storage. Check your permissions or contact the storage server administrator.') + 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.'), + savefailed: _('Document cannot be saved to storage. Check your permissions or contact the storage server (%storageserver) administrator.') }; diff --git a/loleaflet/main.js b/loleaflet/main.js index fed59570..48200cd9 100644 --- a/loleaflet/main.js +++ b/loleaflet/main.js @@ -113,7 +113,7 @@ var map = L.map('map', { wopi: isWopi, alwaysActive: alwaysActive, idleTimeoutSecs: idleTimeoutSecs, // Dim when user is idle. - outOfFocusTimeoutSecs: outOfFocusTimeoutSecs, // Dim after switching tabs. + outOfFocusTimeoutSecs: outOfFocusTimeoutSecs // Dim after switching tabs. }); // toolbar.js (loaded in
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/main.js loleaflet/src loolwsd.xml.in wsd/FileServer.cpp wsd/LOOLWSD.cpp
loleaflet/dist/loleaflet.html |2 ++ loleaflet/main.js | 18 ++ loleaflet/src/map/Map.js |6 ++ loolwsd.xml.in|5 + wsd/FileServer.cpp|4 wsd/LOOLWSD.cpp |2 ++ 6 files changed, 25 insertions(+), 12 deletions(-) New commits: commit 1134a1440dbf7114bbd32472f910b49849ff60ce Author: Ashod Nakashian Date: Thu May 11 00:02:38 2017 -0400 Configurable timeouts Timeouts to dimming the doc in the browser are now configurable from WSD and is relayed to loleflet as expected. Out of focus timeout is now 60 seconds. Change-Id: I8452e30976f6a81b0c3bb3ba5774daa244c1640c Reviewed-on: https://gerrit.libreoffice.org/37489 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index bfa9ad3e..0d587090 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -87,6 +87,8 @@ window.access_token = '%ACCESS_TOKEN%'; window.access_token_ttl = '%ACCESS_TOKEN_TTL%'; window.loleaflet_logging = '%LOLEAFLET_LOGGING%'; + window.outOfFocusTimeoutSecs = %OUT_OF_FOCUS_TIMEOUT_SECS%; + window.idleTimeoutSecs = %IDLE_TIMEOUT_SECS%; diff --git a/loleaflet/main.js b/loleaflet/main.js index 4f32fce3..7b080577 100644 --- a/loleaflet/main.js +++ b/loleaflet/main.js @@ -102,15 +102,17 @@ if (wopiSrc != '') { document.title = title; var map = L.map('map', { -server: host, -doc: docURL, -docParams: docParams, -permission: permission, -timestamp: timestamp, -documentContainer: 'document-container', -debug: debugMode, + server: host, + doc: docURL, + docParams: docParams, + permission: permission, + timestamp: timestamp, + documentContainer: 'document-container', + debug: debugMode, wopi: isWopi, - alwaysActive: alwaysActive + alwaysActive: alwaysActive, + idleTimeoutSecs: idleTimeoutSecs, // Dim when user is idle. + outOfFocusTimeoutSecs: outOfFocusTimeoutSecs, // Dim after switching tabs. }); // toolbar.js (loaded in
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 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 41942b923cde9adfea679288f8a818e9e87b825f Author: Pranav Kant Date: 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 shutting-down the wsd 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 (cherry picked from commit 1cb75cbcb8c87481bf341c5ac058a36c13529dc8) Reviewed-on: https://gerrit.libreoffice.org/37643 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index bc2d9cd0..11ad3244 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'); } @@ -451,7 +454,7 @@ $(function () { name: 'toolbar-up', items: [ {type: 'html', id: 'left'}, - {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({
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/src
loleaflet/dist/menubar.css | 16 +++- loleaflet/src/control/Control.Menubar.js | 17 +++-- 2 files changed, 22 insertions(+), 11 deletions(-) New commits: commit ba8bcf59cdd289527e59663a625906aa7c69adc7 Author: Pranav Kant Date: Wed May 3 21:18:36 2017 +0530 tdf#106447: Support checked items in menubar Bin the internal command state recorder to Menubar and use the global state recorder available in the map. Change-Id: I32e81700e38c2d544b2d874e6a30fbe58e8d43bd Reviewed-on: https://gerrit.libreoffice.org/37505 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/menubar.css b/loleaflet/dist/menubar.css index 70fdaee7..eb115d77 100644 --- a/loleaflet/dist/menubar.css +++ b/loleaflet/dist/menubar.css @@ -62,7 +62,7 @@ cursor: default; } .lo-menu a, .lo-menu a:hover, .lo-menu a:focus, .lo-menu a:active, .lo-menu a.highlighted { -padding: 5px 15px; +padding: 5px 22px; color: #000; } .lo-menu a:hover, .lo-menu a:focus, .lo-menu a:active, .lo-menu a.highlighted { @@ -226,3 +226,17 @@ top: 3px; /* This is not a menu, plain action, but we want it to appear like a menu */ } } + +/* Some more lo-menu specific customizations */ + +/* The smartmenus plugin doesn't seem to have support for icons, so implement our own pseudo-elements */ +.lo-menu-item-checked::before { +position: absolute; +content: '\2713'; +left: 5px; +top: 5px; +} + +.lo-menu-item-checked:hover::before { +color: #fff; +} diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 4cbc6b71..89048a3b 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -296,15 +296,6 @@ L.Control.Menubar = L.Control.extend({ this._menubarCont = L.DomUtil.get('main-menu'); map.on('doclayerinit', this._onDocLayerInit, this); - map.on('commandstatechanged', this._onCommandStateChanged, this); - }, - - _onCommandStateChanged: function(e) { - // Store information about enabled/disabled commands - // Used later just before showing menu to enable/disable menu items - if (e.state === 'enabled' || e.state === 'disabled') { - this.options.commandStates[e.commandName] = e.state; - } }, _onDocLayerInit: function() { @@ -382,11 +373,17 @@ L.Control.Menubar = L.Control.extend({ if (map._permission === 'edit') { if (type === 'unocommand') { // enable all depending on stored commandStates var unoCommand = $(aItem).data('uno'); - if (self.options.commandStates[unoCommand] === 'disabled') { + if (map['stateChangeHandler'].getItemValue(unoCommand) === 'disabled') { $(aItem).addClass('disabled'); } else { $(aItem).removeClass('disabled'); } + + if (map['stateChangeHandler'].getItemValue(unoCommand) === 'true') { + $(aItem).addClass('lo-menu-item-checked'); + } else { + $(aItem).removeClass('lo-menu-item-checked'); + } } else if (type === 'action') { // enable all except fullscreen on windows if (id === 'fullscreen' && (L.Browser.ie || L.Browser.edge)) { // Full screen works weirdly on IE 11 and on Edge $(aItem).addClass('disabled'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/admin/admin.html |2 loleaflet/dist/admin/adminAnalytics.html |2 loleaflet/dist/admin/adminSettings.html |2 loleaflet/dist/l10n/admin-localizations.json | 121 +++ 4 files changed, 124 insertions(+), 3 deletions(-) New commits: commit d4b62a9051ec5a994f2230763047cdc4264b1ddd Author: Pranav Kant Date: Tue May 2 19:38:04 2017 +0530 Make admin l10n work again The localization.json file contains path like 'l10n/lang.json' which means path relative the html file being accessed. This works when we access .../loleaflet.html but not so when we access .../admin/admin.html because then it tries to access .../admin/l10n/lang.json while it should look for this file one directory up. One could think to change the paths in localization.json file to something like '/loleaflet/dist/l10n/lang.json' so that same path is accessed always for loleaflet UI as well as admin, but it has repercussions that we access l10n data always using 'dist' prefix and not using git hash, so browser caching the l10n data across multiple versions. Ideal would be to split the admin localization completely from the loleaflet-ui localization. No point in fetching whole of the loleaflet localizations strings when we are only accessing the admin console. This would also solve problem mentioned previously. For now, just split the admin localization file only while still allowing admin console to fetch the same l10n files. Change-Id: I0824fb05b9b4123b58d6fd8edafb374ee7128229 (cherry picked from commit 163e04af0b6253445f91f1803f4e4a47e786eca9) Reviewed-on: https://gerrit.libreoffice.org/37161 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/dist/admin/admin.html index 0d44ea4e..ac68b753 100644 --- a/loleaflet/dist/admin/admin.html +++ b/loleaflet/dist/admin/admin.html @@ -15,7 +15,7 @@ https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js";> https://oss.maxcdn.com/respond/1.4.2/respond.min.js";>
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/loleaflet.css |3 +++ 1 file changed, 3 insertions(+) New commits: commit f9b009300cee50d62d54291909b5dbda4270861b Author: Pranav Kant Date: Thu Apr 27 11:09:55 2017 +0530 Don't eat new lines Change-Id: Idaa1af9a0bc12d9967d3807ebca95ec1ca755ae3 (cherry picked from commit 5858f4e8565728e47effbc831e4165d135df3864) Reviewed-on: https://gerrit.libreoffice.org/37015 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index dd7ddb59..fe69deff 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -162,6 +162,9 @@ body { overflow-wrap: break-word; word-wrap: break-word; + /* Don't eat new lines */ + white-space: pre-wrap; + /* Adds a hyphen where the word breaks, if supported (No Blink) */ -ms-hyphens: auto; -moz-hyphens: auto; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |6 -- loleaflet/src/layer/tile/CalcTileLayer.js | 12 2 files changed, 18 deletions(-) New commits: commit 4e7d3321d9872c849b6695e940e8b4ec864040bb Author: Pranav Kant Date: 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 (cherry picked from commit 56c49af98a14cb7098849c046c32a181f6761e11) Reviewed-on: https://gerrit.libreoffice.org/37013 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky 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: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/loleaflet.css |7 --- 1 file changed, 7 deletions(-) New commits: commit 30f7c767dacddb1ba09cada756948d4e0a0169ea Author: Pranav Kant Date: Tue Apr 25 19:30:59 2017 +0530 loleaflet: Don't allow inserting breaks anywhere overflow-break property is enough for us which still allows inserting line breaks arbitrarily anywhere but only if there is no otherwise acceptable break points in the line. Change-Id: I8ea94daba258b00caa259c97597cf1206a89fa64 (cherry picked from commit 759b0945d475ebea09f48d85e821a66badc99b8e) Reviewed-on: https://gerrit.libreoffice.org/36947 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 810a2a31..b637a217 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -157,18 +157,11 @@ body { line-height: 1.4; } -/* Taken from https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */ .loleaflet-dont-break { /* These are technically the same, but use both */ overflow-wrap: break-word; word-wrap: break-word; - -ms-word-break: break-all; - /* This is the dangerous one in WebKit, as it breaks things wherever */ - word-break: break-all; - /* Instead use this non-standard one: */ - word-break: break-word; - /* Adds a hyphen where the word breaks, if supported (No Blink) */ -ms-hyphens: auto; -moz-hyphens: auto; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/loleaflet.css |3 +++ 1 file changed, 3 insertions(+) New commits: commit 39d7d30e6095f02045d25bcc7f850087682adc08 Author: Pranav Kant Date: Tue Apr 25 14:43:57 2017 +0530 loleaflet: Don't overflow long names, align author names properly Change-Id: I0d833291fc996ecb4007bcb58b588967afa6ea58 (cherry picked from commit 2d55476b20baab5c46d153eac393cdc458e55d43) Reviewed-on: https://gerrit.libreoffice.org/36933 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 9f643e4e..810a2a31 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -227,6 +227,9 @@ body { padding-right: 10px; vertical-align: top; display: table-cell; + width: 100%; + overflow: hidden; + max-width: 110px; } .loleaflet-annotation-menu, .loleaflet-annotation-menu-redline, .loleaflet-redline-accept-button, .loleaflet-redline-reject-button { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css | 19 +++ loleaflet/src/layer/marker/Annotation.js |2 +- 2 files changed, 20 insertions(+), 1 deletion(-) New commits: commit 1e19b704934976715f5a8d5344ea19195de979d4 Author: Pranav Kant Date: Mon Apr 24 20:21:34 2017 +0530 loleaflet: Wrap both comments and redlines Change-Id: Iee0c61340cc78b93a2d3d23157bab715c3e7411e (cherry picked from commit 2b38191e3be6f9ebeff5d407b89b76fb70b3efec) Reviewed-on: https://gerrit.libreoffice.org/36922 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 274548e4..9f643e4e 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -157,6 +157,25 @@ body { line-height: 1.4; } +/* Taken from https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */ +.loleaflet-dont-break { +/* These are technically the same, but use both */ +overflow-wrap: break-word; + word-wrap: break-word; + + -ms-word-break: break-all; + /* This is the dangerous one in WebKit, as it breaks things wherever */ + word-break: break-all; + /* Instead use this non-standard one: */ + word-break: break-word; + + /* Adds a hyphen where the word breaks, if supported (No Blink) */ + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + .loleaflet-annotation-content-author { margin: 0; margin-top: 2px; diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 6f580cab..30959f20 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -182,7 +182,7 @@ L.Annotation = L.Layer.extend({ this._captionNode = L.DomUtil.create(tagDiv, 'loleaflet-annotation-caption', wrapper); this._captionText = L.DomUtil.create(tagDiv, empty, this._captionNode); } - this._contentNode = L.DomUtil.create(tagDiv, 'loleaflet-annotation-content', wrapper); + this._contentNode = L.DomUtil.create(tagDiv, 'loleaflet-annotation-content loleaflet-dont-break', wrapper); this._nodeModify = L.DomUtil.create(tagDiv, classEdit, wrapper); this._nodeModifyText = L.DomUtil.create(tagTextArea, classTextArea, this._nodeModify); this._contentText = L.DomUtil.create(tagDiv, empty, this._contentNode); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist loleaflet/src
loleaflet/dist/loleaflet.css |5 + loleaflet/src/layer/AnnotationManager.js |4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) New commits: commit 7661a518da261946d6bcc0c5227d942f6793c737 Author: Pranav Kant Date: Mon Apr 24 20:20:46 2017 +0530 loleaflet: Fix width/size of comments/redlines (cherry picked from commit ca482f006582faa30773792866155fca7c910d03) (cherry picked from commit 0c53975f180042e1c7b3cc3fd70737deefaba7a1) Change-Id: I5cd67258b251a9d522716433d5e190cd29fef078 Reviewed-on: https://gerrit.libreoffice.org/36921 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 47ed88b0..274548e4 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -149,10 +149,7 @@ body { color: #222; border: none; border-radius: 2px; -} - -.loleaflet-annotation-content-wrapper { -width: 180px; + 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: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/loleaflet.css |1 + 1 file changed, 1 insertion(+) New commits: commit a03bfc15cc5d5861598efe0b63239ceecf282174 Author: Pranav Kant Date: Mon Apr 24 19:34:57 2017 +0530 loleaflet: Increase the annotation height a bit more Change-Id: Ibd04cfe3e17354244a31177edca23467e0f8e9c8 (cherry picked from commit c88f1156b2f63ee330ad25d3b01c102378419b82) Reviewed-on: https://gerrit.libreoffice.org/36920 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index 08ad35b2..47ed88b0 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -178,6 +178,7 @@ body { resize: none; background-color: white; overflow-x: hidden; + height: 50px; width: 95%; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/loleaflet.css |1 - 1 file changed, 1 deletion(-) New commits: commit 538e2c57610b3a8c39298128da93bb6256ab634a Author: Pranav Kant Date: Mon Apr 24 19:34:19 2017 +0530 loleaflet: Enable vertical scroll on annotations Change-Id: I6ff7a29bd22f57b4d9bbdbb824619030cf5f2e43 (cherry picked from commit ecdb7e26455d105e4b936054cb333c60ca01d513) Reviewed-on: https://gerrit.libreoffice.org/36919 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css index cd7ae6a0..08ad35b2 100644 --- a/loleaflet/dist/loleaflet.css +++ b/loleaflet/dist/loleaflet.css @@ -178,7 +178,6 @@ body { resize: none; background-color: white; overflow-x: hidden; - overflow-y: hidden; width: 95%; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 5367bbb3cc2423bb84006bca72156c51a7115c69 Author: Aron Budea Date: Fri Apr 14 22:58:45 2017 +0200 Show font/highlight color on toolbar in IE 11 as well .repeat is not supported. Change-Id: I4f9d75f851f73e4cc626ca6f0a13aa1877308e70 Reviewed-on: https://gerrit.libreoffice.org/36553 Reviewed-by: Henry Castro Tested-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/36707 Reviewed-by: Aron Budea Tested-by: Aron Budea diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 63e3fd82..d2b2374f 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1115,7 +1115,7 @@ map.on('commandstatechanged', function (e) { else { color = color.toString(16); - color = '#' + '0'.repeat(6 - color.length) + color; + color = '#' + Array(7 - color.length).join('0') + color; } div = L.DomUtil.get('fontcolorindicator'); if (div) { @@ -1130,7 +1130,7 @@ map.on('commandstatechanged', function (e) { } else { color = color.toString(16); - color = '#' + '0'.repeat(6 - color.length) + color; + color = '#' + Array(7 - color.length).join('0') + color; } div = L.DomUtil.get('backcolorindicator'); if (div) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 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 ec8c13571815b19e4691aec7ea61b37a87548015 Author: Jan Holesovsky Date: 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 Reviewed-on: https://gerrit.libreoffice.org/36484 Reviewed-by: pranavk Tested-by: pranavk 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-annotati
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist wsd/FileServer.cpp
loleaflet/dist/loleaflet.html |7 --- wsd/FileServer.cpp| 15 ++- 2 files changed, 14 insertions(+), 8 deletions(-) New commits: commit 00af954041c72f00e2813f4102fe22b6f52fa946 Author: Pranav Kant Date: Wed Apr 12 19:23:35 2017 +0530 Make CSP work in older browsers This cherry-pick consists of following commits: Move CSP to response headers from meta tag in html (cherry picked from commit b7eafb1e4a8da6fced02af395581475f0332c2a7) Use CSP without WOPI host too (cherry picked from commit 699e8df9a7f99f59a5366e4f2506a69d71e8de9d) Change-Id: I7f0d7c294e492b3c69ebea6fbd820d6558b9c3b3 Reviewed-on: https://gerrit.libreoffice.org/36480 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index 8b3f794c..bfa9ad3e 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -3,13 +3,6 @@ Online Editor -
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
loleaflet/dist/images/lc_accepttrackedchanges.svg | 123 -- loleaflet/dist/images/lc_showtrackedchanges.svg | 144 -- loleaflet/dist/images/lc_trackchanges.svg | 125 --- loleaflet/dist/toolbar.css|3 loleaflet/dist/toolbar/toolbar.js |3 5 files changed, 1 insertion(+), 397 deletions(-) New commits: commit a65cf94b6580442a14479f7d6304f541d4614491 Author: Pranav Kant Date: Tue Apr 4 23:00:44 2017 +0530 Revert "Add change tracking toolbar buttons" This reverts commit 0c5efd80ad2e90772fac149398a01345ed8fd074. Change tracking options are already available in the menubar, lets bin them from the toolbar Change-Id: Ie340957eb1e615429a54be9cb0639db146e6d7a1 (cherry picked from commit f90ad6e74329367581da8c5461e25d2edc48b652) diff --git a/loleaflet/dist/images/lc_accepttrackedchanges.svg b/loleaflet/dist/images/lc_accepttrackedchanges.svg index 09d56877..a70905a5 100644 --- a/loleaflet/dist/images/lc_accepttrackedchanges.svg +++ b/loleaflet/dist/images/lc_accepttrackedchanges.svg @@ -1,122 +1 @@ - - - -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"; - width="24" - height="24" - id="svg2" - version="1.1" - inkscape:version="0.91 r13725" - viewBox="0 0 24 24" - sodipodi:docname="lc_accepttrackedchanges.svg"> - - - - - - - - - - - - - - - - - -image/svg+xml -http://purl.org/dc/dcmitype/StillImage"; /> - - - - - - - - - +http://www.w3.org/2000/svg";> \ No newline at end of file diff --git a/loleaflet/dist/images/lc_showtrackedchanges.svg b/loleaflet/dist/images/lc_showtrackedchanges.svg deleted file mode 100644 index c8e94479.. --- a/loleaflet/dist/images/lc_showtrackedchanges.svg +++ /dev/null @@ -1,144 +0,0 @@ - - - -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"; - width="24" - height="24" - id="svg2" - version="1.1" - inkscape:version="0.48.4 r9939" - viewBox="0 0 24 24" - sodipodi:docname="lc_showtrackedchanges.svg"> - - - - - - - - - - - - - - - - - -image/svg+xml -http://purl.org/dc/dcmitype/StillImage"; /> - - - - - - - - - - - - - diff --git a/loleaflet/dist/images/lc_trackchanges.svg b/loleaflet/dist/images/lc_trackchanges.svg deleted file mode 100644 index 3c7aa80e.. --- a/loleaflet/dist/images/lc_trackchanges.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - -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"; - width="24" - height="24" - id="svg2" - version="1.1" - inkscape:version="0.48.4 r9939" - viewBox="0 0 24 24" - sodipodi:docname="lc_trackchanges.svg"> - - - - - - - - - - - - - - - - -image/svg+xml -http://purl.org/dc/dcmitype/StillImage"; /> - - - - - - - - - - - diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index 220f4f94..e6cc5dc8 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -254,9 +254,6 @@ button.leaflet-control-search-next .w2ui-icon.selected{ background: url('../images/lc_ok.svg') no-repeat center !important; } .w2ui-icon.repair{ background: url('../images/lc_backward.svg') no-repeat center !important; } .w2ui-icon.specialcharacter{ background: url('../images/lc_insertsymbol.svg') no-repeat center !important; } -.w2ui-icon.trackchanges{ background: url('../images/lc_trackchanges.svg') no-repeat center !important; } -.w2ui-icon.commentchangetracking{ background: url('../images/lc_commentchangetracking.svg') no-repeat center !important; } -.w2ui-icon.showtrackedchanges{ background: url('../images/lc_showtrackedchanges.svg') no-repeat center !important; } #inserttable-wrapper { position: relative; diff --git a/loleaflet/dist/too