From 4c09c10332a5203ee70080a8237852fc8fb521ae Mon Sep 17 00:00:00 2001 From: mxb Date: Mon, 18 Feb 2019 23:15:40 +0100 Subject: [PATCH] Allowing partition sharing between integrated tabs --- app/ux/WebView.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 5ddb90e1..3b310f66 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -171,7 +171,7 @@ Ext.define('Rambox.ux.WebView',{ tag: 'webview' ,src: me.record.get('url') ,style: 'width:100%;height:100%;visibility:visible;' - ,partition: 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).sub : '') + ,partition: me.isExternal ? me.originalPartition : 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).sub : '') ,plugins: 'true' ,allowtransparency: 'on' ,autosize: 'on' @@ -414,10 +414,12 @@ Ext.define('Rambox.ux.WebView',{ var cfg = { xtype: 'webview' ,closable: true // usefull, allow us to close the tab, with the DEL key - ,record: map + ,record: map + ,originalPartition: me.getWebView().partition ,isExternal: true // used for the condition ,closeText: locale['app.window[40]'] }; + Ext.cq1('app-main').add(cfg); // get the last tab and activate it var last = Ext.cq1('app-main').items.length -1;