[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - 2 commits - loleaflet/dist loleaflet/src
Henry Castro
hcastro at collabora.com
Mon Mar 27 01:22:57 UTC 2017
loleaflet/dist/toolbar/toolbar.js | 44 ++++++++++++++++++++++++++++++++++++++
loleaflet/src/control/Toolbar.js | 9 +++++++
2 files changed, 53 insertions(+)
New commits:
commit 2371a82381ef1e6ab6826dd81e26afc5f39e8b0d
Author: Henry Castro <hcastro at collabora.com>
Date: Thu Dec 22 13:41:26 2016 -0400
tdf#103779: Help menu accessibility
(cherry picked from commit 1bede62b132e61fa847aaf066447c2670d14dbab)
Change-Id: Ib2b7dc3222c064d7a3f3d90d2182daf970b5e6a5
Reviewed-on: https://gerrit.libreoffice.org/35480
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 2e87ff65..f95b7b7b 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -212,6 +212,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() {
@@ -220,6 +222,9 @@ L.Map.include({
$('.vex-content').click(function(e) {
e.stopPropagation();
});
+ },
+ beforeClose: function () {
+ map.focus();
}
});
});
@@ -242,6 +247,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() {
@@ -250,6 +256,9 @@ L.Map.include({
$('.vex-content').click(function(e) {
e.stopPropagation();
});
+ },
+ beforeClose: function () {
+ map.enable(true);
}
});
}
commit c29369231cdda89e008881690f20cdb2940b0908
Author: Henry Castro <hcastro at collabora.com>
Date: Wed Dec 21 19:50:04 2016 -0400
tdf#103775: Font color/Highlighting button issue
(cherry picked from commit 65bfc63ace567501912e4b6399ff8f81cc62516e)
Change-Id: Ie52972574cc07ac5826da261aab6671e9fd0272c
Reviewed-on: https://gerrit.libreoffice.org/35479
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 819404f5..cc1c0786 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -408,6 +408,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);
@@ -416,6 +438,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);
More information about the Libreoffice-commits
mailing list