mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
feat wiki/ayuda section
This commit is contained in:
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
25
httpdocs/assets/js/safekat/pages/wiki/menuSortable.js
Normal file
25
httpdocs/assets/js/safekat/pages/wiki/menuSortable.js
Normal 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();
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ $(async() => {
|
||||
|
||||
try {
|
||||
const editor = new WikiEditor()
|
||||
await editor.init()
|
||||
await editor.initViewOnly()
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user