@@ -2,10 +2,10 @@ discard block |
||
2 | 2 | namespace Ajax\common\traits; |
3 | 3 | use Ajax\common\BaseGui; |
4 | 4 | |
5 | -trait JsUtilsInternalTrait{ |
|
5 | +trait JsUtilsInternalTrait { |
|
6 | 6 | |
7 | - protected $jquery_code_for_compile=array (); |
|
8 | - protected $jquery_code_for_compile_at_last=array (); |
|
7 | + protected $jquery_code_for_compile=array(); |
|
8 | + protected $jquery_code_for_compile_at_last=array(); |
|
9 | 9 | |
10 | 10 | protected function _addToCompile($jsScript) { |
11 | 11 | $this->jquery_code_for_compile[]=$jsScript; |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | * @param BaseGui $library |
16 | 16 | * @param mixed $view |
17 | 17 | */ |
18 | - protected function _compileLibrary(BaseGui $library=NULL, &$view=NULL){ |
|
18 | + protected function _compileLibrary(BaseGui $library=NULL, &$view=NULL) { |
|
19 | 19 | if ($library!=NULL) { |
20 | - if(isset($view)) |
|
20 | + if (isset($view)) |
|
21 | 21 | $library->compileHtml($this, $view); |
22 | 22 | if ($library->isAutoCompile()) { |
23 | 23 | $library->compile(true); |
@@ -25,20 +25,20 @@ discard block |
||
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | - protected function defer($script){ |
|
28 | + protected function defer($script) { |
|
29 | 29 | $result="window.defer=function (method) {if (window.jQuery) method(); else setTimeout(function() { defer(method) }, 50);};"; |
30 | 30 | $result.="window.defer(function(){".$script."})"; |
31 | 31 | return $result; |
32 | 32 | } |
33 | 33 | |
34 | - protected function ready($script){ |
|
34 | + protected function ready($script) { |
|
35 | 35 | $result='$(document).ready(function() {'."\n"; |
36 | 36 | $result.=$script.'})'; |
37 | 37 | return $result; |
38 | 38 | } |
39 | 39 | |
40 | 40 | protected function minify($input) { |
41 | - if(trim($input) === "") return $input; |
|
41 | + if (trim($input)==="") return $input; |
|
42 | 42 | return preg_replace( |
43 | 43 | array( |
44 | 44 | // Remove comment(s) |