Code cleanup + indentation fixes

This commit is contained in:
Thomas Bruederli 2015-03-26 14:57:16 +01:00
parent 42ffd55a62
commit b26c2a0830
4 changed files with 23 additions and 25 deletions

View file

@ -60,13 +60,13 @@ libkolab_audittrail.object_history_dialog = function(p)
closeOnEscape: true, closeOnEscape: true,
title: p.title, title: p.title,
open: function() { open: function() {
$dialog.attr('aria-hidden', 'false'); $dialog.attr('aria-hidden', 'false');
setTimeout(function(){ setTimeout(function(){
$dialog.parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().focus(); $dialog.parent().find('.ui-dialog-buttonpane .ui-button').first().focus();
}, 5); }, 5);
}, },
close: function() { close: function() {
$dialog.dialog('destroy').attr('aria-hidden', 'true').hide(); $dialog.dialog('destroy').attr('aria-hidden', 'true').hide();
}, },
buttons: buttons, buttons: buttons,
minWidth: 450, minWidth: 450,

View file

@ -891,23 +891,23 @@ class tasklist_kolab_driver extends tasklist_driver
*/ */
private function _resolve_task_identity($prop) private function _resolve_task_identity($prop)
{ {
$mailbox = $msguid = null; $mailbox = $msguid = null;
$this->_parse_id($prop); $this->_parse_id($prop);
$uid = $prop['uid']; $uid = $prop['uid'];
$list_id = $prop['list']; $list_id = $prop['list'];
if ($folder = $this->get_folder($list_id)) { if ($folder = $this->get_folder($list_id)) {
$mailbox = $folder->get_mailbox_id(); $mailbox = $folder->get_mailbox_id();
// get task object from storage in order to get the real object uid an msguid // get task object from storage in order to get the real object uid an msguid
if ($rec = $folder->get_object($uid)) { if ($rec = $folder->get_object($uid)) {
$msguid = $rec['_msguid']; $msguid = $rec['_msguid'];
$uid = $rec['uid']; $uid = $rec['uid'];
} }
} }
return array($uid, $mailbox, $msguid); return array($uid, $mailbox, $msguid);
} }

View file

@ -51,8 +51,6 @@ $labels['assignedto'] = 'Assigned to';
$labels['created'] = 'Created'; $labels['created'] = 'Created';
$labels['changed'] = 'Last Modified'; $labels['changed'] = 'Last Modified';
$labels['taskoptions'] = 'Options'; $labels['taskoptions'] = 'Options';
$labels['taskhistory'] = 'History';
$labels['compare'] = 'Compare';
$labels['all'] = 'All'; $labels['all'] = 'All';
$labels['flagged'] = 'Flagged'; $labels['flagged'] = 'Flagged';
@ -155,16 +153,15 @@ $labels['itipcancelmailbody'] = "*\$title*\n\nDue: \$date\n\nAssignees: \$attend
$labels['saveintasklist'] = 'save in '; $labels['saveintasklist'] = 'save in ';
// history dialog // history dialog
$labels['taskhistory'] = 'History';
$labels['objectchangelog'] = 'Change History'; $labels['objectchangelog'] = 'Change History';
$labels['objectdiff'] = 'Changes from $rev1 to $rev2'; $labels['objectdiff'] = 'Changes from $rev1 to $rev2';
$labels['actionappend'] = 'Saved'; $labels['actionappend'] = 'Saved';
$labels['actionmove'] = 'Moved'; $labels['actionmove'] = 'Moved';
$labels['actiondelete'] = 'Deleted'; $labels['actiondelete'] = 'Deleted';
$labels['compare'] = 'Compare'; $labels['compare'] = 'Compare';
$labels['showrevision'] = 'Show this version'; $labels['showrevision'] = 'Show this version';
$labels['restore'] = 'Restore this version'; $labels['restore'] = 'Restore this version';
$labels['objectnotfound'] = 'Failed to load task data'; $labels['objectnotfound'] = 'Failed to load task data';
$labels['objectchangelognotavailable'] = 'Change history is not available for this task'; $labels['objectchangelognotavailable'] = 'Change history is not available for this task';
$labels['objectdiffnotavailable'] = 'No comparison possible for the selected revisions'; $labels['objectdiffnotavailable'] = 'No comparison possible for the selected revisions';

View file

@ -393,9 +393,10 @@ class tasklist extends rcube_plugin
$dtformat = $this->rc->config->get('date_format') . ' ' . $this->rc->config->get('time_format'); $dtformat = $this->rc->config->get('date_format') . ' ' . $this->rc->config->get('time_format');
array_walk($data, function(&$change) use ($lib, $dtformat) { array_walk($data, function(&$change) use ($lib, $dtformat) {
if ($change['date']) { if ($change['date']) {
$dt = $lib->adjust_timezone($change['date']); $dt = $lib->adjust_timezone($change['date']);
if ($dt instanceof DateTime) if ($dt instanceof DateTime) {
$change['date'] = $this->rc->format_date($dt, $dtformat, false); $change['date'] = $this->rc->format_date($dt, $dtformat, false);
}
} }
}); });
$this->rc->output->command('plugin.task_render_changelog', $data); $this->rc->output->command('plugin.task_render_changelog', $data);