@@ -1,4 +1,4 @@ |
||
| 1 | -<?php if(($this->defaultForMessage)): ?> |
|
| 1 | +<?php if (($this->defaultForMessage)): ?> |
|
| 2 | 2 | jaxon.ajax.message.success = jaxon.dialogs.notify.success; |
| 3 | 3 | jaxon.ajax.message.info = jaxon.dialogs.notify.info; |
| 4 | 4 | jaxon.ajax.message.warning = jaxon.dialogs.notify.warning; |
@@ -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", function(args) { |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | protected function alert(string $sMessage, string $sTitle, string $sType): string |
| 93 | 93 | { |
| 94 | - if($this->returnCode()) |
|
| 94 | + if ($this->returnCode()) |
|
| 95 | 95 | { |
| 96 | 96 | return empty($sTitle) ? "toastr.$sType($sMessage)" : "toastr.$sType($sMessage, '$sTitle')"; |
| 97 | 97 | } |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | */ |
| 82 | 82 | protected function alert(string $sMessage, string $sTitle, string $sClass): string |
| 83 | 83 | { |
| 84 | - if($this->returnCode()) |
|
| 84 | + if ($this->returnCode()) |
|
| 85 | 85 | { |
| 86 | 86 | return "$.notify(" . $sMessage . ", {className:'" . $sClass . "', position:'top center'})"; |
| 87 | 87 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | protected function alert(string $sMessage, string $sTitle, string $sType): string |
| 92 | 92 | { |
| 93 | - if($this->returnCode()) |
|
| 93 | + if ($this->returnCode()) |
|
| 94 | 94 | { |
| 95 | 95 | return "$('body').overhang({message:" . $sMessage . ", type:'" . $sType . "'})"; |
| 96 | 96 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
| 139 | 139 | { |
| 140 | - if(!$sNoScript) |
|
| 140 | + if (!$sNoScript) |
|
| 141 | 141 | { |
| 142 | 142 | return "jaxon.dialogs.overhang.confirm(" . $sQuestion . ",function(){" . $sYesScript . ";})"; |
| 143 | 143 | } |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | */ |
| 91 | 91 | private function alert(string $sMessage, string $sType): string |
| 92 | 92 | { |
| 93 | - if($this->returnCode()) |
|
| 93 | + if ($this->returnCode()) |
|
| 94 | 94 | { |
| 95 | 95 | return "$.simplyToast(" . $sMessage . ", '" . $sType . "')"; |
| 96 | 96 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $aOptions['content'] = $sContent; |
| 94 | 94 | $aOptions['buttons'] = []; |
| 95 | 95 | $ind = 0; |
| 96 | - foreach($aButtons as $button) |
|
| 96 | + foreach ($aButtons as $button) |
|
| 97 | 97 | { |
| 98 | 98 | $_button = [ |
| 99 | 99 | 'text' => $button['title'], |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | 'class' => $button['class'], |
| 102 | 102 | ]; |
| 103 | 103 | // Optional attributes |
| 104 | - foreach($button as $attr => $value) |
|
| 104 | + foreach ($button as $attr => $value) |
|
| 105 | 105 | { |
| 106 | - if(!in_array($attr, ['title', 'class', 'click'])) |
|
| 106 | + if (!in_array($attr, ['title', 'class', 'click'])) |
|
| 107 | 107 | { |
| 108 | 108 | $_button[$attr] = $value; |
| 109 | 109 | } |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | */ |
| 136 | 136 | protected function notify(string $sMessage, string $sTitle, string $sType): string |
| 137 | 137 | { |
| 138 | - if($this->returnCode()) |
|
| 138 | + if ($this->returnCode()) |
|
| 139 | 139 | { |
| 140 | 140 | return "Lobibox.notify('" . $sType . "', {title:'" . $sTitle . "', msg:" . $sMessage . "})"; |
| 141 | 141 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
| 184 | 184 | { |
| 185 | 185 | $sTitle = $this->helper()->getQuestionTitle(); |
| 186 | - if(!$sNoScript) |
|
| 186 | + if (!$sNoScript) |
|
| 187 | 187 | { |
| 188 | 188 | return "jaxon.dialogs.lobibox.confirm(" . $sQuestion . ",'" . |
| 189 | 189 | $sTitle . "',function(){" . $sYesScript . ";})"; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | protected function alert(string $sContent, string $sTitle, string $sType): string |
| 125 | 125 | { |
| 126 | - if($this->returnCode()) |
|
| 126 | + if ($this->returnCode()) |
|
| 127 | 127 | { |
| 128 | 128 | return "jaxon.dialogs.bootbox.alert('" . $sType . "'," . $sContent . ",'" . $sTitle . "')"; |
| 129 | 129 | } |
@@ -170,8 +170,7 @@ discard block |
||
| 170 | 170 | { |
| 171 | 171 | $sTitle = $this->helper()->getQuestionTitle(); |
| 172 | 172 | return empty($sNoScript) ? |
| 173 | - "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : |
|
| 174 | - "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
| 173 | + "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
| 175 | 174 | ";},function(){" . $sNoScript . ";})"; |
| 176 | 175 | } |
| 177 | 176 | } |
@@ -95,12 +95,12 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | protected function alert(string $sMessage, string $sTitle, string $sType): string |
| 97 | 97 | { |
| 98 | - if($this->returnCode()) |
|
| 98 | + if ($this->returnCode()) |
|
| 99 | 99 | { |
| 100 | 100 | return "swal({text:" . $sMessage . ", title:'" . $sTitle . "', type:'" . $sType . "'})"; |
| 101 | 101 | } |
| 102 | 102 | $aOptions = ['text' => $sMessage, 'title' => '', 'type' => $sType]; |
| 103 | - if(($sTitle)) |
|
| 103 | + if (($sTitle)) |
|
| 104 | 104 | { |
| 105 | 105 | $aOptions['title'] = $sTitle; |
| 106 | 106 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
| 148 | 148 | { |
| 149 | 149 | $sTitle = $this->helper()->getQuestionTitle(); |
| 150 | - if(!$sNoScript) |
|
| 150 | + if (!$sNoScript) |
|
| 151 | 151 | { |
| 152 | 152 | return "jaxon.dialogs.swal.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})"; |
| 153 | 153 | } |