diff --git a/core/modules/views/js/ajax_view.js b/core/modules/views/js/ajax_view.js index edfba50c0b70af1f19db45aadd5f52f635821608..9145ea929c6dac641b348f10b76fe9ab383dc198 100644 --- a/core/modules/views/js/ajax_view.js +++ b/core/modules/views/js/ajax_view.js @@ -8,10 +8,12 @@ "use strict"; /** - * Attaches the AJAX behavior to Views exposed filter forms and key View - * links. + * Attaches the AJAX behavior to exposed filters forms and key View links. * * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches ajaxView functionality to relevant elements. */ Drupal.behaviors.ViewsAjaxView = {}; Drupal.behaviors.ViewsAjaxView.attach = function () { @@ -41,7 +43,9 @@ * @constructor * * @param {object} settings + * Settings object for the ajax view. * @param {string} settings.view_dom_id + * The DOM id of the view. */ Drupal.views.ajaxView = function (settings) { var selector = '.js-view-dom-id-' + settings.view_dom_id; @@ -142,8 +146,10 @@ /** * Attach the ajax behavior to a singe link. * - * @param {string} id + * @param {string} [id] + * The ID of the link. * @param {HTMLElement} link + * The link element. */ Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) { var $link = $(link); @@ -168,10 +174,14 @@ }; /** + * Views scroll to top ajax command. * * @param {Drupal.Ajax} [ajax] + * A {@link Drupal.ajax} object. * @param {object} response + * Ajax response. * @param {string} response.selector + * Selector to use. */ Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response) { // Scroll to the top of the view. This will allow users diff --git a/core/modules/views/js/base.js b/core/modules/views/js/base.js index d4282299ddcac85fb33fc2bd55e46239d3566632..2fa7f79b8d59fb828d54724d4f90b6b5de1fa214 100644 --- a/core/modules/views/js/base.js +++ b/core/modules/views/js/base.js @@ -16,8 +16,10 @@ * Helper function to parse a querystring. * * @param {string} query + * The querystring to parse. * * @return {object} + * A map of query parameters. */ Drupal.Views.parseQueryString = function (query) { var args = {}; @@ -41,9 +43,12 @@ * Helper function to return a view's arguments based on a path. * * @param {string} href + * The href to check. * @param {string} viewPath + * The views path to check. * * @return {object} + * An object containing `view_args` and `view_path`. */ Drupal.Views.parseViewArgs = function (href, viewPath) { var returnObj = {}; @@ -61,8 +66,10 @@ * Strip off the protocol plus domain from an href. * * @param {string} href + * The href to strip. * * @return {string} + * The href without the protocol and domain. */ Drupal.Views.pathPortion = function (href) { // Remove e.g. http://example.com if present. @@ -78,8 +85,10 @@ * Return the Drupal path portion of an href. * * @param {string} href + * The href to check. * * @return {string} + * An internal path. */ Drupal.Views.getPath = function (href) { href = Drupal.Views.pathPortion(href); diff --git a/core/modules/views/js/views-contextual.js b/core/modules/views/js/views-contextual.js index e0fe169d5aa5d909acb44a27bbbcb9baee74d2ae..e6586ebc8530ea30fb7db5c528a9f96daca0a143 100644 --- a/core/modules/views/js/views-contextual.js +++ b/core/modules/views/js/views-contextual.js @@ -8,8 +8,12 @@ "use strict"; /** + * Attaches contextual region classes to views elements. * * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Adds class `contextual-region` to views elements. */ Drupal.behaviors.viewsContextualLinks = { attach: function (context) {