Commit 608bdebf authored by webchick's avatar webchick

Issue #2506447 by eiriksm, nod_: JSDoc content_translations module

parent 0e05f3b6
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
* Forces applicable options to be checked as translatable. * Forces applicable options to be checked as translatable.
* *
* @type {Drupal~behavior} * @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches content translation dependent options to the UI.
*/ */
Drupal.behaviors.contentTranslationDependentOptions = { Drupal.behaviors.contentTranslationDependentOptions = {
attach: function (context) { attach: function (context) {
...@@ -75,11 +78,14 @@ ...@@ -75,11 +78,14 @@
* Makes field translatability inherit bundle translatability. * Makes field translatability inherit bundle translatability.
* *
* @type {Drupal~behavior} * @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches content translation behavior.
*/ */
Drupal.behaviors.contentTranslation = { Drupal.behaviors.contentTranslation = {
attach: function (context) { attach: function (context) {
// Initially hide all field rows for non translatable bundles and all column // Initially hide all field rows for non translatable bundles and all
// rows for non translatable fields. // column rows for non translatable fields.
$(context).find('table .bundle-settings .translatable :input').once('translation-entity-admin-hide').each(function () { $(context).find('table .bundle-settings .translatable :input').once('translation-entity-admin-hide').each(function () {
var $input = $(this); var $input = $(this);
var $bundleSettings = $input.closest('.bundle-settings'); var $bundleSettings = $input.closest('.bundle-settings');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment