Completed
Push — master ( db4c08...7ebf5f )
by Jean-Christophe
02:43
created
Ajax/semantic/widgets/datatable/DataTableFieldAsTrait.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,15 +62,17 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	private function getFieldButton($caption,$visibleHover=true){
64 64
 		$bt= new HtmlButton("",$caption);
65
-		if($visibleHover)
66
-			$this->_visibleOver($bt);
65
+		if($visibleHover) {
66
+					$this->_visibleOver($bt);
67
+		}
67 68
 		return $bt;
68 69
 	}
69 70
 
70 71
 	private function getFieldButtons($buttons,$visibleHover=true){
71 72
 		$bts=new HtmlButtonGroups("",$buttons);
72
-		if($visibleHover)
73
-			$this->_visibleOver($bts);
73
+		if($visibleHover) {
74
+					$this->_visibleOver($bts);
75
+		}
74 76
 		return $bts;
75 77
 	}
76 78
 
@@ -87,8 +89,9 @@  discard block
 block discarded – undo
87 89
 		return $this->_fieldAs(function($id,$name,$value,$caption) use ($url,$responseElement,$cssStyle,$index,$attributes){
88 90
 			$button=new HtmlButton($id,$value,$cssStyle);
89 91
 			$button->postOnClick($url,"$(event.target).closest('tr').find(':input').serialize()",$responseElement,$attributes["ajax"]);
90
-			if(!isset($attributes["visibleHover"]) || $attributes["visibleHover"])
91
-				$this->_visibleOver($button);
92
+			if(!isset($attributes["visibleHover"]) || $attributes["visibleHover"]) {
93
+							$this->_visibleOver($button);
94
+			}
92 95
 				return $button;
93 96
 		}, $index,$attributes);
94 97
 	}
@@ -159,8 +162,9 @@  discard block
 block discarded – undo
159 162
 	private function getDefaultButton($icon,$class=null,$visibleHover=true){
160 163
 		$bt=$this->getFieldButton("",$visibleHover);
161 164
 		$bt->asIcon($icon);
162
-		if(isset($class))
163
-			$bt->addClass($class);
165
+		if(isset($class)) {
166
+					$bt->addClass($class);
167
+		}
164 168
 		return $bt;
165 169
 	}
166 170
 
Please login to merge, or discard this patch.