|
|
@ -1243,10 +1243,6 @@ function rcube_elastic_ui()
|
|
|
|
|
|
|
|
|
|
|
|
env.got_smart_toolbar = true;
|
|
|
|
env.got_smart_toolbar = true;
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: if the toolbar contains "global or list only" buttons
|
|
|
|
|
|
|
|
// another popup menu with these options should be created
|
|
|
|
|
|
|
|
// on the list (or sidebar if there's no list element).
|
|
|
|
|
|
|
|
// TODO: spacer item
|
|
|
|
|
|
|
|
// TODO: a way to inject buttons to the menu from content iframe
|
|
|
|
// TODO: a way to inject buttons to the menu from content iframe
|
|
|
|
// or automatically add all buttons except Save and Cancel
|
|
|
|
// or automatically add all buttons except Save and Cancel
|
|
|
|
// (example QR Code button in contact frame)
|
|
|
|
// (example QR Code button in contact frame)
|
|
|
@ -1258,12 +1254,20 @@ function rcube_elastic_ui()
|
|
|
|
var toolbar = $(this);
|
|
|
|
var toolbar = $(this);
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.children().each(function() {
|
|
|
|
toolbar.children().each(function() {
|
|
|
|
var button = $(this).detach();
|
|
|
|
var item = $('<li role="menuitem">'),
|
|
|
|
|
|
|
|
button = $(this).detach();
|
|
|
|
|
|
|
|
|
|
|
|
// Remove empty text nodes that break alignment of text of the menu item
|
|
|
|
// Remove empty text nodes that break alignment of text of the menu item
|
|
|
|
button.contents().filter(function() { if (this.nodeType == 3 && !$.trim(this.nodeValue).length) $(this).remove(); });
|
|
|
|
button.contents().filter(function() { if (this.nodeType == 3 && !$.trim(this.nodeValue).length) $(this).remove(); });
|
|
|
|
|
|
|
|
|
|
|
|
items.push($('<li role="menuitem">').append(button));
|
|
|
|
if (button.is('.spacer')) {
|
|
|
|
|
|
|
|
item.addClass('spacer');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
item.append(button);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
items.push(item);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.remove();
|
|
|
|
toolbar.remove();
|
|
|
|