1var nfPayPalExpressDebugController = Marionette.Object.extend({ 2 3 initialize: function() { 4 console.log( 'INIT' ); 5 // nfRadio.channel( 'submit' ).trigger( 'submit:response', response, textStatus, jqXHR ); 6 this.listenTo( Backbone.Radio.channel( 'submit' ), 'submit:response', this.response ); 7 }, 8 9 response: function( response, textStatus, jqXHR ) { 10 if( 'undefined' == typeof response.data.actions.paypal_express ) return; 11 if( 'undefined' == typeof response.data.actions.paypal_express.debug ) return; 12 jQuery( '.nf-response-msg' ).after( this.formatData( response.data.actions.paypal_express.debug ) ); 13 }, 14 15 formatData: function( data ) { 16 // TODO: Move to Underscore Template. 17 // TODO: Translate static text. 18 var output = '<table><tr><th colspan="2" style="text-align: center">PayPal Express Debug</th></tr>'; 19 _.each( data, function( value, property ) { 20 output += '<tr><th>' + property + '</th><td>' + value + '</td></tr>'; 21 }); 22 output += '</table>'; 23 return '<div>' + output + '</div>'; 24 } 25 26}); 27 28jQuery( document ).ready( function( $ ) { 29 new nfPayPalExpressDebugController(); 30});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.