feat wiki/ayuda section

This commit is contained in:
amazuecos
2025-03-02 10:22:01 +01:00
parent 3406fb3005
commit 3140e527e8
24 changed files with 735 additions and 168 deletions

View File

@ -1,11 +1,12 @@
import WikiEditor from "../../components/editorjs/WikiEditor.js"
import Ajax from "../../components/ajax.js"
$(async () => {
try {
const editor = new WikiEditor()
await editor.init()
} catch (error) {
}

View File

@ -0,0 +1,25 @@
import Ajax from "../../components/ajax.js"
import { alertError, alertSuccess } from "../../components/alerts/sweetAlert.js"
import ListSortable from "../../components/listSortable.js"
$(() => {
const menuSectionList = new ListSortable('#menu-inner-list')
menuSectionList.onEnd(updateWikiSectionOrder)
})
const updateWikiSectionOrder = (evt) =>
{
let list = new ListSortable('#menu-inner-list')
const ajax = new Ajax('/wiki/section/update/order',
{
orders : list.getArray()
},
null,
(response) => alertSuccess(response.message).fire(),
(error) => alertError(error.message).fire(),
)
ajax.post();
}

View File

@ -6,7 +6,7 @@ $(async() => {
try {
const editor = new WikiEditor()
await editor.init()
await editor.initViewOnly()
} catch (error) {
}