mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-20 12:58:46 +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(
|
$actions = array(
|
||||||
'add' => array(
|
'add' => array(
|
||||||
'caption' => 'Add',
|
'caption' => 'Add',
|
||||||
'icon' => 'new',
|
'icon' => 'add',
|
||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'onExecute' => 'javaScript:app.calendar.toolbar_action',
|
'onExecute' => 'javaScript:app.calendar.toolbar_action',
|
||||||
'hint' => 'Add',
|
'hint' => 'Add',
|
||||||
@ -380,6 +380,14 @@ class calendar_uiviews extends calendar_ui
|
|||||||
'hint' => 'Previous',
|
'hint' => 'Previous',
|
||||||
'toolbarDefault' => true,
|
'toolbarDefault' => true,
|
||||||
),
|
),
|
||||||
|
'today' => array(
|
||||||
|
'caption' => 'Today',
|
||||||
|
'icon' => 'today',
|
||||||
|
'group' => $group,
|
||||||
|
'onExecute' => 'javaScript:app.calendar.toolbar_action',
|
||||||
|
'hint' => 'Today',
|
||||||
|
'toolbarDefault' => true,
|
||||||
|
),
|
||||||
'next' => array(
|
'next' => array(
|
||||||
'caption' => 'Next',
|
'caption' => 'Next',
|
||||||
'icon' => 'next',
|
'icon' => 'next',
|
||||||
|
@ -413,6 +413,13 @@ app.classes.calendar = AppJS.extend(
|
|||||||
case 'weekend':
|
case 'weekend':
|
||||||
this.update_state({weekend: action.checked});
|
this.update_state({weekend: action.checked});
|
||||||
break;
|
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 'next':
|
||||||
case 'previous':
|
case 'previous':
|
||||||
var delta = action.id == 'previous' ? -1 : 1;
|
var delta = action.id == 'previous' ? -1 : 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user