summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-26 13:57:16 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-26 13:57:16 (GMT)
commitb26c2a083045437e23cc7200390a03a7908a8a99 (patch)
tree055d889f6f57bd9fecf0614f6ed04ab2aafa47cc
parent42ffd55a628fb58019b9a6168ae46bcc6ba0cfa7 (diff)
downloadroundcubemail-plugins-kolab-b26c2a083045437e23cc7200390a03a7908a8a99.tar.gz
Code cleanup + indentation fixes
-rw-r--r--plugins/libkolab/js/audittrail.js10
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php26
-rw-r--r--plugins/tasklist/localization/en_US.inc5
-rw-r--r--plugins/tasklist/tasklist.php7
4 files changed, 23 insertions, 25 deletions
diff --git a/plugins/libkolab/js/audittrail.js b/plugins/libkolab/js/audittrail.js
index 0fe7bcb..56e0df2 100644
--- a/plugins/libkolab/js/audittrail.js
+++ b/plugins/libkolab/js/audittrail.js
@@ -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,
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index 9000d8f..359e242 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -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);
}
diff --git a/plugins/tasklist/localization/en_US.inc b/plugins/tasklist/localization/en_US.inc
index 8dc2929..0bf8894 100644
--- a/plugins/tasklist/localization/en_US.inc
+++ b/plugins/tasklist/localization/en_US.inc
@@ -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';
diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php
index 869a192..c83d763 100644
--- a/plugins/tasklist/tasklist.php
+++ b/plugins/tasklist/tasklist.php
@@ -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);