|');
// Check explicitly that term 2's parent is term 1.
$parents = taxonomy_term_load_parents($term2->id());
@@ -69,7 +69,7 @@ function testTermIndentation() {
$this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->get('vid' ) . '/overview', $edit, t('Save'));
// All terms back at the root level, no identation should be present.
- $this->assertNoPattern('|
|');
+ $this->assertNoPattern('|
|');
// Check explicitly that term 2 has no parents.
\Drupal::entityManager()->getStorage('taxonomy_term')->resetCache();
diff --git a/core/modules/toolbar/css/toolbar.module.css b/core/modules/toolbar/css/toolbar.module.css
index c089186..4ddfd35 100644
--- a/core/modules/toolbar/css/toolbar.module.css
+++ b/core/modules/toolbar/css/toolbar.module.css
@@ -217,12 +217,12 @@ body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
*/
/* Hide the orientation toggle when the configured narrow breakpoint is not
* active. */
-.toolbar .toolbar-tray .toolbar-toggle-orientation {
+.toolbar .toolbar-tray .js-toolbar-toggle-orientation {
display: none;
}
/* Show the orientation toggle when the configured narrow breakpoint is
* active. */
-.toolbar-oriented .toolbar-tray .toolbar-toggle-orientation {
+.toolbar-oriented .toolbar-tray .js-toolbar-toggle-orientation {
display: block;
}
.toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
diff --git a/core/modules/toolbar/js/escapeAdmin.js b/core/modules/toolbar/js/escapeAdmin.js
index 0544a40..3510985 100644
--- a/core/modules/toolbar/js/escapeAdmin.js
+++ b/core/modules/toolbar/js/escapeAdmin.js
@@ -35,7 +35,7 @@
else {
$toolbarEscape.text(Drupal.t('Home'));
}
- $toolbarEscape.closest('.toolbar-tab').removeClass('hidden');
+ $toolbarEscape.closest('.js-toolbar-tab').removeClass('hidden');
}
}
};
diff --git a/core/modules/toolbar/js/toolbar.js b/core/modules/toolbar/js/toolbar.js
index dcfbb2a..668d1f6 100644
--- a/core/modules/toolbar/js/toolbar.js
+++ b/core/modules/toolbar/js/toolbar.js
@@ -43,7 +43,7 @@
return;
}
// Process the administrative toolbar.
- $(context).find('#toolbar-administration').once('toolbar', function () {
+ $(context).find('#toolbar-administration').once('js-toolbar', function () {
// Establish the toolbar models and views.
var model = Drupal.toolbar.models.toolbarModel = new Drupal.toolbar.ToolbarModel({
@@ -68,7 +68,7 @@
// Render collapsible menus.
var menuModel = Drupal.toolbar.models.menuModel = new Drupal.toolbar.MenuModel();
Drupal.toolbar.views.menuVisualView = new Drupal.toolbar.MenuVisualView({
- el: $(this).find('.toolbar-menu-administration').get(0),
+ el: $(this).find('.js-toolbar-menu-administration').get(0),
model: menuModel,
strings: options.strings
});
@@ -129,7 +129,7 @@
// not the first 'Home' toolbar tab).
if (Drupal.toolbar.models.toolbarModel.get('orientation') === 'horizontal' && Drupal.toolbar.models.toolbarModel.get('activeTab') === null) {
Drupal.toolbar.models.toolbarModel.set({
- 'activeTab': $('.toolbar-bar .toolbar-tab:not(.home-toolbar-tab) a').get(0)
+ 'activeTab': $('.toolbar-bar .toolbar-tab:not(.js-home-toolbar-tab) a').get(0)
});
}
});
@@ -205,7 +205,7 @@
* A string representing a DOM fragment.
*/
Drupal.theme.toolbarOrientationToggle = function () {
- return '
' +
+ return '
' +
'' +
'
';
};
diff --git a/core/modules/toolbar/js/toolbar.menu.js b/core/modules/toolbar/js/toolbar.menu.js
index c14d0d4..31f6800 100644
--- a/core/modules/toolbar/js/toolbar.menu.js
+++ b/core/modules/toolbar/js/toolbar.menu.js
@@ -68,7 +68,7 @@
* simply toggling its presence.
*/
function toggleList($item, switcher) {
- var $toggle = $item.children('.toolbar-box').children('.toolbar-handle');
+ var $toggle = $item.children('.js-toolbar-box .toolbar-box').children('.toolbar-handle');
switcher = (typeof switcher !== 'undefined') ? switcher : !$item.hasClass('open');
// Toggle the item open state.
$item.toggleClass('open', switcher);
@@ -99,14 +99,14 @@
'text': ''
};
// Initialize items and their links.
- $menu.find('li > a').wrap('
');
+ $menu.find('li > a').wrap('
');
// Add a handle to each list item if it has a menu.
$menu.find('li').each(function (index, element) {
var $item = $(element);
if ($item.children('ul.menu').length) {
- var $box = $item.children('.toolbar-box');
+ var $box = $item.children('.js-toolbar-box .toolbar-box');
options.text = Drupal.t('@label', {'@label': $box.find('a').text()});
- $item.children('.toolbar-box')
+ $item.children('.js-toolbar-box .toolbar-box')
.append(Drupal.theme('toolbarMenuItemToggle', options));
}
});
@@ -156,8 +156,8 @@
// Bind event handlers.
$(document)
- .on('click.toolbar', '.toolbar-box', toggleClickHandler)
- .on('click.toolbar', '.toolbar-box a', linkClickHandler);
+ .on('click.toolbar', '.js-toolbar-box .toolbar-box', toggleClickHandler)
+ .on('click.toolbar', '.js-toolbar-box .toolbar-box a', linkClickHandler);
// Return the jQuery object.
return this.each(function (selector) {
diff --git a/core/modules/toolbar/js/views/ToolbarVisualView.js b/core/modules/toolbar/js/views/ToolbarVisualView.js
index aaccf17..ddfff2a 100644
--- a/core/modules/toolbar/js/views/ToolbarVisualView.js
+++ b/core/modules/toolbar/js/views/ToolbarVisualView.js
@@ -20,10 +20,10 @@
};
return {
- 'click .toolbar-bar .toolbar-tab': 'onTabClick',
- 'click .toolbar-toggle-orientation button': 'onOrientationToggleClick',
- 'touchend .toolbar-bar .toolbar-tab': touchEndToClick,
- 'touchend .toolbar-toggle-orientation button': touchEndToClick
+ 'click .js-toolbar-bar .js-toolbar-tab': 'onTabClick',
+ 'click .js-toolbar-toggle-orientation button': 'onOrientationToggleClick',
+ 'touchend .js-toolbar-bar .js-toolbar-tab': touchEndToClick,
+ 'touchend .js-toolbar-toggle-orientation button': touchEndToClick
};
},
@@ -39,7 +39,7 @@
// Add the tray orientation toggles.
this.$el
- .find('.toolbar-tray .toolbar-lining')
+ .find('.js-toolbar-tray .toolbar-lining')
.append(Drupal.theme('toolbarOrientationToggle'));
// Trigger an activeTab change so that listening scripts can respond on
@@ -154,7 +154,7 @@
localStorage.setItem('Drupal.toolbar.activeTabID', JSON.stringify(id));
}
// Activate the associated tray.
- var $tray = this.$el.find('[data-toolbar-tray="' + name + '"].toolbar-tray');
+ var $tray = this.$el.find('[data-toolbar-tray="' + name + '"].js-toolbar-tray');
if ($tray.length) {
$tray.addClass('active');
this.model.set('activeTray', $tray.get(0));
@@ -177,10 +177,10 @@
updateBarAttributes: function () {
var isOriented = this.model.get('isOriented');
if (isOriented) {
- this.$el.find('.toolbar-bar').attr('data-offset-top', '');
+ this.$el.find('.js-toolbar-bar').attr('data-offset-top', '');
}
else {
- this.$el.find('.toolbar-bar').removeAttr('data-offset-top');
+ this.$el.find('.js-toolbar-bar').removeAttr('data-offset-top');
}
// Toggle between a basic vertical view and a more sophisticated
// horizontal and vertical display of the toolbar bar and trays.
@@ -196,14 +196,14 @@
// the tray orientation toggle.
var antiOrientation = (orientation === 'vertical') ? 'horizontal' : 'vertical';
// Update the orientation of the trays.
- var $trays = this.$el.find('.toolbar-tray')
+ var $trays = this.$el.find('.js-toolbar-tray')
.removeClass('toolbar-tray-horizontal toolbar-tray-vertical')
- .addClass('toolbar-tray-' + orientation);
+ .addClass('js-toolbar-tray-' + orientation);
// Update the tray orientation toggle button.
var iconClass = 'toolbar-icon-toggle-' + orientation;
var iconAntiClass = 'toolbar-icon-toggle-' + antiOrientation;
- var $orientationToggle = this.$el.find('.toolbar-toggle-orientation')
+ var $orientationToggle = this.$el.find('.js-toolbar-toggle-orientation')
.toggle(this.model.get('isTrayToggleVisible'));
$orientationToggle.find('button')
.val(antiOrientation)
@@ -227,7 +227,7 @@
* Sets the tops of the trays so that they align with the bottom of the bar.
*/
adjustPlacement: function () {
- var $trays = this.$el.find('.toolbar-tray');
+ var $trays = this.$el.find('.js-toolbar-tray');
if (!this.model.get('isOriented')) {
$trays.css('padding-top', 0);
$trays.removeClass('toolbar-tray-horizontal').addClass('toolbar-tray-vertical');
@@ -235,7 +235,7 @@
else {
// The toolbar container is invisible. Its placement is used to
// determine the container for the trays.
- $trays.css('padding-top', this.$el.find('.toolbar-bar').outerHeight());
+ $trays.css('padding-top', this.$el.find('.js-toolbar-bar').outerHeight());
}
},
diff --git a/core/modules/toolbar/src/Element/ToolbarItem.php b/core/modules/toolbar/src/Element/ToolbarItem.php
index 929dac4..dfc7fc5 100644
--- a/core/modules/toolbar/src/Element/ToolbarItem.php
+++ b/core/modules/toolbar/src/Element/ToolbarItem.php
@@ -82,7 +82,7 @@ public static function preRenderToolbarItem($element) {
$element['tray']['#wrapper_attributes'] = array();
}
$element['tray']['#wrapper_attributes'] += $attributes;
- $element['tray']['#wrapper_attributes']['class'][] = 'toolbar-tray';
+ $element['tray']['#wrapper_attributes']['class'][] = 'js-toolbar-tray';
}
$element['tab']['#attributes']['class'][] = 'toolbar-item';
diff --git a/core/modules/toolbar/templates/toolbar.html.twig b/core/modules/toolbar/templates/toolbar.html.twig
index 30e61ea..aba6c0d 100644
--- a/core/modules/toolbar/templates/toolbar.html.twig
+++ b/core/modules/toolbar/templates/toolbar.html.twig
@@ -23,20 +23,20 @@
*/
#}