Bug 23735 - area-userblock remains visible when empty
Summary: area-userblock remains visible when empty
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: 18.11
Hardware: All All
: P5 - low trivial (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-03 15:14 UTC by Christopher Brannon
Modified: 2020-06-04 20:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2019-10-03 15:14:35 UTC
If IntranetmainUserblock is unused, a blank frame is still shown at the bottom of the staff client.  This should be hidden or non-existant if this preference is unused.

Currently, I am using jQuery to resolve this:

//Hide Area User Block if Empty
function isEmpty( el ){
return !$.trim(el.html())
}
if (isEmpty($('#main_intranet-main div.user-info'))) {
$('#area-userblock').hide();
}
//End Hide
Comment 1 Lucas Gass 2019-10-04 09:35:42 UTC
Christopher,

I have tried to re create this and cannot. If I take everything out of the  IntranetmainUserblock syspref and look at the source I do not see the #area-userblock. 

Looking at the intranet-main.tt it looks to have an IF that will only display this section if the sysprwef has content. Did you recreate this on master?
Comment 2 Christopher Brannon 2019-10-04 14:39:09 UTC
(In reply to Lucas Gass from comment #1)
> Christopher,
> 
> I have tried to re create this and cannot. If I take everything out of the 
> IntranetmainUserblock syspref and look at the source I do not see the
> #area-userblock. 
> 
> Looking at the intranet-main.tt it looks to have an IF that will only
> display this section if the sysprwef has content. Did you recreate this on
> master?

No.  I specifically marked this for 18.11.
Comment 3 Owen Leonard 2019-10-04 14:51:40 UTC
I cannot reproduce this problem in master or 18.11.09. Could you have some empty markup in the preference?
Comment 4 Christopher Brannon 2019-10-04 17:22:00 UTC
Well, I feel stupid.

However, I found that if I had a blank line and used delete or backspace, even repeatedly on both, it will not get rid of everything.  I have to leave the blank line and use CTRL-A and delete to get rid of anything hidden.  That isn't very intuitive.
Comment 5 Christopher Brannon 2019-10-04 17:26:10 UTC
I will mark this resolved and open a new bug on removing things from these preferences.