Commit 573ac544 authored by webchick's avatar webchick

Issue #2531692 by eiriksm: JSDoc user module

parent b6ed6e74
......@@ -12,6 +12,10 @@
* check that its confirmation is correct.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches password strength indicator and other relevant validation to
* password fields.
*/
Drupal.behaviors.password = {
attach: function (context, settings) {
......@@ -104,9 +108,12 @@
* Returns the estimated strength and the relevant output message.
*
* @param {string} password
* The password to evaluate.
* @param {object} translate
* An object containing the text to display for each strength level.
*
* @return {object}
* An object containing strength, message, indicatorText and indicatorClass.
*/
Drupal.evaluatePasswordStrength = function (password, translate) {
password = password.trim();
......
......@@ -11,16 +11,19 @@
* Shows checked and disabled checkboxes for inherited permissions.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches functionality to the permissions table.
*/
Drupal.behaviors.permissions = {
attach: function (context) {
var self = this;
$('table#permissions').once('permissions').each(function () {
// On a site with many roles and permissions, this behavior initially has
// to perform thousands of DOM manipulations to inject checkboxes and hide
// them. By detaching the table from the DOM, all operations can be
// performed without triggering internal layout and re-rendering processes
// in the browser.
// On a site with many roles and permissions, this behavior initially
// has to perform thousands of DOM manipulations to inject checkboxes
// and hide them. By detaching the table from the DOM, all operations
// can be performed without triggering internal layout and re-rendering
// processes in the browser.
var $table = $(this);
var $ancestor;
var method;
......
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