1
0
Fork 0
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:
Anh Nhan Nguyen 2013-03-19 11:16:41 -07:00 committed by epriestley
parent 17b9ac41f1
commit 3b5d9ff79a

View file

@ -288,16 +288,19 @@ final class PhabricatorObjectItemView extends AphrontView {
private function renderHandleIcon(PhabricatorObjectHandle $handle, $label) {
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(
'span',
array(
'class' => 'phabricator-object-item-handle-icon',
'sigil' => 'has-tooltip',
'style' => 'background: url('.$handle->getImageURI().')',
'meta' => array(
'tip' => $label,
),
),
$options,
'');
}