mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
- Fix day view user header
- Fix toolbar add button
This commit is contained in:
parent
ec8c22c93b
commit
d1739fd873
@ -622,14 +622,22 @@ class calendar_ui
|
||||
$sel_options = array();
|
||||
|
||||
// Add external owners that a select account widget will not find
|
||||
$linked_owners = array();
|
||||
foreach($owners as $owner)
|
||||
{
|
||||
if(!is_numeric(substr($owner, 0,1)))
|
||||
if(!is_numeric($owner))
|
||||
{
|
||||
$resource = $this->bo->resources[substr($owner, 0,1)];
|
||||
$sel_options['owner'][] = array('value' => $owner, 'label' => egw_link::title($resource['app'], substr($owner,1)));
|
||||
$label = egw_link::title($resource['app'], substr($owner,1));
|
||||
$linked_owners[$resource['app']][substr($owner,1)] = $label;
|
||||
$sel_options['owner'][] = array('value' => $owner, 'label' => $label);
|
||||
}
|
||||
}
|
||||
if($linked_owners)
|
||||
{
|
||||
// Send them to link registry too
|
||||
egw_json_response::get()->call('egw.link_title_callback',$linked_owners);
|
||||
}
|
||||
|
||||
$readonlys = array();
|
||||
$sel_options['status_filter'] = array(
|
||||
|
@ -276,7 +276,7 @@ class calendar_uiviews extends calendar_ui
|
||||
'caption' => 'Add',
|
||||
'icon' => 'add',
|
||||
'group' => ++$group,
|
||||
'onExecute' => 'javaScript:egw.open(null,"calendar","add");',
|
||||
'onExecute' => 'javaScript:app.calendar.toolbar_action',
|
||||
'hint' => 'Add',
|
||||
'toolbarDefault' => true,
|
||||
),
|
||||
|
@ -411,7 +411,6 @@ app.classes.calendar = AppJS.extend(
|
||||
*/
|
||||
toolbar_action: function toolbar_action(action)
|
||||
{
|
||||
debugger;
|
||||
// Most can just provide state change data
|
||||
if(action.data && action.data.state)
|
||||
{
|
||||
@ -420,6 +419,8 @@ app.classes.calendar = AppJS.extend(
|
||||
// Special handling
|
||||
switch(action.id)
|
||||
{
|
||||
case 'add':
|
||||
return egw.open(null,"calendar","add");
|
||||
case 'weekend':
|
||||
this.update_state({weekend: action.checked});
|
||||
break;
|
||||
|
@ -344,6 +344,7 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||
set_label: function(label) {
|
||||
this.options.label = label;
|
||||
this.title.text(label);
|
||||
this.title.toggleClass('et2_clickable et2_link',label === '');
|
||||
},
|
||||
set_left: function(left) {
|
||||
// Maybe?
|
||||
|
@ -232,16 +232,16 @@ var et2_calendar_view = et2_valueWidget.extend(
|
||||
break;
|
||||
case 'r':
|
||||
application = 'resources';
|
||||
this.owner.set_value(_owner.substr(1));
|
||||
break;
|
||||
}
|
||||
// This might not have a value right away
|
||||
user = egw.link_title(application,user.match(/\d+/)[0]);
|
||||
// send an empty function or it won't ask the server
|
||||
user = egw.link_title(application,user.match(/\d+/)[0], function() {}, this);
|
||||
}
|
||||
else // users
|
||||
{
|
||||
user = parseInt(user)
|
||||
var accounts = egw.accounts();
|
||||
var accounts = egw.accounts('both');
|
||||
for(var j = 0; j < accounts.length; j++)
|
||||
{
|
||||
if(accounts[j].value === user)
|
||||
|
Loading…
Reference in New Issue
Block a user