Commit c65a5e40 authored by jan.koester's avatar jan.koester
Browse files

test

parent 03c6ffa1
Loading
Loading
Loading
Loading
+14 −2
Changes for data/themes/default/editor.html: 14 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -3493,13 +3493,25 @@
        })();

        // Initial setup - Direct initialization
        window.onload = () => {
        window.onload = async () => {
            setView(false); // Default to desktop view on load
            initPluginToolbar();
            initDocumentTree(); // Load the document structure tree
            handleElementSelection(currentSelectedElementId); // Initial selection state
            loadTemplateList(); // Auto-load templates on startup
            await loadTemplateList(); // Auto-load templates on startup
            initThemeSwatches(); // Populate theme color palette

            // Optional deep-link: open editor with a specific template loaded.
            const query = new URLSearchParams(window.location.search);
            const openTemplateId = query.get('template_id');
            const openTemplateName = query.get('template_name');
            if (openTemplateName) {
                currentTemplateName = openTemplateName;
                updateCurrentTemplateDisplay(openTemplateName, null);
            }
            if (openTemplateId) {
                await loadTemplateFromDb(openTemplateId);
            }
        };
    </script>
</body>
+14 −2
Changes for data/themes/minimal/editor.html: 14 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -3493,13 +3493,25 @@
        })();

        // Initial setup - Direct initialization
        window.onload = () => {
        window.onload = async () => {
            setView(false); // Default to desktop view on load
            initPluginToolbar();
            initDocumentTree(); // Load the document structure tree
            handleElementSelection(currentSelectedElementId); // Initial selection state
            loadTemplateList(); // Auto-load templates on startup
            await loadTemplateList(); // Auto-load templates on startup
            initThemeSwatches(); // Populate theme color palette

            // Optional deep-link: open editor with a specific template loaded.
            const query = new URLSearchParams(window.location.search);
            const openTemplateId = query.get('template_id');
            const openTemplateName = query.get('template_name');
            if (openTemplateName) {
                currentTemplateName = openTemplateName;
                updateCurrentTemplateDisplay(openTemplateName, null);
            }
            if (openTemplateId) {
                await loadTemplateFromDb(openTemplateId);
            }
        };
    </script>
</body>
+1 −1
Changes for plugins/content/content.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -1721,7 +1721,7 @@ namespace blogi {
                    json_object *jedit = json_object_new_object();
                    json_object_object_add(jedit, "label", json_object_new_string(tr(_lang,"Edit").c_str()));
                    json_object_object_add(jedit, "url", json_object_new_string(
                        (Args->config->buildurl("settings/content/edit?id=") + std::string(res[i][0])).c_str()));
                        (Args->config->buildurl("editor?content_id=") + std::string(res[i][0]) + "&content_title=" + std::string(res[i][1] ? res[i][1] : "")).c_str()));
                    json_object_array_add(jactions, jedit);
                }

+1 −1
Changes for plugins/template/template.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ namespace blogi {
                json_object *jedit = json_object_new_object();
                json_object_object_add(jedit, "label", json_object_new_string(tr(_lang, "Edit").c_str()));
                json_object_object_add(jedit, "url", json_object_new_string(
                    (Args->config->buildurl("settings/template/edit?id=") + std::string(res[i][0])).c_str()));
                    (Args->config->buildurl("editor?template_id=") + std::string(res[i][0]) + "&template_name=" + std::string(res[i][1] ? res[i][1] : "")).c_str()));
                json_object_array_add(jactions, jedit);

                // Delete