Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken expander when "no_results_found" #79

Open
photomedia opened this issue Aug 23, 2016 · 4 comments
Open

broken expander when "no_results_found" #79

photomedia opened this issue Aug 23, 2016 · 4 comments
Labels

Comments

@photomedia
Copy link

90_irstats2.js has the following on line 252:

        var elparent = container.up( "div[class=ep_summary_box_body]" );

This breaks the EPrints::Box, because it removes the ..._inner class that is required.
This should be changed to:

        var elparent = container.up( "div[class=irstats2_summary_page_container]" );

This way, if there is an error message (eg: no stats), the expander is not broken.

@jiadiyao jiadiyao added the bug label Aug 14, 2017
@wfyson
Copy link
Contributor

wfyson commented Aug 20, 2018

To try and keep the look and feel of the box the same, I'd suggest the following fix instead. Rather than change the element we update, we update the element in a manner that allows it to still be collapsed.

// for summary page
var elparent = container.up( "div[class=ep_summary_box_body]" );
if( elparent != null )
{       
    elparent.update( "<div id='" + elparent.id + "_inner'><p>" + msg + "</p></div>" );
    return;
}

@photomedia
Copy link
Author

Have you tested your fix? If it works and the expand/collapse button is working even when there is an error message (no stats), then it's fine with me :)

@wfyson
Copy link
Contributor

wfyson commented Aug 20, 2018

Yeah, have tested and it works - will roll it into the codebase and update the bazaar as soon as possible!

@goetzk
Copy link
Contributor

goetzk commented Jan 11, 2021

This code appears to be in place within lib/static/javascript/auto/90_irstats2.js, so it seems this has been done done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants