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

BlockUI always enabled just by importing the library #790

Closed
ggam opened this issue May 22, 2017 · 5 comments
Closed

BlockUI always enabled just by importing the library #790

ggam opened this issue May 22, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@ggam
Copy link
Collaborator

ggam commented May 22, 2017

Manually importing the BlockUI library enables it for AJAX requests even with it being disabled on the web.xml. BootsFaces AJAX API checks for the presence of the $.blockUI and if it's present and not null, it automatically blocks and unblocks the screen:

if ($.blockUI && $.blockUI != null) {

Since BlockUI cannot be disabled on a per request basis (like PrimeFaces does with the global attribute), I imported the library and disabled it on web.xml. But BootsFaces doesn't do the check on the client side.

I propose two changes here:

  • [bug]: importing the library should not automatically enable it
  • [feature]: a new way to disable BlockUI for a specific component/event (like PrimeFaces).

The workaround I've used for now is to rename the variables on my imported JS file, downloaded from the author's website.

@stephanrauh
Copy link
Collaborator

I guess it's easy to implement the check of the web.xml setting. If I'm not mistaken, you've already done similar things. If you want to submit the PR yourself, go ahead!

@ggam
Copy link
Collaborator Author

ggam commented May 23, 2017 via email

@chongma
Copy link
Collaborator

chongma commented Aug 29, 2017

slightly related: i was doing pagespeed insights https://developers.google.com/speed/pagespeed/insights/ the other day and it said that the BlockUI javascript file was not minified. does BootsFaces use the minified version?

stephanrauh added a commit to TheCoder4eu/BootsFacesWeb that referenced this issue Aug 29, 2017
… per-request basis, formatted the source code and added a navigation sidebar.
@stephanrauh
Copy link
Collaborator

Actually, there's no official minified version of BlockUI. I minified it manually.

@stephanrauh
Copy link
Collaborator

We've implemented this feature long ago. I've just added the documentation, so we can close the ticket.

@stephanrauh stephanrauh added this to the v1.2.0 milestone Aug 29, 2017
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

3 participants