mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 13:52:40 +01:00
Disappear PhabricatorObjectItemView's empty tooltips if is empty
Test Plan: removed one or two labels from uiexample, verified expected behaviour Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5382
This commit is contained in:
parent
17b9ac41f1
commit
3b5d9ff79a
1 changed files with 11 additions and 8 deletions
|
@ -288,16 +288,19 @@ final class PhabricatorObjectItemView extends AphrontView {
|
||||||
private function renderHandleIcon(PhabricatorObjectHandle $handle, $label) {
|
private function renderHandleIcon(PhabricatorObjectHandle $handle, $label) {
|
||||||
Javelin::initBehavior('phabricator-tooltips');
|
Javelin::initBehavior('phabricator-tooltips');
|
||||||
|
|
||||||
|
$options = array(
|
||||||
|
'class' => 'phabricator-object-item-handle-icon',
|
||||||
|
'style' => 'background: url('.$handle->getImageURI().')',
|
||||||
|
);
|
||||||
|
|
||||||
|
if (strlen($label)) {
|
||||||
|
$options['sigil'] = 'has-tooltip';
|
||||||
|
$options['meta'] = array('tip' => $label);
|
||||||
|
}
|
||||||
|
|
||||||
return javelin_tag(
|
return javelin_tag(
|
||||||
'span',
|
'span',
|
||||||
array(
|
$options,
|
||||||
'class' => 'phabricator-object-item-handle-icon',
|
|
||||||
'sigil' => 'has-tooltip',
|
|
||||||
'style' => 'background: url('.$handle->getImageURI().')',
|
|
||||||
'meta' => array(
|
|
||||||
'tip' => $label,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'');
|
'');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue