N°7567 - Error message on bulk modify on object with different values in a an HTML field

This commit is contained in:
Benjamin Dalsass
2024-06-13 14:48:06 +02:00
parent bfbb046b10
commit 1f8726669b
4 changed files with 7 additions and 17 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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

View File

@@ -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
*/