Commit 6a260d23 authored by jan.koester's avatar jan.koester
Browse files

test

parent 0444e792
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
WEBEDIT:
  HTTP:
    BIND: "0.0.0.0"
    PORT: 8999
    MAXCON: 256
  SSL:
    CERT: ""
    KEY: ""
    PASSWORD: ""
  DATABASE:
    DRIVER: "sqlite"
    CONNECTION: "/var/lib/blogi-editor/webedit.db"
  PLUGINDIR:
    - "/usr/lib/blogi/plugins/webedit"
  HTMLDIR: "/home/intranet.tuxist.de/jan.koester/Projects/blogi/editor/html"
  PREFIX: ""
  LANGUAGE: "DE"
  AUTHDB:
    - URL: "https://10.1.2.80:9090/api/3baa27b6-84cf-4402-bbe8-bd42c3da6782"
      CLIENTNAME: "dibsi-debian"
      CLIENTSECRET: "Aec9moor"
      DOMAIN: "tuxist.de"
  NODE:
    WIDGETDIR:
      - "/usr/local/share/blogi-editor/node/widgets"
      - "/var/lib/blogi-editor/node/widgets"
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ RUN apk add --no-cache yaml brotli openssl ca-certificates json-c libuuid libpq

RUN mkdir /etc/blogi
RUN mkdir /usr/local/share/blogi
RUN mkdir -p /var/lib/blogi-editor

COPY docker-config.yaml /usr/local/share/blogi

+21 −0
Original line number Diff line number Diff line
WEBEDIT:
  HTTP:
    BIND: "0.0.0.0"
    PORT: 8999
    MAXCON: 256
  SSL:
    CERT: ""
    KEY: ""
    PASSWORD: ""
  DATABASE:
    DRIVER: "sqlite"
    CONNECTION: "/var/lib/blogi-editor/webedit.db"
  PLUGINDIR:
    - "/usr/local/lib/blogi/plugins/webedit"
  HTMLDIR: "/usr/local/share/blogi-editor/html"
  PREFIX: ""
  LANGUAGE: "DE"
  NODE:
    WIDGETDIR:
      - "/usr/local/share/blogi-editor/node/widgets"
      - "/var/lib/blogi-editor/node/widgets"
+17 −0
Original line number Diff line number Diff line
services:
  blogi-editor-test:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: blogi-editor-test
    ports:
      - "8999:8999"
    volumes:
      - ./config.test.two-widget-paths.yaml:/etc/blogi-editor/config.yaml:ro
      - ./node/widgets:/usr/local/share/blogi-editor/node/widgets:ro
      - ./node/widgets-extra:/var/lib/blogi-editor/node/widgets:ro
      - blogi_editor_data:/var/lib/blogi-editor
    restart: "no"

volumes:
  blogi_editor_data:
+34 −1
Original line number Diff line number Diff line
@@ -7,8 +7,15 @@ var PropertiesPanel = (function() {

    var currentUuid = null;
    var currentSchema = null;
    var saveTimer = null;
    var isSaving = false;

    function showProperties(uuid) {
        // Persist unsaved changes before switching to another element.
        if (currentUuid && uuid && currentUuid !== uuid) {
            saveProperties();
        }

        currentUuid = uuid;
        var container = document.getElementById('properties-content');

@@ -108,6 +115,8 @@ var PropertiesPanel = (function() {
            e.preventDefault();
            saveProperties();
        });
        form.addEventListener('input', scheduleSave);
        form.addEventListener('change', scheduleSave);

        // Create panels
        var desktopPanel = document.createElement('div');
@@ -454,7 +463,12 @@ var PropertiesPanel = (function() {
    }

    function saveProperties() {
        if (!currentUuid) return;
        if (!currentUuid || isSaving) return;

        if (saveTimer) {
            clearTimeout(saveTimer);
            saveTimer = null;
        }

        var form = document.getElementById('prop-form');
        if (!form) return;
@@ -470,6 +484,7 @@ var PropertiesPanel = (function() {
            }
        }

        isSaving = true;
        EditorApi.setProperties(currentUuid, properties).then(function(resp) {
            // Update form fields with computed dimensions from blog
            if (resp && resp.real_width) {
@@ -486,10 +501,28 @@ var PropertiesPanel = (function() {
            }
        }).catch(function(err) {
            console.error('Failed to save properties:', err);
        }).finally(function() {
            isSaving = false;
        });
    }

    function scheduleSave() {
        if (!currentUuid) return;
        if (saveTimer) clearTimeout(saveTimer);
        saveTimer = setTimeout(function() {
            saveTimer = null;
            saveProperties();
        }, 250);
    }

    function clear() {
        if (currentUuid) {
            saveProperties();
        }
        if (saveTimer) {
            clearTimeout(saveTimer);
            saveTimer = null;
        }
        currentUuid = null;
        currentSchema = null;
        var container = document.getElementById('properties-content');
Loading