forked from extern/egroupware
Move today button between prev & next buttons
This commit is contained in:
parent
1804a84062
commit
52dd6cd644
@ -3177,7 +3177,19 @@ app.classes.calendar = AppJS.extend(
|
||||
$j(window).on('resize.calendar'+date.dom_id, function() {
|
||||
var percent = 1+(($j(date_widget.getDOMNode()).width() - preferred_width) / preferred_width);
|
||||
percent *= font_ratio;
|
||||
$j('#calendar-sidebox_date .ui-datepicker-inline').css('font-size',(percent*100)+'%');
|
||||
$j('#calendar-sidebox_date .ui-datepicker-inline,#calendar-sidebox_header_today')
|
||||
.css('font-size',(percent*100)+'%');
|
||||
// Position today
|
||||
var buttons = $j('#calendar-sidebox_date .ui-datepicker-header a');
|
||||
var left = Infinity;
|
||||
var total = 0;
|
||||
buttons.each(function() {
|
||||
total += $j(this).position().left;
|
||||
});
|
||||
// Why doesn't this work properly?
|
||||
var today = $j('#calendar-sidebox_header_today')
|
||||
.position({my: 'center left', at: 'center right',of: buttons});
|
||||
today.css('left',(total/buttons.length)/*+(today.width()/2)*/)
|
||||
}).trigger('resize');
|
||||
|
||||
}
|
||||
|
@ -36,6 +36,19 @@
|
||||
#calendar-sidebox_date_header > button {
|
||||
width: 45%;
|
||||
}
|
||||
#calendar-sidebox_header_today {
|
||||
position: absolute;
|
||||
width: 2.4em;
|
||||
height: 1.8em;
|
||||
z-index: 1;
|
||||
text-indent: 3em;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
background-size: contain;
|
||||
background-color: transparent;
|
||||
background-image: url(images/today.png);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
#calendar-sidebox_weekend {
|
||||
/* Special css styling goes here */
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ Egroupware
|
||||
<template id="calendar.sidebox">
|
||||
<vbox parent_node="calendar-et2_target">
|
||||
<textbox id="keywords" class="et2_fullWidth" blur="Search" onchange="app.calendar.update_state({view: 'listview',keywords: widget.getValue()});return false;"/>
|
||||
<buttononly id="header_today" label="Today" onclick="
|
||||
<buttononly id="header_today" label="Today" icon="today" statustext="Today" onclick="
|
||||
var tempDate = new Date();
|
||||
var today = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate(),0,-tempDate.getTimezoneOffset(),0);
|
||||
var change = {date: today.toJSON()};
|
||||
|
@ -1322,6 +1322,9 @@ div#calendar-container div.calendar table tbody tr.rowhilite td {
|
||||
#calendar-sidebox_date .ui-widget-content .ui-state-hover {
|
||||
background-color: rgba(103, 159, 210, 0.2);
|
||||
}
|
||||
#calendar-sidebox_header_today {
|
||||
background-image: url(images/today.png);
|
||||
}
|
||||
#calendar_cat_id,
|
||||
#calendar_filter,
|
||||
#uical_select_owner,
|
||||
|
@ -1358,6 +1358,9 @@ div#calendar-container {
|
||||
background-color: @color_hover_row;
|
||||
}
|
||||
}
|
||||
#calendar-sidebox_header_today {
|
||||
background-image: url(images/today.png);
|
||||
}
|
||||
// Select Fields in Sidemenu
|
||||
#calendar_cat_id,
|
||||
#calendar_filter,
|
||||
|
Loading…
Reference in New Issue
Block a user