@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected function alert($content, $title, $theme) |
74 | 74 | { |
75 | - if(!$title) |
|
75 | + if (!$title) |
|
76 | 76 | { |
77 | 77 | $title = ' '; |
78 | 78 | } |
79 | - if($this->getReturn()) |
|
79 | + if ($this->getReturn()) |
|
80 | 80 | { |
81 | 81 | return "$.jAlert({content:" . $content . ", title:'" . $title . "', theme:'" . $theme . "'})"; |
82 | 82 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | public function confirm($question, $yesScript, $noScript) |
122 | 122 | { |
123 | 123 | $title = $this->getQuestionTitle(); |
124 | - if(!$noScript) |
|
124 | + if (!$noScript) |
|
125 | 125 | { |
126 | 126 | return "jaxon.dialogs.jalert.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
127 | 127 | } |
@@ -124,8 +124,7 @@ |
||
124 | 124 | if(!$noScript) |
125 | 125 | { |
126 | 126 | return "jaxon.dialogs.jalert.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
127 | - } |
|
128 | - else |
|
127 | + } else |
|
129 | 128 | { |
130 | 129 | return "jaxon.dialogs.jalert.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";},function(){" . $noScript . ";})"; |
131 | 130 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected function alert($message, $title, $type) |
74 | 74 | { |
75 | - if($this->getReturn()) |
|
75 | + if ($this->getReturn()) |
|
76 | 76 | { |
77 | 77 | return "$('body').overhang({message:" . $message . ", type:'" . $type . "'})"; |
78 | 78 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function confirm($question, $yesScript, $noScript) |
120 | 120 | { |
121 | - if(!$noScript) |
|
121 | + if (!$noScript) |
|
122 | 122 | { |
123 | 123 | return "jaxon.dialogs.overhang.confirm(" . $question . ",function(){" . $yesScript . ";})"; |
124 | 124 | } |
@@ -121,8 +121,7 @@ |
||
121 | 121 | if(!$noScript) |
122 | 122 | { |
123 | 123 | return "jaxon.dialogs.overhang.confirm(" . $question . ",function(){" . $yesScript . ";})"; |
124 | - } |
|
125 | - else |
|
124 | + } else |
|
126 | 125 | { |
127 | 126 | return "jaxon.dialogs.overhang.confirm(" . $question . ",function(){" . $yesScript . ";},function(){" . $noScript . ";})"; |
128 | 127 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | protected function getContainer() |
38 | 38 | { |
39 | 39 | $sContainer = 'bootbox-container'; |
40 | - if($this->hasOption('dom.container')) |
|
40 | + if ($this->hasOption('dom.container')) |
|
41 | 41 | { |
42 | 42 | $sContainer = $this->getOption('dom.container'); |
43 | 43 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | protected function alert($content, $title, $type) |
107 | 107 | { |
108 | - if($this->getReturn()) |
|
108 | + if ($this->getReturn()) |
|
109 | 109 | { |
110 | 110 | return "jaxon.dialogs.bootbox.alert('" . $type . "'," . $content . ",'" . $title . "')"; |
111 | 111 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | public function confirm($question, $yesScript, $noScript) |
151 | 151 | { |
152 | 152 | $title = $this->getQuestionTitle(); |
153 | - if(!$noScript) |
|
153 | + if (!$noScript) |
|
154 | 154 | { |
155 | 155 | return "jaxon.dialogs.bootbox.confirm(" . $question . ",'" . |
156 | 156 | $title . "',function(){" . $yesScript . ";})"; |
@@ -154,8 +154,7 @@ |
||
154 | 154 | { |
155 | 155 | return "jaxon.dialogs.bootbox.confirm(" . $question . ",'" . |
156 | 156 | $title . "',function(){" . $yesScript . ";})"; |
157 | - } |
|
158 | - else |
|
157 | + } else |
|
159 | 158 | { |
160 | 159 | return "jaxon.dialogs.bootbox.confirm(" . $question . ",'" . |
161 | 160 | $title . "',function(){" . $yesScript . ";},function(){" . $noScript . ";})"; |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | protected function alert($message, $title, $class) |
66 | 66 | { |
67 | - if($this->getReturn()) |
|
67 | + if ($this->getReturn()) |
|
68 | 68 | { |
69 | 69 | return "$.notify(" . $message . ", {className:'" . $class . "', position:'top center'})"; |
70 | 70 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | protected function alert($text, $title, $type) |
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:'" . $type . "', sec:'" . $duration . "'})"; |
81 | 81 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | public function confirm($question, $yesScript, $noScript) |
121 | 121 | { |
122 | 122 | $title = $this->getQuestionTitle(); |
123 | - if(!$noScript) |
|
123 | + if (!$noScript) |
|
124 | 124 | { |
125 | 125 | return "jaxon.dialogs.ymzbox.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
126 | 126 | } |
@@ -123,8 +123,7 @@ |
||
123 | 123 | if(!$noScript) |
124 | 124 | { |
125 | 125 | return "jaxon.dialogs.ymzbox.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
126 | - } |
|
127 | - else |
|
126 | + } else |
|
128 | 127 | { |
129 | 128 | return "jaxon.dialogs.ymzbox.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";},function(){" . $noScript . ";})"; |
130 | 129 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function getScript() |
44 | 44 | { |
45 | - return $this->render('noty/alert.js'); |
|
45 | + return $this->render('noty/alert.js'); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function getReadyScript() |
52 | 52 | { |
53 | - return $this->render('noty/ready.js.php'); |
|
53 | + return $this->render('noty/ready.js.php'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected function alert($message, $title, $type) |
66 | 66 | { |
67 | - if($this->getReturn()) |
|
67 | + if ($this->getReturn()) |
|
68 | 68 | { |
69 | 69 | return "noty({text:" . $message . ", type:'" . $type . "', layout: 'topCenter'})"; |
70 | 70 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function confirm($question, $yesScript, $noScript) |
112 | 112 | { |
113 | 113 | $title = $this->getQuestionTitle(); |
114 | - if(!$noScript) |
|
114 | + if (!$noScript) |
|
115 | 115 | { |
116 | 116 | return "jaxon.dialogs.noty.confirm(" . $question . ",'',function(){" . $yesScript . ";})"; |
117 | 117 | } |
@@ -114,8 +114,7 @@ |
||
114 | 114 | if(!$noScript) |
115 | 115 | { |
116 | 116 | return "jaxon.dialogs.noty.confirm(" . $question . ",'',function(){" . $yesScript . ";})"; |
117 | - } |
|
118 | - else |
|
117 | + } else |
|
119 | 118 | { |
120 | 119 | return "jaxon.dialogs.noty.confirm(" . $question . ",'',function(){" . $yesScript . ";},function(){" . $noScript . ";})"; |
121 | 120 | } |
@@ -183,18 +183,18 @@ |
||
183 | 183 | $aOptions = $this->getOptionNames($sKeyPrefix); |
184 | 184 | $sSpaces = str_repeat(' ', $nSpaces); |
185 | 185 | $sScript = ''; |
186 | - foreach($aOptions as $sShortName => $sFullName) |
|
186 | + foreach ($aOptions as $sShortName => $sFullName) |
|
187 | 187 | { |
188 | 188 | $value = $this->xDialog->getOption($sFullName); |
189 | - if(is_string($value)) |
|
189 | + if (is_string($value)) |
|
190 | 190 | { |
191 | 191 | $value = "'$value'"; |
192 | 192 | } |
193 | - elseif(is_bool($value)) |
|
193 | + elseif (is_bool($value)) |
|
194 | 194 | { |
195 | 195 | $value = ($value ? 'true' : 'false'); |
196 | 196 | } |
197 | - elseif(!is_numeric($value)) |
|
197 | + elseif (!is_numeric($value)) |
|
198 | 198 | { |
199 | 199 | $value = print_r($value, true); |
200 | 200 | } |
@@ -189,12 +189,10 @@ |
||
189 | 189 | if(is_string($value)) |
190 | 190 | { |
191 | 191 | $value = "'$value'"; |
192 | - } |
|
193 | - elseif(is_bool($value)) |
|
192 | + } elseif(is_bool($value)) |
|
194 | 193 | { |
195 | 194 | $value = ($value ? 'true' : 'false'); |
196 | - } |
|
197 | - elseif(!is_numeric($value)) |
|
195 | + } elseif(!is_numeric($value)) |
|
198 | 196 | { |
199 | 197 | $value = print_r($value, true); |
200 | 198 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $options['content'] = (string)$content; |
72 | 72 | $options['buttons'] = array(); |
73 | 73 | $ind = 0; |
74 | - foreach($buttons as $button) |
|
74 | + foreach ($buttons as $button) |
|
75 | 75 | { |
76 | 76 | $_button = [ |
77 | 77 | 'text' => $button['title'], |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | 'class' => $button['class'], |
80 | 80 | ]; |
81 | 81 | // Optional attributes |
82 | - foreach($button as $attr => $value) |
|
82 | + foreach ($button as $attr => $value) |
|
83 | 83 | { |
84 | - if(!in_array($attr, ['title', 'class', 'click'])) |
|
84 | + if (!in_array($attr, ['title', 'class', 'click'])) |
|
85 | 85 | { |
86 | 86 | $_button[$attr] = $value; |
87 | 87 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | protected function notify($message, $title, $type) |
115 | 115 | { |
116 | - if($this->getReturn()) |
|
116 | + if ($this->getReturn()) |
|
117 | 117 | { |
118 | 118 | return "Lobibox.notify('" . $type . "', {title:'" . $title . "', msg:" . $message . "})"; |
119 | 119 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | public function confirm($question, $yesScript, $noScript) |
161 | 161 | { |
162 | 162 | $title = $this->getQuestionTitle(); |
163 | - if(!$noScript) |
|
163 | + if (!$noScript) |
|
164 | 164 | { |
165 | 165 | return "jaxon.dialogs.lobibox.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
166 | 166 | } |
@@ -163,8 +163,7 @@ |
||
163 | 163 | if(!$noScript) |
164 | 164 | { |
165 | 165 | return "jaxon.dialogs.lobibox.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
166 | - } |
|
167 | - else |
|
166 | + } else |
|
168 | 167 | { |
169 | 168 | return "jaxon.dialogs.lobibox.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";},function(){" . $noScript . ";})"; |
170 | 169 | } |
@@ -115,7 +115,7 @@ |
||
115 | 115 | public function confirm($question, $yesScript, $noScript) |
116 | 116 | { |
117 | 117 | $title = $this->getQuestionTitle(); |
118 | - if(!$noScript) |
|
118 | + if (!$noScript) |
|
119 | 119 | { |
120 | 120 | return "jaxon.dialogs.izi.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
121 | 121 | } |
@@ -118,8 +118,7 @@ |
||
118 | 118 | if(!$noScript) |
119 | 119 | { |
120 | 120 | return "jaxon.dialogs.izi.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";})"; |
121 | - } |
|
122 | - else |
|
121 | + } else |
|
123 | 122 | { |
124 | 123 | return "jaxon.dialogs.izi.confirm(" . $question . ",'" . $title . "',function(){" . $yesScript . ";},function(){" . $noScript . ";})"; |
125 | 124 | } |