Skip to content

Commit 17253b5

Browse files
committed
Add license status message
1 parent 778ccca commit 17253b5

File tree

11 files changed

+260
-27
lines changed

11 files changed

+260
-27
lines changed

assets/build/css/style-edd-sl-sdk.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/build/js/edd-sl-sdk.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/src/css/style.scss

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,23 @@
3636
display: flex;
3737
flex-direction: column;
3838
gap: 1.5em;
39+
max-width: 500px;
3940

4041
button.edd-sdk__notice--dismiss {
4142
position: absolute;
4243
color: #555;
4344
text-decoration: none;
4445
font-size: 2em;
45-
top: 0;
46+
top: 0.5em;
4647
right: 0.5em;
48+
line-height: 1;
49+
padding: 4px;
50+
51+
&:before {
52+
font-family: dashicons;
53+
font-weight: normal;
54+
content: "\f335";
55+
}
4756
}
4857

4958
.inline-notice {
@@ -72,3 +81,7 @@
7281
color: #d63638;
7382
}
7483
}
84+
85+
.edd-sl-sdk__license-status-message {
86+
font-style: italic;
87+
}

assets/src/js/license.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,16 @@
9999
on( document, 'click', '.edd-sl-sdk-license__delete', function ( e ) {
100100
e.preventDefault();
101101

102-
const btn = e.target;
103-
const ajaxAction = 'edd_sl_sdk_delete';
102+
const btn = e.target,
103+
input = $( '.edd-sl-sdk__license--input' );
104+
const ajaxAction = 'edd_sl_sdk_delete_' + input.getAttribute( 'data-slug' );
104105

105106
const data = {
106107
action: ajaxAction,
107108
token: btn.getAttribute( 'data-token' ),
108109
timestamp: btn.getAttribute( 'data-timestamp' ),
109110
nonce: btn.getAttribute( 'data-nonce' ),
110-
license: $( '.edd-sl-sdk__license--input' ).value,
111+
license: input.value,
111112
};
112113

113114
if ( !data.license ) {

0 commit comments

Comments
 (0)