From d4b5e98514a7d238d41966a6b56871616095a9ad Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass <95754414+bdalsass@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:41:44 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B07678=20-=20Bulk=20modify=20of=20objects?= =?UTF-8?q?=20with=20HTML=20field=20broken=20-=20file=20have=20been=20rest?= =?UTF-8?q?ored=20from=20its=20previous=20version=20due=20to=20a=20wrong?= =?UTF-8?q?=20merge=20conflict=20resolution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/ckeditor/src/plugins/disabler/disabler.plugin.ts | 12 +++++------- js/utils.js | 8 -------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/js/ckeditor/src/plugins/disabler/disabler.plugin.ts b/js/ckeditor/src/plugins/disabler/disabler.plugin.ts index 9ad8ccfa3..a51bac3be 100644 --- a/js/ckeditor/src/plugins/disabler/disabler.plugin.ts +++ b/js/ckeditor/src/plugins/disabler/disabler.plugin.ts @@ -1,12 +1,6 @@ import { Plugin } from '@ckeditor/ckeditor5-core'; import {ClassicEditor} from "@ckeditor/ckeditor5-editor-classic"; -interface BlockFieldInterface{ - (element:HTMLElement, isBlocked: boolean):any; -} - -declare var BlockFieldElement: BlockFieldInterface; - export default class Disabler extends Plugin { static get pluginName() { @@ -42,7 +36,11 @@ export default class Disabler extends Plugin { // @ts-ignore const oElement = $(oEditor.ui.element); if(typeof oElement.block === 'function') { - BlockFieldElement(oElement, oInputElement.disabled); + if (oInputElement.disabled) { + oElement.block({message: '', blockMsgClass: '', enableValidation : true, baseZ: 9999, overlayCSS: { backgroundColor: '#ccd6e066'}}); + } else { + oElement.unblock(); + } } // handle ckeditor read only mode diff --git a/js/utils.js b/js/utils.js index 4d51b4ee0..987358fdb 100644 --- a/js/utils.js +++ b/js/utils.js @@ -314,14 +314,6 @@ function BlockField(field_id, bBlocked) { } } -function BlockFieldElement(element, bBlocked) { - if (bBlocked) { - element.block({message: '', enableValidation : true, baseZ: 9999, overlayCSS: { backgroundColor: '#ccd6e066'}}); - } else { - element.unblock(); - } -} - /** * Updates (enables/disables) a "duration" field */