mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 10:59:42 +00:00
Mobile: Conform to new LoggingSchema
MobileFrontend recently introduced a new loggingSchema structure. Match here, too. Bug: T77929 Change-Id: Ie863937566fb894860d705f51a04ab30de76140d
This commit is contained in:
parent
c40863f6ab
commit
7a3d154447
|
@ -1,7 +1,8 @@
|
||||||
( function( M, $ ) {
|
( function( M, $ ) {
|
||||||
var api = M.require( 'api' ),
|
var api = M.require( 'api' ),
|
||||||
popup = M.require( 'toast' ),
|
popup = M.require( 'toast' ),
|
||||||
schema = M.require( 'loggingSchemas/MobileWebClickTracking' );
|
SchemaMobileWebClickTracking = M.require( 'loggingSchemas/SchemaMobileWebClickTracking' ),
|
||||||
|
schema = new SchemaMobileWebClickTracking( {}, 'MobileWebDiffClickTracking' );
|
||||||
|
|
||||||
function thankUser( name, revision, gender ) {
|
function thankUser( name, revision, gender ) {
|
||||||
var d = $.Deferred();
|
var d = $.Deferred();
|
||||||
|
@ -57,7 +58,10 @@
|
||||||
)
|
)
|
||||||
.on( 'click', function() {
|
.on( 'click', function() {
|
||||||
var $this = $( this );
|
var $this = $( this );
|
||||||
schema.log( 'Diff', 'thank', name );
|
schema.log( {
|
||||||
|
name: 'thank',
|
||||||
|
destination: name
|
||||||
|
} );
|
||||||
if ( !$this.hasClass( 'thanked' ) ) {
|
if ( !$this.hasClass( 'thanked' ) ) {
|
||||||
thankUser( name, rev, gender ).done( function() {
|
thankUser( name, rev, gender ).done( function() {
|
||||||
$this.addClass( 'thanked' ).attr( 'disabled', true )
|
$this.addClass( 'thanked' ).attr( 'disabled', true )
|
||||||
|
|
Loading…
Reference in a new issue