Kaldari has uploaded a new change for review.
https://gerrit.wikimedia.org/r/68125
Change subject: Calling functions explicitly due to context
......................................................................
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
---
M modules/special/ext.echo.special.js
1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/25/68125/1
diff --git a/modules/special/ext.echo.special.js
b/modules/special/ext.echo.special.js
index 06018ef..c77eecb 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -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.
--
To view, visit https://gerrit.wikimedia.org/r/68125
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I602a58a82ee91646901d0ab1c8b7bb4b22b3437a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits