1
0
Fork 0
mirror of https://bitbucket.org/vertlach/iusethis.git synced 2024-05-25 20:38:20 +03:00

English version hooray

This commit is contained in:
Alexander Yakovlev 2017-01-18 19:31:29 +07:00
parent da278d02c2
commit 111fd984ce

15
IUT.js
View file

@ -16,6 +16,13 @@ var IUT = function IUT() {
this.id = 0;
this.last_id = 0;
this.imagePath = mw.config.get( 'wgExtensionAssetsPath' ) + '/VoteNY/images/';
$.when( mw.loader.using( [ 'mediawiki.api.messages', 'mediawiki.jqueryMsg' ] ), $.ready ).then( function() {
return new mw.Api().loadMessagesIfMissing( [
'iusethis-unvote-link',
'iusethis-link',
'people-count'
] );
})
/**
* Called when voting through the green square voting box
@ -30,9 +37,9 @@ var IUT = function IUT() {
what: 'vote',
pageId: PageID
} ).done( function( data ) {
$( '#PollVotes' ).html( data.iusethis.result );
$( '#PollVotes' ).html( data.iusethis.result + ' ' + mw.msg('people-count') );
$( '#Answer' ).html(
'<a href="javascript:void(0);" class="vote-unvote-link">' +
' <a href="javascript:void(0);" class="vote-unvote-link">' +
mw.msg( 'iusethis-unvote-link' ) + '</a>'
);
} );
@ -50,9 +57,9 @@ var IUT = function IUT() {
what: 'delete',
pageId: PageID
} ).done( function( data ) {
$( '#PollVotes' ).html( data.iusethis.result );
$( '#PollVotes' ).html( data.iusethis.result + ' ' + mw.msg('people-count') );
$( '#Answer' ).html(
'<a href="javascript:void(0);" class="vote-vote-link">' +
' <a href="javascript:void(0);" class="vote-vote-link">' +
mw.msg( 'iusethis-link' ) + '</a>'
);
} );