Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 22 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** global: GLSR, jQuery */ |
||
2 | ;(function( x ) { |
||
3 | |||
4 | 'use strict'; |
||
5 | |||
6 | var Console = function() { |
||
|
|||
7 | x( 'form' ).on( 'click', '#clear-console', this.onClick_ ); |
||
8 | }; |
||
9 | |||
10 | Console.prototype = { |
||
11 | onClick_: function( ev ) { |
||
12 | var request = { |
||
13 | action: 'clear-console', |
||
14 | }; |
||
15 | (new GLSR.Ajax( request, ev )).post( function( response ) { |
||
16 | GLSR.Notices( response.notices ); |
||
17 | x( '#console' ).val( response.console ); |
||
18 | }); |
||
19 | }, |
||
20 | }; |
||
21 | |||
22 | GLSR.Console = Console; |
||
23 | })( jQuery ); |
||
24 |