Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443205
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443205
Commits
267a86ae
Commit
267a86ae
authored
9 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2531694
by eiriksm, nod_, dawehner: JSDoc views module
parent
2d22d73a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/modules/views/js/ajax_view.js
+13
-3
13 additions, 3 deletions
core/modules/views/js/ajax_view.js
core/modules/views/js/base.js
+9
-0
9 additions, 0 deletions
core/modules/views/js/base.js
core/modules/views/js/views-contextual.js
+4
-0
4 additions, 0 deletions
core/modules/views/js/views-contextual.js
with
26 additions
and
3 deletions
core/modules/views/js/ajax_view.js
+
13
−
3
View file @
267a86ae
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
core/modules/views/js/base.js
+
9
−
0
View file @
267a86ae
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
core/modules/views/js/views-contextual.js
+
4
−
0
View file @
267a86ae
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment