Loading core/.eslintrc.jquery.json +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ "jquery/no-sizzle": 0, "jquery/no-slide": 0, "jquery/no-submit": 2, "jquery/no-text": 0, "jquery/no-text": 2, "jquery/no-toggle": 0, "jquery/no-trigger": 0, "jquery/no-trim": 2, Loading core/misc/tableresponsive.es6.js +8 −4 Original line number Diff line number Diff line Loading @@ -108,13 +108,15 @@ // If the table has hidden columns, associate an action link with the // table to show the columns. if (hiddenLength > 0) { this.$link.show().text(this.showText); this.$link.show(); this.$link[0].textContent = this.showText; } // When the toggle is pegged, its presence is maintained because the user // has interacted with it. This is necessary to keep the link visible if // the user adjusts screen size and changes the visibility of columns. if (!pegged && hiddenLength === 0) { this.$link.hide().text(this.hideText); this.$link.hide(); this.$link[0].textContent = this.hideText; } }, Loading Loading @@ -148,7 +150,8 @@ // Keep track of the revealed headers, so they can be hidden later. self.$revealedCells = $().add(self.$revealedCells).add($header); }); this.$link.text(this.hideText).data('pegged', 1); this.$link[0].textContent = this.hideText; this.$link.data('pegged', 1); } // Hide revealed columns. else { Loading Loading @@ -177,7 +180,8 @@ // Return the rest of the style attribute values to the element. $cell.attr('style', newProps.join(';')); }); this.$link.text(this.showText).data('pegged', 0); this.$link[0].textContent = this.showText; this.$link.data('pegged', 0); // Refresh the toggle link. $(window).trigger('resize.tableresponsive'); } Loading core/misc/tableresponsive.js +8 −4 Original line number Diff line number Diff line Loading @@ -33,11 +33,13 @@ var hiddenLength = this.$headers.filter('.priority-medium:hidden, .priority-low:hidden').length; if (hiddenLength > 0) { this.$link.show().text(this.showText); this.$link.show(); this.$link[0].textContent = this.showText; } if (!pegged && hiddenLength === 0) { this.$link.hide().text(this.hideText); this.$link.hide(); this.$link[0].textContent = this.hideText; } }, eventhandlerToggleColumns: function eventhandlerToggleColumns(e) { Loading @@ -58,7 +60,8 @@ $header.show(); self.$revealedCells = $().add(self.$revealedCells).add($header); }); this.$link.text(this.hideText).data('pegged', 1); this.$link[0].textContent = this.hideText; this.$link.data('pegged', 1); } else { this.$revealedCells.hide(); this.$revealedCells.each(function (index, element) { Loading @@ -81,7 +84,8 @@ $cell.attr('style', newProps.join(';')); }); this.$link.text(this.showText).data('pegged', 0); this.$link[0].textContent = this.showText; this.$link.data('pegged', 0); $(window).trigger('resize.tableresponsive'); } } Loading core/misc/vertical-tabs.es6.js +5 −6 Original line number Diff line number Diff line Loading @@ -84,8 +84,9 @@ // Transform each details into a tab. $details.each(function () { const $that = $(this); const $summary = $that.find('> summary'); const verticalTab = new Drupal.verticalTab({ title: $that.find('> summary').text(), title: $summary.length ? $summary[0].textContent : '', details: $that, }); tabList.append(verticalTab.item); Loading Loading @@ -281,15 +282,13 @@ */ Drupal.theme.verticalTab = function (settings) { const tab = {}; tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>'); tab.title[0].textContent = settings.title; tab.item = $( '<li class="vertical-tabs__menu-item" tabindex="-1"></li>', ).append( (tab.link = $('<a href="#"></a>') .append( (tab.title = $( '<strong class="vertical-tabs__menu-item-title"></strong>', ).text(settings.title)), ) .append(tab.title) .append( (tab.summary = $( '<span class="vertical-tabs__menu-item-summary"></span>', Loading core/misc/vertical-tabs.js +5 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,9 @@ $this.wrap('<div class="vertical-tabs clearfix"></div>').before(tabList); $details.each(function () { var $that = $(this); var $summary = $that.find('> summary'); var verticalTab = new Drupal.verticalTab({ title: $that.find('> summary').text(), title: $summary.length ? $summary[0].textContent : '', details: $that }); tabList.append(verticalTab.item); Loading Loading @@ -127,7 +128,9 @@ Drupal.theme.verticalTab = function (settings) { var tab = {}; tab.item = $('<li class="vertical-tabs__menu-item" tabindex="-1"></li>').append(tab.link = $('<a href="#"></a>').append(tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>').text(settings.title)).append(tab.summary = $('<span class="vertical-tabs__menu-item-summary"></span>'))); tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>'); tab.title[0].textContent = settings.title; tab.item = $('<li class="vertical-tabs__menu-item" tabindex="-1"></li>').append(tab.link = $('<a href="#"></a>').append(tab.title).append(tab.summary = $('<span class="vertical-tabs__menu-item-summary"></span>'))); return tab; }; })(jQuery, Drupal, drupalSettings); No newline at end of file Loading
core/.eslintrc.jquery.json +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ "jquery/no-sizzle": 0, "jquery/no-slide": 0, "jquery/no-submit": 2, "jquery/no-text": 0, "jquery/no-text": 2, "jquery/no-toggle": 0, "jquery/no-trigger": 0, "jquery/no-trim": 2, Loading
core/misc/tableresponsive.es6.js +8 −4 Original line number Diff line number Diff line Loading @@ -108,13 +108,15 @@ // If the table has hidden columns, associate an action link with the // table to show the columns. if (hiddenLength > 0) { this.$link.show().text(this.showText); this.$link.show(); this.$link[0].textContent = this.showText; } // When the toggle is pegged, its presence is maintained because the user // has interacted with it. This is necessary to keep the link visible if // the user adjusts screen size and changes the visibility of columns. if (!pegged && hiddenLength === 0) { this.$link.hide().text(this.hideText); this.$link.hide(); this.$link[0].textContent = this.hideText; } }, Loading Loading @@ -148,7 +150,8 @@ // Keep track of the revealed headers, so they can be hidden later. self.$revealedCells = $().add(self.$revealedCells).add($header); }); this.$link.text(this.hideText).data('pegged', 1); this.$link[0].textContent = this.hideText; this.$link.data('pegged', 1); } // Hide revealed columns. else { Loading Loading @@ -177,7 +180,8 @@ // Return the rest of the style attribute values to the element. $cell.attr('style', newProps.join(';')); }); this.$link.text(this.showText).data('pegged', 0); this.$link[0].textContent = this.showText; this.$link.data('pegged', 0); // Refresh the toggle link. $(window).trigger('resize.tableresponsive'); } Loading
core/misc/tableresponsive.js +8 −4 Original line number Diff line number Diff line Loading @@ -33,11 +33,13 @@ var hiddenLength = this.$headers.filter('.priority-medium:hidden, .priority-low:hidden').length; if (hiddenLength > 0) { this.$link.show().text(this.showText); this.$link.show(); this.$link[0].textContent = this.showText; } if (!pegged && hiddenLength === 0) { this.$link.hide().text(this.hideText); this.$link.hide(); this.$link[0].textContent = this.hideText; } }, eventhandlerToggleColumns: function eventhandlerToggleColumns(e) { Loading @@ -58,7 +60,8 @@ $header.show(); self.$revealedCells = $().add(self.$revealedCells).add($header); }); this.$link.text(this.hideText).data('pegged', 1); this.$link[0].textContent = this.hideText; this.$link.data('pegged', 1); } else { this.$revealedCells.hide(); this.$revealedCells.each(function (index, element) { Loading @@ -81,7 +84,8 @@ $cell.attr('style', newProps.join(';')); }); this.$link.text(this.showText).data('pegged', 0); this.$link[0].textContent = this.showText; this.$link.data('pegged', 0); $(window).trigger('resize.tableresponsive'); } } Loading
core/misc/vertical-tabs.es6.js +5 −6 Original line number Diff line number Diff line Loading @@ -84,8 +84,9 @@ // Transform each details into a tab. $details.each(function () { const $that = $(this); const $summary = $that.find('> summary'); const verticalTab = new Drupal.verticalTab({ title: $that.find('> summary').text(), title: $summary.length ? $summary[0].textContent : '', details: $that, }); tabList.append(verticalTab.item); Loading Loading @@ -281,15 +282,13 @@ */ Drupal.theme.verticalTab = function (settings) { const tab = {}; tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>'); tab.title[0].textContent = settings.title; tab.item = $( '<li class="vertical-tabs__menu-item" tabindex="-1"></li>', ).append( (tab.link = $('<a href="#"></a>') .append( (tab.title = $( '<strong class="vertical-tabs__menu-item-title"></strong>', ).text(settings.title)), ) .append(tab.title) .append( (tab.summary = $( '<span class="vertical-tabs__menu-item-summary"></span>', Loading
core/misc/vertical-tabs.js +5 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,9 @@ $this.wrap('<div class="vertical-tabs clearfix"></div>').before(tabList); $details.each(function () { var $that = $(this); var $summary = $that.find('> summary'); var verticalTab = new Drupal.verticalTab({ title: $that.find('> summary').text(), title: $summary.length ? $summary[0].textContent : '', details: $that }); tabList.append(verticalTab.item); Loading Loading @@ -127,7 +128,9 @@ Drupal.theme.verticalTab = function (settings) { var tab = {}; tab.item = $('<li class="vertical-tabs__menu-item" tabindex="-1"></li>').append(tab.link = $('<a href="#"></a>').append(tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>').text(settings.title)).append(tab.summary = $('<span class="vertical-tabs__menu-item-summary"></span>'))); tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>'); tab.title[0].textContent = settings.title; tab.item = $('<li class="vertical-tabs__menu-item" tabindex="-1"></li>').append(tab.link = $('<a href="#"></a>').append(tab.title).append(tab.summary = $('<span class="vertical-tabs__menu-item-summary"></span>'))); return tab; }; })(jQuery, Drupal, drupalSettings); No newline at end of file