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:
Florianschmidtwelzow 2015-01-10 03:09:41 +01:00 committed by Mattflaschen
parent c40863f6ab
commit 7a3d154447

View file

@ -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 )