Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DSR demo theme
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
DAR
DSR demo theme
Merge requests
!1
js portal
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
js portal
js_portal
into
master
Overview
1
Commits
1
Pipelines
0
Changes
2
Closed
seppe
requested to merge
js_portal
into
master
3 years ago
Overview
1
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
4a6dab19
1 commit,
3 years ago
2 files
+
45
−
0
Expand all files
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
Search (e.g. *.vue) (Ctrl+P)
js/portal.js
0 → 100644
+
44
−
0
Options
/**
* @file
* A JavaScript file for the theme.
*
* In order for this JavaScript to be loaded on pages, see the instructions in
* the README.txt next to this file.
*/
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it with an "anonymous closure". See:
// - https://drupal.org/node/1446420
// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
(
function
(
Drupal
,
$
)
{
'
use strict
'
;
// To understand behaviors, see https://www.drupal.org/node/2269515
Drupal
.
behaviors
.
basic
=
{
attach
:
function
(
context
,
settings
)
{
if
(
$
(
'
#block-views-block-portal-shareholders-block-1
'
).
length
)
{
if
(
$
(
'
#block-views-block-portal-shareholders-block-1 .views-row
'
).
length
<=
1
){
$
(
'
#block-views-block-portal-shareholders-block-1
'
).
css
({
'
display
'
:
'
none
'
});
}
}
// Execute code once the DOM is ready. $(handler) not required
// within Drupal.behaviors.
$
(
window
).
on
(
'
load
'
,
function
()
{
// Execute code once the window is fully loaded.
});
$
(
window
).
on
(
'
resize
'
,
function
()
{
// Execute code when the window is resized.
});
$
(
window
).
on
(
'
scroll
'
,
function
()
{
// Execute code when the window scrolls.
});
}
};
})(
Drupal
,
jQuery
);