diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index dee2165e22..0941b8b32b 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -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( diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index b93dcc9e95..505e4a6133 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -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, ), diff --git a/calendar/js/app.js b/calendar/js/app.js index 5538490a3d..055fc516a5 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -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; diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 3c151e7720..0a2f886d09 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -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? diff --git a/calendar/js/et2_widget_view.js b/calendar/js/et2_widget_view.js index f5202bbb01..cae483c8b2 100644 --- a/calendar/js/et2_widget_view.js +++ b/calendar/js/et2_widget_view.js @@ -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)