merge latest master.
[lhc/web/wiklou.git] / resources / mediawiki.page / mediawiki.page.watch.ajax.js
index 14557d4..a7e059c 100644 (file)
                                        otherAction = action === 'watch' ? 'unwatch' : 'watch';
                                        $li = $link.closest( 'li' );
 
-                                       mw.util.jsMessage( watchResponse.message, 'ajaxwatch' );
+                                       mw.notify( $.parseHTML( watchResponse.message ), { tag: 'watch-self' } );
 
                                        // Set link to opposite
                                        updateWatchLink( $link, otherAction );
                                },
                                // Error
                                function () {
-                                       var cleanTitle, html, link;
+                                       var cleanTitle, msg, link;
 
                                        // Reset link to non-loading mode
                                        updateWatchLink( $link, action );
                                                        title: cleanTitle
                                                }, cleanTitle
                                        );
-                                       html = mw.msg( 'watcherrortext', link );
+                                       msg = mw.messsage( 'watcherrortext', link );
 
                                        // Report to user about the error
-                                       mw.util.jsMessage( html, 'ajaxwatch' );
+                                       mw.notify( msg, { tag: 'watch-self' } );
 
                                }
                        );