Skip to content

Commit af34697

Browse files
committed
Fix scrut bugs
1 parent 51d1e94 commit af34697

File tree

4 files changed

+13
-29
lines changed

4 files changed

+13
-29
lines changed

Ajax/semantic/html/base/traits/BaseTrait.php

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -213,33 +213,11 @@ protected function addBehavior(&$array,$key,$value,$before="",$after=""){
213213
}
214214

215215
public function getVariations() {
216-
return $this->_variations;
217-
}
216+
return $this->_variations;
217+
}
218218

219219
public function getStates() {
220-
return $this->_states;
221-
}
220+
return $this->_states;
221+
}
222222

223-
/*
224-
protected function addBehavior(&$array,$key,$value,$before="",$after=""){
225-
echo $key.":".$this->_self->identifier."<br>";
226-
227-
if(\is_string($value)){
228-
if(isset($array[$key])){
229-
$p=JString::replaceAtFirstAndLast($array[$key], $before, "", $after, "");
230-
$array[$key]=$before.$p.$value.$after;
231-
}else
232-
$array[$key]=$before.$value.$after;
233-
}else{
234-
if(isset($array[$key])){
235-
if(!\is_array($array[$key])){
236-
$array[$key]=[$array[$key]];
237-
}
238-
$array[$key][]=$value;
239-
}else{
240-
$array[$key]=$value;
241-
}
242-
}
243-
return $this;
244-
}*/
245223
}

Ajax/semantic/html/collections/table/HtmlTable.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,17 @@ public function setColAlignment($colIndex,$alignment){
235235
case TextAlignment::LEFT:
236236
$function="colLeft";
237237
break;
238+
238239
case TextAlignment::RIGHT:
239240
$function="colRight";
240241
break;
242+
241243
case TextAlignment::CENTER:
242244
$function="colCenter";
243245
break;
244-
default:$function="colLeft";
246+
247+
default:
248+
$function="colLeft";
245249
}
246250
$this->colAlign($colIndex, $function);
247251
return $this;

Ajax/semantic/html/content/view/HtmlViewContent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function setContent($value){
3232
$this->addContent($value);
3333
}
3434

35-
public function addElement($content, $baseClass="",$part=NULL) {
35+
public function addElement($content, $baseClass="") {
3636
$count=\sizeof($this->content);
3737
$result=new HtmlViewContent("element-" . $count . "-" . $this->identifier, $content);
3838
$result->setClass($baseClass);

Ajax/semantic/html/content/view/HtmlViewGroups.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function getItem($index){
5757
public function getItemContent($itemIndex, $contentIndex) {
5858
$item=$this->getItem($itemIndex);
5959
if (isset($item)) {
60-
return $item->getContent($contentIndex);
60+
$content=$item->getContent();
61+
if(isset($content[$contentIndex]))
62+
return $content[$contentIndex];
6163
}
6264
}
6365

0 commit comments

Comments
 (0)