Calendar sidebox:

- Move today button to sidebox calendar header
- Fix bug in resources select options where resources overwrote owners
This commit is contained in:
Nathan Gray 2015-11-05 21:52:43 +00:00
parent c992e8830c
commit a2cb9064fa
4 changed files with 6 additions and 7 deletions

View File

@ -2593,9 +2593,9 @@ app.classes.calendar = AppJS.extend(
} }
} }
// Add to, not replace, current value // Add to, not replace, current value
if(typeof state[key] == 'object' && typeof app.calendar.state[key]) if(typeof state[key] == 'object' && typeof app.calendar.state[key] == 'object')
{ {
jQuery.extend(state[key],app.calendar.state[key]); jQuery.merge(state[key],app.calendar.state[key]);
} }
} }
} }
@ -2706,14 +2706,13 @@ app.classes.calendar = AppJS.extend(
// Today // Today
var today = et2_createWidget('buttononly', {image: 'calendar/today', label: 'Today', id: 'today'},date); var today = et2_createWidget('buttononly', {image: 'calendar/today', label: 'Today', id: 'today'},date);
today.set_image('calendar/today'); today.set_image('calendar/today');
today.set_label(egw.lang('Today'));
var today_button = $j(today.getDOMNode()); var today_button = $j(today.getDOMNode());
today_button today_button
.prependTo(date.getDOMNode()) .prependTo(date.getDOMNode())
.addClass('et2_clickable')
.on('click', function() { .on('click', function() {
var inst = $j.datepicker._getInst(datepicker[0]); app.calendar.update_state({date: new Date().toJSON()});
inst.drawMonth = new Date().getUTCMonth();
inst.drawYear = new Date().getFullYear();
jQuery.datepicker._updateDatepicker(inst);
}); });
var position_today = function() { var position_today = function() {
var week_col = $j('#calendar-sidebox_date th.ui-datepicker-week-col'); var week_col = $j('#calendar-sidebox_date th.ui-datepicker-week-col');

View File

@ -26,7 +26,7 @@ Egroupware
</columns> </columns>
<rows><row width="100%"> <rows><row width="100%">
<buttononly align="center" class="sideboxstar" id="add" onclick="egw.open(null,'calendar','add');" image="new" label="Add"/> <buttononly align="center" class="sideboxstar" id="add" onclick="egw.open(null,'calendar','add');" image="new" label="Add"/>
<buttononly align="center" class="sideboxstar" id="day" image="today" label="Day view" onclick="app.calendar.update_state({view:'day'});"/> <buttononly align="center" class="sideboxstar" id="day" image="day" label="Day view" onclick="app.calendar.update_state({view:'day'});"/>
<buttononly align="center" class="sideboxstar" id="week" image="week" label="Weekview" onclick="app.calendar.update_state({view:'week'});"/> <buttononly align="center" class="sideboxstar" id="week" image="week" label="Weekview" onclick="app.calendar.update_state({view:'week'});"/>
<buttononly align="center" class="sideboxstar" id="weekN" image="multiweek" label="Multiple week view" onclick="app.calendar.update_state({view:'weekN'});"/> <buttononly align="center" class="sideboxstar" id="weekN" image="multiweek" label="Multiple week view" onclick="app.calendar.update_state({view:'weekN'});"/>
<buttononly align="center" class="sideboxstar" id="month" image="month" label="Month view" onclick="app.calendar.update_state({view:'month'});"/> <buttononly align="center" class="sideboxstar" id="month" image="month" label="Month view" onclick="app.calendar.update_state({view:'month'});"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB