IMP_Ajax_Application_Handler_Dynamic
extends Horde_Core_Ajax_Application_Handler
in package
Defines AJAX actions used exclusively in the IMP dynamic view.
Tags
Table of Contents
Properties
- $_readOnly : array<string|int, mixed>
- The list of actions that require readonly access to the session.
Methods
- addAttachmentCkeditor() : Horde_Core_Ajax_Response_Raw
- AJAX action: Add an attachment to a compose message (from the ckeditor plugin).
- addContact() : bool
- AJAX action: Add contact.
- addressHeader() : object
- AJAX action: Return a list of address objects used to build an address header for a message.
- autocompleteSearch() : object
- AJAX Action: Do an autocomplete search.
- blacklist() : bool
- AJAX action: Blacklist/whitelist addresses from messages.
- createFlag() : object
- AJAX action: Create an IMAP flag.
- createMailbox() : bool
- AJAX action: Create a mailbox.
- createMailboxPrepare() : object
- AJAX action: Check access rights for creation of a submailbox.
- deleteAttach() : array<string|int, mixed>
- AJAX action: Delete an attachment from compose data.
- deleteMailbox() : bool
- AJAX action: Delete a mailbox.
- deleteMailboxPrepare() : object
- AJAX action: Check access rights for deletion/rename of mailbox.
- dynamicInit() : bool
- AJAX action: Initialize dynamic view.
- emptyMailbox() : bool
- AJAX action: Empty a mailbox.
- emptyMailboxPrepare() : object
- AJAX action: Check access rights for a mailbox, and provide number of messages to be emptied.
- flagAll() : bool
- AJAX action: Flag all messages in a mailbox.
- flagMessages() : bool
- AJAX action: Flag messages.
- getContactsImage() : object
- AJAX action: Return the contacts images for a given e-mail address.
- html2Text() : object
- AJAX action: Convert HTML to text (compose data).
- importMailbox() : object
- AJAX action: Import a mailbox.
- inlineMessageOutput() : object
- AJAX action: Return the inline display text for a given MIME ID of a message.
- isFixedMbox() : object
- AJAX action: Is the given mailbox fixed? Called dynamically to delay retrieval of ACLs of all visible mailboxes at initialization.
- listMailboxes() : bool
- AJAX action: List mailboxes.
- mailboxSize() : object
- AJAX action: Determine the size of a mailbox.
- messageMimeTree() : mixed
- AJAX action: Return the MIME tree representation of the message.
- modifyPoll() : mixed
- AJAX action: Modify list of polled mailboxes.
- newFilter() : Horde_Core_Ajax_Response_HordeCore_Reload
- AJAX action: Redirect to the filter edit page and pre-populate with an e-mail address.
- purgeDeleted() : bool
- AJAX action: Purge deleted messages.
- renameMailbox() : bool
- AJAX action: Rename a mailbox.
- sendMDN() : mixed
- AJAX action: Send a Message Disposition Notification (MDN).
- sentMailList() : object
- AJAX action: Generate the sent-mail select list.
- stripAttachment() : mixed
- AJAX action: strip attachment.
- subscribe() : bool
- AJAX action: [un]Subscribe to a mailbox.
- text2Html() : object
- AJAX action: Convert text to HTML (compose data).
Properties
$_readOnly
The list of actions that require readonly access to the session.
protected
array<string|int, mixed>
$_readOnly
= array('html2Text', 'text2Html')
Methods
addAttachmentCkeditor()
AJAX action: Add an attachment to a compose message (from the ckeditor plugin).
public
addAttachmentCkeditor() : Horde_Core_Ajax_Response_Raw
Variables used:
- CKEditorFuncNum: (integer) CKEditor function identifier to call when returning URL data
- composeCache: (string) The IMP_Compose cache identifier.
Return values
Horde_Core_Ajax_Response_Raw —text/html return containing javascript code to update the URL parameter in CKEditor.
addContact()
AJAX action: Add contact.
public
addContact() : bool
Variables used:
- addr: (string) [JSON array] Address list.
Return values
bool —True on success, false on failure.
addressHeader()
AJAX action: Return a list of address objects used to build an address header for a message.
public
addressHeader() : object
See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used:
- header: (string) The header to return.
Return values
object —An object with the following entries:
- hdr_data: (object) Contains header names as keys and lists of address objects as values.
autocompleteSearch()
AJAX Action: Do an autocomplete search.
public
autocompleteSearch() : object
Variables used:
- limit: (integer) If set, limits to this many results.
- search: (string) Search string.
- type: (string) Autocomplete search type.
Return values
object —An object with a single property: 'results'. The format of 'results' depends on the search type.
- type = 'email'
Results is an array with the following keys for each result:
- g: (array) List of addresses in the group (in same 'results' format as type = 'email').
- l: (string) Full label.
- s: (string) Short display string.
- v: (string) Value.
blacklist()
AJAX action: Blacklist/whitelist addresses from messages.
public
blacklist() : bool
See the list of variables needed for IMP_Ajax_Application#changed(), IMP_Ajax_Application#deleteMsgs(), and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used:
- blacklist: (integer) 1 to blacklist, 0 to whitelist.
Return values
bool —True on success.
createFlag()
AJAX action: Create an IMAP flag.
public
createFlag() : object
Variables used:
- flagcolor: (string) Background color for flag label.
- flagname: (string) Flag name.
Return values
object —An object with the following properties:
- success: (boolean) True if successful.
createMailbox()
AJAX action: Create a mailbox.
public
createMailbox() : bool
Variables used:
- create_poll: (boolean) If true, add new mailbox to poll list.
- mbox: (string) The name of the new mailbox.
- parent: (string) The parent mailbox (base64url encoded).
Return values
bool —True on success, false on failure.
createMailboxPrepare()
AJAX action: Check access rights for creation of a submailbox.
public
createMailboxPrepare() : object
Variables used:
- mbox: (string) The name of the mailbox to check (base64url encoded).
Return values
object —Object with the following properties:
- result: (boolean) True if submailboxes can be created.
deleteAttach()
AJAX action: Delete an attachment from compose data.
public
deleteAttach() : array<string|int, mixed>
Variables used:
- atc_indices: (string) [JSON array] Attachment IDs to delete.
- imp_compose: (string) The IMP_Compose cache identifier.
- quiet: (boolean) If true, don't output notifications.
Return values
array<string|int, mixed> —The list of attchment IDs that were deleted.
deleteMailbox()
AJAX action: Delete a mailbox.
public
deleteMailbox() : bool
Variables used:
- container: (boolean) True if base element is a container.
- mbox: (string) The full mailbox name to delete (base64url encoded).
- subfolders: (boolean) Delete all subfolders?
Return values
bool —True on success, false on failure.
deleteMailboxPrepare()
AJAX action: Check access rights for deletion/rename of mailbox.
public
deleteMailboxPrepare() : object
Variables used:
- mbox: (string) The name of the mailbox to check (base64url encoded).
- type: (string) Either 'delete' or 'rename'.
Return values
object —Object with the following properties:
- result: (boolean) True if mailbox can be deleted/renamed.
dynamicInit()
AJAX action: Initialize dynamic view.
public
dynamicInit() : bool
Tags
Return values
bool —True.
emptyMailbox()
AJAX action: Empty a mailbox.
public
emptyMailbox() : bool
Variables used:
- mbox: (string) The full mailbox name to empty (base64url encoded).
Return values
bool —True on success, false on failure.
emptyMailboxPrepare()
AJAX action: Check access rights for a mailbox, and provide number of messages to be emptied.
public
emptyMailboxPrepare() : object
Variables used:
- mbox: (string) The name of the mailbox to check (base64url encoded).
Return values
object —Object with the following properties:
- result: (integer) The number of messages to be deleted.
flagAll()
AJAX action: Flag all messages in a mailbox.
public
flagAll() : bool
Variables used:
- add: (integer) Add the flags?
- flags: (string) The IMAP flags to add/remove (JSON serialized array).
- mbox: (string) The full mailbox name (base64url encoded).
Return values
bool —True on success, false on failure.
flagMessages()
AJAX action: Flag messages.
public
flagMessages() : bool
See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used:
- add: (integer) Set the flag?
- flags: (string) The flags to set (JSON serialized array).
Return values
bool —True on success, false on failure.
getContactsImage()
AJAX action: Return the contacts images for a given e-mail address.
public
getContactsImage() : object
Variables used:
- addr: (string) The e-mail address.
Return values
object —An object with the following properties:
- avatar: (string) The URL of the avatar image.
- flag: (string) The URL of the sender's country flag image.
- flagname: (string) The name of the country of the sender.
html2Text()
AJAX action: Convert HTML to text (compose data).
public
html2Text() : object
Variables used:
- data: (string) [JSON array] List of data to convert. Keys are UIDs
used to idetify the return values. Values are arrays with
these keys:
- changed: (integer) Has the text changed from the original?
- text: (string) The text to convert.
- imp_compose: (string) The IMP_Compose cache identifier.
Return values
object —An object with the following entries:
- text: (array) Array with keys as UIDs and values as the converted text string.
importMailbox()
AJAX action: Import a mailbox.
public
importMailbox() : object
Variables used:
- import_mbox: (string) The mailbox to import into (base64url encoded).
Return values
object —Returns response object to display JSON HTML-encoded:
- action: (string) The action name (importMailbox).
- mbox: (string) The mailbox the messages were imported to (base64url encoded).
inlineMessageOutput()
AJAX action: Return the inline display text for a given MIME ID of a message.
public
inlineMessageOutput() : object
See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used:
- mimeid: (string) The MIME ID to return.
Return values
object —An object with the following entries:
- md: (array) Metadata information. - mimeid: (string) The base MIME ID of the text. - puids: (array) See IMP_Ajax_Application#previewUids(). - text: (string) Inline Message text of the part.
isFixedMbox()
AJAX action: Is the given mailbox fixed? Called dynamically to delay retrieval of ACLs of all visible mailboxes at initialization.
public
isFixedMbox() : object
Variables used:
- mbox: (integer) The mailbox name.
Return values
object —An object with the following entires:
- fixed: (boolean) True if the mailbox is fixed.
listMailboxes()
AJAX action: List mailboxes.
public
listMailboxes() : bool
Variables used:
- all: (integer) 1 to show all mailboxes.
- base: (string) The base mailbox.
- expall: (boolean) 1 to expand all (requires 'all').
- initial: (string) 1 to indicate the initial request for mailbox list.
- mboxes: (string) The list of mailboxes to process (JSON encoded array; mailboxes are base64url encoded).
- reload: (integer) 1 to force reload of mailboxes.
- unsub: (integer) 1 to show unsubscribed mailboxes.
Return values
bool —True.
mailboxSize()
AJAX action: Determine the size of a mailbox.
public
mailboxSize() : object
Variables used:
- mbox: (string) The name of the mailbox to check (base64url encoded).
Return values
object —An object with the following properties:
- size: (string) Formatted size string.
messageMimeTree()
AJAX action: Return the MIME tree representation of the message.
public
messageMimeTree() : mixed
See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used:
- preview: (integer) If set, return preview data. Otherwise, return full data.
Return values
mixed —On error will return null. Otherwise an object with the following entries:
- tree: (string) The MIME tree representation of the message. If viewing preview, on error this object will contain error and errortype properties.
modifyPoll()
AJAX action: Modify list of polled mailboxes.
public
modifyPoll() : mixed
Variables used:
- add: (integer) 1 to add to the poll list, 0 to remove.
- mbox: (string) The full mailbox name to modify (base64url encoded).
Return values
mixed —False on failure, or an object with the following entries:
- add: (integer) 1 if added to the poll list, 0 if removed.
- mbox: (string) The full mailbox name modified.
newFilter()
AJAX action: Redirect to the filter edit page and pre-populate with an e-mail address.
public
newFilter() : Horde_Core_Ajax_Response_HordeCore_Reload
Requires EITHER 'addr' -or- mailbox/indices from form params.
Variables used:
- addr: (string) The e-mail address to use.
Return values
Horde_Core_Ajax_Response_HordeCore_Reload —Object with URL to redirect to.
purgeDeleted()
AJAX action: Purge deleted messages.
public
purgeDeleted() : bool
See the list of variables needed for IMP_Ajax_Application#deleteMsgs().
Return values
bool —True on success.
renameMailbox()
AJAX action: Rename a mailbox.
public
renameMailbox() : bool
Variables used:
- new_name: (string) New mailbox name (child node) (UTF-8).
- new_parent: (string) New parent name (UTF-8; base64url encoded). If not present, uses old parent.
- old_name: (string) Full name of old mailbox (base64url encoded).
Return values
bool —True on success, false on failure.
sendMDN()
AJAX action: Send a Message Disposition Notification (MDN).
public
sendMDN() : mixed
Mailbox/indices form parameters needed.
Return values
mixed —False on failure, or an object with these properties:
- puids: (array) See IMP_Ajax_Application#previewUids().
sentMailList()
AJAX action: Generate the sent-mail select list.
public
sentMailList() : object
Variables used: NONE
Return values
object —An object with the following properties:
- flist: (array) TODO
stripAttachment()
AJAX action: strip attachment.
public
stripAttachment() : mixed
See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed.
Return values
mixed —False on failure, or an object with these properties:
- puids: (array) See IMP_Ajax_Application#previewUids(). Contains a list of new mailbox/UID values.
subscribe()
AJAX action: [un]Subscribe to a mailbox.
public
subscribe() : bool
Variables used:
- mbox: (string) The full mailbox name to [un]subscribe to (base64url encoded).
- sub: (integer) 1 to subscribe, empty to unsubscribe.
- subfolders: (boolean) [Un]subscribe to all subfolders?
Return values
bool —True on success, false on failure.
text2Html()
AJAX action: Convert text to HTML (compose data).
public
text2Html() : object
Variables used:
- data: (string) [JSON array] List of data to convert. Keys are UIDs
used to idetify the return values. Values are arrays with
these keys:
- changed: (integer) Has the text changed from the original?
- text: (string) The text to convert.
- imp_compose: (string) The IMP_Compose cache identifier.
Return values
object —An object with the following entries:
- text: (array) Array with keys as UIDs and values as the converted text string.