@saltcorn/server 0.6.2-beta.1 → 0.6.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +9 -13
- package/auth/admin.js +8 -24
- package/auth/roleadmin.js +6 -16
- package/auth/routes.js +113 -59
- package/locales/en.json +30 -1
- package/markup/admin.js +17 -0
- package/package.json +17 -8
- package/public/ckeditor/adapters/jquery.js +10 -0
- package/public/ckeditor/ckeditor.js +1286 -0
- package/public/ckeditor/config.js +38 -0
- package/public/ckeditor/contents.css +208 -0
- package/public/ckeditor/lang/af.js +5 -0
- package/public/ckeditor/lang/ar.js +5 -0
- package/public/ckeditor/lang/az.js +5 -0
- package/public/ckeditor/lang/bg.js +5 -0
- package/public/ckeditor/lang/bn.js +5 -0
- package/public/ckeditor/lang/bs.js +5 -0
- package/public/ckeditor/lang/ca.js +5 -0
- package/public/ckeditor/lang/cs.js +5 -0
- package/public/ckeditor/lang/cy.js +5 -0
- package/public/ckeditor/lang/da.js +5 -0
- package/public/ckeditor/lang/de-ch.js +5 -0
- package/public/ckeditor/lang/de.js +5 -0
- package/public/ckeditor/lang/el.js +5 -0
- package/public/ckeditor/lang/en-au.js +5 -0
- package/public/ckeditor/lang/en-ca.js +5 -0
- package/public/ckeditor/lang/en-gb.js +5 -0
- package/public/ckeditor/lang/en.js +5 -0
- package/public/ckeditor/lang/eo.js +5 -0
- package/public/ckeditor/lang/es-mx.js +5 -0
- package/public/ckeditor/lang/es.js +5 -0
- package/public/ckeditor/lang/et.js +5 -0
- package/public/ckeditor/lang/eu.js +5 -0
- package/public/ckeditor/lang/fa.js +5 -0
- package/public/ckeditor/lang/fi.js +5 -0
- package/public/ckeditor/lang/fo.js +5 -0
- package/public/ckeditor/lang/fr-ca.js +5 -0
- package/public/ckeditor/lang/fr.js +5 -0
- package/public/ckeditor/lang/gl.js +5 -0
- package/public/ckeditor/lang/gu.js +5 -0
- package/public/ckeditor/lang/he.js +5 -0
- package/public/ckeditor/lang/hi.js +5 -0
- package/public/ckeditor/lang/hr.js +5 -0
- package/public/ckeditor/lang/hu.js +5 -0
- package/public/ckeditor/lang/id.js +5 -0
- package/public/ckeditor/lang/is.js +5 -0
- package/public/ckeditor/lang/it.js +5 -0
- package/public/ckeditor/lang/ja.js +5 -0
- package/public/ckeditor/lang/ka.js +5 -0
- package/public/ckeditor/lang/km.js +5 -0
- package/public/ckeditor/lang/ko.js +5 -0
- package/public/ckeditor/lang/ku.js +5 -0
- package/public/ckeditor/lang/lt.js +5 -0
- package/public/ckeditor/lang/lv.js +5 -0
- package/public/ckeditor/lang/mk.js +5 -0
- package/public/ckeditor/lang/mn.js +5 -0
- package/public/ckeditor/lang/ms.js +5 -0
- package/public/ckeditor/lang/nb.js +5 -0
- package/public/ckeditor/lang/nl.js +5 -0
- package/public/ckeditor/lang/no.js +5 -0
- package/public/ckeditor/lang/oc.js +5 -0
- package/public/ckeditor/lang/pl.js +5 -0
- package/public/ckeditor/lang/pt-br.js +5 -0
- package/public/ckeditor/lang/pt.js +5 -0
- package/public/ckeditor/lang/ro.js +5 -0
- package/public/ckeditor/lang/ru.js +5 -0
- package/public/ckeditor/lang/si.js +5 -0
- package/public/ckeditor/lang/sk.js +5 -0
- package/public/ckeditor/lang/sl.js +5 -0
- package/public/ckeditor/lang/sq.js +5 -0
- package/public/ckeditor/lang/sr-latn.js +5 -0
- package/public/ckeditor/lang/sr.js +5 -0
- package/public/ckeditor/lang/sv.js +5 -0
- package/public/ckeditor/lang/th.js +5 -0
- package/public/ckeditor/lang/tr.js +5 -0
- package/public/ckeditor/lang/tt.js +5 -0
- package/public/ckeditor/lang/ug.js +5 -0
- package/public/ckeditor/lang/uk.js +5 -0
- package/public/ckeditor/lang/vi.js +5 -0
- package/public/ckeditor/lang/zh-cn.js +5 -0
- package/public/ckeditor/lang/zh.js +5 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- package/public/ckeditor/plugins/about/dialogs/about.js +8 -0
- package/public/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- package/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- package/public/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- package/public/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- package/public/ckeditor/plugins/dialog/styles/dialog.css +18 -0
- package/public/ckeditor/plugins/icons.png +0 -0
- package/public/ckeditor/plugins/icons_hidpi.png +0 -0
- package/public/ckeditor/plugins/image/dialogs/image.js +44 -0
- package/public/ckeditor/plugins/image/images/noimage.png +0 -0
- package/public/ckeditor/plugins/link/dialogs/anchor.js +8 -0
- package/public/ckeditor/plugins/link/dialogs/link.js +30 -0
- package/public/ckeditor/plugins/link/images/anchor.png +0 -0
- package/public/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- package/public/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- package/public/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- package/public/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- package/public/ckeditor/plugins/magicline/images/icon.png +0 -0
- package/public/ckeditor/plugins/pastefromgdocs/filter/default.js +8 -0
- package/public/ckeditor/plugins/pastefromlibreoffice/filter/default.js +11 -0
- package/public/ckeditor/plugins/pastefromword/filter/default.js +42 -0
- package/public/ckeditor/plugins/pastetools/filter/common.js +24 -0
- package/public/ckeditor/plugins/pastetools/filter/image.js +12 -0
- package/public/ckeditor/plugins/scayt/CHANGELOG.md +4 -0
- package/public/ckeditor/plugins/scayt/LICENSE.md +28 -0
- package/public/ckeditor/plugins/scayt/README.md +81 -0
- package/public/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- package/public/ckeditor/plugins/scayt/dialogs/options.js +32 -0
- package/public/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- package/public/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/et.js +11 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/sr.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- package/public/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
- package/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- package/public/ckeditor/plugins/table/dialogs/table.js +22 -0
- package/public/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
- package/public/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
- package/public/ckeditor/plugins/widget/images/handle.png +0 -0
- package/public/ckeditor/plugins/wsc/LICENSE.md +28 -0
- package/public/ckeditor/plugins/wsc/README.md +84 -0
- package/public/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- package/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- package/public/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- package/public/ckeditor/plugins/wsc/dialogs/wsc.js +90 -0
- package/public/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- package/public/ckeditor/plugins/wsc/icons/hidpi/spellchecker.png +0 -0
- package/public/ckeditor/plugins/wsc/icons/spellchecker.png +0 -0
- package/public/ckeditor/plugins/wsc/lang/af.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ar.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/bg.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/bn.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/bs.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ca.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/cs.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/cy.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/da.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/de.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/el.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/en-au.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/en-ca.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/en-gb.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/en.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/eo.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/es.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/et.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/eu.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/fa.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/fi.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/fo.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/fr-ca.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/fr.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/gl.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/gu.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/he.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/hi.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/hr.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/hu.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/is.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/it.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ja.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ka.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/km.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ko.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ku.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/lt.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/lv.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/mk.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/mn.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ms.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/nb.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/nl.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/no.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/pl.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/pt-br.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/pt.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ro.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ru.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/sk.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/sl.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/sr-latn.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/sr.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/sv.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/th.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/tr.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/ug.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/uk.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/vi.js +2 -0
- package/public/ckeditor/plugins/wsc/lang/zh-cn.js +1 -0
- package/public/ckeditor/plugins/wsc/lang/zh.js +1 -0
- package/public/ckeditor/plugins/wsc/plugin.js +5 -0
- package/public/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- package/public/ckeditor/skins/moono-lisa/dialog.css +5 -0
- package/public/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- package/public/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- package/public/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- package/public/ckeditor/skins/moono-lisa/editor.css +5 -0
- package/public/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- package/public/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- package/public/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- package/public/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- package/public/ckeditor/skins/moono-lisa/icons.png +0 -0
- package/public/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/close.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- package/public/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- package/public/ckeditor/skins/moono-lisa/readme.md +46 -0
- package/public/ckeditor/styles.js +137 -0
- package/public/ckeditor/vendor/promise.js +13 -0
- package/public/saltcorn.css +20 -3
- package/public/saltcorn.js +3 -0
- package/restart_watcher.js +12 -2
- package/routes/actions.js +1 -15
- package/routes/admin.js +6 -23
- package/routes/api.js +51 -60
- package/routes/config.js +0 -1
- package/routes/crashlog.js +1 -4
- package/routes/delete.js +1 -2
- package/routes/edit.js +1 -2
- package/routes/eventlog.js +2 -15
- package/routes/events.js +0 -1
- package/routes/fields.js +1 -9
- package/routes/files.js +144 -64
- package/routes/homepage.js +3 -0
- package/routes/infoarch.js +12 -19
- package/routes/library.js +1 -4
- package/routes/list.js +50 -6
- package/routes/menu.js +118 -32
- package/routes/packs.js +2 -8
- package/routes/page.js +1 -7
- package/routes/pageedit.js +18 -30
- package/routes/plugins.js +21 -34
- package/routes/scapi.js +155 -184
- package/routes/search.js +6 -10
- package/routes/settings.js +1 -2
- package/routes/tables.js +1 -22
- package/routes/tenant.js +1 -9
- package/routes/utils.js +19 -19
- package/routes/view.js +7 -5
- package/routes/viewedit.js +18 -29
- package/s3storage.js +167 -0
- package/tests/admin.test.js +4 -2
- package/wrapper.js +5 -1
package/routes/menu.js
CHANGED
|
@@ -15,11 +15,13 @@ const File = require("@saltcorn/data/models/file");
|
|
|
15
15
|
const User = require("@saltcorn/data/models/user");
|
|
16
16
|
const View = require("@saltcorn/data/models/view");
|
|
17
17
|
const Page = require("@saltcorn/data/models/page");
|
|
18
|
+
const { save_menu_items } = require("@saltcorn/data/models/config");
|
|
18
19
|
const db = require("@saltcorn/data/db");
|
|
19
20
|
|
|
20
21
|
const { mkTable, renderForm, link, post_btn } = require("@saltcorn/markup");
|
|
21
22
|
const { script, domReady, div, ul } = require("@saltcorn/markup/tags");
|
|
22
23
|
const { send_infoarch_page } = require("../markup/admin.js");
|
|
24
|
+
const Table = require("@saltcorn/data/models/table");
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* @type {object}
|
|
@@ -32,14 +34,33 @@ const router = new Router();
|
|
|
32
34
|
module.exports = router;
|
|
33
35
|
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @param {object} req
|
|
37
|
+
*
|
|
38
|
+
* @param {object} req
|
|
37
39
|
* @returns {Promise<Form>}
|
|
38
40
|
*/
|
|
39
41
|
const menuForm = async (req) => {
|
|
40
42
|
const views = await View.find({}, { orderBy: "name", nocase: true });
|
|
41
43
|
const pages = await Page.find({}, { orderBy: "name", nocase: true });
|
|
42
44
|
const roles = await User.get_roles();
|
|
45
|
+
const tables = await Table.find({});
|
|
46
|
+
const dynTableOptions = tables.map((t) => t.name);
|
|
47
|
+
const dynOrderFieldOptions = {},
|
|
48
|
+
dynSectionFieldOptions = {};
|
|
49
|
+
for (const table of tables) {
|
|
50
|
+
dynOrderFieldOptions[table.name] = [""];
|
|
51
|
+
dynSectionFieldOptions[table.name] = [""];
|
|
52
|
+
const fields = await table.getFields();
|
|
53
|
+
for (const field of fields) {
|
|
54
|
+
dynOrderFieldOptions[table.name].push(field.name);
|
|
55
|
+
if (
|
|
56
|
+
field.type &&
|
|
57
|
+
field.type.name === "String" &&
|
|
58
|
+
field.attributes &&
|
|
59
|
+
field.attributes.options
|
|
60
|
+
)
|
|
61
|
+
dynSectionFieldOptions[table.name].push(field.name);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
43
64
|
|
|
44
65
|
return new Form({
|
|
45
66
|
action: "/menu/",
|
|
@@ -50,6 +71,11 @@ const menuForm = async (req) => {
|
|
|
50
71
|
additionalButtons: [
|
|
51
72
|
{ label: "Update", id: "btnUpdate", class: "btn btn-primary" },
|
|
52
73
|
{ label: "Add", id: "btnAdd", class: "btn btn-primary" },
|
|
74
|
+
{
|
|
75
|
+
label: "Recalculate dynamic",
|
|
76
|
+
id: "btnRecalc",
|
|
77
|
+
class: "btn btn-primary",
|
|
78
|
+
},
|
|
53
79
|
],
|
|
54
80
|
fields: [
|
|
55
81
|
{
|
|
@@ -58,7 +84,7 @@ const menuForm = async (req) => {
|
|
|
58
84
|
input_type: "select",
|
|
59
85
|
class: "menutype item-menu",
|
|
60
86
|
required: true,
|
|
61
|
-
options: ["View", "Page", "Link", "Header"],
|
|
87
|
+
options: ["View", "Page", "Link", "Header", "Dynamic", "Search"],
|
|
62
88
|
},
|
|
63
89
|
{
|
|
64
90
|
name: "text",
|
|
@@ -74,6 +100,7 @@ const menuForm = async (req) => {
|
|
|
74
100
|
attributes: {
|
|
75
101
|
html: `<button type="button" id="myEditor_icon" class="btn btn-outline-secondary"></button>`,
|
|
76
102
|
},
|
|
103
|
+
showIf: { type: ["View", "Page", "Link", "Header"] },
|
|
77
104
|
},
|
|
78
105
|
{
|
|
79
106
|
name: "icon",
|
|
@@ -111,6 +138,67 @@ const menuForm = async (req) => {
|
|
|
111
138
|
attributes: { options: views.map((r) => r.select_option) },
|
|
112
139
|
showIf: { type: "View" },
|
|
113
140
|
},
|
|
141
|
+
{
|
|
142
|
+
name: "dyn_table",
|
|
143
|
+
label: req.__("Table"),
|
|
144
|
+
class: "item-menu",
|
|
145
|
+
type: "String",
|
|
146
|
+
attributes: {
|
|
147
|
+
options: dynTableOptions,
|
|
148
|
+
},
|
|
149
|
+
required: true,
|
|
150
|
+
showIf: { type: "Dynamic" },
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "dyn_order",
|
|
154
|
+
label: req.__("Order field"),
|
|
155
|
+
class: "item-menu",
|
|
156
|
+
type: "String",
|
|
157
|
+
attributes: {
|
|
158
|
+
calcOptions: ["dyn_table", dynOrderFieldOptions],
|
|
159
|
+
},
|
|
160
|
+
showIf: { type: "Dynamic" },
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "dyn_section_field",
|
|
164
|
+
label: req.__("Section field"),
|
|
165
|
+
class: "item-menu",
|
|
166
|
+
type: "String",
|
|
167
|
+
attributes: {
|
|
168
|
+
calcOptions: ["dyn_table", dynSectionFieldOptions],
|
|
169
|
+
},
|
|
170
|
+
sublabel: req.__(
|
|
171
|
+
"Optional. String type with options, each of which will become a menu section"
|
|
172
|
+
),
|
|
173
|
+
showIf: { type: "Dynamic" },
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "dyn_label_fml",
|
|
177
|
+
label: req.__("Label formula"),
|
|
178
|
+
class: "item-menu",
|
|
179
|
+
type: "String",
|
|
180
|
+
required: true,
|
|
181
|
+
showIf: { type: "Dynamic" },
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "dyn_url_fml",
|
|
185
|
+
label: req.__("URL formula"),
|
|
186
|
+
class: "item-menu",
|
|
187
|
+
type: "String",
|
|
188
|
+
required: true,
|
|
189
|
+
showIf: { type: "Dynamic" },
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "dyn_include_fml",
|
|
193
|
+
label: req.__("Include formula"),
|
|
194
|
+
sublabel: req.__(
|
|
195
|
+
"If specified, only include in menu rows that evaluate to true"
|
|
196
|
+
),
|
|
197
|
+
class: "item-menu",
|
|
198
|
+
type: "String",
|
|
199
|
+
required: true,
|
|
200
|
+
showIf: { type: "Dynamic" },
|
|
201
|
+
},
|
|
114
202
|
{
|
|
115
203
|
name: "style",
|
|
116
204
|
label: req.__("Style"),
|
|
@@ -118,6 +206,7 @@ const menuForm = async (req) => {
|
|
|
118
206
|
class: "item-menu",
|
|
119
207
|
type: "String",
|
|
120
208
|
required: true,
|
|
209
|
+
showIf: { type: ["View", "Page", "Link", "Header", "Dynamic"] },
|
|
121
210
|
attributes: {
|
|
122
211
|
options: [
|
|
123
212
|
{ name: "", label: "Link" },
|
|
@@ -139,6 +228,7 @@ const menuForm = async (req) => {
|
|
|
139
228
|
{
|
|
140
229
|
name: "location",
|
|
141
230
|
label: req.__("Location"),
|
|
231
|
+
showIf: { type: ["View", "Page", "Link", "Header", "Dynamic"] },
|
|
142
232
|
sublabel: req.__("Not all themes support all locations"),
|
|
143
233
|
class: "item-menu",
|
|
144
234
|
type: "String",
|
|
@@ -157,16 +247,16 @@ const menuForm = async (req) => {
|
|
|
157
247
|
//create -- new
|
|
158
248
|
|
|
159
249
|
/**
|
|
160
|
-
* @param {object[]} menu_items
|
|
250
|
+
* @param {object[]} menu_items
|
|
161
251
|
* @returns {string}
|
|
162
252
|
*/
|
|
163
253
|
const menuEditorScript = (menu_items) => `
|
|
164
254
|
var iconPickerOptions = {searchText: "Search icon...", labelHeader: "{0}/{1}"};
|
|
165
255
|
let lastState;
|
|
166
256
|
let editor;
|
|
167
|
-
function ajax_save_menu() {
|
|
257
|
+
function ajax_save_menu(skip_check) {
|
|
168
258
|
const s = editor.getString()
|
|
169
|
-
if(s===lastState) return;
|
|
259
|
+
if(s===lastState && !skip_check) return;
|
|
170
260
|
lastState=s;
|
|
171
261
|
ajax_post('/menu', {data: s,
|
|
172
262
|
success: ()=>{}, dataType : 'json', contentType: 'application/json;charset=UTF-8'})
|
|
@@ -192,6 +282,11 @@ const menuEditorScript = (menu_items) => `
|
|
|
192
282
|
editor.update();
|
|
193
283
|
ajax_save_menu();
|
|
194
284
|
});
|
|
285
|
+
$("#btnRecalc").click(function(){
|
|
286
|
+
editor.update();
|
|
287
|
+
ajax_save_menu(true);
|
|
288
|
+
location.reload();
|
|
289
|
+
});
|
|
195
290
|
// Calling the add method
|
|
196
291
|
$('#btnAdd').click(function(){
|
|
197
292
|
editor.add();
|
|
@@ -202,8 +297,8 @@ const menuEditorScript = (menu_items) => `
|
|
|
202
297
|
`;
|
|
203
298
|
|
|
204
299
|
/**
|
|
205
|
-
* @param {object[]} menu_items
|
|
206
|
-
* @returns {object[]}
|
|
300
|
+
* @param {object[]} menu_items
|
|
301
|
+
* @returns {object[]}
|
|
207
302
|
*/
|
|
208
303
|
const menuTojQME = (menu_items) =>
|
|
209
304
|
(menu_items || []).map((mi) => ({
|
|
@@ -213,18 +308,6 @@ const menuTojQME = (menu_items) =>
|
|
|
213
308
|
...(mi.subitems ? { children: menuTojQME(mi.subitems) } : {}),
|
|
214
309
|
}));
|
|
215
310
|
|
|
216
|
-
/**
|
|
217
|
-
* @param {object[]} menu_items
|
|
218
|
-
* @returns {object[]}
|
|
219
|
-
*/
|
|
220
|
-
const jQMEtoMenu = (menu_items) =>
|
|
221
|
-
menu_items.map((mi) => ({
|
|
222
|
-
...mi,
|
|
223
|
-
label: mi.text,
|
|
224
|
-
children: undefined,
|
|
225
|
-
...(mi.children ? { subitems: jQMEtoMenu(mi.children) } : {}),
|
|
226
|
-
}));
|
|
227
|
-
|
|
228
311
|
/**
|
|
229
312
|
* @name get
|
|
230
313
|
* @function
|
|
@@ -233,7 +316,6 @@ const jQMEtoMenu = (menu_items) =>
|
|
|
233
316
|
*/
|
|
234
317
|
router.get(
|
|
235
318
|
"/",
|
|
236
|
-
setTenant,
|
|
237
319
|
isAdmin,
|
|
238
320
|
error_catcher(async (req, res) => {
|
|
239
321
|
const form = await menuForm(req);
|
|
@@ -278,6 +360,17 @@ router.get(
|
|
|
278
360
|
});
|
|
279
361
|
})
|
|
280
362
|
);
|
|
363
|
+
/**
|
|
364
|
+
* @param {object[]} menu_items
|
|
365
|
+
* @returns {object[]}
|
|
366
|
+
*/
|
|
367
|
+
const jQMEtoMenu = (menu_items) =>
|
|
368
|
+
menu_items.map((mi) => ({
|
|
369
|
+
...mi,
|
|
370
|
+
label: mi.text,
|
|
371
|
+
children: undefined,
|
|
372
|
+
...(mi.children ? { subitems: jQMEtoMenu(mi.children) } : {}),
|
|
373
|
+
}));
|
|
281
374
|
|
|
282
375
|
/**
|
|
283
376
|
* @name post
|
|
@@ -287,19 +380,12 @@ router.get(
|
|
|
287
380
|
*/
|
|
288
381
|
router.post(
|
|
289
382
|
"/",
|
|
290
|
-
setTenant,
|
|
291
383
|
isAdmin,
|
|
292
384
|
error_catcher(async (req, res) => {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
res.json({ success: true });
|
|
297
|
-
} else {
|
|
298
|
-
const new_menu = JSON.parse(req.body.menu);
|
|
299
|
-
await getState().setConfig("menu_items", jQMEtoMenu(new_menu));
|
|
300
|
-
req.flash("success", req.__(`Menu updated`));
|
|
385
|
+
const new_menu = req.body;
|
|
386
|
+
const menu_items = jQMEtoMenu(new_menu);
|
|
387
|
+
await save_menu_items(menu_items);
|
|
301
388
|
|
|
302
|
-
|
|
303
|
-
}
|
|
389
|
+
res.json({ success: true });
|
|
304
390
|
})
|
|
305
391
|
);
|
package/routes/packs.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const Router = require("express-promise-router");
|
|
8
|
-
const {
|
|
8
|
+
const { isAdmin, error_catcher } = require("./utils.js");
|
|
9
9
|
const { mkTable, renderForm, link, post_btn } = require("@saltcorn/markup");
|
|
10
10
|
const { getState } = require("@saltcorn/data/db/state");
|
|
11
11
|
const Table = require("@saltcorn/data/models/table");
|
|
@@ -54,7 +54,6 @@ module.exports = router;
|
|
|
54
54
|
*/
|
|
55
55
|
router.get(
|
|
56
56
|
"/create/",
|
|
57
|
-
setTenant,
|
|
58
57
|
isAdmin,
|
|
59
58
|
error_catcher(async (req, res) => {
|
|
60
59
|
const tables = await Table.find({});
|
|
@@ -139,7 +138,6 @@ router.get(
|
|
|
139
138
|
*/
|
|
140
139
|
router.post(
|
|
141
140
|
"/create",
|
|
142
|
-
setTenant,
|
|
143
141
|
isAdmin,
|
|
144
142
|
error_catcher(async (req, res) => {
|
|
145
143
|
var pack = {
|
|
@@ -211,7 +209,7 @@ router.post(
|
|
|
211
209
|
);
|
|
212
210
|
|
|
213
211
|
/**
|
|
214
|
-
* @param {object} req
|
|
212
|
+
* @param {object} req
|
|
215
213
|
* @returns {Form}
|
|
216
214
|
*/
|
|
217
215
|
const install_pack_form = (req) =>
|
|
@@ -236,7 +234,6 @@ const install_pack_form = (req) =>
|
|
|
236
234
|
*/
|
|
237
235
|
router.get(
|
|
238
236
|
"/install",
|
|
239
|
-
setTenant,
|
|
240
237
|
isAdmin,
|
|
241
238
|
error_catcher(async (req, res) => {
|
|
242
239
|
res.sendWrap(req.__(`Install Pack`), {
|
|
@@ -267,7 +264,6 @@ router.get(
|
|
|
267
264
|
*/
|
|
268
265
|
router.post(
|
|
269
266
|
"/install",
|
|
270
|
-
setTenant,
|
|
271
267
|
isAdmin,
|
|
272
268
|
error_catcher(async (req, res) => {
|
|
273
269
|
var pack, error;
|
|
@@ -326,7 +322,6 @@ router.post(
|
|
|
326
322
|
*/
|
|
327
323
|
router.post(
|
|
328
324
|
"/install-named/:name",
|
|
329
|
-
setTenant,
|
|
330
325
|
isAdmin,
|
|
331
326
|
error_catcher(async (req, res) => {
|
|
332
327
|
const { name } = req.params;
|
|
@@ -363,7 +358,6 @@ router.post(
|
|
|
363
358
|
*/
|
|
364
359
|
router.post(
|
|
365
360
|
"/uninstall/:name",
|
|
366
|
-
setTenant,
|
|
367
361
|
isAdmin,
|
|
368
362
|
error_catcher(async (req, res) => {
|
|
369
363
|
const { name } = req.params;
|
package/routes/page.js
CHANGED
|
@@ -10,11 +10,7 @@ const Page = require("@saltcorn/data/models/page");
|
|
|
10
10
|
const { div, a, i } = require("@saltcorn/markup/tags");
|
|
11
11
|
const { renderForm } = require("@saltcorn/markup");
|
|
12
12
|
const { getState } = require("@saltcorn/data/db/state");
|
|
13
|
-
const {
|
|
14
|
-
setTenant,
|
|
15
|
-
error_catcher,
|
|
16
|
-
scan_for_page_title,
|
|
17
|
-
} = require("../routes/utils.js");
|
|
13
|
+
const { error_catcher, scan_for_page_title } = require("../routes/utils.js");
|
|
18
14
|
const { add_edit_bar } = require("../markup/admin.js");
|
|
19
15
|
const { traverseSync } = require("@saltcorn/data/models/layout");
|
|
20
16
|
const { run_action_column } = require("@saltcorn/data/plugin-helper");
|
|
@@ -38,7 +34,6 @@ module.exports = router;
|
|
|
38
34
|
*/
|
|
39
35
|
router.get(
|
|
40
36
|
"/:pagename",
|
|
41
|
-
setTenant,
|
|
42
37
|
error_catcher(async (req, res) => {
|
|
43
38
|
const { pagename } = req.params;
|
|
44
39
|
|
|
@@ -76,7 +71,6 @@ router.get(
|
|
|
76
71
|
*/
|
|
77
72
|
router.post(
|
|
78
73
|
"/:pagename/action/:rndid",
|
|
79
|
-
setTenant,
|
|
80
74
|
error_catcher(async (req, res) => {
|
|
81
75
|
const { pagename, rndid } = req.params;
|
|
82
76
|
const role = req.isAuthenticated() ? req.user.role_id : 10;
|
package/routes/pageedit.js
CHANGED
|
@@ -20,7 +20,7 @@ const { getViews, traverseSync } = require("@saltcorn/data/models/layout");
|
|
|
20
20
|
const { add_to_menu } = require("@saltcorn/data/models/pack");
|
|
21
21
|
const db = require("@saltcorn/data/db");
|
|
22
22
|
|
|
23
|
-
const {
|
|
23
|
+
const { isAdmin, error_catcher } = require("./utils.js");
|
|
24
24
|
const {
|
|
25
25
|
mkTable,
|
|
26
26
|
renderForm,
|
|
@@ -46,9 +46,9 @@ const router = new Router();
|
|
|
46
46
|
module.exports = router;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* @param {object} page
|
|
50
|
-
* @param {*} roles
|
|
51
|
-
* @param {object} req
|
|
49
|
+
* @param {object} page
|
|
50
|
+
* @param {*} roles
|
|
51
|
+
* @param {object} req
|
|
52
52
|
* @returns {Form}
|
|
53
53
|
*/
|
|
54
54
|
const editPageRoleForm = (page, roles, req) =>
|
|
@@ -60,8 +60,8 @@ const editPageRoleForm = (page, roles, req) =>
|
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* @param {object} page
|
|
64
|
-
* @param {object} req
|
|
63
|
+
* @param {object} page
|
|
64
|
+
* @param {object} req
|
|
65
65
|
* @returns {string}
|
|
66
66
|
*/
|
|
67
67
|
const page_dropdown = (page, req) =>
|
|
@@ -101,8 +101,8 @@ const page_dropdown = (page, req) =>
|
|
|
101
101
|
]);
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
105
|
-
* @param {object} req
|
|
104
|
+
*
|
|
105
|
+
* @param {object} req
|
|
106
106
|
* @returns {Promise<Form>}
|
|
107
107
|
*/
|
|
108
108
|
const pagePropertiesForm = async (req) => {
|
|
@@ -146,9 +146,9 @@ const pagePropertiesForm = async (req) => {
|
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
150
|
-
* @param {object} req
|
|
151
|
-
* @param {object} context
|
|
149
|
+
*
|
|
150
|
+
* @param {object} req
|
|
151
|
+
* @param {object} context
|
|
152
152
|
* @returns {Promise<object>}
|
|
153
153
|
*/
|
|
154
154
|
const pageBuilderData = async (req, context) => {
|
|
@@ -225,9 +225,9 @@ const pageBuilderData = async (req, context) => {
|
|
|
225
225
|
};
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* @param {*} rows
|
|
229
|
-
* @param {*} roles
|
|
230
|
-
* @param {object} req
|
|
228
|
+
* @param {*} rows
|
|
229
|
+
* @param {*} roles
|
|
230
|
+
* @param {object} req
|
|
231
231
|
* @returns {div}
|
|
232
232
|
*/
|
|
233
233
|
const getPageList = (rows, roles, req) => {
|
|
@@ -308,7 +308,6 @@ const getRootPageForm = (pages, roles, req) => {
|
|
|
308
308
|
*/
|
|
309
309
|
router.get(
|
|
310
310
|
"/",
|
|
311
|
-
setTenant,
|
|
312
311
|
isAdmin,
|
|
313
312
|
error_catcher(async (req, res) => {
|
|
314
313
|
const pages = await Page.find({}, { orderBy: "name" });
|
|
@@ -339,10 +338,10 @@ router.get(
|
|
|
339
338
|
);
|
|
340
339
|
|
|
341
340
|
/**
|
|
342
|
-
* @param {*} contents
|
|
343
|
-
* @param {*} noCard
|
|
344
|
-
* @param {object} req
|
|
345
|
-
* @param {*} page
|
|
341
|
+
* @param {*} contents
|
|
342
|
+
* @param {*} noCard
|
|
343
|
+
* @param {object} req
|
|
344
|
+
* @param {*} page
|
|
346
345
|
* @returns {*}
|
|
347
346
|
*/
|
|
348
347
|
const wrap = (contents, noCard, req, page) => ({
|
|
@@ -372,7 +371,6 @@ const wrap = (contents, noCard, req, page) => ({
|
|
|
372
371
|
*/
|
|
373
372
|
router.get(
|
|
374
373
|
"/edit-properties/:pagename",
|
|
375
|
-
setTenant,
|
|
376
374
|
isAdmin,
|
|
377
375
|
error_catcher(async (req, res) => {
|
|
378
376
|
const { pagename } = req.params;
|
|
@@ -401,7 +399,6 @@ router.get(
|
|
|
401
399
|
*/
|
|
402
400
|
router.get(
|
|
403
401
|
"/new",
|
|
404
|
-
setTenant,
|
|
405
402
|
isAdmin,
|
|
406
403
|
error_catcher(async (req, res) => {
|
|
407
404
|
const form = await pagePropertiesForm(req);
|
|
@@ -420,7 +417,6 @@ router.get(
|
|
|
420
417
|
*/
|
|
421
418
|
router.post(
|
|
422
419
|
"/edit-properties",
|
|
423
|
-
setTenant,
|
|
424
420
|
isAdmin,
|
|
425
421
|
error_catcher(async (req, res) => {
|
|
426
422
|
const form = await pagePropertiesForm(req);
|
|
@@ -456,7 +452,6 @@ router.post(
|
|
|
456
452
|
*/
|
|
457
453
|
router.get(
|
|
458
454
|
"/edit/:pagename",
|
|
459
|
-
setTenant,
|
|
460
455
|
isAdmin,
|
|
461
456
|
error_catcher(async (req, res) => {
|
|
462
457
|
const { pagename } = req.params;
|
|
@@ -498,7 +493,6 @@ router.get(
|
|
|
498
493
|
*/
|
|
499
494
|
router.post(
|
|
500
495
|
"/edit/:pagename",
|
|
501
|
-
setTenant,
|
|
502
496
|
isAdmin,
|
|
503
497
|
error_catcher(async (req, res) => {
|
|
504
498
|
const { pagename } = req.params;
|
|
@@ -529,7 +523,6 @@ router.post(
|
|
|
529
523
|
*/
|
|
530
524
|
router.post(
|
|
531
525
|
"/savebuilder/:id",
|
|
532
|
-
setTenant,
|
|
533
526
|
isAdmin,
|
|
534
527
|
error_catcher(async (req, res) => {
|
|
535
528
|
const { id } = req.params;
|
|
@@ -551,7 +544,6 @@ router.post(
|
|
|
551
544
|
*/
|
|
552
545
|
router.post(
|
|
553
546
|
"/delete/:id",
|
|
554
|
-
setTenant,
|
|
555
547
|
isAdmin,
|
|
556
548
|
error_catcher(async (req, res) => {
|
|
557
549
|
const { id } = req.params;
|
|
@@ -570,7 +562,6 @@ router.post(
|
|
|
570
562
|
*/
|
|
571
563
|
router.post(
|
|
572
564
|
"/set_root_page",
|
|
573
|
-
setTenant,
|
|
574
565
|
isAdmin,
|
|
575
566
|
error_catcher(async (req, res) => {
|
|
576
567
|
const pages = await Page.find({}, { orderBy: "name" });
|
|
@@ -598,7 +589,6 @@ router.post(
|
|
|
598
589
|
*/
|
|
599
590
|
router.post(
|
|
600
591
|
"/add-to-menu/:id",
|
|
601
|
-
setTenant,
|
|
602
592
|
isAdmin,
|
|
603
593
|
error_catcher(async (req, res) => {
|
|
604
594
|
const { id } = req.params;
|
|
@@ -628,7 +618,6 @@ router.post(
|
|
|
628
618
|
*/
|
|
629
619
|
router.post(
|
|
630
620
|
"/clone/:id",
|
|
631
|
-
setTenant,
|
|
632
621
|
isAdmin,
|
|
633
622
|
error_catcher(async (req, res) => {
|
|
634
623
|
const { id } = req.params;
|
|
@@ -650,7 +639,6 @@ router.post(
|
|
|
650
639
|
*/
|
|
651
640
|
router.post(
|
|
652
641
|
"/setrole/:id",
|
|
653
|
-
setTenant,
|
|
654
642
|
isAdmin,
|
|
655
643
|
error_catcher(async (req, res) => {
|
|
656
644
|
const { id } = req.params;
|