Buttons with built-in loading indicators
lab.hakim.se
lab.hakim.se
Quick demo: http://codepen.io/ultimatedelman/pen/klDHy
Since you wouldn't obviously use all the effects in this article, just pick the one you would use and have the .loading class effect the correct change.
UPDATE: now with fewer elements. Only HTML element needed to achieve this effect is the button itself :)
pointer-events: none;
cursor: not-allowed;
But my point isn't who-invented-it, it's that it's very easy to implement this in your own buttons without using Bootstrap. I still use my own implementation, despite suggesting it to them. Just create some data attributes (I have data-default-message, data-inflight-message, and data-success-message) and change your buttons appropriately. I have a standard function that I call on my forms that handles that for me, which I've gisted here: https://gist.github.com/pamelafox/5714109 You could do that in a more elegant way than that bit of code. :-)
I prefer the changing-message approach to the showing-the-indicator approach because the verb stays, and you remember what it was that you were doing. Handy for us forgetful folks. You can use both, too, of course.
See "Buttons" section at http://fortawesome.github.io/Font-Awesome/examples/
Oh, and thank you for adding a license. So often I see neat hacks posted, without any license at all...
https://github.com/ADstruc/waitable
We built a generic jQuery plugin which binds to jQuery promises, taking care of the waiting state and double-submit issues while firing off Ajax requests.
You can remove it with the non-standard `button::-moz-focus-inner{border:0}`. Then you could define some style for `button:focus{...}` to help keyboard navigation.
Note that the dotted line appears inside the button, around the text, and not around the button like :focus{outline} would do.
You wouldn't want to remove the styling completely, but definitely get rid of the browser default and use a custom focus style that looks better.
of course an error would be nice, but the main goal is to submit the form I spent the last minutes filling in.
Here's a CSS version of it (with image assets).
Usually these lightbox/modal overlays use an extra div either loaded with the page or injected on the fly that covers the entire window and is positioned just below the modal on the z-axis (z-index).
His solution was to give the button a really massive box-shadow :O
box-shadow: 0px 0px 0px 3000px rgba(0,0,0,0.8);
I'd never have thought of that. ---
| | <--- the box
---
X <--- where Hakim thinksAnd at first I was impressed by the overlay, especially considering the novel implementation. However, after a little thought and setting that novelty aside, I think that effect is broken. It's simply not at all conventional for a fully masked page to retain interactivity (despite the odd site that allows this).
Worst case scenario, an unsuspecting user activates an overlay button, and while it's loading, starts clicking state-changing buttons around the page just to kill time.
I had to learn more before I throw out PowerPoint, so I Googled (which is difficult because of the top level domain in the name, had to search with quotations). http://ltlatnd.wordpress.com/2013/05/20/slid-es-for-lightwei...
TLDNR: Formerly Rvl.io, free tier, commenting. Paid tier at $7/mo has revision history, private slides and offline export.
And no, I don't work or know Hakim :)