@saltcorn/server 0.6.2-beta.2 → 0.6.2

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.
Files changed (345) hide show
  1. package/auth/admin.js +3 -2
  2. package/auth/routes.js +96 -13
  3. package/locales/en.json +11 -1
  4. package/package.json +9 -7
  5. package/public/ckeditor/adapters/jquery.js +10 -0
  6. package/public/ckeditor/ckeditor.js +1286 -0
  7. package/public/ckeditor/config.js +38 -0
  8. package/public/ckeditor/contents.css +208 -0
  9. package/public/ckeditor/lang/af.js +5 -0
  10. package/public/ckeditor/lang/ar.js +5 -0
  11. package/public/ckeditor/lang/az.js +5 -0
  12. package/public/ckeditor/lang/bg.js +5 -0
  13. package/public/ckeditor/lang/bn.js +5 -0
  14. package/public/ckeditor/lang/bs.js +5 -0
  15. package/public/ckeditor/lang/ca.js +5 -0
  16. package/public/ckeditor/lang/cs.js +5 -0
  17. package/public/ckeditor/lang/cy.js +5 -0
  18. package/public/ckeditor/lang/da.js +5 -0
  19. package/public/ckeditor/lang/de-ch.js +5 -0
  20. package/public/ckeditor/lang/de.js +5 -0
  21. package/public/ckeditor/lang/el.js +5 -0
  22. package/public/ckeditor/lang/en-au.js +5 -0
  23. package/public/ckeditor/lang/en-ca.js +5 -0
  24. package/public/ckeditor/lang/en-gb.js +5 -0
  25. package/public/ckeditor/lang/en.js +5 -0
  26. package/public/ckeditor/lang/eo.js +5 -0
  27. package/public/ckeditor/lang/es-mx.js +5 -0
  28. package/public/ckeditor/lang/es.js +5 -0
  29. package/public/ckeditor/lang/et.js +5 -0
  30. package/public/ckeditor/lang/eu.js +5 -0
  31. package/public/ckeditor/lang/fa.js +5 -0
  32. package/public/ckeditor/lang/fi.js +5 -0
  33. package/public/ckeditor/lang/fo.js +5 -0
  34. package/public/ckeditor/lang/fr-ca.js +5 -0
  35. package/public/ckeditor/lang/fr.js +5 -0
  36. package/public/ckeditor/lang/gl.js +5 -0
  37. package/public/ckeditor/lang/gu.js +5 -0
  38. package/public/ckeditor/lang/he.js +5 -0
  39. package/public/ckeditor/lang/hi.js +5 -0
  40. package/public/ckeditor/lang/hr.js +5 -0
  41. package/public/ckeditor/lang/hu.js +5 -0
  42. package/public/ckeditor/lang/id.js +5 -0
  43. package/public/ckeditor/lang/is.js +5 -0
  44. package/public/ckeditor/lang/it.js +5 -0
  45. package/public/ckeditor/lang/ja.js +5 -0
  46. package/public/ckeditor/lang/ka.js +5 -0
  47. package/public/ckeditor/lang/km.js +5 -0
  48. package/public/ckeditor/lang/ko.js +5 -0
  49. package/public/ckeditor/lang/ku.js +5 -0
  50. package/public/ckeditor/lang/lt.js +5 -0
  51. package/public/ckeditor/lang/lv.js +5 -0
  52. package/public/ckeditor/lang/mk.js +5 -0
  53. package/public/ckeditor/lang/mn.js +5 -0
  54. package/public/ckeditor/lang/ms.js +5 -0
  55. package/public/ckeditor/lang/nb.js +5 -0
  56. package/public/ckeditor/lang/nl.js +5 -0
  57. package/public/ckeditor/lang/no.js +5 -0
  58. package/public/ckeditor/lang/oc.js +5 -0
  59. package/public/ckeditor/lang/pl.js +5 -0
  60. package/public/ckeditor/lang/pt-br.js +5 -0
  61. package/public/ckeditor/lang/pt.js +5 -0
  62. package/public/ckeditor/lang/ro.js +5 -0
  63. package/public/ckeditor/lang/ru.js +5 -0
  64. package/public/ckeditor/lang/si.js +5 -0
  65. package/public/ckeditor/lang/sk.js +5 -0
  66. package/public/ckeditor/lang/sl.js +5 -0
  67. package/public/ckeditor/lang/sq.js +5 -0
  68. package/public/ckeditor/lang/sr-latn.js +5 -0
  69. package/public/ckeditor/lang/sr.js +5 -0
  70. package/public/ckeditor/lang/sv.js +5 -0
  71. package/public/ckeditor/lang/th.js +5 -0
  72. package/public/ckeditor/lang/tr.js +5 -0
  73. package/public/ckeditor/lang/tt.js +5 -0
  74. package/public/ckeditor/lang/ug.js +5 -0
  75. package/public/ckeditor/lang/uk.js +5 -0
  76. package/public/ckeditor/lang/vi.js +5 -0
  77. package/public/ckeditor/lang/zh-cn.js +5 -0
  78. package/public/ckeditor/lang/zh.js +5 -0
  79. package/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  80. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  81. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  82. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  83. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  84. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  85. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
  86. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
  87. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  88. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  89. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +13 -0
  90. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
  91. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  92. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
  93. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  94. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  95. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
  96. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
  97. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
  98. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  99. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
  100. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  101. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
  102. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
  103. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
  104. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  105. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  106. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  107. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  108. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  109. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  110. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
  111. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  112. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  113. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  114. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  115. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  116. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
  117. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  118. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
  119. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  120. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  121. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
  122. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  123. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  124. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
  125. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  126. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
  127. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  128. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  129. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  130. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  131. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
  132. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
  133. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
  134. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +12 -0
  135. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +12 -0
  136. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
  137. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  138. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  139. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  140. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
  141. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  142. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  143. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  144. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  145. package/public/ckeditor/plugins/about/dialogs/about.js +8 -0
  146. package/public/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  147. package/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  148. package/public/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  149. package/public/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  150. package/public/ckeditor/plugins/dialog/styles/dialog.css +18 -0
  151. package/public/ckeditor/plugins/icons.png +0 -0
  152. package/public/ckeditor/plugins/icons_hidpi.png +0 -0
  153. package/public/ckeditor/plugins/image/dialogs/image.js +44 -0
  154. package/public/ckeditor/plugins/image/images/noimage.png +0 -0
  155. package/public/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  156. package/public/ckeditor/plugins/link/dialogs/link.js +30 -0
  157. package/public/ckeditor/plugins/link/images/anchor.png +0 -0
  158. package/public/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  159. package/public/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  160. package/public/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  161. package/public/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  162. package/public/ckeditor/plugins/magicline/images/icon.png +0 -0
  163. package/public/ckeditor/plugins/pastefromgdocs/filter/default.js +8 -0
  164. package/public/ckeditor/plugins/pastefromlibreoffice/filter/default.js +11 -0
  165. package/public/ckeditor/plugins/pastefromword/filter/default.js +42 -0
  166. package/public/ckeditor/plugins/pastetools/filter/common.js +24 -0
  167. package/public/ckeditor/plugins/pastetools/filter/image.js +12 -0
  168. package/public/ckeditor/plugins/scayt/CHANGELOG.md +4 -0
  169. package/public/ckeditor/plugins/scayt/LICENSE.md +28 -0
  170. package/public/ckeditor/plugins/scayt/README.md +81 -0
  171. package/public/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  172. package/public/ckeditor/plugins/scayt/dialogs/options.js +32 -0
  173. package/public/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  174. package/public/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
  175. package/public/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  176. package/public/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
  177. package/public/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  178. package/public/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
  179. package/public/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  180. package/public/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  181. package/public/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  182. package/public/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  183. package/public/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
  184. package/public/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
  185. package/public/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  186. package/public/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  187. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
  188. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
  189. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  190. package/public/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  191. package/public/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  192. package/public/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
  193. package/public/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  194. package/public/ckeditor/plugins/specialchar/dialogs/lang/et.js +11 -0
  195. package/public/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
  196. package/public/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  197. package/public/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  198. package/public/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  199. package/public/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
  200. package/public/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  201. package/public/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  202. package/public/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  203. package/public/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  204. package/public/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  205. package/public/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  206. package/public/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  207. package/public/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  208. package/public/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
  209. package/public/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  210. package/public/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
  211. package/public/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  212. package/public/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  213. package/public/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  214. package/public/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  215. package/public/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
  216. package/public/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  217. package/public/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  218. package/public/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  219. package/public/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
  220. package/public/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  221. package/public/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  222. package/public/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  223. package/public/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  224. package/public/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  225. package/public/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js +13 -0
  226. package/public/ckeditor/plugins/specialchar/dialogs/lang/sr.js +13 -0
  227. package/public/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  228. package/public/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  229. package/public/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  230. package/public/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  231. package/public/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  232. package/public/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  233. package/public/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  234. package/public/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  235. package/public/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
  236. package/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  237. package/public/ckeditor/plugins/table/dialogs/table.js +22 -0
  238. package/public/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
  239. package/public/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
  240. package/public/ckeditor/plugins/widget/images/handle.png +0 -0
  241. package/public/ckeditor/plugins/wsc/LICENSE.md +28 -0
  242. package/public/ckeditor/plugins/wsc/README.md +84 -0
  243. package/public/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  244. package/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  245. package/public/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  246. package/public/ckeditor/plugins/wsc/dialogs/wsc.js +90 -0
  247. package/public/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  248. package/public/ckeditor/plugins/wsc/icons/hidpi/spellchecker.png +0 -0
  249. package/public/ckeditor/plugins/wsc/icons/spellchecker.png +0 -0
  250. package/public/ckeditor/plugins/wsc/lang/af.js +2 -0
  251. package/public/ckeditor/plugins/wsc/lang/ar.js +2 -0
  252. package/public/ckeditor/plugins/wsc/lang/bg.js +2 -0
  253. package/public/ckeditor/plugins/wsc/lang/bn.js +2 -0
  254. package/public/ckeditor/plugins/wsc/lang/bs.js +2 -0
  255. package/public/ckeditor/plugins/wsc/lang/ca.js +2 -0
  256. package/public/ckeditor/plugins/wsc/lang/cs.js +2 -0
  257. package/public/ckeditor/plugins/wsc/lang/cy.js +2 -0
  258. package/public/ckeditor/plugins/wsc/lang/da.js +2 -0
  259. package/public/ckeditor/plugins/wsc/lang/de.js +2 -0
  260. package/public/ckeditor/plugins/wsc/lang/el.js +2 -0
  261. package/public/ckeditor/plugins/wsc/lang/en-au.js +2 -0
  262. package/public/ckeditor/plugins/wsc/lang/en-ca.js +2 -0
  263. package/public/ckeditor/plugins/wsc/lang/en-gb.js +2 -0
  264. package/public/ckeditor/plugins/wsc/lang/en.js +2 -0
  265. package/public/ckeditor/plugins/wsc/lang/eo.js +2 -0
  266. package/public/ckeditor/plugins/wsc/lang/es.js +2 -0
  267. package/public/ckeditor/plugins/wsc/lang/et.js +2 -0
  268. package/public/ckeditor/plugins/wsc/lang/eu.js +2 -0
  269. package/public/ckeditor/plugins/wsc/lang/fa.js +2 -0
  270. package/public/ckeditor/plugins/wsc/lang/fi.js +2 -0
  271. package/public/ckeditor/plugins/wsc/lang/fo.js +2 -0
  272. package/public/ckeditor/plugins/wsc/lang/fr-ca.js +2 -0
  273. package/public/ckeditor/plugins/wsc/lang/fr.js +2 -0
  274. package/public/ckeditor/plugins/wsc/lang/gl.js +2 -0
  275. package/public/ckeditor/plugins/wsc/lang/gu.js +2 -0
  276. package/public/ckeditor/plugins/wsc/lang/he.js +2 -0
  277. package/public/ckeditor/plugins/wsc/lang/hi.js +2 -0
  278. package/public/ckeditor/plugins/wsc/lang/hr.js +2 -0
  279. package/public/ckeditor/plugins/wsc/lang/hu.js +2 -0
  280. package/public/ckeditor/plugins/wsc/lang/is.js +2 -0
  281. package/public/ckeditor/plugins/wsc/lang/it.js +2 -0
  282. package/public/ckeditor/plugins/wsc/lang/ja.js +2 -0
  283. package/public/ckeditor/plugins/wsc/lang/ka.js +2 -0
  284. package/public/ckeditor/plugins/wsc/lang/km.js +2 -0
  285. package/public/ckeditor/plugins/wsc/lang/ko.js +2 -0
  286. package/public/ckeditor/plugins/wsc/lang/ku.js +2 -0
  287. package/public/ckeditor/plugins/wsc/lang/lt.js +2 -0
  288. package/public/ckeditor/plugins/wsc/lang/lv.js +2 -0
  289. package/public/ckeditor/plugins/wsc/lang/mk.js +2 -0
  290. package/public/ckeditor/plugins/wsc/lang/mn.js +2 -0
  291. package/public/ckeditor/plugins/wsc/lang/ms.js +2 -0
  292. package/public/ckeditor/plugins/wsc/lang/nb.js +2 -0
  293. package/public/ckeditor/plugins/wsc/lang/nl.js +2 -0
  294. package/public/ckeditor/plugins/wsc/lang/no.js +2 -0
  295. package/public/ckeditor/plugins/wsc/lang/pl.js +2 -0
  296. package/public/ckeditor/plugins/wsc/lang/pt-br.js +2 -0
  297. package/public/ckeditor/plugins/wsc/lang/pt.js +2 -0
  298. package/public/ckeditor/plugins/wsc/lang/ro.js +2 -0
  299. package/public/ckeditor/plugins/wsc/lang/ru.js +2 -0
  300. package/public/ckeditor/plugins/wsc/lang/sk.js +2 -0
  301. package/public/ckeditor/plugins/wsc/lang/sl.js +2 -0
  302. package/public/ckeditor/plugins/wsc/lang/sr-latn.js +2 -0
  303. package/public/ckeditor/plugins/wsc/lang/sr.js +2 -0
  304. package/public/ckeditor/plugins/wsc/lang/sv.js +2 -0
  305. package/public/ckeditor/plugins/wsc/lang/th.js +2 -0
  306. package/public/ckeditor/plugins/wsc/lang/tr.js +2 -0
  307. package/public/ckeditor/plugins/wsc/lang/ug.js +2 -0
  308. package/public/ckeditor/plugins/wsc/lang/uk.js +2 -0
  309. package/public/ckeditor/plugins/wsc/lang/vi.js +2 -0
  310. package/public/ckeditor/plugins/wsc/lang/zh-cn.js +1 -0
  311. package/public/ckeditor/plugins/wsc/lang/zh.js +1 -0
  312. package/public/ckeditor/plugins/wsc/plugin.js +5 -0
  313. package/public/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
  314. package/public/ckeditor/skins/moono-lisa/dialog.css +5 -0
  315. package/public/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
  316. package/public/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
  317. package/public/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
  318. package/public/ckeditor/skins/moono-lisa/editor.css +5 -0
  319. package/public/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
  320. package/public/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
  321. package/public/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
  322. package/public/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
  323. package/public/ckeditor/skins/moono-lisa/icons.png +0 -0
  324. package/public/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  325. package/public/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
  326. package/public/ckeditor/skins/moono-lisa/images/close.png +0 -0
  327. package/public/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
  328. package/public/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  329. package/public/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
  330. package/public/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  331. package/public/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
  332. package/public/ckeditor/skins/moono-lisa/images/lock.png +0 -0
  333. package/public/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
  334. package/public/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
  335. package/public/ckeditor/skins/moono-lisa/readme.md +46 -0
  336. package/public/ckeditor/styles.js +137 -0
  337. package/public/ckeditor/vendor/promise.js +13 -0
  338. package/public/saltcorn.css +18 -1
  339. package/public/saltcorn.js +3 -0
  340. package/restart_watcher.js +1 -4
  341. package/routes/list.js +48 -1
  342. package/routes/menu.js +113 -25
  343. package/serve.js +4 -0
  344. package/tests/admin.test.js +4 -2
  345. package/wrapper.js +8 -1
@@ -0,0 +1,46 @@
1
+ "Moono-lisa" Skin
2
+ =================
3
+
4
+ This skin has been made a **default skin** starting from CKEditor 4.6.0 and is maintained by the core developers.
5
+
6
+ For more information about skins, please check the [CKEditor Skin SDK](https://ckeditor.com/docs/ckeditor4/latest/guide/skin_sdk_intro.html)
7
+ documentation.
8
+
9
+ Features
10
+ -------------------
11
+ "Moono-lisa" is a monochromatic skin, which offers a modern, flat and minimalistic look which blends very well in modern design.
12
+ It comes with the following features:
13
+
14
+ - Chameleon feature with brightness.
15
+ - High-contrast compatibility.
16
+ - Graphics source provided in SVG.
17
+
18
+ Directory Structure
19
+ -------------------
20
+
21
+ CSS parts:
22
+ - **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance,
23
+ - **mainui.css**: the file contains styles of entire editor outline structures,
24
+ - **toolbar.css**: the file contains styles of the editor toolbar space (top),
25
+ - **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar,
26
+ - **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded
27
+ until the first panel open up,
28
+ - **elementspath.css**: the file contains styles of the editor elements path bar (bottom),
29
+ - **menu.css**: the file contains styles of all editor menus including context menu and button drop-down,
30
+ it's not loaded until the first menu open up,
31
+ - **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open,
32
+ - **reset.css**: the file defines the basis of style resets among all editor UI spaces,
33
+ - **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference,
34
+ - **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks.
35
+
36
+ Other parts:
37
+ - **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature,
38
+ - **images/**: contains a fill general used images,
39
+ - **dev/**: contains SVG and PNG source of the skin icons.
40
+
41
+ License
42
+ -------
43
+
44
+ Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
45
+
46
+ For licensing, see LICENSE.md or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license)
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ // This file contains style definitions that can be used by CKEditor plugins.
7
+ //
8
+ // The most common use for it is the "stylescombo" plugin which shows the Styles drop-down
9
+ // list containing all styles in the editor toolbar. Other plugins, like
10
+ // the "div" plugin, use a subset of the styles for their features.
11
+ //
12
+ // If you do not have plugins that depend on this file in your editor build, you can simply
13
+ // ignore it. Otherwise it is strongly recommended to customize this file to match your
14
+ // website requirements and design properly.
15
+ //
16
+ // For more information refer to: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#style-rules
17
+
18
+ CKEDITOR.stylesSet.add( 'default', [
19
+ /* Block styles */
20
+
21
+ // These styles are already available in the "Format" drop-down list ("format" plugin),
22
+ // so they are not needed here by default. You may enable them to avoid
23
+ // placing the "Format" combo in the toolbar, maintaining the same features.
24
+ /*
25
+ { name: 'Paragraph', element: 'p' },
26
+ { name: 'Heading 1', element: 'h1' },
27
+ { name: 'Heading 2', element: 'h2' },
28
+ { name: 'Heading 3', element: 'h3' },
29
+ { name: 'Heading 4', element: 'h4' },
30
+ { name: 'Heading 5', element: 'h5' },
31
+ { name: 'Heading 6', element: 'h6' },
32
+ { name: 'Preformatted Text',element: 'pre' },
33
+ { name: 'Address', element: 'address' },
34
+ */
35
+
36
+ { name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } },
37
+ { name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } },
38
+ {
39
+ name: 'Special Container',
40
+ element: 'div',
41
+ styles: {
42
+ padding: '5px 10px',
43
+ background: '#eee',
44
+ border: '1px solid #ccc'
45
+ }
46
+ },
47
+
48
+ /* Inline styles */
49
+
50
+ // These are core styles available as toolbar buttons. You may opt enabling
51
+ // some of them in the Styles drop-down list, removing them from the toolbar.
52
+ // (This requires the "stylescombo" plugin.)
53
+ /*
54
+ { name: 'Strong', element: 'strong', overrides: 'b' },
55
+ { name: 'Emphasis', element: 'em' , overrides: 'i' },
56
+ { name: 'Underline', element: 'u' },
57
+ { name: 'Strikethrough', element: 'strike' },
58
+ { name: 'Subscript', element: 'sub' },
59
+ { name: 'Superscript', element: 'sup' },
60
+ */
61
+
62
+ { name: 'Marker', element: 'span', attributes: { 'class': 'marker' } },
63
+
64
+ { name: 'Big', element: 'big' },
65
+ { name: 'Small', element: 'small' },
66
+ { name: 'Typewriter', element: 'tt' },
67
+
68
+ { name: 'Computer Code', element: 'code' },
69
+ { name: 'Keyboard Phrase', element: 'kbd' },
70
+ { name: 'Sample Text', element: 'samp' },
71
+ { name: 'Variable', element: 'var' },
72
+
73
+ { name: 'Deleted Text', element: 'del' },
74
+ { name: 'Inserted Text', element: 'ins' },
75
+
76
+ { name: 'Cited Work', element: 'cite' },
77
+ { name: 'Inline Quotation', element: 'q' },
78
+
79
+ { name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } },
80
+ { name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } },
81
+
82
+ /* Object styles */
83
+
84
+ {
85
+ name: 'Styled Image (left)',
86
+ element: 'img',
87
+ attributes: { 'class': 'left' }
88
+ },
89
+
90
+ {
91
+ name: 'Styled Image (right)',
92
+ element: 'img',
93
+ attributes: { 'class': 'right' }
94
+ },
95
+
96
+ {
97
+ name: 'Compact Table',
98
+ element: 'table',
99
+ attributes: {
100
+ cellpadding: '5',
101
+ cellspacing: '0',
102
+ border: '1',
103
+ bordercolor: '#ccc'
104
+ },
105
+ styles: {
106
+ 'border-collapse': 'collapse'
107
+ }
108
+ },
109
+
110
+ { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
111
+ { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } },
112
+
113
+ /* Widget styles */
114
+
115
+ { name: 'Clean Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-clean' } },
116
+ { name: 'Grayscale Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-grayscale' } },
117
+
118
+ { name: 'Featured Snippet', type: 'widget', widget: 'codeSnippet', attributes: { 'class': 'code-featured' } },
119
+
120
+ { name: 'Featured Formula', type: 'widget', widget: 'mathjax', attributes: { 'class': 'math-featured' } },
121
+
122
+ { name: '240p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-240p' }, group: 'size' },
123
+ { name: '360p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-360p' }, group: 'size' },
124
+ { name: '480p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-480p' }, group: 'size' },
125
+ { name: '720p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-720p' }, group: 'size' },
126
+ { name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-1080p' }, group: 'size' },
127
+
128
+ // Adding space after the style name is an intended workaround. For now, there
129
+ // is no option to create two styles with the same name for different widget types. See https://dev.ckeditor.com/ticket/16664.
130
+ { name: '240p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-240p' }, group: 'size' },
131
+ { name: '360p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-360p' }, group: 'size' },
132
+ { name: '480p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-480p' }, group: 'size' },
133
+ { name: '720p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-720p' }, group: 'size' },
134
+ { name: '1080p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-1080p' }, group: 'size' }
135
+
136
+ ] );
137
+
@@ -0,0 +1,13 @@
1
+ (function(v,w){"object"===typeof exports&&"undefined"!==typeof module?module.exports=w():"function"===typeof define&&define.amd?define(w):v.ES6Promise=w()})(this,function(){function v(a){return"function"===typeof a}function w(){return function(){return process.nextTick(n)}}function R(){return"undefined"!==typeof B?function(){B(n)}:C()}function S(){var a=0,b=new J(n),c=document.createTextNode("");b.observe(c,{characterData:!0});return function(){c.data=a=++a%2}}function T(){var a=new MessageChannel;
2
+ a.port1.onmessage=n;return function(){return a.port2.postMessage(0)}}function C(){var a=setTimeout;return function(){return a(n,1)}}function n(){for(var a=0;a<k;a+=2)(0,q[a])(q[a+1]),q[a]=void 0,q[a+1]=void 0;k=0}function U(){try{var a=Function("return this")().require("vertx");B=a.runOnLoop||a.runOnContext;return R()}catch(b){return C()}}function D(a,b){var c=this,d=new this.constructor(r);void 0===d[z]&&K(d);var e=c._state;if(e){var f=arguments[e-1];l(function(){return L(e,d,f,c._result)})}else E(c,
3
+ d,a,b);return d}function F(a){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(r);x(b,a);return b}function r(){}function M(a){try{return a.then}catch(b){return p.error=b,p}}function V(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function W(a,b,c){l(function(a){var e=!1,f=V(c,b,function(c){e||(e=!0,b!==c?x(a,c):m(a,c))},function(b){e||(e=!0,g(a,b))},"Settle: "+(a._label||" unknown promise"));!e&&f&&(e=!0,g(a,f))},a)}function X(a,b){b._state===y?m(a,b._result):b._state===t?g(a,
4
+ b._result):E(b,void 0,function(b){return x(a,b)},function(b){return g(a,b)})}function N(a,b,c){b.constructor===a.constructor&&c===D&&b.constructor.resolve===F?X(a,b):c===p?(g(a,p.error),p.error=null):void 0===c?m(a,b):v(c)?W(a,b,c):m(a,b)}function x(a,b){if(a===b)g(a,new TypeError("You cannot resolve a promise with itself"));else{var c=typeof b;null===b||"object"!==c&&"function"!==c?m(a,b):N(a,b,M(b))}}function Y(a){a._onerror&&a._onerror(a._result);G(a)}function m(a,b){a._state===u&&(a._result=b,
5
+ a._state=y,0!==a._subscribers.length&&l(G,a))}function g(a,b){a._state===u&&(a._state=t,a._result=b,l(Y,a))}function E(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null;e[f]=b;e[f+y]=c;e[f+t]=d;0===f&&a._state&&l(G,a)}function G(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d=void 0,e=void 0,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?L(c,d,e,f):e(f);a._subscribers.length=0}}function L(a,b,c,d){var e=v(c),f=void 0,h=void 0,k=void 0,l=void 0;if(e){try{f=c(d)}catch(n){p.error=
6
+ n,f=p}f===p?(l=!0,h=f.error,f.error=null):k=!0;if(b===f){g(b,new TypeError("A promises callback cannot return that same promise."));return}}else f=d,k=!0;b._state===u&&(e&&k?x(b,f):l?g(b,h):a===y?m(b,f):a===t&&g(b,f))}function Z(a,b){try{b(function(b){x(a,b)},function(b){g(a,b)})}catch(c){g(a,c)}}function K(a){a[z]=O++;a._state=void 0;a._result=void 0;a._subscribers=[]}var H=void 0,P=H=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},k=0,B=void 0,
7
+ I=void 0,l=function(a,b){q[k]=a;q[k+1]=b;k+=2;2===k&&(I?I(n):Q())},A=(H="undefined"!==typeof window?window:void 0)||{},J=A.MutationObserver||A.WebKitMutationObserver,A="undefined"===typeof self&&"undefined"!==typeof process&&"[object process]"==={}.toString.call(process),aa="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,q=Array(1E3),Q=void 0,Q=A?w():J?S():aa?T():void 0===H&&"function"===typeof require?U():C(),z=Math.random().toString(36).substring(2),
8
+ u=void 0,y=1,t=2,p={error:null},O=0,ba=function(){function a(a,c){this._instanceConstructor=a;this.promise=new a(r);this.promise[z]||K(this.promise);P(c)?(this._remaining=this.length=c.length,this._result=Array(this.length),0===this.length?m(this.promise,this._result):(this.length=this.length||0,this._enumerate(c),0===this._remaining&&m(this.promise,this._result))):g(this.promise,Error("Array Methods must be provided an Array"))}a.prototype._enumerate=function(a){for(var c=0;this._state===u&&c<a.length;c++)this._eachEntry(a[c],
9
+ c)};a.prototype._eachEntry=function(a,c){var d=this._instanceConstructor,e=d.resolve;e===F?(e=M(a),e===D&&a._state!==u?this._settledAt(a._state,c,a._result):"function"!==typeof e?(this._remaining--,this._result[c]=a):d===h?(d=new d(r),N(d,a,e),this._willSettleAt(d,c)):this._willSettleAt(new d(function(c){return c(a)}),c)):this._willSettleAt(e(a),c)};a.prototype._settledAt=function(a,c,d){var e=this.promise;e._state===u&&(this._remaining--,a===t?g(e,d):this._result[c]=d);0===this._remaining&&m(e,this._result)};
10
+ a.prototype._willSettleAt=function(a,c){var d=this;E(a,void 0,function(a){return d._settledAt(y,c,a)},function(a){return d._settledAt(t,c,a)})};return a}(),h=function(){function a(b){this[z]=O++;this._result=this._state=void 0;this._subscribers=[];if(r!==b){if("function"!==typeof b)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof a)Z(this,b);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
11
+ }}a.prototype["catch"]=function(a){return this.then(null,a)};a.prototype["finally"]=function(a){var c=this.constructor;return v(a)?this.then(function(d){return c.resolve(a()).then(function(){return d})},function(d){return c.resolve(a()).then(function(){throw d;})}):this.then(a,a)};return a}();h.prototype.then=D;h.all=function(a){return(new ba(this,a)).promise};h.race=function(a){var b=this;return P(a)?new b(function(c,d){for(var e=a.length,f=0;f<e;f++)b.resolve(a[f]).then(c,d)}):new b(function(a,
12
+ b){return b(new TypeError("You must pass an array to race."))})};h.resolve=F;h.reject=function(a){var b=new this(r);g(b,a);return b};h._setScheduler=function(a){I=a};h._setAsap=function(a){l=a};h._asap=l;h.polyfill=function(){var a=void 0;if("undefined"!==typeof global)a=global;else if("undefined"!==typeof self)a=self;else try{a=Function("return this")()}catch(b){throw Error("polyfill failed because global object is unavailable in this environment");}var c=a.Promise;if(c){var d=null;try{d=Object.prototype.toString.call(c.resolve())}catch(e){}if("[object Promise]"===
13
+ d&&!c.cast)return}a.Promise=h};return h.Promise=h});
@@ -81,13 +81,19 @@ div[data-inline-edit-dest-url]:hover .editicon {
81
81
 
82
82
  border-color: #95a5a6;
83
83
  }
84
- .search-bar input[type="search"] {
84
+ .search-bar input[type="search"]:not(.hasbl) {
85
85
  border-left: none;
86
86
  border-color: #95a5a6;
87
87
  padding-left: 0.3rem;
88
88
  background-color: #ffffff;
89
89
  }
90
90
 
91
+ .search-bar input[type="search"] {
92
+ border-color: #95a5a6;
93
+ padding-left: 0.3rem;
94
+ background-color: #ffffff;
95
+ }
96
+
91
97
  .search-bar button.search-bar {
92
98
  border-color: #95a5a6;
93
99
  background-color: #ffffff;
@@ -95,10 +101,21 @@ div[data-inline-edit-dest-url]:hover .editicon {
95
101
  .search-bar button.dropdown-toggle {
96
102
  border-left: none;
97
103
  }
104
+
98
105
  #button-search-submit {
99
106
  border-right: none;
100
107
  padding-right: 0.3rem;
101
108
  }
109
+
110
+ form.menusearch button {
111
+ border-left: none;
112
+ padding-right: 0.3rem;
113
+ }
114
+
115
+ .pl-2p5 {
116
+ padding-left: 0.75rem !important;
117
+ }
118
+
102
119
  .br-none {
103
120
  border-right: none;
104
121
  }
@@ -638,3 +638,6 @@ function room_older(viewname, room_id, btn) {
638
638
  }
639
639
  );
640
640
  }
641
+ function showHideCol(nm, e) {
642
+ $("#jsGrid").jsGrid("fieldOption", nm, "visible", e.checked);
643
+ }
@@ -18,6 +18,7 @@ const relevantPackages = [
18
18
  "postgres",
19
19
  "saltcorn-data",
20
20
  "saltcorn-markup",
21
+ "saltcorn-sbadmin2",
21
22
  "server",
22
23
  "sqlite",
23
24
  ];
@@ -119,10 +120,6 @@ const listenForChanges = (projectDirs, pluginDirs) => {
119
120
  (event, file) => {
120
121
  console.log("'%s' changed \n re-starting now", file);
121
122
  closeWatchers();
122
- spawnSync("npm", ["run", "tsc"], {
123
- stdio: "inherit",
124
- cwd: projectRoot,
125
- });
126
123
  process.exit();
127
124
  }
128
125
  )
package/routes/list.js CHANGED
@@ -12,7 +12,17 @@ const Router = require("express-promise-router");
12
12
 
13
13
  const db = require("@saltcorn/data/db");
14
14
  const { mkTable, h, link, post_btn } = require("@saltcorn/markup");
15
- const { a, script, domReady, div, text } = require("@saltcorn/markup/tags");
15
+ const {
16
+ a,
17
+ script,
18
+ domReady,
19
+ div,
20
+ text,
21
+ button,
22
+ input,
23
+ label,
24
+ form,
25
+ } = require("@saltcorn/markup/tags");
16
26
  const Table = require("@saltcorn/data/models/table");
17
27
  const { isAdmin, error_catcher } = require("./utils");
18
28
  const moment = require("moment");
@@ -244,6 +254,42 @@ router.get(
244
254
  { href: `/table/${table.id || table.name}`, text: table.name },
245
255
  { text: req.__("Data") },
246
256
  ],
257
+ right: div(
258
+ { class: "dropdown" },
259
+ button(
260
+ {
261
+ class: "btn btn-sm btn-outline-secondary dropdown-toggle",
262
+ "data-boundary": "viewport",
263
+ type: "button",
264
+ id: "btnHideCols",
265
+ "data-toggle": "dropdown",
266
+ "aria-haspopup": "true",
267
+ "aria-expanded": "false",
268
+ },
269
+ "Show/hide fields"
270
+ ),
271
+ div(
272
+ {
273
+ class: "dropdown-menu",
274
+ "aria-labelledby": "btnHideCols",
275
+ },
276
+ form(
277
+ { class: "px-2" },
278
+ fields.map((f) =>
279
+ div(
280
+ { class: "form-check" },
281
+ input({
282
+ type: "checkbox",
283
+ onChange: `showHideCol('${f.name}', this)`,
284
+ class: "form-check-input",
285
+ checked: true,
286
+ }),
287
+ label(f.name)
288
+ )
289
+ )
290
+ )
291
+ )
292
+ ),
247
293
  },
248
294
  {
249
295
  type: "blank",
@@ -269,6 +315,7 @@ router.get(
269
315
  `)
270
316
  ),
271
317
  div({ id: "jsGridNotify" }),
318
+
272
319
  div({ id: "jsGrid" })
273
320
  ),
274
321
  },
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}
@@ -40,6 +42,25 @@ 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",
@@ -164,9 +254,9 @@ 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();
@@ -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
@@ -277,6 +360,17 @@ router.get(
277
360
  });
278
361
  })
279
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
+ }));
280
374
 
281
375
  /**
282
376
  * @name post
@@ -288,16 +382,10 @@ router.post(
288
382
  "/",
289
383
  isAdmin,
290
384
  error_catcher(async (req, res) => {
291
- if (req.xhr) {
292
- const new_menu = req.body;
293
- await getState().setConfig("menu_items", jQMEtoMenu(new_menu));
294
- res.json({ success: true });
295
- } else {
296
- const new_menu = JSON.parse(req.body.menu);
297
- await getState().setConfig("menu_items", jQMEtoMenu(new_menu));
298
- 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);
299
388
 
300
- res.redirect(`/menu`);
301
- }
389
+ res.json({ success: true });
302
390
  })
303
391
  );
package/serve.js CHANGED
@@ -38,6 +38,7 @@ const {
38
38
  getRelevantPackages,
39
39
  getPluginDirectories,
40
40
  } = require("./restart_watcher");
41
+ const { spawnSync } = require("child_process");
41
42
 
42
43
  // helpful https://gist.github.com/jpoehls/2232358
43
44
  /**
@@ -162,6 +163,9 @@ module.exports =
162
163
  ...appargs
163
164
  } = {}) => {
164
165
  if (dev && cluster.isMaster) {
166
+ spawnSync("npm", ["run", "tsc"], {
167
+ stdio: "inherit",
168
+ });
165
169
  listenForChanges(getRelevantPackages(), await getPluginDirectories());
166
170
  }
167
171
  const useNCpus = process.env.SALTCORN_NWORKERS
@@ -268,8 +268,10 @@ describe("menu editor", () => {
268
268
  await request(app)
269
269
  .post("/menu")
270
270
  .set("Cookie", loginCookie)
271
- .send("menu=" + encodeURIComponent(JSON.stringify(menu_json)))
272
- .expect(toRedirect("/menu"));
271
+ .send(menu_json)
272
+ .set("Content-Type", "application/json")
273
+ .set("Accept", "application/json")
274
+ .expect(toSucceed);
273
275
  });
274
276
  it("show new menu", async () => {
275
277
  const app = await getApp({ disableCsrf: true });
package/wrapper.js CHANGED
@@ -16,7 +16,10 @@ const getFlashes = (req) =>
16
16
  .filter((a) => a.msg && a.msg.length && a.msg.length > 0);
17
17
 
18
18
  const get_extra_menu = (role, state, req) => {
19
- const cfg = getState().getConfig("menu_items", []);
19
+ let cfg = getState().getConfig("unrolled_menu_items", []);
20
+ if (!cfg || cfg.length === 0) {
21
+ cfg = getState().getConfig("menu_items", []);
22
+ }
20
23
  const locale = req.getLocale();
21
24
  const __ = (s) => state.i18n.__({ phrase: s, locale }) || s;
22
25
  const transform = (items) =>
@@ -27,6 +30,7 @@ const get_extra_menu = (role, state, req) => {
27
30
  icon: item.icon,
28
31
  location: item.location,
29
32
  style: item.style || "",
33
+ type: item.type,
30
34
  link:
31
35
  item.type === "Link"
32
36
  ? item.url
@@ -235,6 +239,7 @@ module.exports = (version_tag) =>
235
239
  brand: get_brand(state),
236
240
  menu: get_menu(req),
237
241
  currentUrl,
242
+ originalUrl: req.originalUrl,
238
243
  alerts: getFlashes(req),
239
244
  body,
240
245
  headers: get_headers(req, version_tag),
@@ -279,6 +284,8 @@ module.exports = (version_tag) =>
279
284
  brand: get_brand(state),
280
285
  menu: get_menu(req),
281
286
  currentUrl,
287
+ originalUrl: req.originalUrl,
288
+
282
289
  alerts,
283
290
  body: html.length === 1 ? html[0] : html.join(""),
284
291
  headers: get_headers(req, version_tag, opts.description, pageHeaders),