mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Toolbar changes:
- Change Add button icon from new to + - Add Today button to toolbar
This commit is contained in:
parent
01471c3d61
commit
0ae7ba40ce
@ -274,7 +274,7 @@ class calendar_uiviews extends calendar_ui
|
||||
$actions = array(
|
||||
'add' => array(
|
||||
'caption' => 'Add',
|
||||
'icon' => 'new',
|
||||
'icon' => 'add',
|
||||
'group' => ++$group,
|
||||
'onExecute' => 'javaScript:app.calendar.toolbar_action',
|
||||
'hint' => 'Add',
|
||||
@ -380,6 +380,14 @@ class calendar_uiviews extends calendar_ui
|
||||
'hint' => 'Previous',
|
||||
'toolbarDefault' => true,
|
||||
),
|
||||
'today' => array(
|
||||
'caption' => 'Today',
|
||||
'icon' => 'today',
|
||||
'group' => $group,
|
||||
'onExecute' => 'javaScript:app.calendar.toolbar_action',
|
||||
'hint' => 'Today',
|
||||
'toolbarDefault' => true,
|
||||
),
|
||||
'next' => array(
|
||||
'caption' => 'Next',
|
||||
'icon' => 'next',
|
||||
|
@ -413,6 +413,13 @@ app.classes.calendar = AppJS.extend(
|
||||
case 'weekend':
|
||||
this.update_state({weekend: action.checked});
|
||||
break;
|
||||
case 'today':
|
||||
var tempDate = new Date();
|
||||
var today = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate(),0,-tempDate.getTimezoneOffset(),0);
|
||||
var change = {date: today.toJSON()};
|
||||
if(app.calendar.state.view == 'planner') { change.planner_days = Math.ceil((new Date(app.calendar.state.last) - new Date(app.calendar.state.first)) / (24*3600000));}
|
||||
app.calendar.update_state(change);
|
||||
break;
|
||||
case 'next':
|
||||
case 'previous':
|
||||
var delta = action.id == 'previous' ? -1 : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user