now elements with data-w2p_disable are not disabled.
in addition, for non-ajax forms, disabled submit buttons are reenabled
after 5 seconds
plus reindented, refactored AND jslinted
This fixes how values are read. For cache.disk, we need to use the second value in the dict.
For cache.ram everything is already there in the object, no need trying to get the stats (which are not there) in the loop.
Also small fix for buttons that did not open the detailed statistics when clicked (class hidden has !important in bootstrap3).
Fixed the example so it actually does what it says. It said "The last 10 entries will appear sorted in a table below.". What it did was if the number of entries was 10, it would truncate the entries and start over again. So, in order for this to show the last 10 entries, it has to delete the oldest entry after 10. The best way to do that is to not sort the list, except when displaying and then delete the first entry in the list before inserting the 11th entry.
this is because jquery can't know what button was pressed when the
submit event is triggered. We circumvent it adding an hidden field before
triggering the submission
BTW: don't know why the commit seems huge. I just changed a bit the trap_form
function to handle the corner case and streamlined what disableElement,
enableElement, disableFormElements, enableFormElements do,
along with formInputClickSelector
This comes from an unfortunate choice of naming conventions and the fact that
manage errors gets called even on the full document on page load.
I had a table full of .error-"classed" elements and it took nearly 30 seconds for that
snippet to hide and fade them in. We should definitevely prefix every css class with
something that won't clash with everything else.