Commit b26c2a08 authored by Thomas Bruederli's avatar Thomas Bruederli

Code cleanup + indentation fixes

parent 42ffd55a
......@@ -60,13 +60,13 @@ libkolab_audittrail.object_history_dialog = function(p)
closeOnEscape: true,
title: p.title,
open: function() {
$dialog.attr('aria-hidden', 'false');
setTimeout(function(){
$dialog.parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().focus();
}, 5);
$dialog.attr('aria-hidden', 'false');
setTimeout(function(){
$dialog.parent().find('.ui-dialog-buttonpane .ui-button').first().focus();
}, 5);
},
close: function() {
$dialog.dialog('destroy').attr('aria-hidden', 'true').hide();
$dialog.dialog('destroy').attr('aria-hidden', 'true').hide();
},
buttons: buttons,
minWidth: 450,
......
......@@ -891,23 +891,23 @@ class tasklist_kolab_driver extends tasklist_driver
*/
private function _resolve_task_identity($prop)
{
$mailbox = $msguid = null;
$mailbox = $msguid = null;
$this->_parse_id($prop);
$uid = $prop['uid'];
$list_id = $prop['list'];
$this->_parse_id($prop);
$uid = $prop['uid'];
$list_id = $prop['list'];
if ($folder = $this->get_folder($list_id)) {
$mailbox = $folder->get_mailbox_id();
if ($folder = $this->get_folder($list_id)) {
$mailbox = $folder->get_mailbox_id();
// get task object from storage in order to get the real object uid an msguid
if ($rec = $folder->get_object($uid)) {
$msguid = $rec['_msguid'];
$uid = $rec['uid'];
}
}
// get task object from storage in order to get the real object uid an msguid
if ($rec = $folder->get_object($uid)) {
$msguid = $rec['_msguid'];
$uid = $rec['uid'];
}
}
return array($uid, $mailbox, $msguid);
return array($uid, $mailbox, $msguid);
}
......
......@@ -51,8 +51,6 @@ $labels['assignedto'] = 'Assigned to';
$labels['created'] = 'Created';
$labels['changed'] = 'Last Modified';
$labels['taskoptions'] = 'Options';
$labels['taskhistory'] = 'History';
$labels['compare'] = 'Compare';
$labels['all'] = 'All';
$labels['flagged'] = 'Flagged';
......@@ -155,16 +153,15 @@ $labels['itipcancelmailbody'] = "*\$title*\n\nDue: \$date\n\nAssignees: \$attend
$labels['saveintasklist'] = 'save in ';
// history dialog
$labels['taskhistory'] = 'History';
$labels['objectchangelog'] = 'Change History';
$labels['objectdiff'] = 'Changes from $rev1 to $rev2';
$labels['actionappend'] = 'Saved';
$labels['actionmove'] = 'Moved';
$labels['actiondelete'] = 'Deleted';
$labels['compare'] = 'Compare';
$labels['showrevision'] = 'Show this version';
$labels['restore'] = 'Restore this version';
$labels['objectnotfound'] = 'Failed to load task data';
$labels['objectchangelognotavailable'] = 'Change history is not available for this task';
$labels['objectdiffnotavailable'] = 'No comparison possible for the selected revisions';
......
......@@ -393,9 +393,10 @@ class tasklist extends rcube_plugin
$dtformat = $this->rc->config->get('date_format') . ' ' . $this->rc->config->get('time_format');
array_walk($data, function(&$change) use ($lib, $dtformat) {
if ($change['date']) {
$dt = $lib->adjust_timezone($change['date']);
if ($dt instanceof DateTime)
$change['date'] = $this->rc->format_date($dt, $dtformat, false);
$dt = $lib->adjust_timezone($change['date']);
if ($dt instanceof DateTime) {
$change['date'] = $this->rc->format_date($dt, $dtformat, false);
}
}
});
$this->rc->output->command('plugin.task_render_changelog', $data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment