Improvements in autocomplete and googiespell menus

pull/5742/merge
Aleksander Machniak 7 years ago
parent 28526a73f1
commit 52e96f8d1b

@ -112,7 +112,6 @@
@color-checkbox-focus: darken(@color-checkbox, 30%); @color-checkbox-focus: darken(@color-checkbox, 30%);
@color-checkbox-checked-focus: darken(@color-checkbox-checked, 30%); @color-checkbox-checked-focus: darken(@color-checkbox-checked, 30%);
@color-blockquote-background: #f6f6f6; @color-blockquote-background: #f6f6f6;
@color-blockquote-0: blue; @color-blockquote-0: blue;
@color-blockquote-1: green; @color-blockquote-1: green;
@ -121,6 +120,8 @@
@color-blockquote-1-border: green; @color-blockquote-1-border: green;
@color-blockquote-2-border: #b00; @color-blockquote-2-border: #b00;
@color-spellcheck-link: #b91414;
// Datepicker // Datepicker
@color-datepicker-border: @color-layout-border; @color-datepicker-border: @color-layout-border;

@ -257,7 +257,7 @@ html.iframe body {
@media screen and (max-width: @screen-width-xs) { @media screen and (max-width: @screen-width-xs) {
body > #layout > div.menu { body > #layout > div.menu {
position: absolute; position: absolute;
z-index: 100; z-index: 30001; /* because autocompletion popup uses z-index:30000 */
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;

@ -151,7 +151,6 @@ a:hover {
@import "widgets/lists"; @import "widgets/lists";
@import "widgets/forms"; @import "widgets/forms";
@import "widgets/mail"; @import "widgets/mail";
@import "widgets/googiespell";

@ -32,6 +32,8 @@
.popover { .popover {
box-shadow: 3px 3px 5px @color-popover-shadow; box-shadow: 3px 3px 5px @color-popover-shadow;
overflow: hidden;
padding: 0;
& > h3 { & > h3 {
/* On mobile don't display popup arrows and titles */ /* On mobile don't display popup arrows and titles */
@ -67,6 +69,11 @@ html.layout-phone {
font-size: @layout-touch-header-font-size; font-size: @layout-touch-header-font-size;
color: @color-popover-header; color: @color-popover-header;
background-color: @color-popover-header-background; background-color: @color-popover-header-background;
a {
display: inline-block;
width: 100%;
}
} }
.popover-body > * { .popover-body > * {
@ -91,6 +98,12 @@ html.layout-phone {
bottom: 0; bottom: 0;
width: 100%; width: 100%;
} }
#rcmKSearchpane {
bottom: auto;
box-shadow: none;
border: 1px solid @color-input-border;
}
} }
html.touch .popover { html.touch .popover {

@ -451,10 +451,62 @@ html.touch input.icon-checkbox + label {
} }
} }
& > .googie_edit_layer,
& > .mce-tinymce, & > .mce-tinymce,
& > textarea { & > textarea {
margin-top: 2.55rem; margin-top: 2.55rem;
font-family: monospace; font-family: monospace;
width: 100%; width: 100% !important;
}
}
/*** GoogieSpell widget ***/
.googie_window {
width: 16rem;
}
.googie_edit_layer {
font-family: monospace;
/* from Bootstrap's textarea */
padding: .5rem .75rem;
border: 1px solid @color-input-border;
border-radius: .3rem;
line-height: 1.25;
}
.googie_link {
color: @color-spellcheck-link;
text-decoration: underline;
cursor: pointer;
}
.googie_list {
td {
min-width: 8rem;
width: auto;
&.googie_list_onhover {
color: @color-toolbarmenu-hover;
background-color: @color-toolbarmenu-hover-background;
}
.googie_list_revert:before {
&:extend(.font-icon-class);
content: @fa-var-plus-square;
}
.googie_add_to_dict:before {
&:extend(.font-icon-class);
content: @fa-var-plus-square;
}
}
input {
display: inline-block;
margin: .5rem .5rem .5rem 0 !important;
padding: .5rem .75rem !important;
} }
} }

@ -1,68 +0,0 @@
/**
* Roundcube webmail styles for the Elastic skin
*
* Copyright (c) 2017, The Roundcube Dev Team
*
* The contents are subject to the Creative Commons Attribution-ShareAlike
* License. It is allowed to copy, distribute, transmit and to adapt the work
* by keeping credits to the original authors in the README.md file.
* See http://creativecommons.org/licenses/by-sa/3.0/ for details.
*/
/*** GoogieSpell widget ***/
/* TODO: review and use only what we need */
.googie_window {
width: 185px;
margin: 0;
padding: 0;
}
.googie_edit_layer {
padding: 4px;
font-family: monospace;
border: 0;
}
.googie_edit_layer span {
font-family: monospace;
}
.googie_link {
color: #b91414;
text-decoration: underline;
cursor: pointer;
font-size: 9pt;
font-family: monospace;
}
.googie_list {
width: 100%;
margin: 0;
padding: 0;
border-spacing: 0;
}
.googie_list td {
min-width: 80px;
width: auto;
}
.googie_list td.googie_list_selected {
}
.googie_list_close {
}
.googie_list_onhover .googie_list_close {
}
.googie_list_revert {
}
.googie_list_revert:hover {
}
.googie_ok_button {
}

@ -185,6 +185,7 @@ html.touch {
& > i:before { & > i:before {
&:extend(.font-icon-class); &:extend(.font-icon-class);
content: @fa-var-user; content: @fa-var-user;
margin-left: .5rem;
} }
&.group > i:before { &.group > i:before {
content: @fa-var-group; content: @fa-var-group;
@ -238,6 +239,13 @@ html.touch {
} }
} }
.popupmenu .listing {
li.selected {
color: @color-toolbarmenu-hover;
background-color: @color-toolbarmenu-hover-background;
}
}
ul.treelist li { ul.treelist li {
div.treetoggle { div.treetoggle {
position: absolute; position: absolute;

@ -302,6 +302,7 @@
} }
} }
.toolbarmenu li { .toolbarmenu li {
&.separator { &.separator {
/* TODO: all separator properties */ /* TODO: all separator properties */
@ -315,7 +316,6 @@
margin: 0; /* Unsets Bootstrap label margin, bug? */ margin: 0; /* Unsets Bootstrap label margin, bug? */
} }
} }
a { a {
opacity: .5; opacity: .5;

@ -735,9 +735,40 @@ function rcube_elastic_ui()
function rcmail_popup_init(o) function rcmail_popup_init(o)
{ {
// Add some common styling to the autocomplete/googiespell popups // Add some common styling to the autocomplete/googiespell popups
$('table,ul', o.obj).addClass('listing iconized'); $('table,ul', o.obj).addClass('toolbarmenu listing iconized');
$(o.obj).addClass('popupmenu'); $(o.obj).addClass('popupmenu popover');
bootstrap_style(o.obj); bootstrap_style(o.obj);
// for googiespell list
$('input', o.obj).addClass('form-control');
// Modify the googiespell menu on mobile
if (is_mobile() && $(o.obj).is('.googie_window')) {
// Set popup Close title
var title = rcmail.gettext('close'),
class_name = 'button icon cancel',
close_link = $('<a>').attr('class', class_name).text(title)
.click(function(e) {
e.stopPropagation();
$('.popover-overlay').remove();
$(o.obj).hide();
});
$('<h3 class="popover-header">').append(close_link).prependTo(o.obj);
// add overlay element for phone layout
if (!$('.popover-overlay').length) {
$('<div>').attr('class', 'popover-overlay')
.appendTo('body')
.click(function() { $(this).remove(); });
}
$('table,button', o.obj).click(function(e) {
if (!$(e.target).is('input')) {
$('.popover-overlay').remove();
}
});
}
}; };
/** /**

Loading…
Cancel
Save