summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/system/js/system.js
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2015-06-05 13:17:55 -0700
committerJennifer Hodgdon <yahgrp@poplarware.com>2015-06-05 13:17:55 -0700
commitc3cb303173edc41c7d3549735e57eeb4d4e56a59 (patch)
tree3b26c61f7c5949cadf3bf39b825688200a20a4f8 /core/modules/system/js/system.js
parent4fb37aa1ff320831d5cf6d0f08dd510da56efdbd (diff)
downloaddrupal-c3cb303173edc41c7d3549735e57eeb4d4e56a59.tar.gz
drupal-c3cb303173edc41c7d3549735e57eeb4d4e56a59.zip
Issue #2493691 by nod_, eiriksm, dawehner: Add JSDoc for core modules JS
Diffstat (limited to 'core/modules/system/js/system.js')
-rw-r--r--core/modules/system/js/system.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/modules/system/js/system.js b/core/modules/system/js/system.js
index 31096f968812..e052c3f207d3 100644
--- a/core/modules/system/js/system.js
+++ b/core/modules/system/js/system.js
@@ -1,3 +1,8 @@
+/**
+ * @file
+ * System behaviors.
+ */
+
(function ($, Drupal, drupalSettings) {
"use strict";
@@ -9,6 +14,8 @@
* When a field is filled out, apply its value to other fields that will likely
* use the same value. In the installer this is used to populate the
* administrator email address with the same value as the site email address.
+ *
+ * @type {Drupal~behavior}
*/
Drupal.behaviors.copyFieldValue = {
attach: function (context) {
@@ -34,12 +41,13 @@
$('#' + ids.join(', #')).removeOnce('copy-field-values').off('blur');
}
},
+
/**
* Event handler that fill the target element with the specified value.
*
- * @param e
+ * @param {jQuery.Event} e
* Event object.
- * @param value
+ * @param {string} value
* Custom value from jQuery trigger.
*/
valueTargetCopyHandler: function (e, value) {
@@ -48,10 +56,13 @@
$target.val(value);
}
},
+
/**
* Handler for a Blur event on a source field.
*
* This event handler will trigger a 'value:copy' event on all dependent fields.
+ *
+ * @param {jQuery.Event} e
*/
valueSourceBlurHandler: function (e) {
var value = $(e.target).val();