Commit a8313cf4 authored by gdd's avatar gdd

Merge remote-tracking branch 'core/8.x' into 8.x-file-config

parents 79c10d63 d790839e
......@@ -2504,7 +2504,8 @@ function drupal_valid_test_ua() {
}
}
return FALSE;
$test_prefix = FALSE;
return $test_prefix;
}
/**
......@@ -2709,6 +2710,41 @@ function language_list($only_enabled = FALSE) {
return $only_enabled ? $languages['enabled'] : $languages['all'];
}
/**
* Loads a language object from the database.
*
* @param $langcode
* The language code.
*
* @return
* A fully-populated language object or FALSE.
*/
function language_load($langcode) {
$languages = language_list();
return isset($languages[$langcode]) ? $languages[$langcode] : FALSE;
}
/**
* Produced the printed name for a language for display.
*
* @param $langcode
* The language code.
*
* @return
* The printed name of the language.
*/
function language_name($langcode) {
if ($langcode == LANGUAGE_NONE) {
return t('None');
}
if ($language = language_load($langcode)) {
return $language->name;
}
return t('Unknown (@langcode)', array('@langcode' => $langcode));
}
/**
* Returns the default language used on the site.
*
......@@ -2716,16 +2752,13 @@ function language_list($only_enabled = FALSE) {
* A language object.
*/
function language_default() {
$default = variable_get(
'language_default',
(object) array(
'langcode' => 'en',
'name' => 'English',
'direction' => 0,
'enabled' => 1,
'weight' => 0,
)
);
$default = variable_get('language_default', (object) array(
'langcode' => 'en',
'name' => 'English',
'direction' => 0,
'enabled' => 1,
'weight' => 0,
));
$default->default = TRUE;
return $default;
}
......
......@@ -5344,9 +5344,24 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
// themes as provided by a distribution. It is pristine in the same way that
// the 'core/modules' directory is pristine for core; users should avoid
// any modification by using the sites/all or sites/<domain> directories.
$profiles = array();
$profile = drupal_get_profile();
if (file_exists("profiles/$profile/$directory")) {
$searchdir[] = "profiles/$profile/$directory";
// For SimpleTest to be able to test modules packaged together with a
// distribution we need to include the profile of the parent site (in which
// test runs are triggered).
if (drupal_valid_test_ua()) {
$testing_profile = variable_get('simpletest_parent_profile', FALSE);
if ($testing_profile && $testing_profile != $profile) {
$profiles[] = $testing_profile;
}
}
// In case both profile directories contain the same extension, the actual
// profile always has precedence.
$profiles[] = $profile;
foreach ($profiles as $profile) {
if (file_exists("profiles/$profile/$directory")) {
$searchdir[] = "profiles/$profile/$directory";
}
}
// Always search sites/all/* as well as the global directories.
......
......@@ -213,11 +213,6 @@ function install_begin_request(&$install_state) {
// Add any installation parameters passed in via the URL.
$install_state['parameters'] += $_GET;
// @todo: remove this testbot compatibility layer once the testbot is fixed.
if (isset($_GET['locale'])) {
$install_state['parameters']['langcode'] = $_GET['locale'];
}
// Validate certain core settings that are used throughout the installation.
if (!empty($install_state['parameters']['profile'])) {
$install_state['parameters']['profile'] = preg_replace('/[^a-zA-Z_0-9]/', '', $install_state['parameters']['profile']);
......
......@@ -9,33 +9,33 @@
* The language is determined using a URL language indicator:
* path prefix or domain according to the configuration.
*/
const LOCALE_LANGUAGE_NEGOTIATION_URL = 'locale-url';
const LANGUAGE_NEGOTIATION_URL = 'locale-url';
/**
* The language is set based on the browser language settings.
*/
const LOCALE_LANGUAGE_NEGOTIATION_BROWSER = 'locale-browser';
const LANGUAGE_NEGOTIATION_BROWSER = 'locale-browser';
/**
* The language is determined using the current interface language.
*/
const LOCALE_LANGUAGE_NEGOTIATION_INTERFACE = 'locale-interface';
const LANGUAGE_NEGOTIATION_INTERFACE = 'locale-interface';
/**
* If no URL language is available language is determined using an already
* detected one.
*/
const LOCALE_LANGUAGE_NEGOTIATION_URL_FALLBACK = 'locale-url-fallback';
const LANGUAGE_NEGOTIATION_URL_FALLBACK = 'locale-url-fallback';
/**
* The language is set based on the user language settings.
*/
const LOCALE_LANGUAGE_NEGOTIATION_USER = 'locale-user';
const LANGUAGE_NEGOTIATION_USER = 'locale-user';
/**
* The language is set based on the request/session parameters.
*/
const LOCALE_LANGUAGE_NEGOTIATION_SESSION = 'locale-session';
const LANGUAGE_NEGOTIATION_SESSION = 'locale-session';
/**
* Regular expression pattern used to localize JavaScript strings.
......@@ -88,13 +88,13 @@
* URL language negotiation: use the path prefix as URL language
* indicator.
*/
const LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX = 0;
const LANGUAGE_NEGOTIATION_URL_PREFIX = 0;
/**
* URL language negotiation: use the domain as URL language
* indicator.
*/
const LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN = 1;
const LANGUAGE_NEGOTIATION_URL_DOMAIN = 1;
/**
* @defgroup locale-languages-negotiation Language negotiation options
......@@ -264,12 +264,12 @@ function locale_language_from_session($languages) {
function locale_language_from_url($languages) {
$language_url = FALSE;
if (!language_negotiation_get_any(LOCALE_LANGUAGE_NEGOTIATION_URL)) {
if (!language_negotiation_get_any(LANGUAGE_NEGOTIATION_URL)) {
return $language_url;
}
switch (variable_get('locale_language_negotiation_url_part', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX)) {
case LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX:
switch (variable_get('locale_language_negotiation_url_part', LANGUAGE_NEGOTIATION_URL_PREFIX)) {
case LANGUAGE_NEGOTIATION_URL_PREFIX:
// $_GET['q'] might not be available at this time, because
// path initialization runs after the language bootstrap phase.
list($language, $_GET['q']) = language_url_split_prefix(isset($_GET['q']) ? $_GET['q'] : NULL, $languages);
......@@ -278,7 +278,7 @@ function locale_language_from_url($languages) {
}
break;
case LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN:
case LANGUAGE_NEGOTIATION_URL_DOMAIN:
$domains = locale_language_negotiation_url_domains();
foreach ($languages as $language) {
// Skip check if the language doesn't have a domain.
......@@ -333,7 +333,7 @@ function locale_language_from_url($languages) {
*/
function locale_language_url_fallback($language = NULL, $language_type = LANGUAGE_TYPE_INTERFACE) {
$default = language_default();
$prefix = (variable_get('locale_language_negotiation_url_part', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX) == LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX);
$prefix = (variable_get('locale_language_negotiation_url_part', LANGUAGE_NEGOTIATION_URL_PREFIX) == LANGUAGE_NEGOTIATION_URL_PREFIX);
// If the default language is not configured to convey language information,
// a missing URL language information indicates that URL language should be
......@@ -433,17 +433,27 @@ function locale_language_url_rewrite_url(&$path, &$options) {
}
if (isset($options['language'])) {
switch (variable_get('locale_language_negotiation_url_part', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX)) {
case LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN:
switch (variable_get('locale_language_negotiation_url_part', LANGUAGE_NEGOTIATION_URL_PREFIX)) {
case LANGUAGE_NEGOTIATION_URL_DOMAIN:
$domains = locale_language_negotiation_url_domains();
if (!empty($domains[$options['language']->langcode])) {
// Ask for an absolute URL with our modified base_url.
global $is_https;
$url_scheme = ($is_https) ? 'https://' : 'http://';
$options['absolute'] = TRUE;
$options['base_url'] = $domains[$options['language']->langcode];
$options['base_url'] = $url_scheme . $domains[$options['language']->langcode];
if (isset($options['https']) && variable_get('https', FALSE)) {
if ($options['https'] === TRUE) {
$options['base_url'] = str_replace('http://', 'https://', $options['base_url']);
}
elseif ($options['https'] === FALSE) {
$options['base_url'] = str_replace('https://', 'http://', $options['base_url']);
}
}
}
break;
case LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX:
case LANGUAGE_NEGOTIATION_URL_PREFIX:
$prefixes = locale_language_negotiation_url_prefixes();
if (!empty($prefixes[$options['language']->langcode])) {
$options['prefix'] = $prefixes[$options['language']->langcode] . '/';
......@@ -496,7 +506,7 @@ function locale_language_url_rewrite_session(&$path, &$options) {
$languages = language_list(TRUE);
$query_param = check_plain(variable_get('locale_language_negotiation_session_param', 'language'));
$query_value = isset($_GET[$query_param]) ? check_plain($_GET[$query_param]) : NULL;
$query_rewrite = isset($languages[$query_value]) && language_negotiation_get_any(LOCALE_LANGUAGE_NEGOTIATION_SESSION);
$query_rewrite = isset($languages[$query_value]) && language_negotiation_get_any(LANGUAGE_NEGOTIATION_SESSION);
}
else {
$query_rewrite = FALSE;
......
......@@ -2123,7 +2123,7 @@ function menu_contextual_links($module, $parent_path, $args) {
$links = array();
// Performance: In case a previous invocation for the same parent path did not
// return any links, we immediately return here.
if (isset($path_empty[$parent_path])) {
if (isset($path_empty[$parent_path]) && strpos($parent_path, '%') !== FALSE) {
return $links;
}
// Construct the item-specific parent path.
......
......@@ -178,6 +178,30 @@ function system_list($type) {
$lists['filepaths'][] = array('type' => $record->type, 'name' => $record->name, 'filepath' => $record->filename);
}
}
foreach ($lists['theme'] as $key => $theme) {
if (!empty($theme->info['base theme'])) {
// Make a list of the theme's base themes.
$lists['theme'][$key]->base_themes = drupal_find_base_themes($lists['theme'], $key);
// Don't proceed if there was a problem with the root base theme.
if (!current($lists['theme'][$key]->base_themes)) {
continue;
}
// Determine the root base theme.
$base_key = key($lists['theme'][$key]->base_themes);
// Add to the list of sub-themes for each of the theme's base themes.
foreach (array_keys($lists['theme'][$key]->base_themes) as $base_theme) {
$lists['theme'][$base_theme]->sub_themes[$key] = $lists['theme'][$key]->info['name'];
}
// Add the base theme's theme engine info.
$lists['theme'][$key]->info['engine'] = $lists['theme'][$base_key]->info['engine'];
}
else {
// A plain theme is its own base theme.
$base_key = $key;
}
// Set the theme engine prefix.
$lists['theme'][$key]->prefix = ($lists['theme'][$key]->info['engine'] == 'theme') ? $base_key : $lists['theme'][$key]->info['engine'];
}
cache('bootstrap')->set('system_list', $lists);
}
// To avoid a separate database lookup for the filepath, prime the
......
......@@ -630,7 +630,13 @@ function theme_pager_link($variables) {
}
}
return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => $query));
// @todo l() cannot be used here, since it adds an 'active' class based on the
// path only (which is always the current path for pager links). Apparently,
// none of the pager links is active at any time - but it should still be
// possible to use l() here.
// @see http://drupal.org/node/1410574
$attributes['href'] = url($_GET['q'], array('query' => $query));
return '<a' . drupal_attributes($attributes) . '>' . check_plain($text) . '</a>';
}
/**
......
......@@ -431,21 +431,27 @@ function path_load($conditions) {
* - langcode: (optional) The language code of the alias.
*/
function path_save(&$path) {
$path += array('pid' => NULL, 'langcode' => LANGUAGE_NONE);
$path += array('langcode' => LANGUAGE_NONE);
// Insert or update the alias.
$status = drupal_write_record('url_alias', $path, (!empty($path['pid']) ? 'pid' : array()));
// Load the stored alias, if any.
if (!empty($path['pid']) && !isset($path['original'])) {
$path['original'] = path_load($path['pid']);
}
// Verify that a record was written.
if ($status) {
if ($status === SAVED_NEW) {
module_invoke_all('path_insert', $path);
}
else {
module_invoke_all('path_update', $path);
}
drupal_clear_path_cache($path['source']);
if (empty($path['pid'])) {
drupal_write_record('url_alias', $path);
module_invoke_all('path_insert', $path);
}
else {
drupal_write_record('url_alias', $path, array('pid'));
module_invoke_all('path_update', $path);
}
// Clear internal properties.
unset($path['original']);
// Clear the static alias cache.
drupal_clear_path_cache($path['source']);
}
/**
......
......@@ -723,7 +723,7 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) {
* names of the themes and the values are objects having the following
* properties:
* - 'filename': The name of the .info file.
* - 'name': The name of the theme.
* - 'name': The machine name of the theme.
* - 'status': 1 for enabled, 0 for disabled themes.
* - 'info': The contents of the .info file.
* - 'stylesheets': A two dimensional array, using the first key for the
......@@ -733,7 +733,10 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) {
* - 'scripts': An associative array of JavaScripts, using the filename as key
* and the complete filepath as value.
* - 'engine': The name of the theme engine.
* - 'base theme': The name of the base theme.
* - 'base_theme': The name of the base theme.
* - 'base_themes': An ordered array of all the base themes. If the first item
* is NULL, a base theme is missing for this theme.
* - 'sub_themes': An unordered array of sub-themes of this theme.
*/
function list_themes($refresh = FALSE) {
$list = &drupal_static(__FUNCTION__, array());
......@@ -789,6 +792,47 @@ function list_themes($refresh = FALSE) {
return $list;
}
/**
* Find all the base themes for the specified theme.
*
* Themes can inherit templates and function implementations from earlier themes.
*
* @param $themes
* An array of available themes.
* @param $key
* The name of the theme whose base we are looking for.
* @param $used_keys
* A recursion parameter preventing endless loops.
* @return
* Returns an array of all of the theme's ancestors; the first element's value
* will be NULL if an error occurred.
*/
function drupal_find_base_themes($themes, $key, $used_keys = array()) {
$base_key = $themes[$key]->info['base theme'];
// Does the base theme exist?
if (!isset($themes[$base_key])) {
return array($base_key => NULL);
}
$current_base_theme = array($base_key => $themes[$base_key]->info['name']);
// Is the base theme itself a child of another theme?
if (isset($themes[$base_key]->info['base theme'])) {
// Do we already know the base themes of this theme?
if (isset($themes[$base_key]->base_themes)) {
return $themes[$base_key]->base_themes + $current_base_theme;
}
// Prevent loops.
if (!empty($used_keys[$base_key])) {
return array($base_key => NULL);
}
$used_keys[$base_key] = TRUE;
return drupal_find_base_themes($themes, $base_key, $used_keys) + $current_base_theme;
}
// If we get here, then this is our parent theme.
return $current_base_theme;
}
/**
* Generates themed output.
*
......
......@@ -101,6 +101,12 @@ function update_prepare_d8_bootstrap() {
),
);
if ($has_required_schema) {
// Bootstrap variables so we can update theme while preparing the update
// process.
drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
// Update the dynamic include paths that might be used before running the
// proper update functions.
update_prepare_stored_includes();
// Update the environment for the language bootstrap if needed.
update_prepare_d8_language();
......@@ -113,7 +119,7 @@ function update_prepare_d8_bootstrap() {
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
'default' => '',
);
$langcode_indexes = array('indexes' =>
array(
......@@ -127,6 +133,22 @@ function update_prepare_d8_bootstrap() {
}
}
/**
* Fix stored include paths to match the "/core" migration.
*/
function update_prepare_stored_includes() {
// Update language negotiation settings.
foreach (language_types() as $language_type) {
$negotiation = variable_get("language_negotiation_$language_type", array());
foreach ($negotiation as $id => &$provider) {
if (isset($negotiation[$id]['file']) && $negotiation[$id]['file'] == 'includes/locale.inc') {
$negotiation[$id]['file'] = 'core/includes/locale.inc';
}
}
variable_set("language_negotiation_$language_type", $negotiation);
}
}
/**
* Prepare Drupal 8 language changes for the bootstrap if needed.
*/
......@@ -161,17 +183,6 @@ function update_prepare_d8_language() {
db_drop_field('languages', 'domain');
db_drop_field('languages', 'native');
// Rename language column to langcode and set it again as the primary key.
db_drop_primary_key('languages');
$langcode_spec = array(
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
'description' => "Language code, e.g. 'de' or 'en-US'.",
);
db_change_field('languages', 'language', 'langcode', $langcode_spec, array('primary key' => array('langcode')));
// Rename the languages table to language.
db_rename_table('languages', 'language');
......@@ -181,6 +192,10 @@ function update_prepare_d8_language() {
$modules = array('language');
update_module_add_to_system($modules);
update_module_enable($modules);
// Rename 'language' column to 'langcode'.
require_once DRUPAL_ROOT . '/core/modules/language/language.install';
language_update_8000();
}
}
......
......@@ -330,7 +330,7 @@ public function prepareInstallDirectory(&$filetransfer, $directory) {
}
catch (FileTransferException $e) {
$message = t($e->getMessage(), $e->arguments);
$throw_message = t('Unable to create %directory due to the following: %reason', array('%directory' => $install_location, '%reason' => $message));
$throw_message = t('Unable to create %directory due to the following: %reason', array('%directory' => $directory, '%reason' => $message));
throw new UpdaterException($throw_message);
}
}
......
......@@ -494,7 +494,7 @@ $(document).bind('state:disabled', function(e) {
$(e.target)
.attr('disabled', e.value)
.filter('.form-element')
.closest('.form-item, .form-submit, .form-wrapper')[e.value ? 'addClass' : 'removeClass']('form-disabled');
.closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value);
// Note: WebKit nightlies don't reflect that change correctly.
// See https://bugs.webkit.org/show_bug.cgi?id=23789
......@@ -514,7 +514,7 @@ $(document).bind('state:required', function(e) {
$(document).bind('state:visible', function(e) {
if (e.trigger) {
$(e.target).closest('.form-item, .form-submit, .form-wrapper')[e.value ? 'show' : 'hide']();
$(e.target).closest('.form-item, .form-submit, .form-wrapper').toggle(e.value);
}
});
......
......@@ -397,12 +397,12 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) {
if ($(item).is('.tabledrag-root')) {
// Swap with the next group (necessarily a top-level one).
var groupHeight = 0;
nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false);
var nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false);
if (nextGroup) {
$(nextGroup.group).each(function () {
groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight;
});
nextGroupRow = $(nextGroup.group).filter(':last').get(0);
var nextGroupRow = $(nextGroup.group).filter(':last').get(0);
self.rowObject.swap('after', nextGroupRow);
// No need to check for indentation, 0 is the only valid one.
window.scrollBy(0, parseInt(groupHeight, 10));
......
......@@ -2,7 +2,8 @@
Drupal.behaviors.tableSelect = {
attach: function (context, settings) {
$('table:has(th.select-all)', context).once('table-select', Drupal.tableSelect);
// Select the inner-most table in case of nested tables.
$('th.select-all', context).closest('table').once('table-select', Drupal.tableSelect);
}
};
......@@ -69,7 +70,7 @@ Drupal.tableSelectRange = function (from, to, state) {
}
// Either add or remove the selected class based on the state of the target checkbox.
$(i)[ state ? 'addClass' : 'removeClass' ]('selected');
$(i).toggleClass('selected', state);
$('input:checkbox', i).each(function () {
this.checked = state;
});
......
......@@ -25,15 +25,6 @@
* @ingroup themeable
*/
?>
<?php
// Add table javascript.
drupal_add_js('core/misc/tableheader.js');
drupal_add_js(drupal_get_path('module', 'block') . '/block.js');
foreach ($block_regions as $region => $title) {
drupal_add_tabledrag('blocks', 'match', 'sibling', 'block-region-select', 'block-region-' . $region, NULL, FALSE);
drupal_add_tabledrag('blocks', 'order', 'sibling', 'block-weight', 'block-weight-' . $region);
}
?>
<table id="blocks" class="sticky-enabled">
<thead>
<tr>
......
......@@ -20,7 +20,6 @@ a.block-demo-backlink:link,
a.block-demo-backlink:visited {
background-color: #B4D7F0;
-moz-border-radius: 0 0 10px 10px;
-webkit-border-radius: 0 0 10px 10px;
border-radius: 0 0 10px 10px;
color: #000;
font-family: "Lucida Grande", Verdana, sans-serif;
......
......@@ -84,13 +84,22 @@ function block_admin_display_prepare_blocks($theme) {
* @see block_admin_display_form_submit()
*/
function block_admin_display_form($form, &$form_state, $blocks, $theme, $block_regions = NULL) {
$form['#attached']['css'] = array(drupal_get_path('module', 'block') . '/block.admin.css');
$path = drupal_get_path('module', 'block');
$form['#attached']['css'][] = $path . '/block.admin.css';
$form['#attached']['js'][] = 'core/misc/tableheader.js';
$form['#attached']['js'][] = $path . '/block.js';
// Get a list of block regions if one was not provided.
if (!isset($block_regions)) {
$block_regions = system_region_list($theme, REGIONS_VISIBLE);
}
// Add a last region for disabled blocks.
$block_regions_with_disabled = $block_regions + array(BLOCK_REGION_NONE => BLOCK_REGION_NONE);
foreach ($block_regions_with_disabled as $region => $title) {
$form['#attached']['drupal_add_tabledrag'][] = array('blocks', 'match', 'sibling', 'block-region-select', 'block-region-' . $region, NULL, FALSE);
$form['#attached']['drupal_add_tabledrag'][] = array('blocks', 'order', 'sibling', 'block-weight', 'block-weight-' . $region);
}
// Weights range from -delta to +delta, so delta should be at least half
// of the amount of blocks present. This makes sure all blocks in the same
......@@ -104,8 +113,7 @@ function block_admin_display_form($form, &$form_state, $blocks, $theme, $block_r
);
$form['block_regions'] = array(
'#type' => 'value',
// Add a last region for disabled blocks.
'#value' => $block_regions + array(BLOCK_REGION_NONE => BLOCK_REGION_NONE),
'#value' => $block_regions_with_disabled,
);
$form['blocks'] = array();
$form['#tree'] = TRUE;
......
(function ($) {
Drupal.behaviors.bookFieldsetSummaries = {
attach: function (context) {
$('fieldset.book-form', context).drupalSetSummary(function (context) {
var val = $('.form-item-book-bid select').val();
$('fieldset.book-outline-form', context).drupalSetSummary(function (context) {
var $select = $('.form-item-book-bid select');
var val = $select.val();
if (val === '0') {
return Drupal.t('Not in book');
......@@ -13,7 +13,7 @@ Drupal.behaviors.bookFieldsetSummaries = {
return Drupal.t('New book');
}
else {
return Drupal.checkPlain($('.form-item-book-bid select :selected').text());
return Drupal.checkPlain($select.find(':selected').text());
}
});
}
......
......@@ -9,8 +9,6 @@ div.contextual-links-wrapper {
}
div.contextual-links-wrapper ul.contextual-links {
-moz-border-radius: 0 4px 4px 4px;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 4px;
border-radius: 0 4px 4px 4px;
left: 0;
right: auto;
......
......@@ -40,7 +40,6 @@ a.contextual-links-trigger {
width: 28px;
overflow: hidden;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
a.contextual-links-trigger:hover,
......@@ -54,8 +53,6 @@ div.contextual-links-active a.contextual-links-trigger {
position: relative;
z-index: 1;
-moz-border-radius: 4px 4px 0 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
border-radius: 4px 4px 0 0;
}
div.contextual-links-wrapper ul.contextual-links {
......@@ -70,10 +67,6 @@ div.contextual-links-wrapper ul.contextual-links {
top: 18px;
white-space: nowrap;
-moz-border-radius: 4px 0 4px 4px; /* LTR */
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-top-right-radius: 0; /* LTR */
-webkit-border-top-left-radius: 4px; /* LTR */
border-radius: 4px 0 4px 4px; /* LTR */
}
.contextual-links-region:hover a.contextual-links-trigger,
......
......@@ -3,3 +3,4 @@ description = Provides contextual links to perform actions related to elements o
package = Core
version = VERSION
core = 8.x
files[] = contextual.test
<?php
/**
* @file
* Tests for contextual.module.
*/
/**
* Tests accessible links after inaccessible links on dynamic context.
*/
class ContextualDynamicContextTestCase extends DrupalWebTestCase {
protected $profile = 'testing';
public static function getInfo() {
return array(
'name' => 'Contextual links on node lists',
'description' => 'Tests if contextual links are showing on the front page depending on permissions.',
'group' => 'Contextual',
);
}
function setUp() {