#622766 by sun: Add contextual links UI as a JS library.
parent
4d46b7cdf8
commit
905d7c66c4
|
@ -1056,6 +1056,19 @@ function system_library() {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Contextual links.
|
||||||
|
$libraries['contextual-links'] = array(
|
||||||
|
'title' => 'Contextual links',
|
||||||
|
'website' => 'http://drupal.org/node/473268',
|
||||||
|
'version' => '1.0',
|
||||||
|
'js' => array(
|
||||||
|
'misc/contextual_links.js' => array(),
|
||||||
|
),
|
||||||
|
'css' => array(
|
||||||
|
'misc/contextual_links.css' => array(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
// Vertical Tabs.
|
// Vertical Tabs.
|
||||||
$libraries['vertical-tabs'] = array(
|
$libraries['vertical-tabs'] = array(
|
||||||
'title' => 'Vertical Tabs',
|
'title' => 'Vertical Tabs',
|
||||||
|
@ -3613,8 +3626,7 @@ function system_build_contextual_links($element) {
|
||||||
'#links' => $links,
|
'#links' => $links,
|
||||||
'#attributes' => array('class' => array('contextual-links')),
|
'#attributes' => array('class' => array('contextual-links')),
|
||||||
'#attached' => array(
|
'#attached' => array(
|
||||||
'js' => array('misc/contextual_links.js'),
|
'library' => array(array('system', 'contextual-links')),
|
||||||
'css' => array('misc/contextual_links.css'),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue