mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Fix clicking sidebox entries closed the category
This commit is contained in:
parent
68e216abea
commit
fcd5ed7b59
@ -876,10 +876,23 @@ function egw_fw_ui_category(_contDiv, _name, _title, _content, _callback, _anima
|
|||||||
|
|
||||||
//Add content and header to the content div, add some magic jQuery code in order to make it foldable
|
//Add content and header to the content div, add some magic jQuery code in order to make it foldable
|
||||||
this.headerDiv._parent = this;
|
this.headerDiv._parent = this;
|
||||||
jQuery(this.headerDiv).on("click keydown",
|
entryH2._parent = this;
|
||||||
|
jQuery(this.headerDiv).on("keydown",
|
||||||
function(e) {
|
function(e) {
|
||||||
if(e.type == "keydown" && [EGW_KEY_ENTER, EGW_KEY_SPACE].indexOf(e.which) == -1) return;
|
if(e.type == "keydown" && [EGW_KEY_ENTER, EGW_KEY_SPACE].indexOf(e.which) == -1) return;
|
||||||
if (!jQuery(this).hasClass('egw_fw_ui_category_active'))
|
if (!jQuery(this).hasClass("egw_fw_ui_category_active"))
|
||||||
|
{
|
||||||
|
this._parent.open(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._parent.close(false);
|
||||||
|
}
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
jQuery(entryH2).on("click",
|
||||||
|
function(e) {
|
||||||
|
if (!jQuery(this).parent().hasClass("egw_fw_ui_category_active"))
|
||||||
{
|
{
|
||||||
this._parent.open(false);
|
this._parent.open(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user