Fix regression where Edit identities link wasn't working

Extend switch-task command to accept argument in form of task/action.
pull/6292/head
Aleksander Machniak 7 years ago
parent 14cc3ec188
commit 34a280ef89

@ -1499,11 +1499,21 @@ function rcube_webmail()
// switch to another application task // switch to another application task
this.switch_task = function(task) this.switch_task = function(task)
{ {
var action, path;
if ((path = task.split('/')).length == 2) {
task = path[0];
action = path[1];
}
if (this.task === task && task != 'mail') if (this.task === task && task != 'mail')
return; return;
var url = this.get_task_url(task); var url = this.get_task_url(task);
if (action)
url += '&_action=' + action;
if (task == 'mail') if (task == 'mail')
url += '&_mbox=INBOX'; url += '&_mbox=INBOX';
else if (task == 'logout' && !this.env.server_error) { else if (task == 'logout' && !this.env.server_error) {

@ -93,7 +93,7 @@
<td class="title"><label for="_from"><roundcube:label name="from" /></label></td> <td class="title"><label for="_from"><roundcube:label name="from" /></label></td>
<td class="editfield formlinks"> <td class="editfield formlinks">
<roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" /> <roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" />
<a href="#identities" onclick="return rcmail.command('identities')"><roundcube:label name="editidents" /></a> <a href="#identities" onclick="return rcmail.command('switch-task', 'settings/identities')"><roundcube:label name="editidents" /></a>
<roundcube:button command="extwin" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="openextwinlink" condition="!env:extwin" /> <roundcube:button command="extwin" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="openextwinlink" condition="!env:extwin" />
</td> </td>
</tr><tr> </tr><tr>

@ -159,7 +159,7 @@
<div class="input-group"> <div class="input-group">
<roundcube:object name="composeHeaders" part="from" id="_from" form="form" tabindex="1" class="form-control" /> <roundcube:object name="composeHeaders" part="from" id="_from" form="form" tabindex="1" class="form-control" />
<span class="input-group-append"> <span class="input-group-append">
<a href="#identities" onclick="return rcmail.command('identities')" class="input-group-text icon edit" title="<roundcube:label name="editidents" />" tabindex="1"><span class="inner"><roundcube:label name="editidents" /></span></a> <a href="#identities" onclick="return rcmail.command('switch-task', 'settings/identities')" class="input-group-text icon edit" title="<roundcube:label name="editidents" />" tabindex="1"><span class="inner"><roundcube:label name="editidents" /></span></a>
</span> </span>
</div> </div>
</div> </div>

@ -89,7 +89,7 @@
<td class="title"><label for="_from"><roundcube:label name="from" /></label></td> <td class="title"><label for="_from"><roundcube:label name="from" /></label></td>
<td class="editfield"> <td class="editfield">
<roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" /> <roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" />
<a href="#identities" onclick="return rcmail.command('identities')" class="iconlink edit" tabindex="0"><roundcube:label name="editidents" /></a> <a href="#identities" onclick="return rcmail.command('switch-task', 'settings/identities')" class="iconlink edit" tabindex="0"><roundcube:label name="editidents" /></a>
</td> </td>
</tr><tr> </tr><tr>
<td class="title top"><label for="_to"><roundcube:label name="to" /></label></td> <td class="title top"><label for="_to"><roundcube:label name="to" /></label></td>

Loading…
Cancel
Save