- Furter refinement of the API, adding functionality for refreshing documents and returning Token expiration time when retrieving token
- Implementation of a first version of a Wordpress plugin - Adding api service to nginx.conf
This commit is contained in:
70
integrations/Wordpress/eveai_sync/admin/css/eveai-admin.css
Normal file
70
integrations/Wordpress/eveai_sync/admin/css/eveai-admin.css
Normal file
@@ -0,0 +1,70 @@
|
||||
.eveai-admin-wrap {
|
||||
max-width: 800px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.eveai-admin-header {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.eveai-admin-header h1 {
|
||||
margin: 0;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.eveai-admin-content {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.eveai-form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.eveai-form-group label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.eveai-form-group input[type="text"],
|
||||
.eveai-form-group input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.eveai-button {
|
||||
background-color: #0085ba;
|
||||
border-color: #0073aa #006799 #006799;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
||||
display: inline-block;
|
||||
padding: 8px 12px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.eveai-button:hover {
|
||||
background-color: #008ec2;
|
||||
}
|
||||
|
||||
.eveai-category-list {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.eveai-category-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.eveai-category-item label {
|
||||
font-weight: normal;
|
||||
}
|
||||
49
integrations/Wordpress/eveai_sync/admin/js/eveai_admin.js
Normal file
49
integrations/Wordpress/eveai_sync/admin/js/eveai_admin.js
Normal file
@@ -0,0 +1,49 @@
|
||||
jQuery(document).ready(function($) {
|
||||
// Handle bulk sync button click
|
||||
$('#eveai-bulk-sync').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (confirm('Are you sure you want to start a bulk sync? This may take a while.')) {
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'eveai_bulk_sync',
|
||||
nonce: eveai_admin.nonce
|
||||
},
|
||||
success: function(response) {
|
||||
alert(response.data.message);
|
||||
},
|
||||
error: function() {
|
||||
alert('An error occurred. Please try again.');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Handle category exclusion checkboxes
|
||||
$('.eveai-category-exclude').on('change', function() {
|
||||
var categoryId = $(this).val();
|
||||
var isExcluded = $(this).is(':checked');
|
||||
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'eveai_toggle_category_exclusion',
|
||||
category_id: categoryId,
|
||||
is_excluded: isExcluded ? 1 : 0,
|
||||
nonce: eveai_admin.nonce
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
console.log('Category exclusion updated');
|
||||
} else {
|
||||
alert('Failed to update category exclusion');
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
alert('An error occurred. Please try again.');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user