mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 06:50:35 +01:00
* Mail: keyword actions were not always displayed (eg. never for Dovecot and GMail)
This commit is contained in:
parent
1f35ccea1f
commit
589d2c9dae
@ -1327,6 +1327,9 @@ class mail_ui
|
|||||||
'caption' => 'Set / Remove Labels',
|
'caption' => 'Set / Remove Labels',
|
||||||
'icon' => 'tag_message',
|
'icon' => 'tag_message',
|
||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
|
// note this one is NOT a real CAPABILITY reported by the server, but added by selectMailbox
|
||||||
|
'enabled' => $this->mail_bo->icServer->hasCapability('SUPPORTS_KEYWORDS'),
|
||||||
|
'hideOnDisabled' => true,
|
||||||
'children' => array(
|
'children' => array(
|
||||||
'unlabel' => array(
|
'unlabel' => array(
|
||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
@ -1422,12 +1425,6 @@ class mail_ui
|
|||||||
{
|
{
|
||||||
unset($actions['tracker']);
|
unset($actions['tracker']);
|
||||||
}
|
}
|
||||||
// note this one is NOT a real CAPABILITY reported by the server, but added by selectMailbox
|
|
||||||
if (!$this->mail_bo->icServer->hasCapability('SUPPORTS_KEYWORDS'))
|
|
||||||
{
|
|
||||||
unset($actions['mark']['children']['setLabel']);
|
|
||||||
unset($actions['mark']['children']['unsetLabel']);
|
|
||||||
}
|
|
||||||
return $actions;
|
return $actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1438,9 +1435,9 @@ class mail_ui
|
|||||||
* @param array &$rows
|
* @param array &$rows
|
||||||
* @param array &$readonlys
|
* @param array &$readonlys
|
||||||
*/
|
*/
|
||||||
function get_rows($query,&$rows,&$readonlys)
|
function get_rows(&$query,&$rows,&$readonlys)
|
||||||
{
|
{
|
||||||
unset($query['actions']);
|
// unset($query['actions']);
|
||||||
//error_log(__METHOD__.__LINE__.' SelectedFolder:'.$query['selectedFolder'].' Start:'.$query['start'].' NumRows:'.$query['num_rows'].array2string($query['order']).'->'.array2string($query['sort']));
|
//error_log(__METHOD__.__LINE__.' SelectedFolder:'.$query['selectedFolder'].' Start:'.$query['start'].' NumRows:'.$query['num_rows'].array2string($query['order']).'->'.array2string($query['sort']));
|
||||||
if (mail_bo::$debugTimes) $starttime = microtime(true);
|
if (mail_bo::$debugTimes) $starttime = microtime(true);
|
||||||
//$query['search'] is the phrase in the searchbox
|
//$query['search'] is the phrase in the searchbox
|
||||||
@ -1466,6 +1463,7 @@ class mail_ui
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
$this->changeProfile($_profileID);
|
$this->changeProfile($_profileID);
|
||||||
|
$query['actions'] = $this->get_actions();
|
||||||
}
|
}
|
||||||
catch(Exception $e)
|
catch(Exception $e)
|
||||||
{
|
{
|
||||||
@ -2037,7 +2035,6 @@ class mail_ui
|
|||||||
$actionsenabled = self::get_actions();
|
$actionsenabled = self::get_actions();
|
||||||
unset($actionsenabled['open']);
|
unset($actionsenabled['open']);
|
||||||
unset($actionsenabled['mark']['children']['setLabel']);
|
unset($actionsenabled['mark']['children']['setLabel']);
|
||||||
unset($actionsenabled['mark']['children']['unsetLabel']);
|
|
||||||
unset($actionsenabled['mark']['children']['read']);
|
unset($actionsenabled['mark']['children']['read']);
|
||||||
unset($actionsenabled['mark']['children']['unread']);
|
unset($actionsenabled['mark']['children']['unread']);
|
||||||
unset($actionsenabled['mark']['children']['undelete']);
|
unset($actionsenabled['mark']['children']['undelete']);
|
||||||
@ -3868,7 +3865,7 @@ class mail_ui
|
|||||||
* @param bool $getFolders The client needs the folders for the profile
|
* @param bool $getFolders The client needs the folders for the profile
|
||||||
* @return nothing
|
* @return nothing
|
||||||
*/
|
*/
|
||||||
function ajax_changeProfile($icServerID, $getFolders = true)
|
function ajax_changeProfile($icServerID, $getFolders = true, $exec_id=null)
|
||||||
{
|
{
|
||||||
$response = egw_json_response::get();
|
$response = egw_json_response::get();
|
||||||
|
|
||||||
@ -3876,7 +3873,18 @@ class mail_ui
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if ($exec_id) $old_actions = $this->get_actions();
|
||||||
$this->changeProfile($icServerID);
|
$this->changeProfile($icServerID);
|
||||||
|
// if we have an eTemplate exec_id, also send changed actions
|
||||||
|
if ($exec_id && ($actions = $this->get_actions()) != $old_actions)
|
||||||
|
{
|
||||||
|
$response->generic('assign', array(
|
||||||
|
'etemplate_exec_id' => $exec_id,
|
||||||
|
'id' => 'nm',
|
||||||
|
'key' => 'actions',
|
||||||
|
'value' => $actions,
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
self::callWizard($e->getMessage(),true, 'error');
|
self::callWizard($e->getMessage(),true, 'error');
|
||||||
|
@ -97,7 +97,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
$j(nm).off('refresh');
|
$j(nm).off('refresh');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unregister client side cache
|
// Unregister client side cache
|
||||||
this.egw.dataCacheUnregister('mail');
|
this.egw.dataCacheUnregister('mail');
|
||||||
|
|
||||||
@ -1542,7 +1542,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
var server = _senders[0].iface.id.split('::');
|
var server = _senders[0].iface.id.split('::');
|
||||||
var activeFilters = this.mail_getActiveFilters();
|
var activeFilters = this.mail_getActiveFilters();
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.egw.message(this.egw.lang('empty trash'));
|
this.egw.message(this.egw.lang('empty trash'));
|
||||||
egw.json('mail.mail_ui.ajax_emptyTrash',[server[0], activeFilters['selectedFolder']? activeFilters['selectedFolder']:null],function(){self.unlock_tree()})
|
egw.json('mail.mail_ui.ajax_emptyTrash',[server[0], activeFilters['selectedFolder']? activeFilters['selectedFolder']:null],function(){self.unlock_tree()})
|
||||||
.sendRequest(true);
|
.sendRequest(true);
|
||||||
@ -1598,7 +1598,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
this.egw.message(this.egw.lang('Connect to Profile %1',_widget.getSelectedLabel().replace(this._unseen_regexp, '')));
|
this.egw.message(this.egw.lang('Connect to Profile %1',_widget.getSelectedLabel().replace(this._unseen_regexp, '')));
|
||||||
|
|
||||||
this.lock_tree();
|
this.lock_tree();
|
||||||
egw.json('mail.mail_ui.ajax_changeProfile',[folder, getFolders], jQuery.proxy(function() {
|
egw.json('mail.mail_ui.ajax_changeProfile',[folder, getFolders, this.et2._inst.etemplate_exec_id], jQuery.proxy(function() {
|
||||||
// Profile changed, select inbox
|
// Profile changed, select inbox
|
||||||
var inbox = folder + '::INBOX';
|
var inbox = folder + '::INBOX';
|
||||||
_widget.reSelectItem(inbox);
|
_widget.reSelectItem(inbox);
|
||||||
@ -3075,12 +3075,12 @@ app.classes.mail = AppJS.extend(
|
|||||||
if (addr)
|
if (addr)
|
||||||
{
|
{
|
||||||
tmp = aliases.concat(addr.get_value());
|
tmp = aliases.concat(addr.get_value());
|
||||||
|
|
||||||
// returns de-duplicate items of an array
|
// returns de-duplicate items of an array
|
||||||
var deDuplicator = function (item,pos){
|
var deDuplicator = function (item,pos){
|
||||||
return tmp.indexOf(item) == pos
|
return tmp.indexOf(item) == pos
|
||||||
};
|
};
|
||||||
|
|
||||||
aliases = tmp.filter(deDuplicator);
|
aliases = tmp.filter(deDuplicator);
|
||||||
addr.set_value(aliases);
|
addr.set_value(aliases);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user