Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inotify
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
inotify
Merge requests
!3
Resolved once error.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Resolved once error.
issue/inotify-3468868:3468868-once-is-not-function
into
2.0.x
Overview
0
Commits
1
Pipelines
0
Changes
3
Open
Nilesh Shah
requested to merge
issue/inotify-3468868:3468868-once-is-not-function
into
2.0.x
7 months ago
Overview
0
Commits
1
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Compare
2.0.x
2.0.x (HEAD)
and
latest version
latest version
9f88e4fc
1 commit,
7 months ago
3 files
+
57
−
57
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
js/inotify.js
+
22
−
21
Options
(
function
(
$
,
Drupal
)
{
(
function
(
$
,
Drupal
,
once
)
{
'
use strict
'
;
'
use strict
'
;
Drupal
.
behaviors
.
inotify
=
{};
Drupal
.
behaviors
.
inotify
=
{};
// Define the inotify behavior.
Drupal
.
behaviors
.
inotify
=
{
attach
:
function
(
context
,
settings
)
{
// Attach the NotificationsBlockEvents behavior.
once
(
'
inotify-opener-behaviors
'
,
'
.inotify-opener
'
,
context
).
forEach
(
function
(
element
)
{
$
(
'
.inotify-block-content
'
).
toggleClass
(
'
active
'
);
$
(
'
.inotify-opener .count.hidden
'
).
hide
();
});
$
(
'
body
'
).
on
(
'
click
'
,
function
(
evt
)
{
if
(
!
$
(
evt
.
target
).
closest
(
'
.inotify-block
'
).
length
)
{
if
(
$
(
'
.inotify-block-content
'
).
hasClass
(
'
active
'
))
{
$
(
'
.inotify-block-content
'
).
toggleClass
(
'
active
'
);
}
}
});
}
};
// Define the RefreshNotificationsView function.
Drupal
.
behaviors
.
inotify
.
RefreshNotificationsView
=
function
()
{
Drupal
.
behaviors
.
inotify
.
RefreshNotificationsView
=
function
()
{
// Find the notification view.
// Find the notification view.
$
.
each
(
Drupal
.
views
.
instances
,
function
getInstance
(
index
,
element
)
{
$
.
each
(
Drupal
.
views
.
instances
,
function
getInstance
(
index
,
element
)
{
@@ -15,23 +35,4 @@
@@ -15,23 +35,4 @@
});
});
};
};
Drupal
.
behaviors
.
NotificationsBlockEvents
=
{
})(
jQuery
,
Drupal
,
once
);
attach
:
function
(
context
,
settings
)
{
$
(
'
.inotify-opener
'
).
once
().
click
(
function
()
{
$
(
'
.inotify-block-content
'
).
toggleClass
(
'
active
'
);
$
(
'
.inotify-opener .count
'
).
hide
();
});
$
(
'
body
'
).
click
(
function
(
evt
)
{
if
(
$
(
evt
.
target
).
closest
(
'
.inotify-block
'
).
length
)
{
return
;
}
else
{
if
(
$
(
'
.inotify-block-content
'
).
hasClass
(
'
active
'
))
{
$
(
'
.inotify-block-content
'
).
toggleClass
(
'
active
'
)
}
}
});
}
};
})(
jQuery
,
Drupal
);
Loading