Total Complexity | 7 |
Complexity/F | 1.17 |
Lines of Code | 27 |
Function Count | 6 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | jaxon.dialogs.jalert = { |
||
|
|||
2 | success: function(content, title = 'Success') { |
||
3 | $.jAlert({content: content, title: title, theme: 'green'}); |
||
4 | }, |
||
5 | info: function(content, title = 'Information') { |
||
6 | $.jAlert({content: content, title: title, theme: 'blue'}); |
||
7 | }, |
||
8 | warning: function(content, title = 'Warning') { |
||
9 | $.jAlert({content: content, title: title, theme: 'yellow'}); |
||
10 | }, |
||
11 | error: function(content, title = 'Error') { |
||
12 | $.jAlert({content: content, title: title, theme: 'red'}); |
||
13 | }, |
||
14 | confirm: function(question, title, yesCallback, noCallback) { |
||
15 | if(noCallback === undefined) |
||
16 | noCallback = function(){}; |
||
17 | $.jAlert({ |
||
18 | title: title, |
||
19 | type: "confirm", |
||
20 | confirmQuestion: question, |
||
21 | confirmBtnText: "<?php echo $this->yes ?>", |
||
22 | denyBtnText: "<?php echo $this->no ?>", |
||
23 | onConfirm: yesCallback, |
||
24 | onDeny: noCallback |
||
25 | }); |
||
26 | } |
||
27 | }; |
||
28 |
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.