diff --git a/core/misc/ajax.js b/core/misc/ajax.js index d2f4508..e3b366e 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -1,8 +1,6 @@ /** * @file - * - * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and - * XML). + * Provides Ajax page updating via jQuery $.ajax. * * Ajax is a method of making a request via JavaScript while viewing an HTML * page. The request returns an array of commands encoded in JSON, which is @@ -84,15 +82,16 @@ }; /** - * Extends Error to provide handling for Errors in AJAX + * Extends Error to provide handling for Errors in AJAX. * * @constructor * * @augments Error * * @param {XMLHttpRequest} xmlhttp - * xhr object. + * XMLHttpRequest object used for the failed request. * @param {string} uri + * The URI where the error occurred. */ Drupal.AjaxError = function (xmlhttp, uri) { @@ -139,14 +138,14 @@ readyStateText = xmlhttp.status === 0 ? ("\n" + Drupal.t("ReadyState: !readyState", {'!readyState': xmlhttp.readyState})) : ""; /** - * Formated and translated error message. + * Formatted and translated error message. * * @type {string} */ this.message = statusCode + pathText + statusText + responseText + readyStateText; /** - * Used by some browser to display a more accurate stacktrace. + * Used by some browsers to display a more accurate stack trace. * * @type {string} */ @@ -170,23 +169,22 @@ * @constructor * * @param {string} base - * id of element the event is binded to. + * ID of element the event is binded to. * @param {HTMLElement} element - * DOM element uesd to find the ajax url. - * @param {Object} element_settings - * Settings for the Drupal Ajax Object. + * DOM element used to find the Ajax URL. + * @param {object} element_settings + * Settings for the Drupal Ajax object. * - * @code - * Drupal.behaviors.myCustomAJAXStuff = { - * attach: function (context, settings) { - * Drupal.ajax['edit-submit'].commands.insert = function (ajax, response, status) { - * new_content = $(response.data); - * $('#my-wrapper').append(new_content); - * alert('New content was appended to #my-wrapper'); - * } - * } - * }; - * @endcode + * @example + * Drupal.behaviors.myCustomAJAXStuff = { + * attach: function (context, settings) { + * Drupal.ajax['edit-submit'].commands.insert = function (ajax, response, status) { + * new_content = $(response.data); + * $('#my-wrapper').append(new_content); + * alert('New content was appended to #my-wrapper'); + * } + * } + * }; */ Drupal.ajax = function (base, element, element_settings) { var defaults = { @@ -230,7 +228,7 @@ this.element = element; /** - * @type {Object} + * @type {object} */ this.element_settings = element_settings; @@ -268,15 +266,13 @@ } } - /** - * Replacing 'nojs' with 'ajax' in the URL allows for an easy method to let - * the server detect when it needs to degrade gracefully. - * There are four scenarios to check for: - * 1. /nojs/ - * 2. /nojs$ - The end of a URL string. - * 3. /nojs? - Followed by a query (e.g. path/nojs?destination=foobar). - * 4. /nojs# - Followed by a fragment (e.g.: path/nojs#myfragment). - */ + // Replacing 'nojs' with 'ajax' in the URL allows for an easy method to let + // the server detect when it needs to degrade gracefully. + // There are four scenarios to check for: + // 1. /nojs/ + // 2. /nojs$ - The end of a URL string. + // 3. /nojs? - Followed by a query (e.g. path/nojs?destination=foobar). + // 4. /nojs# - Followed by a fragment (e.g.: path/nojs#myfragment). this.url = this.url.replace(/\/nojs(\/|$|\?|#)/g, '/ajax$1'); // Set the options for the ajaxSubmit function. @@ -288,19 +284,19 @@ * * @name Drupal.ajax#options * - * @type {Object} + * @type {object} * - * @prop {String} url - * @prop {Object} data - * @prop {Function} beforeSerialize - * @prop {Function} beforeSubmit - * @prop {Function} beforeSend - * @prop {Function} success - * @prop {Function} complere - * @prop {String} dataType - * @prop {Object} accepts - * @prop {String} accepts.json - * @prop {String} type + * @prop {string} url + * @prop {object} data + * @prop {function} beforeSerialize + * @prop {function} beforeSubmit + * @prop {function} beforeSend + * @prop {function} success + * @prop {function} complere + * @prop {string} dataType + * @prop {object} accepts + * @prop {string} accepts.json + * @prop {string} type */ ajax.options = { url: ajax.url, @@ -583,8 +579,7 @@ }; /** - * Build an effect object which tells us how to apply the effect when adding - * new HTML. + * Build an effect object to apply an effect when adding new HTML. */ Drupal.ajax.prototype.getEffect = function (response) { var type = response.effect || this.effect; @@ -634,8 +629,7 @@ }; /** - * Provide a series of commands that the server can request the client - * perform. + * Provide a series of commands that the client will perform. * * @constructor */ @@ -761,8 +755,7 @@ }, /** - * Command to set the settings that will be used for other commands in this - * response. + * Command to set the settings used for other commands in this response. */ settings: function (ajax, response, status) { if (response.merge) { diff --git a/core/misc/announce.js b/core/misc/announce.js index 38b7510..d323929 100644 --- a/core/misc/announce.js +++ b/core/misc/announce.js @@ -26,8 +26,7 @@ var announcements = []; /** - * Builds a div element with the aria-live attribute and attaches it - * to the DOM. + * Builds a div element with the aria-live attribute and add it to the DOM. */ Drupal.behaviors.drupalAnnounce = { attach: function (context) { diff --git a/core/misc/autocomplete.js b/core/misc/autocomplete.js index 1fd0664..c3ab03d 100644 --- a/core/misc/autocomplete.js +++ b/core/misc/autocomplete.js @@ -14,7 +14,7 @@ * * @param {string} value * - * @return {Array} + * @return {array} */ function autocompleteSplitValues(value) { // We will match the value against comma-separated terms. @@ -59,9 +59,9 @@ /** * The search handler is called before a search is performed. * - * @param {Object} event + * @param {object} event * - * @return {Boolean} + * @return {bool} */ function searchHandler(event) { var options = autocomplete.options; @@ -77,8 +77,8 @@ /** * jQuery UI autocomplete source callback. * - * @param {Object} request - * @param {Function} response + * @param {object} request + * @param {function} response */ function sourceData(request, response) { var elementId = this.element.attr('id'); @@ -91,7 +91,7 @@ * Filter through the suggestions removing all terms already tagged and * display the available terms to the user. * - * @param {Object} suggestions + * @param {object} suggestions */ function showSuggestions(suggestions) { var tagged = autocomplete.splitValues(request.term); @@ -108,7 +108,7 @@ /** * Transforms the data object into an array and update autocomplete results. * - * @param {Object} data + * @param {object} data */ function sourceCallbackHandler(data) { autocomplete.cache[elementId][term] = data; @@ -133,7 +133,7 @@ /** * Handles an autocompletefocus event. * - * @return {Boolean} + * @return {bool} */ function focusHandler() { return false; @@ -142,10 +142,10 @@ /** * Handles an autocompleteselect event. * - * @param {Object} event - * @param {Object} ui + * @param {object} event + * @param {object} ui * - * @return {Boolean} + * @return {bool} */ function selectHandler(event, ui) { var terms = autocomplete.splitValues(event.target.value); @@ -166,10 +166,10 @@ /** * Override jQuery UI _renderItem function to output HTML by default. * - * @param {Object} ul - * @param {Object} item + * @param {object} ul + * @param {object} item * - * @return {Object} + * @return {object} */ function renderItem(ul, item) { return $("
  • ") diff --git a/core/misc/collapse.js b/core/misc/collapse.js index 53299d6..174bf9b 100644 --- a/core/misc/collapse.js +++ b/core/misc/collapse.js @@ -8,8 +8,7 @@ "use strict"; /** - * The collapsible details object represents a single collapsible details - * element. + * The collapsible details object represents a single details element. * * @constructor * @@ -32,17 +31,17 @@ this.setupLegend(); } - $.extend(CollapsibleDetails, /** @lends Drupal.CollapsibleDetails **/{ + $.extend(CollapsibleDetails, /** @lends Drupal.CollapsibleDetails */{ /** * Holds references to instantiated CollapsibleDetails objects. * - * @type {Array.} + * @type {array.} */ instances: [] }); - $.extend(CollapsibleDetails.prototype, /** @lends Drupal.CollapsibleDetails# **/{ + $.extend(CollapsibleDetails.prototype, /** @lends Drupal.CollapsibleDetails# */{ /** * Initialize and setup summary events and markup. diff --git a/core/misc/debounce.js b/core/misc/debounce.js index 34171b0..e5a81d7 100644 --- a/core/misc/debounce.js +++ b/core/misc/debounce.js @@ -14,13 +14,13 @@ * function can be written in such a way that it is only invoked under specific * conditions. * - * @param {Function} func + * @param {function} func * The function to be invoked. - * @param {Number} wait + * @param {number} wait * The time period within which the callback function should only be * invoked once. For example if the wait period is 250ms, then the callback * will only be called at most 4 times per second. - * @param {Boolean} immediate + * @param {bool} immediate * Whether we wait at the beginning or end to execute the function. */ Drupal.debounce = function (func, wait, immediate) { diff --git a/core/misc/dialog/dialog.ajax.js b/core/misc/dialog/dialog.ajax.js index e61b631..86983e5 100644 --- a/core/misc/dialog/dialog.ajax.js +++ b/core/misc/dialog/dialog.ajax.js @@ -54,7 +54,7 @@ * @param {jQuery} $dialog * An jQuery object containing the element that is the dialog target. * - * @return {Array} + * @return {array} * An array of buttons that need to be added to the button area. */ prepareDialogButtons: function ($dialog) { diff --git a/core/misc/dialog/dialog.js b/core/misc/dialog/dialog.js index 3c04de7..24b87a9 100644 --- a/core/misc/dialog/dialog.js +++ b/core/misc/dialog/dialog.js @@ -27,7 +27,7 @@ /** * @typedef DrupalDialog * - * @type {Object} + * @type {object} * * @param {HTMLElement} context * @@ -47,7 +47,7 @@ * Polyfill HTML5 dialog element with jQueryUI. * * @param {HTMLElement} element - * @param {Object} options + * @param {object} options * jQuery UI options to be passed to the dialog. * * @return {DrupalDialog} diff --git a/core/misc/displace.js b/core/misc/displace.js index 60fe9e3..cbf9563 100644 --- a/core/misc/displace.js +++ b/core/misc/displace.js @@ -8,16 +8,21 @@ /** * @typedef OffsetObject - * @type {Object} - * @prop {Number} top - * @prop {Number} left - * @prop {Number} right - * @prop {Number} bottom + * + * @type {object} + * + * @prop {number} top + * @prop {number} left + * @prop {number} right + * @prop {number} bottom */ /** - * Event to listen to for reacting to layout changes of fixed elements on the - * page. + * Event triggering when layout of the page changes. + * + * This is used to position fixed element on the page during page resize and + * Toolbar toggling. + * * @event drupalViewportOffsetChange */ @@ -27,6 +32,7 @@ /** * @name Drupal.displace.offsets + * * @type {OffsetObject} */ var offsets = { @@ -38,6 +44,7 @@ /** * Registers a resize handler on the window. + * * @type {Behavior} */ Drupal.behaviors.drupalDisplace = { @@ -55,8 +62,6 @@ /** * Informs listeners of the current offset dimensions. * - * @function - * * @fires drupalViewportOffsetChange * * @param {bool} [broadcast] @@ -79,8 +84,6 @@ /** * Determines the viewport offsets. * - * @private - * * @return {OffsetObject} * An object whose keys are the for sides an element -- top, right, bottom * and left. The value of each key is the viewport displacement distance for @@ -109,7 +112,7 @@ * The name of the edge to calculate. Can be 'top', 'right', * 'bottom' or 'left'. * - * @return {Number} + * @return {number} * The viewport displacement distance for the requested edge. */ function calculateOffset(edge) { @@ -141,8 +144,6 @@ /** * Calculates displacement for element based on its dimensions and placement. * - * @private - * * @param {HTMLElement} el * The jQuery element whose dimensions and placement will be measured. * diff --git a/core/misc/dropbutton/dropbutton.js b/core/misc/dropbutton/dropbutton.js index da280c6..d096ac6 100644 --- a/core/misc/dropbutton/dropbutton.js +++ b/core/misc/dropbutton/dropbutton.js @@ -49,7 +49,7 @@ * @param {HTMLElement} dropbutton * A jQuery element. * - * @param {Object} settings + * @param {object} settings * A list of options including: * - {string} title: The text inside the toggle link element. This text is * hidden from visual UAs. @@ -58,16 +58,20 @@ // Merge defaults with settings. var options = $.extend({'title': Drupal.t('List additional actions')}, settings); var $dropbutton = $(dropbutton); + /** * @type {jQuery} */ this.$dropbutton = $dropbutton; + /** * @type {jQuery} */ this.$list = $dropbutton.find('.dropbutton'); + /** * Find actions and mark them. + * * @type {jQuery} */ this.$actions = this.$list.find('li').addClass('dropbutton-action'); @@ -85,21 +89,28 @@ this.$dropbutton .addClass('dropbutton-multiple') .on({ + /** * Adds a timeout to close the dropdown on mouseleave. + * * @ignore */ 'mouseleave.dropbutton': $.proxy(this.hoverOut, this), + /** * Clears timeout when mouseout of the dropdown. + * * @ignore */ 'mouseenter.dropbutton': $.proxy(this.hoverIn, this), + /** * Similar to mouseleave/mouseenter, but for keyboard navigation. + * * @ignore */ 'focusout.dropbutton': $.proxy(this.focusOut, this), + /** * @ignore */ @@ -114,11 +125,11 @@ /** * Extend the DropButton constructor. */ - $.extend(DropButton, /** @lends Drupal.DropButton **/{ + $.extend(DropButton, /** @lends Drupal.DropButton */{ /** * Store all processed DropButtons. * - * @type {Array} + * @type {array} */ dropbuttons: [] }); @@ -126,7 +137,8 @@ /** * Extend the DropButton prototype. */ - $.extend(DropButton.prototype, /** @lends Drupal.DropButton# **/{ + $.extend(DropButton.prototype, /** @lends Drupal.DropButton# */{ + /** * Toggle the dropbutton open and closed. * @@ -187,7 +199,8 @@ } }); - $.extend(Drupal.theme, /** @lends Drupal.theme **/{ + $.extend(Drupal.theme, /** @lends Drupal.theme */{ + /** * A toggle is an interactive element often bound to a click handler. * diff --git a/core/misc/drupal.js b/core/misc/drupal.js index 52b8ccd..cd7a24c 100644 --- a/core/misc/drupal.js +++ b/core/misc/drupal.js @@ -10,8 +10,7 @@ */ /** - * Global variable generated by Drupal that holds all the configuration created - * from PHP. + * Variable generated by Drupal with all the configuration created from PHP. * * @global * @@ -19,8 +18,7 @@ */ /** - * Global variable generated by Drupal that holds all translated strings from - * PHP. + * Variable generated by Drupal that holds all translated strings from PHP. * * @global * @@ -54,7 +52,7 @@ if (window.jQuery) { * Custom error type thrown after attach/detach if one or more behaviors * failed. * - * @param {Array} list + * @param {array} list * An array of errors thrown during attach/detach. * @param {string} event * A string containing either 'attach' or 'detach'. @@ -78,19 +76,19 @@ if (window.jQuery) { /** * @typedef BehaviorAttachCallback * - * @type {Function} + * @type {function} * * @param {HTMLElement} context - * @param {Object} settings + * @param {object} settings */ /** * @typedef BehaviorDetachCallback * - * @type {Function} + * @type {function} * * @param {HTMLElement} context - * @param {Object} settings + * @param {object} settings * @param {string} trigger * One of 'unload', 'serialize' or 'move'. */ @@ -98,7 +96,7 @@ if (window.jQuery) { /** * @typedef Behavior * - * @type {Object} + * @type {object} * * @property {BehaviorAttachCallback} attach * Function run on page load and after an AJAX call. @@ -148,7 +146,7 @@ if (window.jQuery) { * @param {HTMLElement} context * An element to attach behaviors to. If none is given, the document * element is used. - * @param {Object} settings + * @param {object} settings * An object containing settings for the current context. If none is given, * the global drupalSettings object is used. * @@ -196,7 +194,7 @@ if (window.jQuery) { * @param {HTMLElement} context * An element to detach behaviors from. If none is given, the document * element is used. - * @param {Object} settings + * @param {object} settings * An object containing settings for the current context. If none given, * the global drupalSettings object is used. * @param {string} trigger @@ -279,7 +277,7 @@ if (window.jQuery) { * * @param {string} str * A string with placeholders. - * @param {Object} args + * @param {object} args * An object of replacements pairs to make. Incidences of any key in this * array are replaced with the corresponding value. Based on the first * character of the key, the value is escaped and/or themed: @@ -327,7 +325,7 @@ if (window.jQuery) { * * @param {string} str * A string with placeholders. - * @param {Object} args + * @param {object} args * Key-value pairs. * @param {Array|null} keys * Array of keys from the "args". Internal use only. @@ -383,7 +381,7 @@ if (window.jQuery) { * of any key in this array are replaced with the corresponding value. * See {@link Drupal.formatString}. * - * @param {Object} options + * @param {object} options * @param {string} [options.context=''] * The context the source string belongs to. * @@ -428,7 +426,7 @@ if (window.jQuery) { * \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * function for more details. * - * @param {Number} count + * @param {number} count * The item count to display. * @param {string} singular * The string for the singular case. Please make sure it is clear this is @@ -438,13 +436,13 @@ if (window.jQuery) { * The string for the plural case. Please make sure it is clear this is * plural, to ease translation. Use @count in place of the item count, as in * "@count new comments". - * @param {Object} [args] + * @param {object} [args] * An object of replacements pairs to make after translation. Incidences * of any key in this array are replaced with the corresponding value. * See Drupal.formatString(). * Note that you do not need to include @count in this array. * This replacement is done automatically for the plural case. - * @param {Object} [options] + * @param {object} [options] * The options to pass to the Drupal.t() function. * * @return {string} @@ -496,7 +494,7 @@ if (window.jQuery) { * `Drupal.theme('placeholder', text)`. * * @namespace - * @param {Function} func + * @param {function} func * The name of the theme function to call. * @param {...*} [.] * Additional arguments to pass along to the theme function. diff --git a/core/misc/form.js b/core/misc/form.js index c3d1253..ceef143 100644 --- a/core/misc/form.js +++ b/core/misc/form.js @@ -1,6 +1,6 @@ /** * @file - * form features. + * Form features. */ (function ($, Drupal, debounce) { @@ -114,7 +114,7 @@ * * @param {HTMLFormElement} form * - * @return {Array} + * @return {array} */ function fieldsList(form) { var $fieldList = $(form).find('[name]').map(function (index, element) { diff --git a/core/misc/progress.js b/core/misc/progress.js index 2bfbd83..206b4e1 100644 --- a/core/misc/progress.js +++ b/core/misc/progress.js @@ -55,7 +55,7 @@ this.element = $(Drupal.theme('progressBar', id)); }; - $.extend(Drupal.ProgressBar.prototype, /** @lends Drupal.ProgressBar# **/{ + $.extend(Drupal.ProgressBar.prototype, /** @lends Drupal.ProgressBar# */{ /** * Set the percentage and status message for the progressbar. @@ -78,6 +78,7 @@ /** * Start monitoring progress via Ajax. + * * @param {string} uri * @param {number} delay */ diff --git a/core/misc/tabbingmanager.js b/core/misc/tabbingmanager.js index 948a567..de5bf64 100644 --- a/core/misc/tabbingmanager.js +++ b/core/misc/tabbingmanager.js @@ -24,7 +24,7 @@ /** * Add public methods to the TabbingManager class. */ - $.extend(TabbingManager.prototype, /** @lends TabbingManager# **/{ + $.extend(TabbingManager.prototype, /** @lends TabbingManager# */{ /** * Constrain tabbing to the specified set of elements only. @@ -71,8 +71,7 @@ }, /** - * Restores a former tabbingContext when an active tabbingContext is - * released. + * Restores a former tabbingContext when an active tabbingContext is released. * * The TabbingManager stack of tabbingContext instances will be unwound * from the top-most released tabbingContext down to the first non-released @@ -161,7 +160,7 @@ * * @param {jQuery} $el * The set of elements that have been disabled. - * @param {Number} level + * @param {number} level * The stack level for which the tabindex attribute should be recorded. */ recordTabindex: function ($el, level) { @@ -178,7 +177,7 @@ * * @param {jQuery} $el * The element that is being reactivated. - * @param {Number} level + * @param {number} level * The stack level for which the tabindex attribute should be restored. */ restoreTabindex: function ($el, level) { @@ -222,7 +221,7 @@ * * @constructor * - * @param {Object} options + * @param {object} options * A set of initiating values that include: * - Number level: The level in the TabbingManager's stack of this * tabbingContext. @@ -249,7 +248,7 @@ /** * Add public methods to the TabbingContext class. */ - $.extend(TabbingContext.prototype, /** @lends TabbingContext# **/{ + $.extend(TabbingContext.prototype, /** @lends TabbingContext# */{ /** * Releases this TabbingContext. diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js index 9eb9ae7..a06bb48 100644 --- a/core/misc/tabledrag.js +++ b/core/misc/tabledrag.js @@ -9,6 +9,7 @@ /** * Store the state of weight columns display for all tables. + * * Default value is to hide weight columns. */ var showWeight = JSON.parse(localStorage.getItem('Drupal.tableDrag.showWeight')); @@ -44,8 +45,7 @@ }; /** - * Constructor for the tableDrag object. Provides table and field - * manipulation. + * Provides table and field manipulation. * * @constructor * @@ -158,8 +158,7 @@ }; /** - * Initialize columns containing form elements to be hidden by default, - * according to the settings for this tableDrag instance. + * Initialize columns containing form elements to be hidden by default. * * Identify and mark each cell with a CSS class so we can easily toggle * show/hide it. Finally, hide columns if user does not have a @@ -197,12 +196,13 @@ }; /** - * Mark cells that have colspan so we can adjust the colspan - * instead of hiding them altogether. + * Mark cells that have colspan. + * + * In order to adjust the colspan instead of hiding them altogether. * * @param {number} columnIndex * - * @return {Function} + * @return {function} */ Drupal.tableDrag.prototype.addColspanClass = function (columnIndex) { return function () { @@ -251,6 +251,7 @@ /** * Toggle the weight column depending on 'showWeight' value. + * * Store only default override. */ Drupal.tableDrag.prototype.toggleColumns = function () { @@ -268,6 +269,7 @@ /** * Hide the columns containing weight/parent form elements. + * * Undo showColumns(). */ Drupal.tableDrag.prototype.hideColumns = function () { @@ -285,7 +287,8 @@ }; /** - * Show the columns containing weight/parent form elements + * Show the columns containing weight/parent form elements. + * * Undo hideColumns(). */ Drupal.tableDrag.prototype.showColumns = function () { @@ -682,6 +685,8 @@ }; /** + * Get the event offset from the target element. + * * Given a target element and a pointer event, get the event offset from that * element. To do this we need the element's position and the target position. * @@ -697,8 +702,9 @@ }; /** - * Find the row the mouse is currently over. This row is then taken and - * swapped with the one being dragged. + * Find the row the mouse is currently over. + * + * This row is then taken and swapped with the one being dragged. * * @param {number} x * The x coordinate of the mouse on the page (not the screen). @@ -761,8 +767,7 @@ }; /** - * After the row is dropped, update the table fields according to the settings - * set for this table. + * After the row is dropped, update the table fields. * * @param {HTMLElement} changedRow * DOM object for the row that was just dropped. @@ -778,8 +783,7 @@ }; /** - * After the row is dropped, update a single table field according to specific - * settings. + * After the row is dropped, update a single table field. * * @param {HTMLElement} changedRow * DOM object for the row that was just dropped. @@ -915,6 +919,8 @@ }; /** + * Copy all tableDrag related classes from one row to another. + * * Copy all special tableDrag classes from one row's form elements to a * different one, removing any special classes that the destination row * may have had. @@ -981,7 +987,7 @@ }; /** - * Command to restripe table properly. + * Command to restripe table properly. */ Drupal.tableDrag.prototype.restripeTable = function () { // :even and :odd are reversed because jQuery counts from 0 and @@ -1054,7 +1060,7 @@ * Whether we want to add classes to this row to indicate child * relationships. * - * @return {Array} + * @return {array} */ Drupal.tableDrag.prototype.row.prototype.findChildren = function (addClasses) { var parentIndentation = this.indents; @@ -1153,8 +1159,7 @@ }; /** - * Determine the valid indentations interval for the row at a given position - * in the table. + * Determine the valid indentations interval for the row at a given position. * * @param {HTMLElement|null} prevRow * DOM object for the row before the tested position @@ -1241,9 +1246,10 @@ }; /** - * Find all siblings for a row, either according to its subgroup or - * indentation. Note that the passed-in row is included in the list of - * siblings. + * Find all siblings for a row. + * + * According to its subgroup or indentation. Note that the passed-in row is + * included in the list of siblings. * * @param {object} rowSettings * The field settings we're using to identify what constitutes a sibling. @@ -1329,7 +1335,7 @@ return null; }; - $.extend(Drupal.theme, /** @lends Drupal.theme **/{ + $.extend(Drupal.theme, /** @lends Drupal.theme */{ /** * @return {string} diff --git a/core/misc/tableheader.js b/core/misc/tableheader.js index edd2509..2aef865 100644 --- a/core/misc/tableheader.js +++ b/core/misc/tableheader.js @@ -56,12 +56,14 @@ /** * When resizing table width can change, recalculate everything. + * * @ignore */ 'resize.TableHeader': tableHeaderResizeHandler, /** * Bind only one event to take care of calling all scroll callbacks. + * * @ignore */ 'scroll.TableHeader': tableHeaderOnScrollHandler @@ -72,12 +74,14 @@ /** * Recalculate columns width when window is resized and when show/hide * weight is triggered. + * * @ignore */ 'columnschange.TableHeader': tableHeaderResizeHandler, /** * Recalculate TableHeader.topOffset when viewport is resized + * * @ignore */ 'drupalViewportOffsetChange.TableHeader': tableHeaderOffsetChangeHandler @@ -101,24 +105,28 @@ /** * @name Drupal.TableHeader#$originalTable + * * @type {HTMLElement} */ this.$originalTable = $table; /** * @name Drupal.TableHeader#$originalHeader + * * @type {jQuery} */ this.$originalHeader = $table.children('thead'); /** * @name Drupal.TableHeader#$originalHeaderCells + * * @type {jQuery} */ this.$originalHeaderCells = this.$originalHeader.find('> tr > th'); /** * @name Drupal.TableHeader#displayWeight + * * @type {null|bool} */ this.displayWeight = null; @@ -127,12 +135,14 @@ /** * @name Drupal.TableHeader#tableHeight + * * @type {number} */ this.tableHeight = $table[0].clientHeight; /** * @name Drupal.TableHeader#tableOffset + * * @type {OffsetObject} */ this.tableOffset = this.$originalTable.offset(); @@ -153,12 +163,10 @@ /** * Store the state of TableHeader. */ - $.extend(TableHeader, /** @lends Drupal.TableHeader **/{ + $.extend(TableHeader, /** @lends Drupal.TableHeader */{ /** * This will store the state of all processed tables. - * - * @type {Array} */ tables: [] }); @@ -166,7 +174,7 @@ /** * Extend TableHeader prototype. */ - $.extend(TableHeader.prototype, /** @lends Drupal.TableHeader# **/{ + $.extend(TableHeader.prototype, /** @lends Drupal.TableHeader# */{ /** * Minimum height in pixels for the table to have a sticky header. diff --git a/core/misc/tableresponsive.js b/core/misc/tableresponsive.js index 341e9b1..e311ad2 100644 --- a/core/misc/tableresponsive.js +++ b/core/misc/tableresponsive.js @@ -23,8 +23,7 @@ }; /** - * The TableResponsive object optimizes table presentation for all screen - * sizes. + * The TableResponsive object optimizes table presentation for screen size. * * A responsive table hides columns at small screen sizes, leaving the most * important columns visible to the end user. Users should not be prevented @@ -63,7 +62,7 @@ /** * Extend the TableResponsive function with a list of managed tables. */ - $.extend(TableResponsive, /** @lends Drupal.TableResponsive **/{ + $.extend(TableResponsive, /** @lends Drupal.TableResponsive */{ /** * Store all created instances. @@ -77,7 +76,7 @@ * Columns are assumed to be hidden if their header has the class priority-low * or priority-medium. */ - $.extend(TableResponsive.prototype, /** @lends Drupal.TableResponsive# **/{ + $.extend(TableResponsive.prototype, /** @lends Drupal.TableResponsive# */{ /** * @param {jQuery.Event} e @@ -99,8 +98,9 @@ }, /** - * Toggle the visibility of columns classed with either 'priority-low' or - * 'priority-medium'. + * Toggle the visibility of columns based on their priority. + * + * Columns are classed with either 'priority-low' or 'priority-medium'. * * @param {jQuery.Event} e */ diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js index 6648d1a..f291405 100644 --- a/core/misc/vertical-tabs.js +++ b/core/misc/vertical-tabs.js @@ -8,9 +8,7 @@ "use strict"; /** - * This script transforms a set of details into a stack of vertical - * tabs. Another tab pane can be selected by clicking on the respective - * tab. + * This script transforms a set of details into a stack of vertical tabs. * * Each tab may have a summary which can be updated by another * script. For that to work, each details element has an associated