Elastic: Improve splitter element identifier

so e.g. in Settings sidebar's width is constant for all Settings pages.
pull/6977/head
Aleksander Machniak 5 years ago
parent 1d9ddf9d33
commit 199afedb96

@ -3877,7 +3877,10 @@ function rcube_elastic_ui()
*/
function splitter_init(node)
{
var key = rcmail.env.task + rcmail.env.action + '.' + node.attr('id'),
// Use id of the list element, if exists, as a part of the key, instead of action.column-id
// This way e.g. the sidebar in Settings is always the same width for all Settings' pages
var list_id = node.find('.scroller .listing').first().attr('id'),
key = rcmail.env.task + '.' + (list_id || (rcmail.env.action + '.' + node.attr('id'))),
pos = get_pref(key),
reverted = node.is('.sidebar-right'),
set_width = function(width) {

Loading…
Cancel
Save