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

"Building..." button doesn't always return the buttons #11

Open
markhalliwell opened this issue May 25, 2014 · 0 comments
Open

"Building..." button doesn't always return the buttons #11

markhalliwell opened this issue May 25, 2014 · 0 comments
Labels

Comments

@markhalliwell
Copy link
Member

Currently if a branch/tag/PR is in the state of a "build" it returns a disabled "Building..." button. The AJAX event used to "check" the build state only happens when one of us admins does a "rebuild" callback and then it auto checks if json.building value is set and then does it's "check" on a setTimeout():
https://github.com/dreditor/dreditor.org/blob/7.x/sites/all/modules/custom/dreditor_org/js/dreditor_org.js#L105-L125

So if this check isn't initiated by the rebuild callback, the button just appears to say "Building..." until one refreshes the page.

This was done very hastily and it's obviously unstable (not my best work lol).

Solution:
Have a second behavior attachment that detects if there is a build button and instantiate the callback, avoiding the setTimeout entirely.

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

1 participant