@@ -14,10 +14,11 @@ discard block |
||
| 14 | 14 | $this->data=$this->data ["JQueryUI"]; |
| 15 | 15 | if (is_int($theme)) { |
| 16 | 16 | $themes=$this->getThemes(); |
| 17 | - if (sizeof($themes)>$theme-1) |
|
| 18 | - $this->theme=$themes [$theme-1]; |
|
| 19 | - else |
|
| 20 | - throw new \Exception("CDNGuiGen : Le numéro de thème demandé n'existe pas"); |
|
| 17 | + if (sizeof($themes)>$theme-1) { |
|
| 18 | + $this->theme=$themes [$theme-1]; |
|
| 19 | + } else { |
|
| 20 | + throw new \Exception("CDNGuiGen : Le numéro de thème demandé n'existe pas"); |
|
| 21 | + } |
|
| 21 | 22 | } |
| 22 | 23 | $this->theme=$theme; |
| 23 | 24 | $this->cssUrl=null; |
@@ -28,16 +29,18 @@ discard block |
||
| 28 | 29 | } |
| 29 | 30 | |
| 30 | 31 | public function getThemes($provider=NULL) { |
| 31 | - if (isset($provider)) |
|
| 32 | - return $this->data [$provider] ["themes"]; |
|
| 33 | - else |
|
| 34 | - return $this->data [$this->provider] ["themes"]; |
|
| 32 | + if (isset($provider)) { |
|
| 33 | + return $this->data [$provider] ["themes"]; |
|
| 34 | + } else { |
|
| 35 | + return $this->data [$this->provider] ["themes"]; |
|
| 36 | + } |
|
| 35 | 37 | } |
| 36 | 38 | |
| 37 | 39 | public function getFirstTheme($provider=NULL) { |
| 38 | 40 | $themes=$this->getThemes($provider); |
| 39 | - if (sizeof($themes)>0) |
|
| 40 | - return $themes [0]; |
|
| 41 | + if (sizeof($themes)>0) { |
|
| 42 | + return $themes [0]; |
|
| 43 | + } |
|
| 41 | 44 | return ""; |
| 42 | 45 | } |
| 43 | 46 | |
@@ -46,14 +49,17 @@ discard block |
||
| 46 | 49 | } |
| 47 | 50 | |
| 48 | 51 | public function getCss() { |
| 49 | - if (isset($this->cssUrl)) |
|
| 50 | - return $this->cssUrl; |
|
| 52 | + if (isset($this->cssUrl)) { |
|
| 53 | + return $this->cssUrl; |
|
| 54 | + } |
|
| 51 | 55 | $version=$this->version; |
| 52 | - if (array_search($version, $this->getVersions())===false) |
|
| 53 | - $version=$this->getLastVersion(); |
|
| 56 | + if (array_search($version, $this->getVersions())===false) { |
|
| 57 | + $version=$this->getLastVersion(); |
|
| 58 | + } |
|
| 54 | 59 | $theme=$this->theme; |
| 55 | - if (array_search($theme, $this->getThemes())===false) |
|
| 56 | - $theme=$this->getFirstTheme(); |
|
| 60 | + if (array_search($theme, $this->getThemes())===false) { |
|
| 61 | + $theme=$this->getFirstTheme(); |
|
| 62 | + } |
|
| 57 | 63 | return $this->replaceVersionAndTheme($this->data [$this->provider] ["css"], $version, $theme); |
| 58 | 64 | } |
| 59 | 65 | |
@@ -14,8 +14,9 @@ |
||
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function compile(JsUtils $js=null) { |
| 17 | - if ($js==null) |
|
| 18 | - return; |
|
| 17 | + if ($js==null) { |
|
| 18 | + return; |
|
| 19 | + } |
|
| 19 | 20 | $result=""; |
| 20 | 21 | $params="{}"; |
| 21 | 22 | $callback=NULL; |
@@ -13,14 +13,16 @@ |
||
| 13 | 13 | return $array [$key]; |
| 14 | 14 | } |
| 15 | 15 | $values=array_values($array); |
| 16 | - if ($pos<sizeof($values)) |
|
| 17 | - return $values [$pos]; |
|
| 16 | + if ($pos<sizeof($values)) { |
|
| 17 | + return $values [$pos]; |
|
| 18 | + } |
|
| 18 | 19 | } |
| 19 | 20 | |
| 20 | 21 | public static function getDefaultValue($array, $key, $default) { |
| 21 | 22 | if (array_key_exists($key, $array)) { |
| 22 | 23 | return $array [$key]; |
| 23 | - } else |
|
| 24 | - return $default; |
|
| 24 | + } else { |
|
| 25 | + return $default; |
|
| 26 | + } |
|
| 25 | 27 | } |
| 26 | 28 | } |
| 27 | 29 | \ No newline at end of file |
@@ -49,9 +49,9 @@ |
||
| 49 | 49 | * @return $this |
| 50 | 50 | */ |
| 51 | 51 | public function setAnimate($value) { |
| 52 | - if ($value instanceof Animation) |
|
| 53 | - $value=$value->getParams(); |
|
| 54 | - else if (is_string($value)) { |
|
| 52 | + if ($value instanceof Animation) { |
|
| 53 | + $value=$value->getParams(); |
|
| 54 | + } else if (is_string($value)) { |
|
| 55 | 55 | $animation=new Animation(); |
| 56 | 56 | $animation->setEasing($value); |
| 57 | 57 | } |
@@ -15,8 +15,9 @@ |
||
| 15 | 15 | class DialogButton extends BaseComponent { |
| 16 | 16 | |
| 17 | 17 | private function addFunction($jsCode) { |
| 18 | - if (!Text::startsWith($jsCode, "function")) |
|
| 19 | - $jsCode="%function(){" . $jsCode . "}%"; |
|
| 18 | + if (!Text::startsWith($jsCode, "function")) { |
|
| 19 | + $jsCode="%function(){" . $jsCode . "}%"; |
|
| 20 | + } |
|
| 20 | 21 | return $jsCode; |
| 21 | 22 | } |
| 22 | 23 | |
@@ -74,8 +74,9 @@ |
||
| 74 | 74 | protected function setParamCtrl($key, $value, $typeCtrl) { |
| 75 | 75 | if (!$typeCtrl($value)) { |
| 76 | 76 | throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." à la position"); |
| 77 | - } else |
|
| 78 | - $this->setParam($key, $value); |
|
| 77 | + } else { |
|
| 78 | + $this->setParam($key, $value); |
|
| 79 | + } |
|
| 79 | 80 | } |
| 80 | 81 | |
| 81 | 82 | /* |
@@ -52,10 +52,11 @@ discard block |
||
| 52 | 52 | $this->from=$from; |
| 53 | 53 | $this->to=$to; |
| 54 | 54 | $this->urlMask="%page%"; |
| 55 | - if(!isset($countVisible)) |
|
| 56 | - $this->countVisible=$to-$from+1; |
|
| 57 | - else |
|
| 58 | - $this->countVisible=$countVisible; |
|
| 55 | + if(!isset($countVisible)) { |
|
| 56 | + $this->countVisible=$to-$from+1; |
|
| 57 | + } else { |
|
| 58 | + $this->countVisible=$countVisible; |
|
| 59 | + } |
|
| 59 | 60 | $this->createContent(); |
| 60 | 61 | } |
| 61 | 62 | |
@@ -74,7 +75,7 @@ discard block |
||
| 74 | 75 | $href=new HtmlLink("a-".$this->identifier."-".$count,$url,$content); |
| 75 | 76 | $href->setProperty($this->attr, $url); |
| 76 | 77 | $elem->setContent($href); |
| 77 | - }else{ |
|
| 78 | + } else{ |
|
| 78 | 79 | $elem->setContent($content); |
| 79 | 80 | } |
| 80 | 81 | $this->content[]=$elem; |
@@ -107,8 +108,9 @@ discard block |
||
| 107 | 108 | public function _addEvent($event, $jsCode) { |
| 108 | 109 | foreach ($this->content as $li){ |
| 109 | 110 | $content=$li->getContent(); |
| 110 | - if($content instanceof BaseHtml) |
|
| 111 | - $content->_addEvent($event,$jsCode); |
|
| 111 | + if($content instanceof BaseHtml) { |
|
| 112 | + $content->_addEvent($event,$jsCode); |
|
| 113 | + } |
|
| 112 | 114 | } |
| 113 | 115 | } |
| 114 | 116 | /** |
@@ -146,8 +148,9 @@ discard block |
||
| 146 | 148 | if (is_int($size)) { |
| 147 | 149 | return $this->addToPropertyUnique("class", CssRef::sizes("pagination")[$size], CssRef::sizes("pagination")); |
| 148 | 150 | } |
| 149 | - if(!PhalconUtils::startsWith($size, "pagination-") && $size!=="") |
|
| 150 | - $size="pagination-".$size; |
|
| 151 | + if(!PhalconUtils::startsWith($size, "pagination-") && $size!=="") { |
|
| 152 | + $size="pagination-".$size; |
|
| 153 | + } |
|
| 151 | 154 | return $this->addToPropertyCtrl("class", $size, CssRef::sizes("pagination")); |
| 152 | 155 | } |
| 153 | 156 | |
@@ -420,8 +420,9 @@ discard block |
||
| 420 | 420 | $element=$this->_prep_element($element); |
| 421 | 421 | $value=$this->_prep_value($value); |
| 422 | 422 | $str="$({$element}).after({$value});"; |
| 423 | - if ($immediatly) |
|
| 424 | - $this->jquery_code_for_compile[]=$str; |
|
| 423 | + if ($immediatly) { |
|
| 424 | + $this->jquery_code_for_compile[]=$str; |
|
| 425 | + } |
|
| 425 | 426 | return $str; |
| 426 | 427 | } |
| 427 | 428 | |
@@ -437,10 +438,12 @@ discard block |
||
| 437 | 438 | if (isset($value)) { |
| 438 | 439 | $value=$this->_prep_value($value); |
| 439 | 440 | $str="$({$element}).attr(\"$attributeName\",{$value});"; |
| 440 | - } else |
|
| 441 | - $str="$({$element}).attr(\"$attributeName\");"; |
|
| 442 | - if ($immediatly) |
|
| 443 | - $this->jquery_code_for_compile[]=$str; |
|
| 441 | + } else { |
|
| 442 | + $str="$({$element}).attr(\"$attributeName\");"; |
|
| 443 | + } |
|
| 444 | + if ($immediatly) { |
|
| 445 | + $this->jquery_code_for_compile[]=$str; |
|
| 446 | + } |
|
| 444 | 447 | return $str; |
| 445 | 448 | } |
| 446 | 449 | |
@@ -456,10 +459,12 @@ discard block |
||
| 456 | 459 | if (isset($param)) { |
| 457 | 460 | $param=$this->_prep_value($param); |
| 458 | 461 | $str="$({$element}).{$jQueryCall}({$param});"; |
| 459 | - } else |
|
| 460 | - $str="$({$element}).{$jQueryCall}();"; |
|
| 461 | - if ($immediatly) |
|
| 462 | - $this->jquery_code_for_compile[]=$str; |
|
| 462 | + } else { |
|
| 463 | + $str="$({$element}).{$jQueryCall}();"; |
|
| 464 | + } |
|
| 465 | + if ($immediatly) { |
|
| 466 | + $this->jquery_code_for_compile[]=$str; |
|
| 467 | + } |
|
| 463 | 468 | return $str; |
| 464 | 469 | } |
| 465 | 470 | /** |
@@ -474,8 +479,9 @@ discard block |
||
| 474 | 479 | $to=$this->_prep_element($to); |
| 475 | 480 | $element=$this->_prep_element($element); |
| 476 | 481 | $str="$({$to}).{$jQueryCall}({$element});"; |
| 477 | - if ($immediatly) |
|
| 478 | - $this->jquery_code_for_compile[]=$str; |
|
| 482 | + if ($immediatly) { |
|
| 483 | + $this->jquery_code_for_compile[]=$str; |
|
| 484 | + } |
|
| 479 | 485 | return $str; |
| 480 | 486 | } |
| 481 | 487 | // -------------------------------------------------------------------- |
@@ -512,8 +518,9 @@ discard block |
||
| 512 | 518 | |
| 513 | 519 | $str="$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");"; |
| 514 | 520 | |
| 515 | - if ($immediatly) |
|
| 516 | - $this->jquery_code_for_compile[]=$str; |
|
| 521 | + if ($immediatly) { |
|
| 522 | + $this->jquery_code_for_compile[]=$str; |
|
| 523 | + } |
|
| 517 | 524 | return $str; |
| 518 | 525 | } |
| 519 | 526 | |
@@ -538,8 +545,9 @@ discard block |
||
| 538 | 545 | |
| 539 | 546 | $str="$({$element}).fadeIn({$speed}{$callback});"; |
| 540 | 547 | |
| 541 | - if ($immediatly) |
|
| 542 | - $this->jquery_code_for_compile[]=$str; |
|
| 548 | + if ($immediatly) { |
|
| 549 | + $this->jquery_code_for_compile[]=$str; |
|
| 550 | + } |
|
| 543 | 551 | return $str; |
| 544 | 552 | } |
| 545 | 553 | |
@@ -564,8 +572,9 @@ discard block |
||
| 564 | 572 | |
| 565 | 573 | $str="$({$element}).fadeOut({$speed}{$callback});"; |
| 566 | 574 | |
| 567 | - if ($immediatly) |
|
| 568 | - $this->jquery_code_for_compile[]=$str; |
|
| 575 | + if ($immediatly) { |
|
| 576 | + $this->jquery_code_for_compile[]=$str; |
|
| 577 | + } |
|
| 569 | 578 | return $str; |
| 570 | 579 | } |
| 571 | 580 | |
@@ -590,8 +599,9 @@ discard block |
||
| 590 | 599 | |
| 591 | 600 | $str="$({$element}).hide({$speed}{$callback});"; |
| 592 | 601 | |
| 593 | - if ($immediatly) |
|
| 594 | - $this->jquery_code_for_compile[]=$str; |
|
| 602 | + if ($immediatly) { |
|
| 603 | + $this->jquery_code_for_compile[]=$str; |
|
| 604 | + } |
|
| 595 | 605 | return $str; |
| 596 | 606 | } |
| 597 | 607 | |
@@ -618,8 +628,9 @@ discard block |
||
| 618 | 628 | |
| 619 | 629 | $str="$({$element}).slideUp({$speed}{$callback});"; |
| 620 | 630 | |
| 621 | - if ($immediatly) |
|
| 622 | - $this->jquery_code_for_compile[]=$str; |
|
| 631 | + if ($immediatly) { |
|
| 632 | + $this->jquery_code_for_compile[]=$str; |
|
| 633 | + } |
|
| 623 | 634 | return $str; |
| 624 | 635 | } |
| 625 | 636 | |
@@ -644,8 +655,9 @@ discard block |
||
| 644 | 655 | |
| 645 | 656 | $str="$({$element}).slideDown({$speed}{$callback});"; |
| 646 | 657 | |
| 647 | - if ($immediatly) |
|
| 648 | - $this->jquery_code_for_compile[]=$str; |
|
| 658 | + if ($immediatly) { |
|
| 659 | + $this->jquery_code_for_compile[]=$str; |
|
| 660 | + } |
|
| 649 | 661 | return $str; |
| 650 | 662 | } |
| 651 | 663 | |
@@ -670,8 +682,9 @@ discard block |
||
| 670 | 682 | |
| 671 | 683 | $str="$({$element}).slideToggle({$speed}{$callback});"; |
| 672 | 684 | |
| 673 | - if ($immediatly) |
|
| 674 | - $this->jquery_code_for_compile[]=$str; |
|
| 685 | + if ($immediatly) { |
|
| 686 | + $this->jquery_code_for_compile[]=$str; |
|
| 687 | + } |
|
| 675 | 688 | return $str; |
| 676 | 689 | } |
| 677 | 690 | |
@@ -688,8 +701,9 @@ discard block |
||
| 688 | 701 | $element=$this->_prep_element($element); |
| 689 | 702 | $str="$({$element}).toggle();"; |
| 690 | 703 | |
| 691 | - if ($immediatly) |
|
| 692 | - $this->jquery_code_for_compile[]=$str; |
|
| 704 | + if ($immediatly) { |
|
| 705 | + $this->jquery_code_for_compile[]=$str; |
|
| 706 | + } |
|
| 693 | 707 | return $str; |
| 694 | 708 | } |
| 695 | 709 | |
@@ -705,8 +719,9 @@ discard block |
||
| 705 | 719 | $element=$this->_prep_element($element); |
| 706 | 720 | $str="$({$element}).trigger(\"$event\");"; |
| 707 | 721 | |
| 708 | - if ($immediatly) |
|
| 709 | - $this->jquery_code_for_compile[]=$str; |
|
| 722 | + if ($immediatly) { |
|
| 723 | + $this->jquery_code_for_compile[]=$str; |
|
| 724 | + } |
|
| 710 | 725 | return $str; |
| 711 | 726 | } |
| 712 | 727 | |
@@ -731,8 +746,9 @@ discard block |
||
| 731 | 746 | |
| 732 | 747 | $str="$({$element}).show({$speed}{$callback});"; |
| 733 | 748 | |
| 734 | - if ($immediatly) |
|
| 735 | - $this->jquery_code_for_compile[]=$str; |
|
| 749 | + if ($immediatly) { |
|
| 750 | + $this->jquery_code_for_compile[]=$str; |
|
| 751 | + } |
|
| 736 | 752 | return $str; |
| 737 | 753 | } |
| 738 | 754 | |
@@ -750,8 +766,9 @@ discard block |
||
| 750 | 766 | $str.="else{".$jsCodeIfFalse."}"; |
| 751 | 767 | } |
| 752 | 768 | |
| 753 | - if ($immediatly) |
|
| 754 | - $this->jquery_code_for_compile[]=$str; |
|
| 769 | + if ($immediatly) { |
|
| 770 | + $this->jquery_code_for_compile[]=$str; |
|
| 771 | + } |
|
| 755 | 772 | return $str; |
| 756 | 773 | } |
| 757 | 774 | |
@@ -817,10 +834,11 @@ discard block |
||
| 817 | 834 | if ($stopPropagation===true) { |
| 818 | 835 | $js="event.stopPropagation();\n".$js; |
| 819 | 836 | } |
| 820 | - if (array_search($event, $this->jquery_events)===false) |
|
| 821 | - $event="\n\t$(".$this->_prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n"; |
|
| 822 | - else |
|
| 823 | - $event="\n\t$(".$this->_prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n"; |
|
| 837 | + if (array_search($event, $this->jquery_events)===false) { |
|
| 838 | + $event="\n\t$(".$this->_prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n"; |
|
| 839 | + } else { |
|
| 840 | + $event="\n\t$(".$this->_prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n"; |
|
| 841 | + } |
|
| 824 | 842 | $this->jquery_code_for_compile[]=$event; |
| 825 | 843 | return $event; |
| 826 | 844 | } |
@@ -870,8 +888,9 @@ discard block |
||
| 870 | 888 | |
| 871 | 889 | $output=($script_tags===FALSE) ? $script : $this->inline($script); |
| 872 | 890 | |
| 873 | - if ($view!=NULL) |
|
| 874 | - $view->setVar($view_var, $output); |
|
| 891 | + if ($view!=NULL) { |
|
| 892 | + $view->setVar($view_var, $output); |
|
| 893 | + } |
|
| 875 | 894 | return $output; |
| 876 | 895 | } |
| 877 | 896 | |
@@ -994,8 +1013,9 @@ discard block |
||
| 994 | 1013 | } |
| 995 | 1014 | $retour.="$.".$method."(url,".$params.").done(function( data ) {\n"; |
| 996 | 1015 | $retour.=$this->_getOnAjaxDone($responseElement, $jsCallback)."});\n"; |
| 997 | - if ($immediatly) |
|
| 998 | - $this->jquery_code_for_compile[]=$retour; |
|
| 1016 | + if ($immediatly) { |
|
| 1017 | + $this->jquery_code_for_compile[]=$retour; |
|
| 1018 | + } |
|
| 999 | 1019 | return $retour; |
| 1000 | 1020 | } |
| 1001 | 1021 | |
@@ -1003,13 +1023,15 @@ discard block |
||
| 1003 | 1023 | $url=$this->_correctAjaxUrl($url); |
| 1004 | 1024 | $retour="url='".$url."';\n"; |
| 1005 | 1025 | $slash="/"; |
| 1006 | - if(PhalconUtils::endsWith($url, "/")) |
|
| 1007 | - $slash=""; |
|
| 1026 | + if(PhalconUtils::endsWith($url, "/")) { |
|
| 1027 | + $slash=""; |
|
| 1028 | + } |
|
| 1008 | 1029 | if(JString::isNotNull($attr)){ |
| 1009 | - if ($attr=="value") |
|
| 1010 | - $retour.="url=url+'".$slash."'+$(this).val();\n"; |
|
| 1011 | - else if($attr!=null && $attr!=="") |
|
| 1012 | - $retour.="url=url+'".$slash."'+$(this).attr('".$attr."');\n"; |
|
| 1030 | + if ($attr=="value") { |
|
| 1031 | + $retour.="url=url+'".$slash."'+$(this).val();\n"; |
|
| 1032 | + } else if($attr!=null && $attr!=="") { |
|
| 1033 | + $retour.="url=url+'".$slash."'+$(this).attr('".$attr."');\n"; |
|
| 1034 | + } |
|
| 1013 | 1035 | } |
| 1014 | 1036 | return $retour; |
| 1015 | 1037 | } |
@@ -1031,8 +1053,9 @@ discard block |
||
| 1031 | 1053 | } |
| 1032 | 1054 | |
| 1033 | 1055 | protected function _correctAjaxUrl($url) { |
| 1034 | - if (PhalconUtils::endsWith($url, "/")) |
|
| 1035 | - $url=substr($url, 0, strlen($url)-1); |
|
| 1056 | + if (PhalconUtils::endsWith($url, "/")) { |
|
| 1057 | + $url=substr($url, 0, strlen($url)-1); |
|
| 1058 | + } |
|
| 1036 | 1059 | if (strncmp($url, 'http://', 7)!=0&&strncmp($url, 'https://', 8)!=0) { |
| 1037 | 1060 | $url=$this->_di->get("url")->get($url); |
| 1038 | 1061 | } |
@@ -1054,8 +1077,9 @@ discard block |
||
| 1054 | 1077 | ."if($('#'+key,".$context.").length){ if($('#'+key,".$context.").is('[value]')) { $('#'+key,".$context.").val(data[key]);} else { $('#'+key,".$context.").html(data[key]); }}};\n"; |
| 1055 | 1078 | $retour.="\t".$jsCallback."\n |
| 1056 | 1079 | });\n"; |
| 1057 | - if ($immediatly) |
|
| 1058 | - $this->jquery_code_for_compile[]=$retour; |
|
| 1080 | + if ($immediatly) { |
|
| 1081 | + $this->jquery_code_for_compile[]=$retour; |
|
| 1082 | + } |
|
| 1059 | 1083 | return $retour; |
| 1060 | 1084 | } |
| 1061 | 1085 | |
@@ -1092,8 +1116,9 @@ discard block |
||
| 1092 | 1116 | $retour.="\tdata=$.parseJSON(data);$.each(data, function(index, value) {\n"."\tvar created=false;var maskElm=$('".$maskSelector."').first();maskElm.hide();"."\tvar newId=(maskElm.attr('id') || 'mask')+'-'+index;"."\tvar newElm=$('#'+newId);\n"."\tif(!newElm.length){\n"."\t\tnewElm=maskElm.clone();newElm.attr('id',newId);\n"."\t\tnewElm.appendTo($('".$maskSelector."').parent());\n"."\t}\n"."\tfor(var key in value){\n"."\t\t\tvar html = $('<div />').append($(newElm).clone()).html();\n"."\t\t\tif(html.indexOf('[['+key+']]')>-1){\n"."\t\t\t\tcontent=$(html.split('[['+key+']]').join(value[key]));\n"."\t\t\t\t$(newElm).replaceWith(content);newElm=content;\n"."\t\t\t}\n"."\t\tvar sel='[data-id=\"'+key+'\"]';if($(sel,newElm).length){\n"."\t\t\tvar selElm=$(sel,newElm);\n"."\t\t\t if(selElm.is('[value]')) { selElm.attr('value',value[key]);selElm.val(value[key]);} else { selElm.html(value[key]); }\n"."\t\t}\n"."}\n"."\t$(newElm).show(true);"."\n"."\t$(newElm).removeClass('hide');"."});\n"; |
| 1093 | 1117 | |
| 1094 | 1118 | $retour.="\t".$jsCallback."\n"."});\n"; |
| 1095 | - if ($immediatly) |
|
| 1096 | - $this->jquery_code_for_compile[]=$retour; |
|
| 1119 | + if ($immediatly) { |
|
| 1120 | + $this->jquery_code_for_compile[]=$retour; |
|
| 1121 | + } |
|
| 1097 | 1122 | return $retour; |
| 1098 | 1123 | } |
| 1099 | 1124 | /** |
@@ -1132,8 +1157,9 @@ discard block |
||
| 1132 | 1157 | }});\n"; |
| 1133 | 1158 | $retour.="$('#".$form."').submit();\n"; |
| 1134 | 1159 | } |
| 1135 | - if ($immediatly) |
|
| 1136 | - $this->jquery_code_for_compile[]=$retour; |
|
| 1160 | + if ($immediatly) { |
|
| 1161 | + $this->jquery_code_for_compile[]=$retour; |
|
| 1162 | + } |
|
| 1137 | 1163 | return $retour; |
| 1138 | 1164 | } |
| 1139 | 1165 | |
@@ -1209,11 +1235,13 @@ discard block |
||
| 1209 | 1235 | public function _doJQuery($element, $jqueryCall, $param="", $jsCallback="", $immediatly=false) { |
| 1210 | 1236 | $param=$this->_prep_value($param); |
| 1211 | 1237 | $callback=""; |
| 1212 | - if ($jsCallback!="") |
|
| 1213 | - $callback=", function(event){\n{$jsCallback}\n}"; |
|
| 1238 | + if ($jsCallback!="") { |
|
| 1239 | + $callback=", function(event){\n{$jsCallback}\n}"; |
|
| 1240 | + } |
|
| 1214 | 1241 | $script="$(".$this->_prep_element($element).").".$jqueryCall."(".$param.$callback.");\n"; |
| 1215 | - if ($immediatly) |
|
| 1216 | - $this->jquery_code_for_compile[]=$script; |
|
| 1242 | + if ($immediatly) { |
|
| 1243 | + $this->jquery_code_for_compile[]=$script; |
|
| 1244 | + } |
|
| 1217 | 1245 | return $script; |
| 1218 | 1246 | } |
| 1219 | 1247 | |
@@ -1241,8 +1269,9 @@ discard block |
||
| 1241 | 1269 | */ |
| 1242 | 1270 | public function _exec($js, $immediatly=false) { |
| 1243 | 1271 | $script=$js."\n"; |
| 1244 | - if ($immediatly) |
|
| 1245 | - $this->jquery_code_for_compile[]=$script; |
|
| 1272 | + if ($immediatly) { |
|
| 1273 | + $this->jquery_code_for_compile[]=$script; |
|
| 1274 | + } |
|
| 1246 | 1275 | return $script; |
| 1247 | 1276 | } |
| 1248 | 1277 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function getCol($index,$force=true){ |
| 35 | 35 | if($index<sizeof($this->cols)+1){ |
| 36 | 36 | $result=$this->cols[$index-1]; |
| 37 | - }else if ($force){ |
|
| 37 | + } else if ($force){ |
|
| 38 | 38 | $result=$this->addColAt(CssSize::SIZE_MD,1,$index); |
| 39 | 39 | $this->cols[]=$result; |
| 40 | 40 | } |