ExtensibleSet: drop-down-like button for drop-...
...down-like elements
This commit is contained in:
parent
5b1c143a1c
commit
748c3668e2
|
@ -30,6 +30,7 @@ class IconHelper
|
||||||
'angle-double-right' => 'e87b',
|
'angle-double-right' => 'e87b',
|
||||||
'up-big' => 'e825',
|
'up-big' => 'e825',
|
||||||
'down-big' => 'e828',
|
'down-big' => 'e828',
|
||||||
|
'down-open' => 'e821',
|
||||||
);
|
);
|
||||||
|
|
||||||
private $mappedUtf8Icons;
|
private $mappedUtf8Icons;
|
||||||
|
|
|
@ -273,10 +273,19 @@ class ExtensibleSetElement extends BaseElement
|
||||||
$field->attributes()->add('class', 'extend-set');
|
$field->attributes()->add('class', 'extend-set');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->add(Html::tag('li', null, [
|
if ($this->suggestionContext === null) {
|
||||||
$this->createAddNewButton(),
|
$this->add(Html::tag('li', null, [
|
||||||
$field
|
$this->createAddNewButton(),
|
||||||
]));
|
$field
|
||||||
|
]));
|
||||||
|
} else {
|
||||||
|
$this->add(Html::tag('li', null, [
|
||||||
|
$this->newInlineButtons(
|
||||||
|
$this->renderDropDownButton()
|
||||||
|
),
|
||||||
|
$field
|
||||||
|
]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createAddNewButton()
|
private function createAddNewButton()
|
||||||
|
@ -444,6 +453,16 @@ class ExtensibleSetElement extends BaseElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function renderDropDownButton()
|
||||||
|
{
|
||||||
|
return $this->createRelatedAction(
|
||||||
|
'drop-down',
|
||||||
|
$this->name,
|
||||||
|
$this->translate('Show available options'),
|
||||||
|
'down-open'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private function renderAddButton()
|
private function renderAddButton()
|
||||||
{
|
{
|
||||||
return $this->createRelatedAction(
|
return $this->createRelatedAction(
|
||||||
|
|
Loading…
Reference in New Issue