loleaflet/dist/toolbar/toolbar.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 56cb689a6457a5e3b9f8b7c60155b9d114584f77 Author: Pranav Kant <[email protected]> Date: Fri Dec 16 20:15:40 2016 +0530 Handle enabled/disabled, true/false toolbar button states If we get a true/false, assume its enabled. Change-Id: I364c7cd611481757b674877ed44ac6ee0f6b0e58 Reviewed-on: https://gerrit.libreoffice.org/32089 Reviewed-by: pranavk <[email protected]> Tested-by: pranavk <[email protected]> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index bbbe2e2..77c24db 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1000,10 +1000,12 @@ map.on('commandstatechanged', function (e) { var id = commandName.toLowerCase().substr(5); if (typeof formatButtons[id] !== 'undefined') { if (state === 'true') { + toolbar.enable(id); toolbar.check(id); toolbarUpMore.check(id); } else if (state === 'false') { + toolbar.enable(id); toolbar.uncheck(id); toolbarUpMore.uncheck(id); } @@ -1027,6 +1029,7 @@ map.on('commandstatechanged', function (e) { toolbar.enable(id); toolbarUpMore.enable(id); } else { + toolbar.uncheck(id); toolbar.disable(id); toolbarUpMore.disable(id); } commit 98036fd90935663263ad4a1be25c7c57e930825b Author: Pranav Kant <[email protected]> Date: Fri Dec 16 18:44:40 2016 +0530 loleaflet: Don't move items to 'toolbar-more' after resizebreak Change-Id: I9660e84f68cde2ab5eed6871d4f3948a736575b9 Reviewed-on: https://gerrit.libreoffice.org/32088 Reviewed-by: pranavk <[email protected]> Tested-by: pranavk <[email protected]> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 89a7ecf..bbbe2e2 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -27,6 +27,9 @@ function resizeToolbar() { // move items from toolbar-up -> toolbar-up-more while ($('#toolbar-up')[0].scrollWidth > Math.max($(window).width(), parseInt($('body').css('min-width')))) { var itemId = toolbarUp.items[toolbarUp.items.length - 4].id; + if (itemId === 'resizebreak') { + return; + } item = toolbarUp.get(itemId); toolbarUp.remove(itemId); toolbarUpMore.insert(toolbarUpMore.items[0], item); @@ -362,7 +365,7 @@ $(function () { {type: 'html', id: 'styles', html: '<select class="styles-select"></select>'}, {type: 'html', id: 'fonts', html: '<select class="fonts-select"></select>'}, {type: 'html', id: 'fontsizes', html: '<select class="fontsizes-select"></select>'}, - {type: 'break'}, + {type: 'break', id: 'resizebreak'}, {type: 'button', id: 'bold', img: 'bold', hint: _('Bold'), uno: 'Bold'}, {type: 'button', id: 'italic', img: 'italic', hint: _('Italic'), uno: 'Italic'}, {type: 'button', id: 'underline', img: 'underline', hint: _('Underline'), uno: 'Underline'}, _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
