Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
when i add a new term and click on "save" it takes some time before the new term is added. During this time no "loading screen" or something is showing. How can i implement this? I need this because users press and press the save bottom cause they think nothing is going on (this adds the same term 100x into my vocubulary :-/)
kind regards,
lolhonk
Comment | File | Size | Author |
---|---|---|---|
#7 | shs-progress_indicator-2182143-7.patch | 2.07 KB | ParisLiakos |
#2 | shs-progress_indicator-2182143-2.patch | 2.13 KB | igorski |
Comments
Comment #1
igorski CreditAttribution: igorski commentedPlease try the attached patch file. I’ve added a simple progress indicator to shs.js.
The inline CSS is definitely bad style, but it’s a start.
Comment #2
igorski CreditAttribution: igorski commentedA slightly better version which accounts for RTL themes.
Comment #3
vgutekunst CreditAttribution: vgutekunst commentedThanks i will test it! ;-)
Comment #4
vgutekunst CreditAttribution: vgutekunst commentedhi thanks for this patch! It worked! The loading button now floats to the right. Is it possible to get him directly under or beneath the new field? Because i think the user dont see it when its in the left or right corner of the screen
Comment #5
Nikita Petrov CreditAttribution: Nikita Petrov commented#1 works great! Thank you, igorski.
Comment #6
rooby CreditAttribution: rooby commentedThis patch is definitely an improvement.
As mentioned in #4 it would be nice if the throbber was directly to the right of the field instead of all the way to the right of the screen, but it is still very usable in its current state.
Comment #7
ParisLiakos CreditAttribution: ParisLiakos commentedi find it easier to notice when there is no float at all..
float right means that in the standard drupal node form and a big screen, you never notice the throbber :)
here is a patch with the float removed. The widget jumps now a bit, but imo at least it is noticeable now
Comment #8
ron_s CreditAttribution: ron_s commentedA throbber is displayed by default using this patch to dispatch a change event:
https://www.drupal.org/node/2264795
Might want to check this one first, since the change event is needed to support other modules and States API.
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commentedI applied the patch there, but there was no throbber after changing a select element
Comment #10
ron_s CreditAttribution: ron_s commentedThat's odd, I did get one. Possible that something in the css is causing it to not display?
Comment #11
ParisLiakos CreditAttribution: ParisLiakos commentedno, i dont see one even in the html source code..maybe another module you have installed?
i dont see how would a loader would be triggered though tbh just by a change event..
i think #states in Drupal7 have nothing to do with ajax, they are just plain jQuery commands that act on html thats already there
Comment #12
ron_s CreditAttribution: ron_s commentedYes, could be that the form is already wrapped in an
['#ajax']
that's causing it, I haven't tested.So I'm assuming if the same was done to the SHS field in a
hook_form_alter
, it would cause a throbber to appear:Should also mention that the event can be
'click'
rather than'change'
too. I believe there are several possible options.Comment #13
fullerja CreditAttribution: fullerja commentedPatch in #7 works for me.