From a2cb9064fa212674d28da763a45ff92748964380 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 5 Nov 2015 21:52:43 +0000 Subject: [PATCH] Calendar sidebox: - Move today button to sidebox calendar header - Fix bug in resources select options where resources overwrote owners --- calendar/js/app.js | 11 +++++------ calendar/templates/default/sidebox.xet | 2 +- calendar/templates/pixelegg/images/day.png | Bin 0 -> 2104 bytes calendar/templates/pixelegg/images/today.png | Bin 2104 -> 1890 bytes 4 files changed, 6 insertions(+), 7 deletions(-) create mode 100755 calendar/templates/pixelegg/images/day.png diff --git a/calendar/js/app.js b/calendar/js/app.js index 24e9ee0911..4d851e4cf6 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -2593,9 +2593,9 @@ app.classes.calendar = AppJS.extend( } } // 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 var today = et2_createWidget('buttononly', {image: 'calendar/today', label: 'Today', id: 'today'},date); today.set_image('calendar/today'); + today.set_label(egw.lang('Today')); var today_button = $j(today.getDOMNode()); today_button .prependTo(date.getDOMNode()) + .addClass('et2_clickable') .on('click', function() { - var inst = $j.datepicker._getInst(datepicker[0]); - inst.drawMonth = new Date().getUTCMonth(); - inst.drawYear = new Date().getFullYear(); - jQuery.datepicker._updateDatepicker(inst); + app.calendar.update_state({date: new Date().toJSON()}); }); var position_today = function() { var week_col = $j('#calendar-sidebox_date th.ui-datepicker-week-col'); diff --git a/calendar/templates/default/sidebox.xet b/calendar/templates/default/sidebox.xet index a51da44b42..827544bbd5 100644 --- a/calendar/templates/default/sidebox.xet +++ b/calendar/templates/default/sidebox.xet @@ -26,7 +26,7 @@ Egroupware - + diff --git a/calendar/templates/pixelegg/images/day.png b/calendar/templates/pixelegg/images/day.png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