loleaflet: icons for expandable entries
Change-Id: I1698b540226e8342a59300b640c7113e48f6f1b3
This commit is contained in:
parent
1455f45cc3
commit
e7f79f4f1c
4 changed files with 19 additions and 6 deletions
|
@ -1065,6 +1065,7 @@ tr.useritem > td > img {
|
|||
.menu-entry-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
|
|
1
loleaflet/images/lc_charfontname.svg
Normal file
1
loleaflet/images/lc_charfontname.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m10.048828 2-7.048828 20h2.9863281c.3203884 0 .5871891-.090762.8007813-.271484.2233009-.190763.3735019-.396304.4511718-.617188l1.2089844-3.916016h7.1210934l1.222657 3.931641c.097088.251004.247289.462129.451172.632813.203883.160642.4766.240234.816406.240234h2.941406l-7.048828-20zm1.9375 3.6445312c.126214.4919681.250739.9494071.376953 1.3710938.126214.4116466.24873.7727394.365235 1.0839844l1.964843 6.3242186h-5.3867184l1.9648434-6.3085936c.106797-.311245.223396-.6779227.34961-1.0996094.126213-.4216867.248729-.8791258.365234-1.3710938z" fill="#696969"/></svg>
|
After Width: | Height: | Size: 632 B |
1
loleaflet/images/lc_fontheight.svg
Normal file
1
loleaflet/images/lc_fontheight.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><text fill="#696969" font-family="sans-serif" font-size="23.924654" letter-spacing="0" transform="scale(.96960275 1.0313502)" word-spacing="0" x="2.015973" y="21.331261"><tspan fill="#696969" font-family="Carlito" font-weight="bold" x="2.015973" y="21.331261">A</tspan></text><g fill="none" stroke="#4d82b8" stroke-linecap="round" stroke-linejoin="round"><g transform="matrix(0 1 -1 0 24 -4.007121)"><path d="m8.507121 1.494946-2.9999998 2.9949499 2.9999998 3.0050501"/><path d="m5.5071212 4.4898959h7.9999998"/></g><g transform="matrix(0 -1 -1 0 24 28)"><path d="m8.507121 1.494946-2.9999998 2.9949499 2.9999998 3.0050501"/><path d="m5.5071212 4.4898959h7.9928788"/></g></g></svg>
|
After Width: | Height: | Size: 742 B |
|
@ -141,9 +141,17 @@ L.Control.JSDialogBuilder = L.Control.extend({
|
|||
return null;
|
||||
},
|
||||
|
||||
_explorableEntry: function(parentContainer, title, contentNode, builder) {
|
||||
_explorableEntry: function(parentContainer, title, contentNode, builder, iconPath) {
|
||||
var sectionTitle = L.DomUtil.create('div', 'ui-header level-' + builder._currentDepth + ' mobile-wizard ui-widget', parentContainer);
|
||||
sectionTitle.innerHTML = title;
|
||||
if (iconPath) {
|
||||
var div = L.DomUtil.create('div', '', sectionTitle);
|
||||
var icon = L.DomUtil.create('img', 'menu-entry-icon', div);
|
||||
icon.src = iconPath;
|
||||
var titleSpan = L.DomUtil.create('span', 'menu-entry-with-icon', div);
|
||||
titleSpan.innerHTML = title;
|
||||
} else {
|
||||
sectionTitle.innerHTML = title;
|
||||
}
|
||||
|
||||
$(sectionTitle).css('justify-content', 'space-between');
|
||||
|
||||
|
@ -399,7 +407,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
|
|||
return false;
|
||||
},
|
||||
|
||||
_comboboxControl: function(parentContainer, data, builder) {
|
||||
_comboboxControl: function(parentContainer, data, builder, iconPath) {
|
||||
// TODO: event listener in the next level...
|
||||
|
||||
if (!data.entries || data.entries.length == 0)
|
||||
|
@ -418,7 +426,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
|
|||
|
||||
var contentNode = {type: 'container', children: entries};
|
||||
|
||||
builder._explorableEntry(parentContainer, title, contentNode, builder);
|
||||
builder._explorableEntry(parentContainer, title, contentNode, builder, iconPath);
|
||||
|
||||
return false;
|
||||
},
|
||||
|
@ -575,13 +583,15 @@ L.Control.JSDialogBuilder = L.Control.extend({
|
|||
},
|
||||
|
||||
_fontNameControl: function(parentContainer, data, builder) {
|
||||
var iconPath = 'images/lc_charfontname.svg';
|
||||
data.entries = [ 'Liberation Sans' ];
|
||||
builder._comboboxControl(parentContainer, data, builder);
|
||||
builder._comboboxControl(parentContainer, data, builder, iconPath);
|
||||
},
|
||||
|
||||
_fontHeightControl: function(parentContainer, data, builder) {
|
||||
var iconPath = 'images/lc_fontheight.svg';
|
||||
data.entries = [ '8', '10', '11', '12', '14', '16', '24', '32', '48' ];
|
||||
builder._comboboxControl(parentContainer, data, builder);
|
||||
builder._comboboxControl(parentContainer, data, builder, iconPath);
|
||||
},
|
||||
|
||||
build: function(parent, data) {
|
||||
|
|
Loading…
Reference in a new issue