Total Complexity | 10 |
Complexity/F | 1.43 |
Lines of Code | 37 |
Function Count | 7 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /* |
||
4 | jaxon.dialogs.bootbox = { |
||
|
|||
5 | alert: function(type, content, title) { |
||
6 | var html = '<div class="alert alert-' + type + '" style="margin-top:15px;margin-bottom:-15px;">'; |
||
7 | if(title != undefined && title != '') |
||
8 | html += '<strong>' + title + '</strong><br/>'; |
||
9 | html += content + '</div>'; |
||
10 | bootbox.alert(html); |
||
11 | }, |
||
12 | success: function(content, title) { |
||
13 | jaxon.dialogs.bootbox.alert('success', content, title); |
||
14 | }, |
||
15 | info: function(content, title) { |
||
16 | jaxon.dialogs.bootbox.alert('info', content, title); |
||
17 | }, |
||
18 | warning: function(content, title) { |
||
19 | jaxon.dialogs.bootbox.alert('warning', content, title); |
||
20 | }, |
||
21 | error: function(content, title) { |
||
22 | jaxon.dialogs.bootbox.alert('danger', content, title); |
||
23 | }, |
||
24 | confirm: function(question, title, yesCallback, noCallback) { |
||
25 | bootbox.confirm({ |
||
26 | title: title, |
||
27 | message: question, |
||
28 | buttons: { |
||
29 | cancel: {label: "<?php echo $this->no ?>"}, |
||
30 | confirm: {label: "<?php echo $this->yes ?>"} |
||
31 | }, |
||
32 | callback: function(res){ |
||
33 | if(res) |
||
34 | yesCallback(); |
||
35 | else if(typeof noCallback == 'function') |
||
36 | noCallback(); |
||
37 | } |
||
38 | }); |
||
39 | } |
||
40 | }; |
||
41 |
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.