Issue #3079738 by lauriii, saschaeggi, webchick, xjm, andrewmacpherson, shimpy, effulgentsia, Wim Leers, DyanneNova, svettes, rainbreaw, fhaeberle, ckrina, AaronMcHale, justafish, catch, charlieweb82, AntoineH, lot007, pzajacz, kostyashupenko, jasonbarrie, antonellasevero, finnsky, worldlinemine, bnjmnm, RobLoach, Dennis Cohn, huzooka, Archita Arora, joachim, jrockowitz, benjifisher, shaal, Gábor Hojtsy, quiron, L2G2, ccasals, hampercm, if-jds, abhisekmazumdar, Kami Amiga, pivica, zrpnr, BrightBold, imalabya, jhedstrom, Neslee Canil Pinto, maliknaik, junaidmasoodi, Maithri Shetty, pranav73, mandclu, modulist, nod_, philosurfer, phenaproxima, mherchel, mlncn, rafuel92, leymannx, kiboman, Swapnil_Kotwal, anevins, evankay, rfmarcelino, thamas, brianperry, idebr, joelpittet, boulaffasae, alexpott, volkerk, DuneBL, Eli-T, Mahenkvyas22: Add Claro administration theme to core
2019-10-13 20:42:58 +00:00
|
|
|
/**
|
2022-09-09 06:26:42 +00:00
|
|
|
* @file
|
|
|
|
* Overrides vertical tabs theming to enable Claro designs.
|
|
|
|
*/
|
Issue #3079738 by lauriii, saschaeggi, webchick, xjm, andrewmacpherson, shimpy, effulgentsia, Wim Leers, DyanneNova, svettes, rainbreaw, fhaeberle, ckrina, AaronMcHale, justafish, catch, charlieweb82, AntoineH, lot007, pzajacz, kostyashupenko, jasonbarrie, antonellasevero, finnsky, worldlinemine, bnjmnm, RobLoach, Dennis Cohn, huzooka, Archita Arora, joachim, jrockowitz, benjifisher, shaal, Gábor Hojtsy, quiron, L2G2, ccasals, hampercm, if-jds, abhisekmazumdar, Kami Amiga, pivica, zrpnr, BrightBold, imalabya, jhedstrom, Neslee Canil Pinto, maliknaik, junaidmasoodi, Maithri Shetty, pranav73, mandclu, modulist, nod_, philosurfer, phenaproxima, mherchel, mlncn, rafuel92, leymannx, kiboman, Swapnil_Kotwal, anevins, evankay, rfmarcelino, thamas, brianperry, idebr, joelpittet, boulaffasae, alexpott, volkerk, DuneBL, Eli-T, Mahenkvyas22: Add Claro administration theme to core
2019-10-13 20:42:58 +00:00
|
|
|
|
2021-12-18 06:12:16 +00:00
|
|
|
(($, Drupal) => {
|
2022-09-09 06:26:42 +00:00
|
|
|
/**
|
|
|
|
* Theme function for a vertical tab.
|
|
|
|
*
|
|
|
|
* @param {object} settings
|
|
|
|
* An object with the following keys:
|
|
|
|
* @param {string} settings.title
|
|
|
|
* The name of the tab.
|
|
|
|
*
|
|
|
|
* @return {object}
|
|
|
|
* This function has to return an object with at least these keys:
|
|
|
|
* - item: The root tab jQuery element
|
|
|
|
* - link: The anchor tag that acts as the clickable area of the tab
|
|
|
|
* (jQuery version)
|
|
|
|
* - summary: The jQuery element that contains the tab summary
|
|
|
|
*/
|
|
|
|
Drupal.theme.verticalTab = (settings) => {
|
2021-12-18 06:12:16 +00:00
|
|
|
const tab = {};
|
2022-04-26 17:42:13 +00:00
|
|
|
tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>');
|
2022-01-28 09:53:59 +00:00
|
|
|
tab.title[0].textContent = settings.title;
|
2022-09-09 06:26:42 +00:00
|
|
|
tab.item = $(
|
|
|
|
'<li class="vertical-tabs__menu-item" tabindex="-1"></li>',
|
|
|
|
).append(
|
|
|
|
(tab.link = $('<a href="#" class="vertical-tabs__menu-link"></a>').append(
|
|
|
|
$('<span class="vertical-tabs__menu-link-content"></span>')
|
|
|
|
.append(tab.title)
|
|
|
|
.append(
|
|
|
|
(tab.summary = $(
|
|
|
|
'<span class="vertical-tabs__menu-link-summary"></span>',
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
);
|
Issue #3079738 by lauriii, saschaeggi, webchick, xjm, andrewmacpherson, shimpy, effulgentsia, Wim Leers, DyanneNova, svettes, rainbreaw, fhaeberle, ckrina, AaronMcHale, justafish, catch, charlieweb82, AntoineH, lot007, pzajacz, kostyashupenko, jasonbarrie, antonellasevero, finnsky, worldlinemine, bnjmnm, RobLoach, Dennis Cohn, huzooka, Archita Arora, joachim, jrockowitz, benjifisher, shaal, Gábor Hojtsy, quiron, L2G2, ccasals, hampercm, if-jds, abhisekmazumdar, Kami Amiga, pivica, zrpnr, BrightBold, imalabya, jhedstrom, Neslee Canil Pinto, maliknaik, junaidmasoodi, Maithri Shetty, pranav73, mandclu, modulist, nod_, philosurfer, phenaproxima, mherchel, mlncn, rafuel92, leymannx, kiboman, Swapnil_Kotwal, anevins, evankay, rfmarcelino, thamas, brianperry, idebr, joelpittet, boulaffasae, alexpott, volkerk, DuneBL, Eli-T, Mahenkvyas22: Add Claro administration theme to core
2019-10-13 20:42:58 +00:00
|
|
|
return tab;
|
|
|
|
};
|
2022-09-09 06:26:42 +00:00
|
|
|
})(jQuery, Drupal);
|