Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542

This commit is contained in:
Pantheon Automation 2015-08-27 12:03:05 -07:00 committed by Greg Anderson
parent 3b2511d96d
commit 81ccda77eb
2155 changed files with 54307 additions and 46870 deletions

View file

@ -107,7 +107,6 @@
text-decoration: none;
}
.no-touch .contextual-region .contextual .contextual-links li a:hover {
color: white;
background-image: -webkit-linear-gradient(rgb(78,159,234) 0%, rgb(65,126,210) 100%);
background-image: linear-gradient(rgb(78,159,234) 0%,rgb(65,126,210) 100%);
color: #000;
background: #f7fcff;
}

View file

@ -66,20 +66,17 @@
*/
initialize: function (attrs, options) {
// Respond to new/removed contextual links.
this.listenTo(options.contextualCollection, {
'reset remove add': this.countContextualLinks,
'add': this.lockNewContextualLinks
});
this.listenTo(options.contextualCollection, 'reset remove add', this.countContextualLinks);
this.listenTo(options.contextualCollection, 'add', this.lockNewContextualLinks);
this.listenTo(this, {
// Automatically determine visibility.
'change:contextualCount': this.updateVisibility,
// Whenever edit mode is toggled, lock all contextual links.
'change:isViewing': function (model, isViewing) {
options.contextualCollection.each(function (contextualModel) {
contextualModel.set('isLocked', !isViewing);
});
}
// Automatically determine visibility.
this.listenTo(this, 'change:contextualCount', this.updateVisibility);
// Whenever edit mode is toggled, lock all contextual links.
this.listenTo(this, 'change:isViewing', function (model, isViewing) {
options.contextualCollection.each(function (contextualModel) {
contextualModel.set('isLocked', !isViewing);
});
});
},

View file

@ -44,7 +44,7 @@ class ContextualController implements ContainerAwareInterface {
'#type' => 'contextual_links',
'#contextual_links' => _contextual_id_to_links($id),
);
$rendered[$id] = $this->container->get('renderer')->renderRoot($element);
$rendered[$id] = (string) $this->container->get('renderer')->renderRoot($element);
}
return new JsonResponse($rendered);

View file

@ -8,6 +8,7 @@
namespace Drupal\contextual\Tests;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Url;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\simpletest\WebTestBase;
use Drupal\Core\Template\Attribute;
@ -46,7 +47,7 @@ class ContextualDynamicContextTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('contextual', 'node', 'views', 'views_ui', 'language');
public static $modules = array('contextual', 'node', 'views', 'views_ui', 'language', 'menu_test');
protected function setUp() {
parent::setUp();
@ -137,6 +138,11 @@ class ContextualDynamicContextTest extends WebTestBase {
$id = 'node:node=' . $node3->id() . ':changed=' . $node3->getChangedTime() . '&langcode=it';
$this->drupalGet('node', ['language' => ConfigurableLanguage::createFromLangcode('it')]);
$this->assertContextualLinkPlaceHolder($id);
// Get a page where contextual links are directly rendered.
$this->drupalGet(Url::fromRoute('menu_test.contextual_test'));
$this->assertEscaped("<script>alert('Welcome to the jungle!')</script>");
$this->assertLink('Edit menu - contextual');
}
/**