@@ -1,10 +1,10 @@ |
||
1 | -<?php if(($this->defaultForMessage)): ?> |
|
1 | +<?php if (($this->defaultForMessage)): ?> |
|
2 | 2 | jaxon.ajax.message.success = jaxon.dialogs.overhang.success; |
3 | 3 | jaxon.ajax.message.info = jaxon.dialogs.overhang.info; |
4 | 4 | jaxon.ajax.message.warning = jaxon.dialogs.overhang.warning; |
5 | 5 | jaxon.ajax.message.error = jaxon.dialogs.overhang.error; |
6 | 6 | <?php endif ?> |
7 | -<?php if(($this->defaultForQuestion)): ?> |
|
7 | +<?php if (($this->defaultForQuestion)): ?> |
|
8 | 8 | jaxon.ajax.message.confirm = jaxon.dialogs.overhang.confirm; |
9 | 9 | <?php endif ?> |
10 | 10 | jaxon.command.handler.register("overhang.alert", function(args) { |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php echo $this->options ?> |
2 | -<?php if(($this->defaultForMessage)): ?> |
|
2 | +<?php if (($this->defaultForMessage)): ?> |
|
3 | 3 | jaxon.ajax.message.success = jaxon.dialogs.toastr.success; |
4 | 4 | jaxon.ajax.message.info = jaxon.dialogs.toastr.info; |
5 | 5 | jaxon.ajax.message.warning = jaxon.dialogs.toastr.warning; |
@@ -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) { |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected function alert(string $sContent, string $sTitle, string $sTheme): string |
74 | 74 | { |
75 | - if(!$sTitle) |
|
75 | + if (!$sTitle) |
|
76 | 76 | { |
77 | 77 | $sTitle = ' '; |
78 | 78 | } |
79 | - if($this->getReturn()) |
|
79 | + if ($this->getReturn()) |
|
80 | 80 | { |
81 | 81 | return "$.jAlert({content:" . $sContent . ", title:'" . $sTitle . "', theme:'" . $sTheme . "'})"; |
82 | 82 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
123 | 123 | { |
124 | 124 | $sTitle = $this->getQuestionTitle(); |
125 | - if(!$sNoScript) |
|
125 | + if (!$sNoScript) |
|
126 | 126 | { |
127 | 127 | return "jaxon.dialogs.jalert.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})"; |
128 | 128 | } |
@@ -125,8 +125,7 @@ |
||
125 | 125 | if(!$sNoScript) |
126 | 126 | { |
127 | 127 | return "jaxon.dialogs.jalert.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})"; |
128 | - } |
|
129 | - else |
|
128 | + } else |
|
130 | 129 | { |
131 | 130 | return "jaxon.dialogs.jalert.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";},function(){" . $sNoScript . ";})"; |
132 | 131 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $aOptions['content'] = (string)$sContent; |
73 | 73 | $aOptions['buttons'] = []; |
74 | 74 | $ind = 0; |
75 | - foreach($aButtons as $button) |
|
75 | + foreach ($aButtons as $button) |
|
76 | 76 | { |
77 | 77 | $_button = [ |
78 | 78 | 'text' => $button['title'], |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | 'class' => $button['class'], |
81 | 81 | ]; |
82 | 82 | // Optional attributes |
83 | - foreach($button as $attr => $value) |
|
83 | + foreach ($button as $attr => $value) |
|
84 | 84 | { |
85 | - if(!in_array($attr, ['title', 'class', 'click'])) |
|
85 | + if (!in_array($attr, ['title', 'class', 'click'])) |
|
86 | 86 | { |
87 | 87 | $_button[$attr] = $value; |
88 | 88 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | protected function notify(string $sMessage, string $sTitle, string $sType): string |
116 | 116 | { |
117 | - if($this->getReturn()) |
|
117 | + if ($this->getReturn()) |
|
118 | 118 | { |
119 | 119 | return "Lobibox.notify('" . $sType . "', {title:'" . $sTitle . "', msg:" . $sMessage . "})"; |
120 | 120 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
163 | 163 | { |
164 | 164 | $sTitle = $this->getQuestionTitle(); |
165 | - if(!$sNoScript) |
|
165 | + if (!$sNoScript) |
|
166 | 166 | { |
167 | 167 | return "jaxon.dialogs.lobibox.confirm(" . $sQuestion . ",'" . |
168 | 168 | $sTitle . "',function(){" . $sYesScript . ";})"; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | protected function getContainer(): string |
39 | 39 | { |
40 | 40 | $sContainer = 'bootbox-container'; |
41 | - if($this->hasOption('dom.container')) |
|
41 | + if ($this->hasOption('dom.container')) |
|
42 | 42 | { |
43 | 43 | $sContainer = $this->getOption('dom.container'); |
44 | 44 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | protected function alert(string $sContent, string $sTitle, string $sType): string |
109 | 109 | { |
110 | - if($this->getReturn()) |
|
110 | + if ($this->getReturn()) |
|
111 | 111 | { |
112 | 112 | return "jaxon.dialogs.bootbox.alert('" . $sType . "'," . $sContent . ",'" . $sTitle . "')"; |
113 | 113 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
155 | 155 | { |
156 | 156 | $sTitle = $this->getQuestionTitle(); |
157 | - if(!$sNoScript) |
|
157 | + if (!$sNoScript) |
|
158 | 158 | { |
159 | 159 | return "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . |
160 | 160 | $sTitle . "',function(){" . $sYesScript . ";})"; |
@@ -158,8 +158,7 @@ |
||
158 | 158 | { |
159 | 159 | return "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . |
160 | 160 | $sTitle . "',function(){" . $sYesScript . ";})"; |
161 | - } |
|
162 | - else |
|
161 | + } else |
|
163 | 162 | { |
164 | 163 | return "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . |
165 | 164 | $sTitle . "',function(){" . $sYesScript . ";},function(){" . $sNoScript . ";})"; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | protected function alert(string $text, string $sTitle, string $sType): string |
76 | 76 | { |
77 | 77 | $duration = $this->getOption('options.duration', 3); |
78 | - if($this->getReturn()) |
|
78 | + if ($this->getReturn()) |
|
79 | 79 | { |
80 | 80 | return "ymz.jq_toast({text:" . $text . ", type:'" . $sType . "', sec:'" . $duration . "'})"; |
81 | 81 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
122 | 122 | { |
123 | 123 | $sTitle = $this->getQuestionTitle(); |
124 | - if(!$sNoScript) |
|
124 | + if (!$sNoScript) |
|
125 | 125 | { |
126 | 126 | return "jaxon.dialogs.ymzbox.confirm(" . $sQuestion . ",'" . $sTitle . |
127 | 127 | "',function(){" . $sYesScript . ";})"; |
@@ -63,7 +63,7 @@ |
||
63 | 63 | */ |
64 | 64 | protected function alert(string $sMessage, string $sTitle, string $sClass): string |
65 | 65 | { |
66 | - if($this->getReturn()) |
|
66 | + if ($this->getReturn()) |
|
67 | 67 | { |
68 | 68 | return "$.notify(" . $sMessage . ", {className:'" . $sClass . "', position:'top center'})"; |
69 | 69 | } |