From b1b708408b9eb3610be8fed86cf2d32eb45a4476 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 4 Oct 2017 19:34:20 +0200 Subject: [PATCH] Improve calendar widget style --- skins/elastic/styles/widgets/jqueryui.less | 5 +++++ skins/elastic/ui.js | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/skins/elastic/styles/widgets/jqueryui.less b/skins/elastic/styles/widgets/jqueryui.less index e77a79db9..22919ae89 100644 --- a/skins/elastic/styles/widgets/jqueryui.less +++ b/skins/elastic/styles/widgets/jqueryui.less @@ -136,6 +136,7 @@ .ui-datepicker { border: 1px solid @color-datepicker-border; + box-shadow: 3px 3px 5px @color-popover-shadow; border-radius: .3rem; padding: 0; overflow: hidden; @@ -153,6 +154,10 @@ a { height: 4rem; } + + select { + display: inline-block; + } } .ui-icon { background-image: none !important; diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index 2fd382ce7..ab9fc7ccb 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -554,9 +554,14 @@ function rcube_elastic_ui() $('a', this).addClass('btn btn-primary'); }); + // Style calendar widget (we use setTimeout() because there's no widget event we could bind to) + $('input.datepicker').focus(function() { + setTimeout(function() { bootstrap_style($('.ui-datepicker')); }, 5); + }); + // Make logon form prettier - if (rcmail.env.task == 'login') { - $('#login-form table tr', context).each(function() { + if (rcmail.env.task == 'login' && context == document) { + $('#login-form table tr').each(function() { var input = $('input,select', this), label = $('label', this), icon = $('').attr('class', 'input-group-addon icon ' + input.attr('name').replace('_', ''));