loleaflet/dist/toolbar/toolbar.js | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
New commits: commit 65bfc63ace567501912e4b6399ff8f81cc62516e Author: Henry Castro <hcas...@collabora.com> Date: Wed Dec 21 19:50:04 2016 -0400 tdf#103775: Font color/Highlighting button issue diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 6d77909..3ef80bd 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -423,6 +423,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); @@ -431,6 +453,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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits