@@ -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", function(args) { |
@@ -1,10 +1,10 @@ |
||
1 | -<?php if(($this->defaultForMessage)): ?> |
|
1 | +<?php if (($this->defaultForMessage)): ?> |
|
2 | 2 | jaxon.ajax.message.success = jaxon.dialogs.xdialog.success; |
3 | 3 | jaxon.ajax.message.info = jaxon.dialogs.xdialog.info; |
4 | 4 | jaxon.ajax.message.warning = jaxon.dialogs.xdialog.warning; |
5 | 5 | jaxon.ajax.message.error = jaxon.dialogs.xdialog.error; |
6 | 6 | <?php endif ?> |
7 | -<?php if(($this->defaultForQuestion)): ?> |
|
7 | +<?php if (($this->defaultForQuestion)): ?> |
|
8 | 8 | jaxon.ajax.message.confirm = jaxon.dialogs.xdialog.confirm; |
9 | 9 | <?php endif ?> |
10 | 10 | jaxon.command.handler.register("xdialog.show", jaxon.dialogs.xdialog.show); |
@@ -86,11 +86,11 @@ |
||
86 | 86 | */ |
87 | 87 | protected function alert(string $sContent, string $sTitle, string $sType): string |
88 | 88 | { |
89 | - if(!$sTitle) |
|
89 | + if (!$sTitle) |
|
90 | 90 | { |
91 | 91 | $sTitle = ' '; |
92 | 92 | } |
93 | - if($this->returnCode()) |
|
93 | + if ($this->returnCode()) |
|
94 | 94 | { |
95 | 95 | return "cuteAlert({message:" . $sContent . ", title:'" . $sTitle . "', type:'" . $sType . "'})"; |
96 | 96 | } |
@@ -24,13 +24,13 @@ |
||
24 | 24 | Jaxon\Dialogs\CuteAlert\CuteAlertLibrary::class, // CuteAlert |
25 | 25 | ]; |
26 | 26 | $jaxon = jaxon(); |
27 | - foreach($aLibraries as $sClass) |
|
27 | + foreach ($aLibraries as $sClass) |
|
28 | 28 | { |
29 | 29 | try |
30 | 30 | { |
31 | 31 | $jaxon->dialog()->registerLibrary($sClass, $sClass::NAME); |
32 | 32 | } |
33 | - catch(SetupException $e){} |
|
33 | + catch (SetupException $e) {} |
|
34 | 34 | } |
35 | 35 | // Register the template dir into the template renderer |
36 | 36 | $jaxon->template()->addNamespace('jaxon::dialogs', dirname(__DIR__) . '/templates'); |
@@ -29,8 +29,7 @@ |
||
29 | 29 | try |
30 | 30 | { |
31 | 31 | $jaxon->dialog()->registerLibrary($sClass, $sClass::NAME); |
32 | - } |
|
33 | - catch(SetupException $e){} |
|
32 | + } catch(SetupException $e){} |
|
34 | 33 | } |
35 | 34 | // Register the template dir into the template renderer |
36 | 35 | $jaxon->template()->addNamespace('jaxon::dialogs', dirname(__DIR__) . '/templates'); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | protected function alert(string $sContent, string $sTitle, string $sType): string |
126 | 126 | { |
127 | - if($this->returnCode()) |
|
127 | + if ($this->returnCode()) |
|
128 | 128 | { |
129 | 129 | return "jaxon.dialogs.bootbox.alert('" . $sType . "'," . $sContent . ",'" . $sTitle . "')"; |
130 | 130 | } |
@@ -172,8 +172,7 @@ discard block |
||
172 | 172 | $sTitle = $this->helper()->getQuestionTitle(); |
173 | 173 | |
174 | 174 | return empty($sNoScript) ? |
175 | - "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : |
|
176 | - "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
175 | + "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
177 | 176 | ";},function(){" . $sNoScript . ";})"; |
178 | 177 | } |
179 | 178 | } |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $aOptions['title'] = $sTitle; |
85 | 85 | $aOptions['body'] = $sContent; |
86 | 86 | $aOptions['buttons'] = []; |
87 | - foreach($aButtons as $aButton) |
|
87 | + foreach ($aButtons as $aButton) |
|
88 | 88 | { |
89 | - if($aButton['click'] === 'close') |
|
89 | + if ($aButton['click'] === 'close') |
|
90 | 90 | { |
91 | 91 | $aOptions['buttons']['cancel'] = $aButton['title']; |
92 | 92 | $aOptions['oncancel'] = 'jaxon.dialogs.xdialog.hide()'; |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | protected function alert(string $sContent, string $sTitle, string $sType): string |
123 | 123 | { |
124 | - if($this->returnCode()) |
|
124 | + if ($this->returnCode()) |
|
125 | 125 | { |
126 | 126 | return "jaxon.dialogs.xdialog.$sType(" . $sContent . "'" . $sTitle . "')"; |
127 | 127 | } |
@@ -170,8 +170,7 @@ discard block |
||
170 | 170 | $sTitle = $this->helper()->getQuestionTitle(); |
171 | 171 | |
172 | 172 | return empty($sNoScript) ? |
173 | - "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : |
|
174 | - "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
173 | + "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
175 | 174 | ";},function(){" . $sNoScript . ";})"; |
176 | 175 | } |
177 | 176 | } |
@@ -90,8 +90,7 @@ |
||
90 | 90 | { |
91 | 91 | $aOptions['buttons']['cancel'] = $aButton['title']; |
92 | 92 | $aOptions['oncancel'] = 'jaxon.dialogs.xdialog.hide()'; |
93 | - } |
|
94 | - else |
|
93 | + } else |
|
95 | 94 | { |
96 | 95 | $aOptions['buttons']['ok'] = $aButton['title']; |
97 | 96 | $aOptions['onok'] = $aButton['click']; |