| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | /** global: GLSR, jQuery */ |
||
| 2 | ;(function( x ) { |
||
| 3 | |||
| 4 | 'use strict'; |
||
| 5 | |||
| 6 | var Logger = function() { |
||
| 7 | x( 'form' ).on( 'click', '#clear-log', this.onClick_ ); |
||
| 8 | }; |
||
| 9 | |||
| 10 | Logger.prototype = { |
||
| 11 | onClick_: function( ev ) { |
||
| 12 | var request = { |
||
| 13 | action: 'clear-log', |
||
| 14 | nonce: GLSR.logger_nonce, |
||
| 15 | }; |
||
| 16 | GLSR.Ajax.postFromEvent( ev, request, function( response ) { |
||
| 17 | GLSR.Notices( response.notices ); |
||
| 18 | x( '#log-file' ).val( response.logger ); |
||
| 19 | }); |
||
| 20 | }, |
||
| 21 | }; |
||
| 22 | |||
| 23 | GLSR.Logger = Logger; |
||
| 24 | })( jQuery ); |
||
| 25 |