-
= $translation->get("departments") ?>
+
+
-
-
= $translation->get("roles") ?>
+
+
-
-
Einrichtungen
+
+
-
-
Fachbereiche
+
+
-
-
-
-
-
-
= $translation->get("connected_subcategories") ?>
-
-
-
- -
- = $translation->get("no_connected_subcategories") ?>
-
-
-
- -
-
-
- = htmlspecialchars($sub['title'] ?? "Fehlende Übersetzung ID {$sub['id']}") ?>
-
-
-
-
-
-
-
-
-
-
= $translation->get("available_categories") ?>
-
-
-
- -
- = $translation->get("all_available_categories_used") ?>
-
-
-
- -
-
-
- = htmlspecialchars($row['title'] ?: "Fehlende Übersetzung ID {$row['id']}") ?>
-
-
-
-
-
-
-
-
-
+
$(function () {
- // Section tab switching
- $('.cf-section-tab').on('click', function () {
- var target = $(this).data('target');
- $('.cf-section-tab').removeClass('active');
- $(this).addClass('active');
- $('.cf-tab-pane').removeClass('active').hide();
- $('#' + target).addClass('active').show();
- });
-
// Funktion zum sequentiellen Speichern der Übersetzungen
window.saveCategoryAjax = function (callback) {
var forms = $(".translationForm");
diff --git a/module/shared_components/quill/quill_resize.css b/module/shared_components/quill/quill_resize.css
new file mode 100644
index 0000000..ba03566
--- /dev/null
+++ b/module/shared_components/quill/quill_resize.css
@@ -0,0 +1,20 @@
+.ql-img-resize-overlay {
+ position: absolute;
+ border: 1px dashed #3C7DD9;
+ box-sizing: border-box;
+ pointer-events: none;
+ z-index: 100;
+}
+
+.ql-img-resize-handle {
+ position: absolute;
+ bottom: -5px;
+ right: -5px;
+ width: 10px;
+ height: 10px;
+ background: #3C7DD9;
+ border: 1px solid #fff;
+ border-radius: 2px;
+ cursor: nwse-resize;
+ pointer-events: all;
+}
diff --git a/module/shared_components/quill/quill_resize.js b/module/shared_components/quill/quill_resize.js
new file mode 100644
index 0000000..a1c05d9
--- /dev/null
+++ b/module/shared_components/quill/quill_resize.js
@@ -0,0 +1,96 @@
+(function () {
+ 'use strict';
+
+ if (typeof Quill === 'undefined') return;
+
+ function ImageResizeModule(quill, options) {
+ this.quill = quill;
+ this.overlay = null;
+ this.activeImg = null;
+ this._startX = 0;
+ this._startW = 0;
+
+ this._onImgClick = this._onImgClick.bind(this);
+ this._onDocClick = this._onDocClick.bind(this);
+ this._onMouseMove = this._onMouseMove.bind(this);
+ this._onMouseUp = this._onMouseUp.bind(this);
+
+ quill.root.addEventListener('click', this._onImgClick);
+ document.addEventListener('click', this._onDocClick);
+ }
+
+ ImageResizeModule.prototype._onImgClick = function (e) {
+ if (e.target && e.target.tagName === 'IMG') {
+ e.stopPropagation();
+ this._select(e.target);
+ }
+ };
+
+ ImageResizeModule.prototype._onDocClick = function (e) {
+ if (this.overlay && e.target !== this.activeImg && !this.overlay.contains(e.target)) {
+ this._deselect();
+ }
+ };
+
+ ImageResizeModule.prototype._select = function (img) {
+ this._deselect();
+ this.activeImg = img;
+
+ var overlay = document.createElement('div');
+ overlay.className = 'ql-img-resize-overlay';
+
+ var handle = document.createElement('div');
+ handle.className = 'ql-img-resize-handle';
+ overlay.appendChild(handle);
+
+ this.quill.root.style.position = 'relative';
+ this.quill.root.appendChild(overlay);
+ this.overlay = overlay;
+
+ this._reposition();
+
+ var self = this;
+ handle.addEventListener('mousedown', function (e) {
+ e.preventDefault();
+ self._startX = e.clientX;
+ self._startW = self.activeImg.offsetWidth || self.activeImg.getBoundingClientRect().width;
+ document.addEventListener('mousemove', self._onMouseMove);
+ document.addEventListener('mouseup', self._onMouseUp);
+ });
+ };
+
+ ImageResizeModule.prototype._reposition = function () {
+ if (!this.overlay || !this.activeImg) return;
+ var r = this.activeImg.getBoundingClientRect();
+ var er = this.quill.root.getBoundingClientRect();
+ this.overlay.style.left = (r.left - er.left + this.quill.root.scrollLeft) + 'px';
+ this.overlay.style.top = (r.top - er.top + this.quill.root.scrollTop) + 'px';
+ this.overlay.style.width = r.width + 'px';
+ this.overlay.style.height = r.height + 'px';
+ };
+
+ ImageResizeModule.prototype._onMouseMove = function (e) {
+ if (!this.activeImg) return;
+ var dx = e.clientX - this._startX;
+ var newW = Math.max(40, this._startW + dx);
+ this.activeImg.style.width = newW + 'px';
+ this.activeImg.setAttribute('width', newW);
+ this._reposition();
+ };
+
+ ImageResizeModule.prototype._onMouseUp = function () {
+ document.removeEventListener('mousemove', this._onMouseMove);
+ document.removeEventListener('mouseup', this._onMouseUp);
+ if (this.quill) this.quill.update();
+ };
+
+ ImageResizeModule.prototype._deselect = function () {
+ if (this.overlay && this.overlay.parentNode) {
+ this.overlay.parentNode.removeChild(this.overlay);
+ }
+ this.overlay = null;
+ this.activeImg = null;
+ };
+
+ Quill.register('modules/imageResize', ImageResizeModule);
+})();
diff --git a/module/shared_components/quill/toolbar_presets.js b/module/shared_components/quill/toolbar_presets.js
new file mode 100644
index 0000000..66339b5
--- /dev/null
+++ b/module/shared_components/quill/toolbar_presets.js
@@ -0,0 +1,46 @@
+window.QuillToolbarPresets = {
+
+ full: function () {
+ return [
+ [{ header: [1, 2, 3, 4, 5, 6, false] }],
+ ['bold', 'italic', 'underline', 'strike'],
+ [{ color: [] }, { background: [] }],
+ [{ list: 'ordered' }, { list: 'bullet' }],
+ [{ indent: '-1' }, { indent: '+1' }],
+ [{ align: [] }],
+ ['blockquote', 'code-block'],
+ ['link', 'image'],
+ ['table'],
+ ['clean']
+ ];
+ },
+
+ compact: function () {
+ return [
+ [{ header: [1, 2, 3, false] }],
+ ['bold', 'italic', 'underline'],
+ [{ list: 'ordered' }, { list: 'bullet' }],
+ ['link', 'image'],
+ ['table'],
+ ['clean']
+ ];
+ },
+
+ betterTableConfig: function () {
+ return {
+ operationMenu: {
+ items: {
+ insertColumnRight: { text: 'Spalte rechts' },
+ insertColumnLeft: { text: 'Spalte links' },
+ insertRowUp: { text: 'Zeile oben' },
+ insertRowDown: { text: 'Zeile unten' },
+ mergeCells: { text: 'Zellen verbinden' },
+ unmergeCells: { text: 'Zellen trennen' },
+ deleteColumn: { text: 'Spalte löschen' },
+ deleteRow: { text: 'Zeile löschen' },
+ deleteTable: { text: 'Tabelle löschen' }
+ }
+ }
+ };
+ }
+};