mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 01:17:04 +03:00
Get Kolab integration working
This commit is contained in:
parent
11823c280d
commit
0c237376e5
13 changed files with 95 additions and 15 deletions
|
|
@ -1964,6 +1964,10 @@ class Actions
|
|||
$aResult[] = Enumerations\Capa::PREFETCH;
|
||||
}
|
||||
|
||||
if ($oConfig->Get('labs', 'kolab_enabled', false)) {
|
||||
$aResult[] = Enumerations\Capa::KOLAB;
|
||||
}
|
||||
|
||||
$aResult[] = Enumerations\Capa::AUTOLOGOUT;
|
||||
|
||||
return $aResult;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ trait Folders
|
|||
|
||||
public function DoFolderCreate() : array
|
||||
{
|
||||
$oAccount = $this->initMailClientConnection();
|
||||
$this->initMailClientConnection();
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -171,9 +171,22 @@ trait Folders
|
|||
return $this->TrueResponse(__FUNCTION__);
|
||||
}
|
||||
|
||||
public function DoFolderSetMetadata() : array
|
||||
{
|
||||
$this->initMailClientConnection();
|
||||
$sFolderFullNameRaw = $this->GetActionParam('Folder');
|
||||
$sMetadataKey = $this->GetActionParam('Key');
|
||||
if ($sFolderFullNameRaw && $sMetadataKey) {
|
||||
$this->MailClient()->FolderSetMetadata($sFolderFullNameRaw, [
|
||||
$sMetadataKey => $this->GetActionParam('Value') ?: null
|
||||
]);
|
||||
}
|
||||
return $this->TrueResponse(__FUNCTION__);
|
||||
}
|
||||
|
||||
public function DoFolderSubscribe() : array
|
||||
{
|
||||
$oAccount = $this->initMailClientConnection();
|
||||
$this->initMailClientConnection();
|
||||
|
||||
$sFolderFullNameRaw = $this->GetActionParam('Folder', '');
|
||||
$bSubscribe = '1' === (string) $this->GetActionParam('Subscribe', '0');
|
||||
|
|
@ -244,7 +257,7 @@ trait Folders
|
|||
*/
|
||||
public function DoFolderMove() : array
|
||||
{
|
||||
$oAccount = $this->initMailClientConnection();
|
||||
$this->initMailClientConnection();
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -267,7 +280,7 @@ trait Folders
|
|||
*/
|
||||
public function DoFolderRename() : array
|
||||
{
|
||||
$oAccount = $this->initMailClientConnection();
|
||||
$this->initMailClientConnection();
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -290,7 +303,7 @@ trait Folders
|
|||
*/
|
||||
public function DoFolderDelete() : array
|
||||
{
|
||||
$oAccount = $this->initMailClientConnection();
|
||||
$this->initMailClientConnection();
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -373,6 +373,7 @@ Enables caching in the system'),
|
|||
'startup_url' => array(''),
|
||||
'strict_html_parser' => array(false),
|
||||
'boundary_prefix' => array(''),
|
||||
'kolab_enabled' => array(false),
|
||||
'dev_email' => array(''),
|
||||
'dev_password' => array('')
|
||||
),
|
||||
|
|
|
|||
|
|
@ -21,4 +21,5 @@ class Capa
|
|||
const ATTACHMENTS_ACTIONS = 'ATTACHMENTS_ACTIONS';
|
||||
const DANGEROUS_ACTIONS = 'DANGEROUS_ACTIONS';
|
||||
const AUTOLOGOUT = 'AUTOLOGOUT';
|
||||
const KOLAB = 'KOLAB';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,7 +438,14 @@
|
|||
"HELP_DELETE_FOLDER": "Delete folder",
|
||||
"HELP_SHOW_HIDE_FOLDER": "Show\/hide folder",
|
||||
"HELP_CHECK_FOR_NEW_MESSAGES": "Check\/don't check for new messages",
|
||||
"HIDE_UNSUBSCRIBED": "Hide unsubscribed folders"
|
||||
"HIDE_UNSUBSCRIBED": "Hide unsubscribed folders",
|
||||
"TYPE_CALENDAR": "Calendar",
|
||||
"TYPE_CONFIGURATION": "Configuration",
|
||||
"TYPE_CONTACTS": "Contacts",
|
||||
"TYPE_FILES": "Files",
|
||||
"TYPE_JOURNAL": "Journal",
|
||||
"TYPE_NOTES": "Notes",
|
||||
"TYPE_TASKS": "Tasks"
|
||||
},
|
||||
"SETTINGS_ACCOUNTS": {
|
||||
"LEGEND_ACCOUNTS": "Accounts",
|
||||
|
|
|
|||
|
|
@ -6,19 +6,28 @@
|
|||
data-bind="value: nameForEdit, visible: edited, hasfocus: edited, onEnter: function () { $root.folderEditOnEnter($data); }, onEsc: function () { $root.folderEditOnEsc($data); }" />
|
||||
|
||||
<span class="folder-system-name" data-bind="text: manageFolderSystemName, visible: isSystemFolder"></span>
|
||||
<a class="btn btn-small btn-small-small btn-danger pull-right button-confirm-delete button-delete-transitions" data-bind="css: {'delete-access': deleteAccess()}, click: function() { $root.deleteFolder($data); }"
|
||||
<a class="btn btn-small btn-small-small btn-danger pull-right button-confirm-delete button-delete-transitions" data-bind="css: {'delete-access': deleteAccess()}, click: $root.deleteFolder"
|
||||
data-i18n="GLOBAL/ARE_YOU_SURE"></a>
|
||||
</td>
|
||||
<td data-i18n="[title]SETTINGS_FOLDERS/HELP_DELETE_FOLDER">
|
||||
<span class="delete-folder e-action fontastic" data-bind="visible: canBeDeleted() && !deleteAccess(), click: function (oFolder) { $root.folderForDeletion(oFolder); }">🗑</span>
|
||||
<span class="delete-folder e-action fontastic" data-bind="visible: canBeDeleted() && !deleteAccess(), click: $root.folderForDeletion">🗑</span>
|
||||
</td>
|
||||
<td data-i18n="[title]SETTINGS_FOLDERS/HELP_SHOW_HIDE_FOLDER">
|
||||
<span class="e-action fontastic" data-bind="css: {'unsubscribed-folder':!subscribed()}, visible: canBeSubscribed(), click: function(oFolder) { $root.toggleFolderSubscription(oFolder); }">👁</span>
|
||||
<span class="e-action fontastic" data-bind="css: {'unsubscribed-folder':!subscribed()}, visible: canBeSubscribed(), click: $root.toggleFolderSubscription">👁</span>
|
||||
</td>
|
||||
<!-- ko if: $root.displaySpecSetting -->
|
||||
<td data-i18n="[title]SETTINGS_FOLDERS/HELP_CHECK_FOR_NEW_MESSAGES">
|
||||
<span class="e-action" data-bind="css: {'check-folder':checkable(), 'unchecked-folder':!checkable()}, visible: canBeSelected() && subscribed(), click: function(oFolder) { $root.toggleFolderCheckable(oFolder); }">
|
||||
<i class="icon-check-mark-circle-two"></i>
|
||||
</span>
|
||||
</td>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: $root.showKolab -->
|
||||
<td class="kolab" title="Kolab">
|
||||
<select data-bind="options: $root.kolabTypeOptions, value: kolabType,
|
||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender,
|
||||
event:{ input: $root.toggleFolderKolabType}"></select>
|
||||
</td>
|
||||
<!-- /ko -->
|
||||
</tr>
|
||||
<!-- ko template: { name: 'SettingsFolderItem', foreach: subFolders } --><!-- /ko -->
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<button type="button" class="close" data-bind="click: function () { folderListError(''); }">×</button>
|
||||
<span data-bind="text: folderListError"></span>
|
||||
</div>
|
||||
<table class="table table-hover list-table" data-bind="i18nUpdate: folderList, css:{'displaySpecSetting': displaySpecSetting}">
|
||||
<table class="table table-hover list-table" data-bind="i18nUpdate: folderList">
|
||||
<tbody data-bind="template: { name: 'SettingsFolderItem', foreach: folderList }"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue