forked from extern/egroupware
Compact theme:
- Fix framework tabs not being able to get closed - Fix some styling - Fix framework tabs are overriding last active opened tab
This commit is contained in:
parent
3dc697e8fc
commit
bfdce2334f
@ -77,6 +77,11 @@ var fw_ui_sidemenu_entry = (function(){ "use strict"; return Class.extend(
|
||||
return true;
|
||||
});
|
||||
|
||||
//close button on active header
|
||||
this.closeButton = document.createElement('span');
|
||||
this.closeButton.classList.add('close')
|
||||
|
||||
|
||||
//Create the content div
|
||||
this.contentDiv = document.createElement("div");
|
||||
this.contentDiv.id = _app+'_sidebox_content';
|
||||
@ -146,6 +151,15 @@ var fw_ui_sidemenu_entry = (function(){ "use strict"; return Class.extend(
|
||||
jQuery(this.contentDiv).hide();
|
||||
},
|
||||
|
||||
setCloseButton: function(_callback)
|
||||
{
|
||||
if (typeof _callback == "function" && this.closeButton)
|
||||
{
|
||||
this.headerDiv.append(this.closeButton);
|
||||
this.closeButton.addEventListener('click', _callback);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* egw_fw_ui_sidemenu_entry_header_active
|
||||
* showAjaxLoader shows the AjaxLoader animation which should be displayed when
|
||||
@ -381,8 +395,21 @@ function egw_fw_ui_tab(_parent, _contHeaderDiv, _contDiv, _icon, _callback,
|
||||
this.setTitle('');
|
||||
jQuery(this.headerDiv).append(this.headerH1);
|
||||
|
||||
//Add close tab button on sidemenuentry for frameworkTabs
|
||||
if (this.tag.isFrameworkTab)
|
||||
{
|
||||
this.tag.sidemenuEntry.setCloseButton(function(){
|
||||
|
||||
jQuery(this.headerDiv).append(this.closeButton);
|
||||
//Only call the close callback if the tab is set closeable
|
||||
if (this._callbackObject.context.closeable)
|
||||
{
|
||||
this._callbackObject.call(this);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}.bind(this.closeButton))
|
||||
}
|
||||
|
||||
this.contentDiv = document.createElement("div");
|
||||
jQuery(this.contentDiv).addClass("egw_fw_ui_tab_content");
|
||||
|
@ -7443,6 +7443,17 @@ img.et2_button_icon[src*="svg"]:hover {
|
||||
border-bottom: none;
|
||||
height: 33px;
|
||||
}
|
||||
body #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active .close {
|
||||
background-image: url(/egroupware/pixelegg/images/close.svg);
|
||||
width: 18px;
|
||||
height: 33px;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
background-size: 18px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
margin-right: 5px;
|
||||
}
|
||||
body #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active img {
|
||||
padding-left: 9px;
|
||||
padding-top: 6px;
|
||||
@ -7454,6 +7465,7 @@ img.et2_button_icon[src*="svg"]:hover {
|
||||
color: #000000;
|
||||
padding-top: 4px;
|
||||
padding-left: 25px !important;
|
||||
display: inline-block;
|
||||
}
|
||||
body #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active:hover {
|
||||
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
|
||||
@ -7509,6 +7521,9 @@ img.et2_button_icon[src*="svg"]:hover {
|
||||
body .sidebar-toggle #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_content {
|
||||
display: none !important;
|
||||
}
|
||||
body .sidebar-toggle #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active .close {
|
||||
display: none;
|
||||
}
|
||||
body .sidebar-toggle #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active:hover {
|
||||
border-radius: 0;
|
||||
background-image: url("../images/ajax-loader.gif");
|
||||
|
@ -511,7 +511,17 @@
|
||||
background-image: url("../images/clear.png");
|
||||
background-position: 95% -3000px;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
.close {
|
||||
background-image: url(/egroupware/pixelegg/images/close.svg);
|
||||
width: 18px;
|
||||
height: 33px;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
background-size: 18px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.background_color_10_gray;
|
||||
.bordered (@gray_30, @gray_30, @gray_30, @gray_30);
|
||||
|
||||
@ -528,7 +538,7 @@
|
||||
.color_100_gray;
|
||||
padding-top: 4px;
|
||||
padding-left:25px !important;
|
||||
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@ -586,6 +596,7 @@
|
||||
display:none !important;
|
||||
}
|
||||
.egw_fw_ui_sidemenu_entry_header_active {
|
||||
.close {display: none;}
|
||||
&:hover {
|
||||
border-radius:0;
|
||||
background-image: url("../images/ajax-loader.gif");
|
||||
|
@ -509,7 +509,7 @@
|
||||
if (_state === 'on' || _state === 'off')
|
||||
{
|
||||
this.activeApp.preferences['toggleMenu'] = _state;
|
||||
egw.set_preference(this.activeApp.appName,'egw_fw_mobile',this.activeApp.preferences);
|
||||
if ((!framework.isAnInternalApp(this.activeApp))) egw.set_preference(this.activeApp.appName,'egw_fw_mobile',this.activeApp.preferences);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -652,7 +652,7 @@
|
||||
if (serialized != this.serializedTabState)
|
||||
{
|
||||
this.serializedTabState = serialized;
|
||||
|
||||
if (this.tabApps) this._setTabAppsSession(this.tabApps);
|
||||
egw.jsonq("EGroupware\\Api\\Framework\\Ajax::ajax_tab_changed_state", [data]);
|
||||
}
|
||||
},
|
||||
@ -743,7 +743,7 @@
|
||||
if (_app.tab == null)
|
||||
{
|
||||
//Create the tab
|
||||
_app.tab = this.tabsUi.addTab(_app.icon, this.tabClickCallback, function(){},
|
||||
_app.tab = this.tabsUi.addTab(_app.icon, this.tabClickCallback, this.tabCloseClickCallback,
|
||||
_app, _pos);
|
||||
_app.tab.setTitle(_app.displayName);
|
||||
}
|
||||
|
@ -7264,6 +7264,17 @@ img.et2_button_icon[src*="svg"]:hover {
|
||||
border-bottom: none;
|
||||
height: 33px;
|
||||
}
|
||||
body #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active .close {
|
||||
background-image: url(/egroupware/pixelegg/images/close.svg);
|
||||
width: 18px;
|
||||
height: 33px;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
background-size: 18px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
margin-right: 5px;
|
||||
}
|
||||
body #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active img {
|
||||
padding-left: 9px;
|
||||
padding-top: 6px;
|
||||
@ -7275,6 +7286,7 @@ img.et2_button_icon[src*="svg"]:hover {
|
||||
color: #000000;
|
||||
padding-top: 4px;
|
||||
padding-left: 25px !important;
|
||||
display: inline-block;
|
||||
}
|
||||
body #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active:hover {
|
||||
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
|
||||
@ -7330,6 +7342,9 @@ img.et2_button_icon[src*="svg"]:hover {
|
||||
body .sidebar-toggle #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_content {
|
||||
display: none !important;
|
||||
}
|
||||
body .sidebar-toggle #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active .close {
|
||||
display: none;
|
||||
}
|
||||
body .sidebar-toggle #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active:hover {
|
||||
border-radius: 0;
|
||||
background-image: url("../images/ajax-loader.gif");
|
||||
|
Loading…
Reference in New Issue
Block a user