loleaflet/dist/toolbar/toolbar.js | 52 ++++++++++++++++++++++++++++++++++++++ loleaflet/main.js | 5 +++ loleaflet/src/control/Toolbar.js | 9 ++++++ 3 files changed, 66 insertions(+)
New commits: commit 02247243163b56478137d7b114bef4d014ea6a1b Author: Henry Castro <[email protected]> Date: Wed Dec 28 13:44:49 2016 -0400 tdf#103642 Page refresh causes unwanted error message (cherry picked from commit 9c64db3ad1d60c4de659d779a4fba17a298ed648) Signed-off-by: Andras Timar <[email protected]> diff --git a/loleaflet/main.js b/loleaflet/main.js index bd9dd1d..27ca498 100644 --- a/loleaflet/main.js +++ b/loleaflet/main.js @@ -114,4 +114,9 @@ map.addControl(L.control.rowHeader()); map.addControl(L.control.contextMenu()); map.addControl(L.control.menubar()); +window.addEventListener('beforeunload', function () { + if (global.map && global.map._socket) { + global.map._socket.close(); + } +}); //require('./dist/toolbar/toolbar'); commit 6ca3ec8d6ccec19bf7519d24e989245ae7f160e7 Author: Henry Castro <[email protected]> Date: Thu Dec 22 13:41:26 2016 -0400 tdf#103779: Help menu accessibility (cherry picked from commit 1bede62b132e61fa847aaf066447c2670d14dbab) Signed-off-by: Andras Timar <[email protected]> diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index 8ad990a..466d698 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -215,6 +215,8 @@ L.Map.include({ translatableContent[i].firstChild.nodeValue = translatableContent[i].firstChild.nodeValue.toLocaleString(); } + $('.vex-content').attr('tabindex', -1); + $('.vex-content').focus(); // workaround for https://github.com/HubSpot/vex/issues/43 $('.vex-overlay').css({ 'pointer-events': 'none'}); $('.vex').click(function() { @@ -223,6 +225,9 @@ L.Map.include({ $('.vex-content').click(function(e) { e.stopPropagation(); }); + }, + beforeClose: function () { + map.focus(); } }); }); @@ -245,6 +250,7 @@ L.Map.include({ contentCSS: { width: w + 'px'}, buttons: {}, afterOpen: function($vexContent) { + map.enable(false); // workaround for https://github.com/HubSpot/vex/issues/43 $('.vex-overlay').css({ 'pointer-events': 'none'}); $('.vex').click(function() { @@ -253,6 +259,9 @@ L.Map.include({ $('.vex-content').click(function(e) { e.stopPropagation(); }); + }, + beforeClose: function () { + map.enable(true); } }); } commit 1e12ab5607615ceef1408861771836a838452323 Author: Henry Castro <[email protected]> Date: Wed Dec 21 19:50:04 2016 -0400 tdf#103775: Font color/Highlighting button issue (cherry picked from commit 65bfc63ace567501912e4b6399ff8f81cc62516e) Signed-off-by: Andras Timar <[email protected]> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index b864ee9..2d4160d 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -407,6 +407,28 @@ $(function () { if (!L.DomUtil.get('fontcolorindicator')) { var fontColorIndicator = L.DomUtil.create('div', 'font-color-indicator', L.DomUtil.get('tb_toolbar-up_item_fontcolor')); fontColorIndicator.id = 'fontcolorindicator'; + L.DomEvent.on(fontColorIndicator, 'mouseover', function () { + var button = fontColorIndicator.parentNode.firstChild; + $(button).addClass('over'); + }); + L.DomEvent.on(fontColorIndicator, 'mouseout', function () { + var button = fontColorIndicator.parentNode.firstChild; + $(button).removeClass('over'); + }); + L.DomEvent.on(fontColorIndicator, 'mousedown', function () { + var button = fontColorIndicator.parentNode.firstChild; + $(button).addClass('down'); + }); + L.DomEvent.on(fontColorIndicator, 'mouseup', function () { + var button = fontColorIndicator.parentNode.firstChild; + $(button).removeClass('down'); + }); + fontColorIndicator.addEventListener('click', function () { + var toolbar = w2ui['toolbar-up']; + if (toolbar) { + toolbar.click('fontcolor', window.event); + } + }, false); $('#fontColorPicker').colorpicker({showOn:'none', hideButton:true}); $('#fontColorPicker').on('change.color', onColorPick); @@ -415,6 +437,28 @@ $(function () { if (!L.DomUtil.get('backcolorindicator')) { var backColorIndicator = L.DomUtil.create('div', 'back-color-indicator', L.DomUtil.get('tb_toolbar-up_item_backcolor')); backColorIndicator.id = 'backcolorindicator'; + L.DomEvent.on(backColorIndicator, 'mouseover', function () { + var button = backColorIndicator.parentNode.firstChild; + $(button).addClass('over'); + }); + L.DomEvent.on(backColorIndicator, 'mouseout', function () { + var button = backColorIndicator.parentNode.firstChild; + $(button).removeClass('over'); + }); + L.DomEvent.on(backColorIndicator, 'mousedown', function () { + var button = backColorIndicator.parentNode.firstChild; + $(button).addClass('down'); + }); + L.DomEvent.on(backColorIndicator, 'mouseup', function () { + var button = backColorIndicator.parentNode.firstChild; + $(button).removeClass('down'); + }); + backColorIndicator.addEventListener('click', function () { + var toolbar = w2ui['toolbar-up']; + if (toolbar) { + toolbar.click('backcolor', window.event); + } + }, false); $('#backColorPicker').colorpicker({showOn:'none', hideButton:true}); $('#backColorPicker').on('change.color', onColorPick); commit cb8d9835e104f54b21617274be83493cf0c36715 Author: Henry Castro <[email protected]> Date: Tue Dec 20 14:41:37 2016 -0400 tdf#103776: Hide/Deactivate "Document repair" button (cherry picked from commit 9450f3938c16a35a7d261c31d830781782697797) Signed-off-by: Andras Timar <[email protected]> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index d00dbb7..b864ee9 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1067,6 +1067,14 @@ map.on('commandstatechanged', function (e) { } } } + + if (id === 'undo' || id === 'redo') { + if (toolbar.get('undo').disabled && toolbar.get('redo').disabled) { + toolbar.disable('repair'); + } else { + toolbar.enable('repair'); + } + } }); map.on('search', function (e) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
