moved initializing fontcombobox with select2 to Toolbar.js

This way both notebookbar and classic toolbar will have the select2
styling

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I9b8294cb1c0308fcfeeed8f9e886e3075c2eb3a1
pull/2890/head
Mert Tumer 2021-07-15 10:05:40 +03:00 committed by Mert Tümer
parent c3f6d9fbd4
commit 1e015b3d07
2 changed files with 5 additions and 3 deletions

View File

@ -137,9 +137,6 @@ L.Control.TopToolbar = L.Control.extend({
edata.isCancelled = true;
} else {
$.extend(edata, { onComplete: function (e) {
$('#fonts-select').select2({
placeholder: _('Font')
});
e.item.html = undefined;
}});
}

View File

@ -40,6 +40,11 @@ L.Map.include({
var that = this;
var fontcombobox = $(nodeSelector);
if (!fontcombobox.hasClass('select2')) {
fontcombobox.select2({
placeholder: _('Font')
});
}
var createSelector = function() {
var commandValues = that.getToolbarCommandValues('.uno:CharFontName');