generated from jric11/baseProject
ChatGPT's update to harden software and run db updates.
This commit is contained in:
+3
-44
@@ -6,54 +6,13 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
var $application = $("#APPLICATION_MNEMONIC").val(),
|
||||
$sessionStorage = JSON.parse(sessionStorage.getItem($application) || "{}"),
|
||||
$CKEditor;
|
||||
$sessionStorage = JSON.parse(sessionStorage.getItem($application) || "{}");
|
||||
|
||||
// ----------------------
|
||||
// Initialize the Editor.
|
||||
// ----------------------
|
||||
|
||||
ClassicEditor
|
||||
.create(document.querySelector('#popover_text'), {
|
||||
toolbar: {
|
||||
items: [
|
||||
'heading',
|
||||
'|',
|
||||
'bold',
|
||||
'italic',
|
||||
'underline',
|
||||
'link',
|
||||
'bulletedList',
|
||||
'numberedList',
|
||||
'|',
|
||||
'fontColor',
|
||||
'fontSize',
|
||||
'fontFamily',
|
||||
'|',
|
||||
'indent',
|
||||
'outdent',
|
||||
'alignment',
|
||||
'|',
|
||||
'horizontalLine',
|
||||
'insertTable',
|
||||
'|',
|
||||
'undo',
|
||||
'redo',
|
||||
'|'
|
||||
]},
|
||||
link: {
|
||||
addTargetToExternalLinks: true,
|
||||
defaultProtocol: "http://"
|
||||
|
||||
}
|
||||
})
|
||||
.then(editor => {
|
||||
$CKEditor = editor;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('CK-Editor error...');
|
||||
console.error(error);
|
||||
});
|
||||
HcrRichText.create(document.querySelector('#popover_text'));
|
||||
|
||||
// -----------
|
||||
// Save Button
|
||||
@@ -144,7 +103,7 @@ $(document).ready(function () {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$CKEditor.updateSourceElement();
|
||||
if (!HcrRichText.sync(document.querySelector('#popover_text'))) return;
|
||||
|
||||
$.post("./", $(this).serialize())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user