@@ -7,12 +7,12 @@ |
||
7 | 7 | } |
8 | 8 | jaxon.command.handler.register("bootbox", (args) => |
9 | 9 | bootbox.alert(args.data.type, args.data.content, args.data.title)); |
10 | -<?php if(($this->defaultForMessage)): ?> |
|
10 | +<?php if (($this->defaultForMessage)): ?> |
|
11 | 11 | jaxon.ajax.message.success = jaxon.dialogs.bootbox.success; |
12 | 12 | jaxon.ajax.message.info = jaxon.dialogs.bootbox.info; |
13 | 13 | jaxon.ajax.message.warning = jaxon.dialogs.bootbox.warning; |
14 | 14 | jaxon.ajax.message.error = jaxon.dialogs.bootbox.error; |
15 | 15 | <?php endif ?> |
16 | -<?php if(($this->defaultForQuestion)): ?> |
|
16 | +<?php if (($this->defaultForQuestion)): ?> |
|
17 | 17 | jaxon.ajax.message.confirm = jaxon.dialogs.bootbox.confirm; |
18 | 18 | <?php endif; |
@@ -1,10 +1,10 @@ |
||
1 | -<?php if(($this->defaultForMessage)): ?> |
|
1 | +<?php if (($this->defaultForMessage)): ?> |
|
2 | 2 | jaxon.ajax.message.success = jaxon.dialogs.cutealert.success; |
3 | 3 | jaxon.ajax.message.info = jaxon.dialogs.cutealert.info; |
4 | 4 | jaxon.ajax.message.warning = jaxon.dialogs.cutealert.warning; |
5 | 5 | jaxon.ajax.message.error = jaxon.dialogs.cutealert.error; |
6 | 6 | <?php endif ?> |
7 | -<?php if(($this->defaultForQuestion)): ?> |
|
7 | +<?php if (($this->defaultForQuestion)): ?> |
|
8 | 8 | jaxon.ajax.message.confirm = jaxon.dialogs.cutealert.confirm; |
9 | 9 | <?php endif ?> |
10 | 10 | jaxon.command.handler.register("cutealert.alert", (args) => cuteAlert(args.data)); |
@@ -1,10 +1,10 @@ |
||
1 | -<?php if(($this->defaultForMessage)): ?> |
|
1 | +<?php if (($this->defaultForMessage)): ?> |
|
2 | 2 | jaxon.ajax.message.success = jaxon.dialogs.noty.success; |
3 | 3 | jaxon.ajax.message.info = jaxon.dialogs.noty.info; |
4 | 4 | jaxon.ajax.message.warning = jaxon.dialogs.noty.warning; |
5 | 5 | jaxon.ajax.message.error = jaxon.dialogs.noty.error; |
6 | 6 | <?php endif ?> |
7 | -<?php if(($this->defaultForQuestion)): ?> |
|
7 | +<?php if (($this->defaultForQuestion)): ?> |
|
8 | 8 | jaxon.ajax.message.confirm = jaxon.dialogs.noty.confirm; |
9 | 9 | <?php endif ?> |
10 | 10 | jaxon.command.handler.register('noty.alert', (args) => |
@@ -1,10 +1,10 @@ |
||
1 | -<?php if(($this->defaultForMessage)): ?> |
|
1 | +<?php if (($this->defaultForMessage)): ?> |
|
2 | 2 | jaxon.ajax.message.success = jaxon.dialogs.jalert.success; |
3 | 3 | jaxon.ajax.message.info = jaxon.dialogs.jalert.info; |
4 | 4 | jaxon.ajax.message.warning = jaxon.dialogs.jalert.warning; |
5 | 5 | jaxon.ajax.message.error = jaxon.dialogs.jalert.error; |
6 | 6 | <?php endif ?> |
7 | -<?php if(($this->defaultForQuestion)): ?> |
|
7 | +<?php if (($this->defaultForQuestion)): ?> |
|
8 | 8 | jaxon.ajax.message.confirm = jaxon.dialogs.jalert.confirm; |
9 | 9 | <?php endif ?> |
10 | 10 | jaxon.command.handler.register("jalert.alert", (args) => $.jAlert(args.data)); |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php echo $this->options ?> |
2 | -<?php if(($this->defaultForMessage)): ?> |
|
2 | +<?php if (($this->defaultForMessage)): ?> |
|
3 | 3 | jaxon.ajax.message.success = jaxon.dialogs.swal.success; |
4 | 4 | jaxon.ajax.message.info = jaxon.dialogs.swal.info; |
5 | 5 | jaxon.ajax.message.warning = jaxon.dialogs.swal.warning; |
6 | 6 | jaxon.ajax.message.error = jaxon.dialogs.swal.error; |
7 | 7 | <?php endif ?> |
8 | -<?php if(($this->defaultForQuestion)): ?> |
|
8 | +<?php if (($this->defaultForQuestion)): ?> |
|
9 | 9 | jaxon.ajax.message.confirm = jaxon.dialogs.swal.confirm; |
10 | 10 | <?php endif ?> |
11 | 11 | jaxon.command.handler.register("sweetalert.alert", (args) => { |
@@ -99,7 +99,7 @@ |
||
99 | 99 | 'error' => 'red', |
100 | 100 | ]; |
101 | 101 | $sTheme = $aTypes[$sStdType] ?? $sStdType; |
102 | - if(!$sTitle) |
|
102 | + if (!$sTitle) |
|
103 | 103 | { |
104 | 104 | $sTitle = ' '; |
105 | 105 | } |
@@ -102,13 +102,13 @@ discard block |
||
102 | 102 | $aOptions['title'] = $sTitle; |
103 | 103 | $aOptions['content'] = $sMessage; |
104 | 104 | $aOptions['buttons'] = []; |
105 | - if(!array_key_exists('boxWidth', $aOptions)) |
|
105 | + if (!array_key_exists('boxWidth', $aOptions)) |
|
106 | 106 | { |
107 | 107 | $aOptions['useBootstrap'] = false; |
108 | 108 | $aOptions['boxWidth'] = '600'; |
109 | 109 | } |
110 | 110 | $ind = 0; |
111 | - foreach($aButtons as $button) |
|
111 | + foreach ($aButtons as $button) |
|
112 | 112 | { |
113 | 113 | $_button = [ |
114 | 114 | 'text' => $button['title'], |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | 'action' => $button['click'], |
117 | 117 | ]; |
118 | 118 | // Optional attributes |
119 | - foreach($button as $attr => $value) |
|
119 | + foreach ($button as $attr => $value) |
|
120 | 120 | { |
121 | - if(!in_array($attr, ['title', 'class', 'click'])) |
|
121 | + if (!in_array($attr, ['title', 'class', 'click'])) |
|
122 | 122 | { |
123 | 123 | $_button[$attr] = $value; |
124 | 124 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | protected function alert(string $sMessage, string $sTitle, string $sType) |
96 | 96 | { |
97 | 97 | $aOptions = ['text' => $sMessage, 'title' => '', 'type' => $sType]; |
98 | - if(($sTitle)) |
|
98 | + if (($sTitle)) |
|
99 | 99 | { |
100 | 100 | $aOptions['title'] = $sTitle; |
101 | 101 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $aOptions['title'] = $sTitle; |
96 | 96 | $aOptions['message'] = $sContent; |
97 | 97 | $aOptions['buttons'] = []; |
98 | - foreach($aButtons as $button) |
|
98 | + foreach ($aButtons as $button) |
|
99 | 99 | { |
100 | 100 | $_button = [ |
101 | 101 | 'label' => $button['title'], |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | 'action' => $button['click'], |
104 | 104 | ]; |
105 | 105 | // Optional attributes |
106 | - foreach($button as $attr => $value) |
|
106 | + foreach ($button as $attr => $value) |
|
107 | 107 | { |
108 | - if(!in_array($attr, ['title', 'class', 'click'])) |
|
108 | + if (!in_array($attr, ['title', 'class', 'click'])) |
|
109 | 109 | { |
110 | 110 | $_button[$attr] = $value; |
111 | 111 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $aOptions['buttons'][] = $_button; |
114 | 114 | } |
115 | 115 | // Turn the value of the nl2br option to false, because it alters form rendering. |
116 | - if(!array_key_exists('nl2br', $aOptions)) |
|
116 | + if (!array_key_exists('nl2br', $aOptions)) |
|
117 | 117 | { |
118 | 118 | $aOptions['nl2br'] = false; |
119 | 119 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ]; |
141 | 141 | $sType = $aTypes[$sStdType] ?? $sStdType; |
142 | 142 | $aOptions = ['message' => $sMessage, 'type' => $sType]; |
143 | - if(($sTitle)) |
|
143 | + if (($sTitle)) |
|
144 | 144 | { |
145 | 145 | $aOptions['title'] = $sTitle; |
146 | 146 | } |