Changeset View
Changeset View
Standalone View
Standalone View
src/view/form/control/PhabricatorRemarkupControl.php
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | foreach ($actions as $action => $spec) { | ||||
$mustcapture = true; | $mustcapture = true; | ||||
$target = null; | $target = null; | ||||
} else { | } else { | ||||
$meta = array(); | $meta = array(); | ||||
$mustcapture = null; | $mustcapture = null; | ||||
$target = '_blank'; | $target = '_blank'; | ||||
} | } | ||||
$content = null; | |||||
$tip = idx($spec, 'tip'); | $tip = idx($spec, 'tip'); | ||||
if ($tip) { | if ($tip) { | ||||
$meta['tip'] = $tip; | $meta['tip'] = $tip; | ||||
$content = phutil_tag( | |||||
'span', | |||||
array( | |||||
'class' => 'aural-only', | |||||
), | |||||
$tip); | |||||
} | } | ||||
require_celerity_resource('sprite-icons-css'); | require_celerity_resource('sprite-icons-css'); | ||||
$buttons[] = javelin_tag( | $buttons[] = javelin_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'class' => implode(' ', $classes), | 'class' => implode(' ', $classes), | ||||
'href' => $href, | 'href' => $href, | ||||
'sigil' => 'remarkup-assist has-tooltip', | 'sigil' => 'remarkup-assist has-tooltip', | ||||
'meta' => $meta, | 'meta' => $meta, | ||||
'mustcapture' => $mustcapture, | 'mustcapture' => $mustcapture, | ||||
'target' => $target, | 'target' => $target, | ||||
'tabindex' => -1, | 'tabindex' => -1, | ||||
), | ), | ||||
phutil_tag( | phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'remarkup-assist sprite-icons remarkup-assist-'.$action, | 'class' => 'remarkup-assist sprite-icons remarkup-assist-'.$action, | ||||
), | ), | ||||
'')); | $content)); | ||||
} | } | ||||
$buttons = phutil_tag( | $buttons = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'remarkup-assist-bar', | 'class' => 'remarkup-assist-bar', | ||||
), | ), | ||||
$buttons); | $buttons); | ||||
Show All 30 Lines |