mirror of https://github.com/itflow-org/itflow
Updated changelog also added redact to open tickets
This commit is contained in:
parent
37c20e4e0d
commit
c3ec83f640
25
CHANGELOG.md
25
CHANGELOG.md
|
|
@ -5,14 +5,31 @@ This file documents all notable changes made to ITFlow.
|
|||
## [25.03 UNRELEASED]
|
||||
|
||||
### Fixed
|
||||
- Fixed missing attachments on ticket replies via the ticket email parser
|
||||
- Fixed missing attachments on ticket replies via the ticket email parser.
|
||||
- Fixed top half of portrait image uploads cut off at the bottom.
|
||||
- Ensure all Tables and fields use CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci on update and new installs.
|
||||
- Convert service_domains to use InnoDB instead of MyISAM.
|
||||
- Fixed intials function from breaking when using UTF8 characters which caused contacts to break.
|
||||
-
|
||||
|
||||
### Added / Changed
|
||||
- Added Bulk Delete Asset Functionality
|
||||
- Ability to redact ticket replies after a ticket is closed
|
||||
- Added Bulk Delete Asset Functionality.
|
||||
- Ability to redact ticket replies after a ticket is closed.
|
||||
- Ability to redact text while ticket is open.
|
||||
- Switched File upload unique file naming to md5 instead of SGHA256 for a huge speed boost.
|
||||
- Added the ability to assign Multiple Assets to a ticket.
|
||||
- Updated all many to many table to use Cascading Deletion with Foreign key associations to reduce error and enhance efficiency abd performance while preserving data integrity.
|
||||
- Turned on Caching for the new AJAX Modals to increase performance to reduce the amount of items it needs to reload into the browser each time the ajax modal is called.
|
||||
- Bumped DataTables from 2.2.1 to 2.2.2.
|
||||
- Bumped TinyMCE from 7.6.1 to 7.7.1 - Giving a large performance boost.
|
||||
- Added Copy to Credentials to Clipboard button in AJAX asset and contact details.
|
||||
- Many Tables have been renameed updated changed.
|
||||
- Orgainzed Theme colors by primary color and then associated color in rows.
|
||||
- Added User icon next to contact if they have a user account.
|
||||
- New Image file uploads by default are converted to optimized webp files and original images are no longer saved. Existing images will be untouched.
|
||||
|
||||
### Breaking Changes
|
||||
- Renamed users table; if you are unable to log in, update the database schema using the CLI script
|
||||
- ATTENTION: TO UPDATE TO THIS VERSION YOU MUST USE: update_cli.php and update_cli.php --db_update from the command line to update or else you will break your install. Keep running update_cli.php --db_update until there are no more updates. BACKUP BEFORE UPDATING TO THIS VERSION. There have been many many backend changes to help us move further with development.
|
||||
|
||||
## [25.02.4]
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ ob_start();
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control tinymce" rows="8" name="details"><?php echo $ticket_details; ?></textarea>
|
||||
<textarea class="form-control tinymceTicket" rows="8" name="details"><?php echo $ticket_details; ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
|
|||
258
js/app.js
258
js/app.js
|
|
@ -150,131 +150,173 @@ tinymce.init({
|
|||
});
|
||||
|
||||
tinymce.init({
|
||||
selector: '.tinymceTicket',
|
||||
browser_spellcheck: true,
|
||||
contextmenu: false,
|
||||
resize: true,
|
||||
min_height: 300,
|
||||
max_height: 600,
|
||||
promotion: false,
|
||||
branding: false,
|
||||
selector: '.tinymceTicket', // Your selector
|
||||
browser_spellcheck: true,
|
||||
contextmenu: false,
|
||||
resize: true,
|
||||
min_height: 300,
|
||||
max_height: 600,
|
||||
promotion: false,
|
||||
branding: false,
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
toolbar: [
|
||||
{ name: 'styles', items: [ 'styles' ] },
|
||||
{ name: 'formatting', items: [ 'bold', 'italic', 'forecolor'] },
|
||||
{ name: 'link', items: [ 'link'] },
|
||||
{ name: 'lists', items: [ 'bullist', 'numlist' ] },
|
||||
{ name: 'indentation', items: [ 'outdent', 'indent' ] },
|
||||
{ name: 'custom', items: ['myRedactButton'] } // Add custom button to toolbar
|
||||
],
|
||||
mobile: {
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
toolbar: [
|
||||
{ name: 'styles', items: [ 'styles' ] },
|
||||
{ name: 'formatting', items: [ 'bold', 'italic', 'forecolor'] },
|
||||
{ name: 'link', items: [ 'link'] },
|
||||
{ name: 'lists', items: [ 'bullist', 'numlist' ] },
|
||||
{ name: 'indentation', items: [ 'outdent', 'indent' ] }
|
||||
],
|
||||
mobile: {
|
||||
menubar: false,
|
||||
plugins: 'autosave lists autolink',
|
||||
toolbar: 'bold italic styles'
|
||||
},
|
||||
convert_urls: false,
|
||||
plugins: 'link image lists table code fullscreen autoresize',
|
||||
license_key: 'gpl'
|
||||
plugins: 'autosave lists autolink',
|
||||
toolbar: 'bold italic styles'
|
||||
},
|
||||
convert_urls: false,
|
||||
plugins: 'link image lists table code fullscreen autoresize',
|
||||
license_key: 'gpl',
|
||||
setup: function(editor) {
|
||||
// Add custom toolbar button with Font Awesome icon
|
||||
editor.ui.registry.addButton('myRedactButton', {
|
||||
icon: 'permanent-pen',
|
||||
tooltip: 'Redact', // Tooltip text for the button
|
||||
onAction: function() {
|
||||
var selectedText = editor.selection.getContent({ format: 'text' });
|
||||
|
||||
if (selectedText) {
|
||||
// Replace the selected text with [REDACTED] in bold red
|
||||
var newContent = '<span style="font-weight: bold; color: red;">[REDACTED]</span>';
|
||||
|
||||
// Replace selected content with the new content
|
||||
editor.selection.setContent(newContent);
|
||||
} else {
|
||||
alert('Please select a word to redact');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize TinyMCE AI
|
||||
tinymce.init({
|
||||
selector: '.tinymceTicketAI',
|
||||
browser_spellcheck: true,
|
||||
contextmenu: false,
|
||||
resize: true,
|
||||
min_height: 300,
|
||||
max_height: 600,
|
||||
promotion: false,
|
||||
branding: false,
|
||||
selector: '.tinymceTicketAI',
|
||||
browser_spellcheck: true,
|
||||
contextmenu: false,
|
||||
resize: true,
|
||||
min_height: 300,
|
||||
max_height: 600,
|
||||
promotion: false,
|
||||
branding: false,
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
toolbar: [
|
||||
{ name: 'styles', items: ['styles'] },
|
||||
{ name: 'formatting', items: ['bold', 'italic', 'forecolor'] },
|
||||
{ name: 'link', items: ['link'] },
|
||||
{ name: 'lists', items: ['bullist', 'numlist'] },
|
||||
{ name: 'indentation', items: ['outdent', 'indent'] },
|
||||
{ name: 'ai', items: ['reword', 'undo', 'redo'] },
|
||||
{ name: 'custom', items: ['myRedactButton'] } // Add custom redact button to toolbar
|
||||
],
|
||||
mobile: {
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
toolbar: [
|
||||
{ name: 'styles', items: [ 'styles' ] },
|
||||
{ name: 'formatting', items: [ 'bold', 'italic', 'forecolor'] },
|
||||
{ name: 'link', items: [ 'link'] },
|
||||
{ name: 'lists', items: [ 'bullist', 'numlist' ] },
|
||||
{ name: 'indentation', items: [ 'outdent', 'indent' ] },
|
||||
{ name: 'ai', items: [ 'reword', 'undo', 'redo' ] }
|
||||
],
|
||||
mobile: {
|
||||
menubar: false,
|
||||
toolbar: 'bold italic styles'
|
||||
},
|
||||
convert_urls: false,
|
||||
plugins: 'link image lists table code codesample fullscreen autoresize',
|
||||
license_key: 'gpl',
|
||||
setup: function(editor) {
|
||||
var rewordButtonApi;
|
||||
toolbar: 'bold italic styles'
|
||||
},
|
||||
convert_urls: false,
|
||||
plugins: 'link image lists table code codesample fullscreen autoresize',
|
||||
license_key: 'gpl',
|
||||
setup: function(editor) {
|
||||
var rewordButtonApi;
|
||||
|
||||
editor.ui.registry.addButton('reword', {
|
||||
icon: 'ai',
|
||||
tooltip: 'Reword Text',
|
||||
onAction: function() {
|
||||
var content = editor.getContent();
|
||||
// Define the Reword button (AI-related button)
|
||||
editor.ui.registry.addButton('reword', {
|
||||
icon: 'ai', // Example icon for AI rewording
|
||||
tooltip: 'Reword Text',
|
||||
onAction: function() {
|
||||
var content = editor.getContent();
|
||||
|
||||
// Disable the Reword button
|
||||
rewordButtonApi.setEnabled(false);
|
||||
// Disable the Reword button
|
||||
rewordButtonApi.setEnabled(false);
|
||||
|
||||
// Show the progress indicator
|
||||
editor.setProgressState(true);
|
||||
// Show the progress indicator
|
||||
editor.setProgressState(true);
|
||||
|
||||
fetch('post.php?ai_reword', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ text: content }),
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
editor.undoManager.transact(function() {
|
||||
editor.setContent(data.rewordedText || 'Error: Could not reword the text.');
|
||||
});
|
||||
fetch('post.php?ai_reword', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ text: content }),
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
editor.undoManager.transact(function() {
|
||||
editor.setContent(data.rewordedText || 'Error: Could not reword the text.');
|
||||
});
|
||||
|
||||
// Hide the progress indicator
|
||||
editor.setProgressState(false);
|
||||
// Hide the progress indicator
|
||||
editor.setProgressState(false);
|
||||
|
||||
// Re-enable the Reword button
|
||||
rewordButtonApi.setEnabled(true);
|
||||
// Re-enable the Reword button
|
||||
rewordButtonApi.setEnabled(true);
|
||||
|
||||
// Optional: Show a success notification
|
||||
editor.notificationManager.open({
|
||||
text: 'Text reworded successfully!',
|
||||
type: 'success',
|
||||
timeout: 3000
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
// Optional: Show a success notification
|
||||
editor.notificationManager.open({
|
||||
text: 'Text reworded successfully!',
|
||||
type: 'success',
|
||||
timeout: 3000
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
|
||||
// Hide the progress indicator
|
||||
editor.setProgressState(false);
|
||||
// Hide the progress indicator
|
||||
editor.setProgressState(false);
|
||||
|
||||
// Re-enable the Reword button
|
||||
rewordButtonApi.setEnabled(true);
|
||||
// Re-enable the Reword button
|
||||
rewordButtonApi.setEnabled(true);
|
||||
|
||||
// Show an error notification
|
||||
editor.notificationManager.open({
|
||||
text: 'An error occurred while rewording the text.',
|
||||
type: 'error',
|
||||
timeout: 5000
|
||||
});
|
||||
});
|
||||
},
|
||||
onSetup: function(buttonApi) {
|
||||
rewordButtonApi = buttonApi;
|
||||
return function() {
|
||||
// Cleanup when the editor is destroyed (if necessary)
|
||||
};
|
||||
}
|
||||
// Show an error notification
|
||||
editor.notificationManager.open({
|
||||
text: 'An error occurred while rewording the text.',
|
||||
type: 'error',
|
||||
timeout: 5000
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
onSetup: function(buttonApi) {
|
||||
rewordButtonApi = buttonApi;
|
||||
return function() {
|
||||
// Cleanup when the editor is destroyed (if necessary)
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Add the Redact button
|
||||
editor.ui.registry.addButton('myRedactButton', {
|
||||
icon: 'permanent-pen',
|
||||
tooltip: 'Redact Text', // Tooltip text for the button
|
||||
onAction: function() {
|
||||
var selectedText = editor.selection.getContent({ format: 'text' });
|
||||
|
||||
if (selectedText) {
|
||||
// Replace the selected text with [REDACTED] in bold red
|
||||
var newContent = '<span style="font-weight: bold; color: red;">[REDACTED]</span>';
|
||||
|
||||
// Replace selected content with the new content
|
||||
editor.selection.setContent(newContent);
|
||||
} else {
|
||||
alert('Please select a word to redact');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize TinyMCE editor with only a redact button
|
||||
|
|
|
|||
Loading…
Reference in New Issue