Skip to content

Commit 51d1e94

Browse files
committed
Fix last Scrut bugs
1 parent bfca286 commit 51d1e94

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function getItem($index){
5757
public function getItemContent($itemIndex, $contentIndex) {
5858
$item=$this->getItem($itemIndex);
5959
if (isset($item)) {
60-
return $item->getItemContent($contentIndex);
60+
return $item->getContent($contentIndex);
6161
}
6262
}
6363

Ajax/semantic/html/elements/HtmlButton.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Ajax\semantic\html\base\traits\LabeledIconTrait;
77
use Ajax\semantic\html\base\constants\Emphasis;
88
use Ajax\semantic\html\base\constants\Social;
9+
use Ajax\semantic\html\modules\HtmlDropdown;
910

1011
/**
1112
* Semantic Button component
@@ -255,7 +256,7 @@ public function asLink($href=NULL,$target=NULL) {
255256
public static function dropdown($identifier,$value,$items=[],$asCombo=false,$icon=null){
256257
$result=new HtmlButtonGroups($identifier,[$value]);
257258
$dd=$result->addDropdown($items,$asCombo);
258-
if(isset($icon))
259+
if(isset($icon) && $dd instanceof HtmlDropdown)
259260
$dd->setIcon($icon);
260261
return $result;
261262
}

Ajax/semantic/html/elements/HtmlButtonGroups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function addDropdown($items,$asCombo=false){
5050
*/
5151
public function addElement($element, $asIcon=false) {
5252
$item=$this->addItem($element);
53-
if($asIcon)
53+
if($asIcon && $item instanceof HtmlButton)
5454
$item->asIcon($element);
5555
return $item;
5656
}

0 commit comments

Comments
 (0)