Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023

This commit is contained in:
Pantheon Automation 2015-09-04 13:20:09 -07:00 committed by Greg Anderson
parent 2720a9ec4b
commit f3791f1da3
1898 changed files with 54300 additions and 11481 deletions

View file

@ -13,15 +13,18 @@
* Attaches the tour's toolbar tab behavior.
*
* It uses the query string for:
* - tour: When ?tour=1 is present, the tour will start automatically
* after the page has loaded.
* - tips: Pass ?tips=class in the url to filter the available tips to
* the subset which match the given class.
* - tour: When ?tour=1 is present, the tour will start automatically after
* the page has loaded.
* - tips: Pass ?tips=class in the url to filter the available tips to the
* subset which match the given class.
*
* @example
* http://example.com/foo?tour=1&tips=bar
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attach tour functionality on `tour` events.
*/
Drupal.behaviors.tour = {
attach: function (context) {
@ -107,7 +110,7 @@
/**
* @type {object}
*/
events: {'click': 'onClick'},
events: {click: 'onClick'},
/**
* Handles edit mode toggle interactions.
@ -125,6 +128,7 @@
* @inheritdoc
*
* @return {Drupal.tour.views.ToggleTourView}
* The `ToggleTourView` view.
*/
render: function () {
// Render the visibility.
@ -168,6 +172,7 @@
* Toolbar tab click event handler; toggles isActive.
*
* @param {jQuery.Event} event
* The click event.
*/
onClick: function (event) {
this.model.set('isActive', !this.model.get('isActive'));

View file

@ -8,7 +8,6 @@
namespace Drupal\tour\Plugin\tour\tip;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Utility\Token;
@ -121,7 +120,7 @@ class TipPluginText extends TipPluginBase implements ContainerFactoryPluginInter
* {@inheritdoc}
*/
public function getOutput() {
$output = '<h2 class="tour-tip-label" id="tour-tip-' . $this->getAriaId() . '-label">' . SafeMarkup::checkPlain($this->getLabel()) . '</h2>';
$output = '<h2 class="tour-tip-label" id="tour-tip-' . $this->getAriaId() . '-label">' . Html::escape($this->getLabel()) . '</h2>';
$output .= '<p class="tour-tip-body" id="tour-tip-' . $this->getAriaId() . '-contents">' . Xss::filterAdmin($this->token->replace($this->getBody())) . '</p>';
return array('#markup' => $output);
}

View file

@ -21,7 +21,7 @@ class TourTest extends TourTestBasic {
*
* @var array
*/
public static $modules = array('tour', 'locale', 'language', 'tour_test');
public static $modules = ['block', 'tour', 'locale', 'language', 'tour_test'];
/**
* The permissions required for a logged in user to test tour tips.
@ -41,6 +41,18 @@ class TourTest extends TourTestBasic {
'tour-test-1' => array(),
);
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->drupalPlaceBlock('local_actions_block', [
'theme' => 'seven',
'region' => 'content'
]);
}
/**
* Test tour functionality.
*/

View file

@ -7,7 +7,7 @@
namespace Drupal\tour_test\Plugin\tour\tip;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Html;
use Drupal\tour\TipPluginBase;
/**
@ -40,7 +40,7 @@ class TipPluginImage extends TipPluginBase {
* {@inheritdoc}
*/
public function getOutput() {
$prefix = '<h2 class="tour-tip-label" id="tour-tip-' . $this->get('ariaId') . '-label">' . SafeMarkup::checkPlain($this->get('label')) . '</h2>';
$prefix = '<h2 class="tour-tip-label" id="tour-tip-' . $this->get('ariaId') . '-label">' . Html::escape($this->get('label')) . '</h2>';
$prefix .= '<p class="tour-tip-image" id="tour-tip-' . $this->get('ariaId') . '-contents">';
return [
'#prefix' => $prefix,