Make editity encryption view appear correctly in classic skin

pull/6144/head
Thomas Bruederli 7 years ago
parent c4f9bd994e
commit b9a68b516a

@ -4066,6 +4066,7 @@ function rcube_webmail()
.on('click', function() { ref.mailvelope_keyring.openSettings(); });
container.show();
ref.triggerEvent('identity-encryption-show', { container: container });
})
.catch(function(err) {
console.error('Mailvelope keyring error', err);

@ -53,16 +53,19 @@ function rcube_init_tabs(id, current)
current = current ? current : 0;
// first hide not selected tabs
fs.each(function(idx) { if (idx != current) $(this).hide(); });
// create tabs container
var tabs = $('<div>').addClass('tabsbar').appendTo(content);
// create tabs container (if not exists)
var tabs = content.find('.tabsbar');
if (!tabs.length)
tabs = $('<div>').addClass('tabsbar').appendTo(content);
// convert fildsets into tabs
fs.each(function(idx) {
var tab, a, elm = $(this), legend = elm.children('legend');
// skip invisible or already initialized fieldsets
if (!elm.is(':visible') || elm.hasClass('tabbed'))
return;
// create a tab
a = $('<a>').text(legend.text()).attr('href', '#');
tab = $('<span>').attr({'id': 'tab'+idx, 'class': 'tablink'})
@ -79,6 +82,9 @@ function rcube_init_tabs(id, current)
// add the tab to container
tab.append(a).appendTo(tabs);
});
// hide not selected tabs
fs.each(function(idx) { if (idx != current) $(this).hide(); });
}
function rcube_show_tab(id, index)

@ -18,7 +18,12 @@
<div id="identity-details" class="boxcontent">
<roundcube:object name="identityform" id="identity-form" size="40" textareacols="70" textarearows="6" />
<script type="text/javascript">rcube_init_tabs('identity-form')</script>
<script type="text/javascript">
rcube_init_tabs('identity-form');
rcmail.addEventListener('identity-encryption-show', function() {
rcube_init_tabs('identity-form');
});
</script>
<div id="formfooter">
<div class="footerleft">

Loading…
Cancel
Save