Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

ISAICP-6345: Add warnings in documentation for legacy behaviors #2460

Merged
merged 1 commit into from
Apr 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions web/themes/joinup/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
*/

(function ($, Drupal) {
// @todo If this behavior needs to be ported to the new Ventuno theme, then
// this should be split off to a separate .js file, and only included in the
// pages / render arrays that actually need it.
Drupal.behaviors.deleteButton = {
attach: function (context, settings) {
$(context).find('#edit-delete').once('deleteButton').each(function () {
Expand All @@ -13,6 +16,9 @@
};

// Fix vertical tabs on the form pages.
// @todo If this behavior needs to be ported to the new Ventuno theme, then
// this should be split off to a separate .js file, and only included in the
// pages / render arrays that actually need it.
Drupal.behaviors.verticalTabsGrid = {
attach: function (context, settings) {
$(context).find('.vertical-tabs').once('verticalTabsGrid').each(function () {
Expand All @@ -35,6 +41,9 @@
};

// Behaviors for tab validation.
// @todo If this behavior needs to be ported to the new Ventuno theme, then
// this should be split off to a separate .js file, and only included in the
// pages / render arrays that actually need it.
Drupal.behaviors.fieldGroupTabsValidation = {
attach: function (context, settings) {
// Keep a flag to focus only the first one in case of multiple tabs with
Expand Down Expand Up @@ -69,6 +78,9 @@
};

// Handle vertical tabs on mobile.
// @todo If this behavior needs to be ported to the new Ventuno theme, then
// this should be split off to a separate .js file, and only included in the
// pages / render arrays that actually need it.
Drupal.behaviors.verticalTabsMobile = {
attach: function (context, settings) {
$(context).find('.vertical-tabs__menu-item--mobile').once('verticalTabsMobile').each(function () {
Expand Down Expand Up @@ -105,6 +117,9 @@
};

// Autosize textareas.
// @todo If this behavior needs to be ported to the new Ventuno theme, then
// this should be split off to a separate .js file, and only included in the
// pages / render arrays that actually need it.
Drupal.behaviors.autosizeTextarea = {
attach: function (context, settings) {
$(context).find('textarea').once('autosizeTextarea').each(function () {
Expand Down