diff --git a/calendar/js/app.js b/calendar/js/app.js index 62706fa94d..a7ee90c029 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -3217,21 +3217,15 @@ app.classes.calendar = AppJS.extend( percent *= font_ratio; $j('#calendar-sidebox_date .ui-datepicker-inline') .css('font-size',(percent*100)+'%'); - // Position today - var buttons = $j('#calendar-sidebox_date .ui-datepicker-header a'); - if(today.length) - { - // Why doesn't this work properly? - go_button.position({my: 'center left', at: 'center right',of: buttons[0]}); - - go_button.css('left', buttons.first().position().left + buttons.first().width()); - var max_width = buttons.last().position().left - (go_button.position().left + go_button.width()); + // Position go and today + var buttons = $j('#calendar-sidebox_date .ui-datepicker-header a span'); + if(today.length && go_button.length) + { + go_button.position({my: 'left+15px center', at: 'right center-1',of: $j('#calendar-sidebox_date .ui-datepicker-year')}); today.css({ - 'left': go_button.position().left + go_button.outerWidth(), - 'top': go_button.css('top'), - 'max-width': max_width, - 'right': buttons.last().outerWidth(true) + 'left': (buttons.first().offset().left + buttons.last().offset().left)/2 - Math.ceil(today.outerWidth(true)/2), + 'top': go_button.css('top') }); } }).trigger('resize'); diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index b9894f86d5..7a63cfb977 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -39,47 +39,39 @@ #calendar-sidebox_date_header > button { width: 45%; } + +#calendar-sidebox_header_go, #calendar-sidebox_header_today { position: absolute; - height: 1.8em; - z-index: 1; - text-indent: 125%; - overflow: hidden; - text-overflow: ellipsis; - border: none; - right: 2em; - margin: 1px; - margin-top: -5px; - - background-position: center center; - background-size: contain; - background-color: transparent; - background-image: url(images/today.png); - background-repeat: no-repeat; -} -#calendar-sidebox_header_go { - position: absolute; - width: 13px; - height: 13px; - top: 0.5em; - right: 4.7em; + width: 12.0px; + height: 12.0px; + top: 28px; z-index: 1; overflow: hidden; - margin: 0px; + margin: 0.5em; font-size: 10px; line-height: 50%; - text-indent: -1px; color: white; background-color: #d8e7f3; border:none; border-radius: 100%; } -#calendar-sidebox_header_go:hover { - background-color: #0c5da5; +#calendar-sidebox_header_today { + right: 35px; +} +#calendar-sidebox_header_go { + right: 80px; + text-indent: -1px; +} +#calendar-sidebox_header_go:hover, #calendar-sidebox_header_today:hover { + background-color: #0c5da5; + box-shadow: none; +} +#calendar-sidebox_date .ui-datepicker-header a { + top: 3px; } - #calendar-sidebox_date .ui-datepicker-prev { - right: 5em; + right: 3em; } #calendar-sidebox_weekend { /* Special css styling goes here */ diff --git a/calendar/templates/default/sidebox.xet b/calendar/templates/default/sidebox.xet index 417836ccfe..5d08895ebb 100644 --- a/calendar/templates/default/sidebox.xet +++ b/calendar/templates/default/sidebox.xet @@ -15,7 +15,7 @@ Egroupware