You've already forked wc-licensed-product
Add inline editing for licenses and copy license key button
- Add inline editing for status, expiry date, and domain fields - Add copy-to-clipboard button for license keys - Add AJAX handlers for inline editing with nonce verification - Update LicenseManager with updateLicenseExpiry method - Add new translations for inline editing strings (de_CH) - Compile updated German translations to .mo file Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -579,3 +579,144 @@
|
||||
#license-search-input {
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
/* Inline Editing Styles */
|
||||
.wclp-editable-cell {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wclp-editable-cell .wclp-display-value {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.wclp-editable-cell .wclp-edit-btn {
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s ease;
|
||||
color: #2271b1;
|
||||
padding: 0;
|
||||
margin-left: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wclp-editable-cell:hover .wclp-edit-btn {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wclp-editable-cell .wclp-edit-btn .dashicons {
|
||||
font-size: 14px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wclp-editable-cell .wclp-edit-btn:hover {
|
||||
color: #135e96;
|
||||
}
|
||||
|
||||
.wclp-edit-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wclp-edit-form .wclp-edit-input {
|
||||
max-width: 150px;
|
||||
height: 28px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.wclp-edit-form .wclp-edit-input[type="date"] {
|
||||
max-width: 130px;
|
||||
}
|
||||
|
||||
.wclp-edit-form select.wclp-edit-input {
|
||||
max-width: 120px;
|
||||
}
|
||||
|
||||
.wclp-edit-form .button-small {
|
||||
height: 26px;
|
||||
line-height: 24px;
|
||||
padding: 0 8px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.wclp-edit-form .wclp-lifetime-btn {
|
||||
font-size: 16px;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
/* Inline notice animation */
|
||||
.wclp-inline-notice {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
/* Make editable cells have a minimum height for consistency */
|
||||
.licenses-table .wclp-editable-cell {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
/* Domain column wider for edit form */
|
||||
.licenses-table td[data-field="domain"] {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
/* Status column */
|
||||
.licenses-table td[data-field="status"] {
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
/* Expiry column */
|
||||
.licenses-table td[data-field="expiry"] {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
/* Copy License Key Button */
|
||||
.wclp-copy-btn {
|
||||
color: #2271b1;
|
||||
padding: 0;
|
||||
margin-left: 5px;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wclp-copy-btn:hover {
|
||||
color: #135e96;
|
||||
}
|
||||
|
||||
.wclp-copy-btn .dashicons {
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wclp-copy-tooltip {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: #1d2327;
|
||||
color: #fff;
|
||||
padding: 4px 8px;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
z-index: 100;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.wclp-copy-tooltip::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border: 5px solid transparent;
|
||||
border-top-color: #1d2327;
|
||||
}
|
||||
|
||||
.wclp-license-key {
|
||||
user-select: all;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user