mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Calling functions explicitly due to context
When I changed mw.echo.special.initialize to be called as a callback from $( document ).ready(), rather than being called explicitly from the closure, it changed the context, which got assigned to _this. This broke some of the function calls. Change-Id: I602a58a82ee91646901d0ab1c8b7bb4b22b3437a
This commit is contained in:
parent
0f62158d03
commit
0558ab1571
|
@ -11,8 +11,7 @@
|
|||
* Initialize the property in special notification page.
|
||||
*/
|
||||
'initialize': function() {
|
||||
var _this = this,
|
||||
skin = mw.config.get('skin');
|
||||
var skin = mw.config.get('skin');
|
||||
|
||||
// Convert more link into a button
|
||||
$( '#mw-echo-more' )
|
||||
|
@ -22,14 +21,14 @@
|
|||
.addClass( 'ui-button-blue' )
|
||||
.click( function( e ) {
|
||||
e.preventDefault();
|
||||
if ( !_this.processing ) {
|
||||
_this.processing = true;
|
||||
_this.loadMore();
|
||||
if ( !mw.echo.special.processing ) {
|
||||
mw.echo.special.processing = true;
|
||||
mw.echo.special.loadMore();
|
||||
}
|
||||
}
|
||||
);
|
||||
_this.notcontinue = mw.config.get( 'wgEchoNextContinue' );
|
||||
_this.header = mw.config.get( 'wgEchoDateHeader' );
|
||||
mw.echo.special.notcontinue = mw.config.get( 'wgEchoNextContinue' );
|
||||
mw.echo.special.header = mw.config.get( 'wgEchoDateHeader' );
|
||||
|
||||
// Set up each individual notification with eventlogging, a close
|
||||
// box and dismiss interface if it is dismissable.
|
||||
|
|
Loading…
Reference in a new issue