mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Fix applications' tabs losing their sidebox app header after reload
This commit is contained in:
parent
2acd3e12d2
commit
886884feea
@ -128,9 +128,9 @@ var fw_base = (function(){ "use strict"; return Class.extend(
|
|||||||
this.appData = new egw_fw_class_application(this,
|
this.appData = new egw_fw_class_application(this,
|
||||||
app.name, app.title, app.icon, app.url, app.sideboxwidth,
|
app.name, app.title, app.icon, app.url, app.sideboxwidth,
|
||||||
baseUrl, internalName);
|
baseUrl, internalName);
|
||||||
if (app.isTabApp) this.appData['isTabApp'] = true;
|
if (app.isFrameworkTab) this.appData['isFrameworkTab'] = true;
|
||||||
//Create a sidebox menu entry for each application
|
//Create a sidebox menu entry for each application
|
||||||
if (!app.noNavbar && app.status != 5)
|
if (!app.noNavbar && (app.status != 5 || app.isFrameworkTab))
|
||||||
{
|
{
|
||||||
this.appData.sidemenuEntry = this.sidemenuUi.addEntry(
|
this.appData.sidemenuEntry = this.sidemenuUi.addEntry(
|
||||||
this.appData.displayName, this.appData.icon,
|
this.appData.displayName, this.appData.icon,
|
||||||
@ -517,7 +517,7 @@ var fw_base = (function(){ "use strict"; return Class.extend(
|
|||||||
//Set the tab closeable if there's more than one tab
|
//Set the tab closeable if there's more than one tab
|
||||||
this.tabsUi.setCloseable(this.tabsUi._isNotTheLastTab());
|
this.tabsUi.setCloseable(this.tabsUi._isNotTheLastTab());
|
||||||
// Do not show tab header if the app is with status 5, means run in background
|
// Do not show tab header if the app is with status 5, means run in background
|
||||||
if (_status == 5 && !_app.isTabApp) _app.tab.hideTabHeader(true);
|
if (_status == 5 && !_app.isFrameworkTab) _app.tab.hideTabHeader(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -747,7 +747,7 @@ var fw_base = (function(){ "use strict"; return Class.extend(
|
|||||||
url: _link,
|
url: _link,
|
||||||
internalName: app.appName,
|
internalName: app.appName,
|
||||||
active: true,
|
active: true,
|
||||||
isTabApp: true
|
isFrameworkTab: true
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._setTabAppsSession(this.tabApps);
|
this._setTabAppsSession(this.tabApps);
|
||||||
|
@ -669,7 +669,7 @@ egw_fw_ui_tabs.prototype.removeTab = function(_tab)
|
|||||||
var lookUpTheNextTab = function(_tab){
|
var lookUpTheNextTab = function(_tab){
|
||||||
for(var t in this.tabs)
|
for(var t in this.tabs)
|
||||||
{
|
{
|
||||||
if (_tab != this.tabs[t] && (this.tabs[t]['status'] != '5' || this.tabs[t]['tag']['isTabApp'])) return this.tabs[t];
|
if (_tab != this.tabs[t] && (this.tabs[t]['status'] != '5' || this.tabs[t]['tag']['isFrameworkTab'])) return this.tabs[t];
|
||||||
}
|
}
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
//Special treatement if the currently active tab gets deleted
|
//Special treatement if the currently active tab gets deleted
|
||||||
@ -706,7 +706,7 @@ egw_fw_ui_tabs.prototype.removeTab = function(_tab)
|
|||||||
*/
|
*/
|
||||||
egw_fw_ui_tabs.prototype.showTab = function(_tab)
|
egw_fw_ui_tabs.prototype.showTab = function(_tab)
|
||||||
{
|
{
|
||||||
if (this.activeTab != _tab && (_tab.status != '5' || _tab.tag.isTabApp))
|
if (this.activeTab != _tab && (_tab.status != '5' || _tab.tag.isFrameworkTab))
|
||||||
{
|
{
|
||||||
for (var i = 0; i < this.tabs.length; i++)
|
for (var i = 0; i < this.tabs.length; i++)
|
||||||
{
|
{
|
||||||
@ -774,7 +774,7 @@ egw_fw_ui_tabs.prototype._isNotTheLastTab = function()
|
|||||||
for (var i in this.tabs)
|
for (var i in this.tabs)
|
||||||
{
|
{
|
||||||
//exclude open tabs with status 5, e.g. status app
|
//exclude open tabs with status 5, e.g. status app
|
||||||
if (this.tabs[i]['status'] != '5' || this.tabs[i]['tag']['isTabApp']) n++;
|
if (this.tabs[i]['status'] != '5' || this.tabs[i]['tag']['isFrameworkTab']) n++;
|
||||||
}
|
}
|
||||||
return n > 1 ? true : false;
|
return n > 1 ? true : false;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user