Copyright 2001-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Michael Slusarz (slusarz@horde.org)
Esempio n. 1
0
 /**
  */
 public function runTasks(array $opts = array())
 {
     if (!isset($opts['url'])) {
         $opts['url'] = Horde::selfUrl(true, true, true);
     }
     if ($this->_app != 'horde' && $GLOBALS['session']->get('horde', 'logintasks') !== true) {
         $GLOBALS['injector']->getInstance('Horde_Core_Factory_LoginTasks')->create('horde')->runTasks($opts);
     }
     parent::runTasks($opts);
 }
Esempio n. 2
0
$prefGroups['share'] = array('column' => _("Task List and Share Preferences"), 'label' => _("Default Task List"), 'desc' => _("Choose your default task list."), 'members' => array('default_tasklist'));
$prefGroups['sync'] = array('column' => _("Task List and Share Preferences"), 'label' => _("Synchronization Preferences"), 'desc' => _("Choose the task lists to use for synchronization with external devices."), 'members' => array('sync_lists', 'activesync_no_multiplex'));
$prefGroups['notification'] = array('column' => _("Task List and Share Preferences"), 'label' => _("Notifications"), 'desc' => _("Choose if you want to be notified of task changes and task alarms."), 'members' => array('task_notification', 'task_notification_exclude_self', 'task_alarms_select'));
$prefGroups['external'] = array('column' => _("Task List and Share Preferences"), 'label' => _("External Data"), 'desc' => _("Show data from other applications or sources."), 'members' => array('show_external'));
// columns in the list view
$_prefs['tasklist_columns'] = array('value' => 'a:2:{i:0;s:8:"priority";i:1;s:3:"due";}', 'type' => 'multienum', 'enum' => array('tasklist' => _("Task List"), 'priority' => _("Priority"), 'assignee' => _("Assignee"), 'due' => _("Due Date"), 'start' => _("Start Date"), 'estimate' => _("Estimated Time")), 'desc' => _("Select the columns that should be shown in the list view:"));
// user preferred sorting column
$_prefs['sortby'] = array('value' => Nag::SORT_PRIORITY, 'type' => 'enum', 'enum' => array(Nag::SORT_PRIORITY => _("Priority"), Nag::SORT_NAME => _("Task Name"), Nag::SORT_DUE => _("Due Date"), Nag::SORT_START => _("Start Date"), Nag::SORT_COMPLETION => _("Completed?"), Nag::SORT_ESTIMATE => _("Estimated Time"), Nag::SORT_ASSIGNEE => _("Assignee"), Nag::SORT_OWNER => _("Task List")), 'desc' => _("Sort tasks by:"));
// alternate sort column
$_prefs['altsortby'] = array('value' => Nag::SORT_DUE, 'type' => 'enum', 'enum' => array(Nag::SORT_PRIORITY => _("Priority"), Nag::SORT_NAME => _("Task Name"), Nag::SORT_DUE => _("Due Date"), Nag::SORT_START => _("Start Date"), Nag::SORT_COMPLETION => _("Completed?"), Nag::SORT_ESTIMATE => _("Estimated Time"), Nag::SORT_ASSIGNEE => _("Assignee"), Nag::SORT_OWNER => _("Task List")), 'desc' => _("Then:"));
// user preferred sorting direction
$_prefs['sortdir'] = array('value' => Nag::SORT_ASCEND, 'type' => 'enum', 'enum' => array(Nag::SORT_ASCEND => _("Ascending"), Nag::SORT_DESCEND => _("Descending")), 'desc' => _("Sort direction:"));
// preference for delete confirmation dialog.
$_prefs['delete_opt'] = array('value' => 1, 'type' => 'checkbox', 'desc' => _("Do you want to confirm deleting entries?"));
// how often to purge completed tasks?
$_prefs['purge_completed_interval'] = array('value' => 0, 'type' => 'enum', 'enum' => array_merge(array(0 => _("Never")), Horde_LoginTasks::getLabels()), 'desc' => _("Purge completed tasks how often:"));
$_prefs['purge_completed_keep'] = array('value' => 30, 'type' => 'number', 'desc' => _("Purge completed tasks older than this amount of days."));
// default to tasks having a due date?
$_prefs['default_due'] = array('value' => 0, 'type' => 'checkbox', 'desc' => _("When creating a new task, should it default to having a due date?"));
// default number of days out for due dates
$_prefs['default_due_days'] = array('value' => 1, 'type' => 'number', 'zero' => true, 'desc' => _("When creating a new task, how many days in the future should the default due date be (0 means today)?"));
// default due time
$_prefs['default_due_time'] = array('value' => 'now', 'type' => 'enum', 'enum' => array(), 'desc' => _("What do you want to be the default due time for tasks?"), 'on_init' => function ($ui) {
    $enum = array('now' => _("The current hour"));
    $twentyfour = $GLOBALS['prefs']->getValue('twentyFour');
    for ($i = 0; $i < 24; ++$i) {
        $value = sprintf('%02d:00', $i);
        $enum[$value] = $twentyfour ? $value : sprintf('%02d:00 ' . ($i >= 12 ? _("pm") : _("am")), $i % 12 ? $i % 12 : 12);
    }
    $ui->prefs['default_due_time']['enum'] = $enum;
});
Esempio n. 3
0
// Refer to turba/config/sources.php for possible source and field values
//
// If you want to provide a default value, this field depends on the
// search_sources preference. For example:
//   'value' => json_encode(array(
//       'source_one' => array('field_one', 'field_two'),
//       'source_two' => array('field_three')
//   ))
// will search the fields 'field_one' and 'field_two' in source_one and
// 'field_three' in source_two.
$_prefs['search_fields'] = array('value' => '');
$_prefs['fb_url'] = array('value' => '<strong>' . _("My Free/Busy URL") . '</strong><div class="fburl"><div>' . _("Copy this URL for use wherever you need your Free/Busy URL:") . '</div><div class="fixed">' . Horde::url('fb.php', true, array('append_session' => -1))->add('u', $GLOBALS['registry']->getAuth()) . '</div></div>', 'type' => 'rawhtml');
// Calendars to include in generating Free/Busy URLs.
$_prefs['fb_cals'] = array('value' => 'a:0:{}', 'type' => 'multienum', 'enum' => array(), 'desc' => _("Choose the calendars to include in the above Free/Busy URL:"), 'on_init' => function ($ui) {
    $enum = array();
    foreach (Kronolith::listCalendars() as $fb_cal => $cal) {
        if ($cal->display()) {
            $enum[htmlspecialchars($fb_cal)] = htmlspecialchars($cal->name());
        }
    }
    $ui->prefs['fb_cals']['enum'] = $enum;
}, 'on_change' => function () {
    $GLOBALS['injector']->getInstance('Horde_Cache')->expire('kronolith.fb.u.' . $GLOBALS['registry']->getAuth());
});
// Login Tasks preferences
$_prefs['purge_events'] = array('value' => 0, 'type' => 'checkbox', 'desc' => _("Purge old events from your calendar?"));
$_prefs['purge_events_interval'] = array('value' => Horde_LoginTasks::MONTHLY, 'type' => 'enum', 'enum' => Horde_LoginTasks::getLabels(), 'desc' => _("Purge old events how often:"));
$_prefs['purge_events_keep'] = array('value' => 365, 'type' => 'number', 'desc' => _("Purge old events older than this amount of days."));
// End Login Tasks preferences
$_prefs['activesync_identity'] = array('value' => 'horde', 'type' => 'enum', 'enum' => array_merge($GLOBALS['injector']->getInstance('Horde_Core_Factory_Identity')->create($GLOBALS['registry']->getAuth())->getAll('id'), array('horde' => _("Use Horde Default"))), 'desc' => _("Choose the identity to use for ActiveSync. This determines the email address used as the ORGANIZER for events you create."));
$_prefs['itip_silent'] = array('value' => 0, 'type' => 'checkbox', 'desc' => _("If checked, NEVER SEND any iTip messages. This means invitees will NOT receive meeting requests and organizers will NOT receive any messages when an existing meeting is altered."));
Esempio n. 4
0
$prefGroups['spamreport'] = array('column' => _("Message"), 'label' => _("Spam Reporting"), 'desc' => _("Configure spam reporting."), 'members' => array('spamselect', 'delete_spam_after_report', 'move_innocent_after_report', 'purge_spam_interval', 'purge_spam_keep'));
// spam mailbox selection widget.
$_prefs['spamselect'] = array('type' => 'special', 'handler' => 'IMP_Prefs_Special_Spam', 'requires_nolock' => array('spam_folder'));
// spam mailbox
$_prefs['spam_folder'] = array('value' => 'Spam');
$_prefs['delete_spam_after_report'] = array('value' => 0, 'type' => 'enum', 'enum' => array(), 'desc' => _("What to do with messages after they have been reported as spam?"), 'help' => 'prefs-delete_spam_after_report', 'on_init' => function ($ui) {
    $enum = array(0 => _("Nothing"), 1 => _("Delete message"));
    if ($GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS)) {
        $enum[2] = _("Move to Spam mailbox");
    }
    $ui->prefs['delete_spam_after_report']['enum'] = $enum;
});
$_prefs['move_innocent_after_report'] = array('value' => 0, 'type' => 'enum', 'enum' => array(0 => _("Nothing"), 1 => _("Move to Inbox")), 'desc' => _("What to do with messages after they have been reported as innocent?"), 'help' => 'prefs-move_innocent_after_report', 'suppress' => function () {
    return !$GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS);
});
$_prefs['purge_spam_interval'] = array('value' => 0, 'type' => 'enum', 'enum' => array_merge(array(0 => _("Never")), Horde_LoginTasks::getLabels()), 'desc' => _("Purge Spam mailbox how often:"), 'help' => 'prefs-purge_spam_interval', 'suppress' => function () {
    return !$GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS);
});
$_prefs['purge_spam_keep'] = array('value' => 30, 'type' => 'number', 'desc' => _("Purge messages in Spam mailbox older than this amount of days."), 'help' => 'prefs-purge_spam_keep', 'requires' => array('purge_spam_interval'), 'suppress' => function () {
    return !$GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS);
});
// *** New Mail Notification Preferences ***
$prefGroups['newmail'] = array('column' => _("Message"), 'label' => _("New Mail"), 'desc' => _("Control when new mail will be checked for, and whether or not to notify you when it arrives."), 'members' => array('refresh_time', 'nav_poll_all', 'newmail_notify', 'newmail_soundselect'));
$_prefs['refresh_time'] = array('value' => 0, 'type' => 'enum', 'enum' => array(0 => _("Never"), 30 => _("Every 30 seconds"), 60 => _("Every minute"), 300 => _("Every 5 minutes"), 900 => _("Every 15 minutes"), 1800 => _("Every half hour")), 'desc' => _("New mail poll interval on mailbox page:"));
$_prefs['newmail_notify'] = array('value' => 0, 'type' => 'checkbox', 'desc' => _("Display notification when new mail arrives?"));
// Sound to play on new mail notification
$_prefs['newmail_audio'] = array('value' => '');
// sound selection widget
$_prefs['newmail_soundselect'] = array('type' => 'special', 'handler' => 'IMP_Prefs_Special_NewmailSound', 'requires' => array('newmail_notify'), 'requires_nolock' => array('newmail_audio'));
// *** IMAP Flag Preferences ***
$prefGroups['flags'] = array('column' => _("Message"), 'label' => _("Flags"), 'desc' => _("Configure flag highlighting."), 'members' => array('flagmanagement', 'show_all_flags'), 'suppress' => function () {