X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special.watchlist%2Fwatchlist.js;h=2d60b1db4cfa469ef85da10d62d7fdfecd97a99a;hb=d5a85f1b43b8c576418da55a299b043e2a7d560e;hp=b9be51fbd5763c4c7a00ead2b2790eb13c07d848;hpb=0c045de899977975884aa93f3f4e2642dd175f83;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.special.watchlist/watchlist.js b/resources/src/mediawiki.special.watchlist/watchlist.js index b9be51fbd5..2d60b1db4c 100644 --- a/resources/src/mediawiki.special.watchlist/watchlist.js +++ b/resources/src/mediawiki.special.watchlist/watchlist.js @@ -8,7 +8,7 @@ // If the user wants to reset their watchlist, use an API call to do so (no reload required) // Adapted from a user script by User:NQ of English Wikipedia // (User:NQ/WatchlistResetConfirm.js) - $resetForm.submit( function ( event ) { + $resetForm.on( 'submit', function ( event ) { var $button = $resetForm.find( 'input[name=mw-watchlist-reset-submit]' ); event.preventDefault(); @@ -41,7 +41,7 @@ } ).fail( function () { // On error, fall back to server-side reset // First remove this submit listener and then re-submit the form - $resetForm.off( 'submit' ).submit(); + $resetForm.off( 'submit' ).trigger( 'submit' ); } ); } ); @@ -50,7 +50,7 @@ // add a listener on all form elements in the header form $( '#mw-watchlist-form input, #mw-watchlist-form select' ).on( 'change', function () { // submit the form when one of the input fields is modified - $( '#mw-watchlist-form' ).submit(); + $( '#mw-watchlist-form' ).trigger( 'submit' ); } ); } @@ -147,7 +147,7 @@ event.preventDefault(); event.stopPropagation(); - $unwatchLink.blur(); + $unwatchLink.trigger( 'blur' ); } ); } } );