Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-notice
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-notice
Commits
a3531ee2
Commit
a3531ee2
authored
6 years ago
by
Grzegorz Rola
Browse files
Options
Downloads
Patches
Plain Diff
Added notice dismiss link.
parent
dc9c8a85
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!15
Feature/notice dismiss link
Pipeline
#10055
failed
6 years ago
Stage: tools
Stage: tests
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
assets/js/notice.js
+3
-0
3 additions, 0 deletions
assets/js/notice.js
assets/js/notice.min.js
+1
-1
1 addition, 1 deletion
assets/js/notice.min.js
with
4 additions
and
1 deletion
assets/js/notice.js
+
3
−
0
View file @
a3531ee2
jQuery
(
document
).
on
(
'
click
'
,
'
.notice-dismiss
'
,
function
()
{
var
notice_name
=
jQuery
(
this
).
closest
(
'
div.notice
'
).
data
(
'
notice-name
'
);
var
source
=
jQuery
(
this
).
closest
(
'
div.notice
'
).
data
(
'
source
'
);
console
.
log
(
'
d
'
);
console
.
log
(
source
);
if
(
''
!==
notice_name
)
{
jQuery
.
ajax
({
url
:
ajaxurl
,
...
...
@@ -17,6 +19,7 @@ jQuery( document ).on( 'click', '.notice-dismiss', function() {
});
jQuery
(
document
).
on
(
'
click
'
,
'
.notice-dismiss-link
'
,
function
()
{
console
.
log
(
jQuery
(
this
).
data
(
'
source
'
));
jQuery
(
this
).
closest
(
'
div.notice
'
).
data
(
'
source
'
,
jQuery
(
this
).
data
(
'
source
'
));
jQuery
(
this
).
closest
(
'
div.notice
'
).
find
(
'
.notice-dismiss
'
).
click
();
});
This diff is collapsed.
Click to expand it.
assets/js/notice.min.js
+
1
−
1
View file @
a3531ee2
jQuery
(
document
).
on
(
"
click
"
,
"
.notice-dismiss
"
,
function
(){
var
a
=
jQuery
(
this
).
closest
(
"
div.notice
"
).
data
(
"
notice-name
"
);
var
b
=
jQuery
(
this
).
closest
(
"
div.notice
"
).
data
(
"
source
"
);
if
(
""
!==
a
){
jQuery
.
ajax
({
url
:
ajaxurl
,
type
:
"
post
"
,
data
:{
action
:
"
wpdesk_notice_dismiss
"
,
notice_name
:
a
,
source
:
b
},
success
:
function
(
c
){}})}});
jQuery
(
document
).
on
(
"
click
"
,
"
.notice-dismiss-link
"
,
function
(){
jQuery
(
this
).
closest
(
"
div.notice
"
).
data
(
"
source
"
,
jQuery
(
this
).
data
(
"
source
"
));
jQuery
(
this
).
closest
(
"
div.notice
"
).
find
(
"
.notice-dismiss
"
).
click
()});
\ No newline at end of file
jQuery
(
document
).
on
(
"
click
"
,
"
.notice-dismiss
"
,
function
(){
var
a
=
jQuery
(
this
).
closest
(
"
div.notice
"
).
data
(
"
notice-name
"
);
var
b
=
jQuery
(
this
).
closest
(
"
div.notice
"
).
data
(
"
source
"
);
console
.
log
(
"
d
"
);
console
.
log
(
b
);
if
(
""
!==
a
){
jQuery
.
ajax
({
url
:
ajaxurl
,
type
:
"
post
"
,
data
:{
action
:
"
wpdesk_notice_dismiss
"
,
notice_name
:
a
,
source
:
b
},
success
:
function
(
c
){}})}});
jQuery
(
document
).
on
(
"
click
"
,
"
.notice-dismiss-link
"
,
function
(){
console
.
log
(
jQuery
(
this
).
data
(
"
source
"
));
jQuery
(
this
).
closest
(
"
div.notice
"
).
data
(
"
source
"
,
jQuery
(
this
).
data
(
"
source
"
));
jQuery
(
this
).
closest
(
"
div.notice
"
).
find
(
"
.notice-dismiss
"
).
click
()});
\ No newline at end of file
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