[wp-trac] [WordPress Trac] #31819: Shiny updates: more sophisticated locking
WordPress Trac
noreply at wordpress.org
Tue Mar 31 16:43:47 UTC 2015
#31819: Shiny updates: more sophisticated locking
-----------------------------+---------------------------------------------
Reporter: DavidAnderson | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.2
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: shiny-updates | Focuses: ui, javascript, administration
-----------------------------+---------------------------------------------
Comment (by adamsilverstein):
It sounds like what you ideally need is a hook where you can have your JS
code run before the ajax call to perform the update.
If core had such a hook, your hooked function could return a Deferred
object or promise that when resolved would trigger the shiny update to
continue. Another use case for #21170 :)
Replying to [comment:6 DavidAnderson]:
> @jorbin - that sounds a good idea in principle... but what I really want
is for the updates to then proceed after the backup has completed. Unless
there's also a way to do that (without copy/pasting half of updates.js),
then it could replace one complex problem with a second one.
>
> I've just committed code to our internal SVN that now works with the
current setup (including getting FTP credentials). It sets the lock
variable to prevent the updates, until it's ready - then it re-sets it and
calls the run-queue function. It's ugly, but it works.
>
> i.e. What I really need is an elegant way to delay the shiny updates
until I'm ready - and then give them the single to go ahead. I've
currently found a way, but it's not pretty.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31819#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list