Total Complexity | 8 |
Complexity/F | 1.14 |
Lines of Code | 38 |
Function Count | 7 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | jaxon.dialogs.noty = { |
||
|
|||
2 | success: function(content, title) { |
||
3 | noty({text: content, type: 'success', layout: 'topCenter', timeout: 5000}); |
||
4 | }, |
||
5 | info: function(content, title) { |
||
6 | noty({text: content, type: 'information', layout: 'topCenter', timeout: 5000}); |
||
7 | }, |
||
8 | warning: function(content, title) { |
||
9 | noty({text: content, type: 'warning', layout: 'topCenter', timeout: 5000}); |
||
10 | }, |
||
11 | error: function(content, title) { |
||
12 | noty({text: content, type: 'error', layout: 'topCenter', timeout: 5000}); |
||
13 | }, |
||
14 | confirm: function(question, title, yesCallback, noCallback) { |
||
15 | noty({ |
||
16 | text: question, |
||
17 | layout: 'topCenter', |
||
18 | buttons: [ |
||
19 | { |
||
20 | addClass: 'btn btn-primary', |
||
21 | text: "<?php echo $this->yes ?>", |
||
22 | onClick: function($noty){ |
||
23 | $noty.close(); |
||
24 | yesCallback(); |
||
25 | } |
||
26 | },{ |
||
27 | addClass: 'btn btn-danger', |
||
28 | text: "<?php echo $this->no ?>", |
||
29 | onClick: function($noty){ |
||
30 | $noty.close(); |
||
31 | if(noCallback !== undefined) |
||
32 | noCallback(); |
||
33 | } |
||
34 | } |
||
35 | ] |
||
36 | }); |
||
37 | } |
||
38 | }; |
||
39 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.