cewebs-transformationengine 3.0.1

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 (703) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +1 -0
  3. data/LICENSE.GPL +674 -0
  4. data/README.md +99 -0
  5. data/Rakefile +19 -0
  6. data/cewebs-transformationengine.gemspec +25 -0
  7. data/index.html +37 -0
  8. data/lib/cewebs-transformationengine/helpers/site.rb +343 -0
  9. data/lib/cewebs-transformationengine/implementation.rb +514 -0
  10. data/lib/cewebs-transformationengine/implementation.xml +14 -0
  11. data/lib/cewebs-transformationengine/sites.xml +131 -0
  12. data/menupoints.rng +27 -0
  13. data/server/data/Default/aman.xml +16 -0
  14. data/server/data/Default/custom.xml +15 -0
  15. data/server/data/Default/persons.rng +106 -0
  16. data/server/data/Default/strings.default.xml +104 -0
  17. data/server/data/Default/strings.rng +674 -0
  18. data/server/data/Default/strings.xml +106 -0
  19. data/server/data/engine.xml +11 -0
  20. data/server/engine +15 -0
  21. data/static/icons/large/accessories-calculator.png +0 -0
  22. data/static/icons/large/accessories-character-map.png +0 -0
  23. data/static/icons/large/accessories-text-editor.png +0 -0
  24. data/static/icons/large/address-book-new.png +0 -0
  25. data/static/icons/large/application-certificate.png +0 -0
  26. data/static/icons/large/application-magicpoint.png +0 -0
  27. data/static/icons/large/application-msword.png +0 -0
  28. data/static/icons/large/application-ogg.png +0 -0
  29. data/static/icons/large/application-pdf.png +0 -0
  30. data/static/icons/large/application-postscript.png +0 -0
  31. data/static/icons/large/application-rtf.png +0 -0
  32. data/static/icons/large/application-vnd.lotus-1-2-3.png +0 -0
  33. data/static/icons/large/application-vnd.ms-excel.png +0 -0
  34. data/static/icons/large/application-vnd.ms-powerpoint.png +0 -0
  35. data/static/icons/large/application-vnd.oasis.opendocument.graphics-template.png +0 -0
  36. data/static/icons/large/application-vnd.oasis.opendocument.graphics.png +0 -0
  37. data/static/icons/large/application-vnd.oasis.opendocument.image.png +0 -0
  38. data/static/icons/large/application-vnd.oasis.opendocument.presentation-template.png +0 -0
  39. data/static/icons/large/application-vnd.oasis.opendocument.presentation.png +0 -0
  40. data/static/icons/large/application-vnd.oasis.opendocument.spreadsheet-template.png +0 -0
  41. data/static/icons/large/application-vnd.oasis.opendocument.spreadsheet.png +0 -0
  42. data/static/icons/large/application-vnd.oasis.opendocument.text-template.png +0 -0
  43. data/static/icons/large/application-vnd.oasis.opendocument.text-web.png +0 -0
  44. data/static/icons/large/application-vnd.oasis.opendocument.text.png +0 -0
  45. data/static/icons/large/application-vnd.rn-realmedia-secure.png +0 -0
  46. data/static/icons/large/application-vnd.rn-realmedia-vbr.png +0 -0
  47. data/static/icons/large/application-vnd.rn-realmedia.png +0 -0
  48. data/static/icons/large/application-vnd.stardivision.calc.png +0 -0
  49. data/static/icons/large/application-vnd.stardivision.impress.png +0 -0
  50. data/static/icons/large/application-vnd.stardivision.writer.png +0 -0
  51. data/static/icons/large/application-vnd.sun.xml.calc.png +0 -0
  52. data/static/icons/large/application-vnd.sun.xml.calc.template.png +0 -0
  53. data/static/icons/large/application-vnd.sun.xml.draw.png +0 -0
  54. data/static/icons/large/application-vnd.sun.xml.draw.template.png +0 -0
  55. data/static/icons/large/application-vnd.sun.xml.impress.png +0 -0
  56. data/static/icons/large/application-vnd.sun.xml.impress.template.png +0 -0
  57. data/static/icons/large/application-vnd.sun.xml.writer.png +0 -0
  58. data/static/icons/large/application-vnd.sun.xml.writer.template.png +0 -0
  59. data/static/icons/large/application-wordperfect.png +0 -0
  60. data/static/icons/large/application-x-7z-compressed.png +0 -0
  61. data/static/icons/large/application-x-abiword.png +0 -0
  62. data/static/icons/large/application-x-applix-spreadsheet.png +0 -0
  63. data/static/icons/large/application-x-applix-word.png +0 -0
  64. data/static/icons/large/application-x-archive.png +0 -0
  65. data/static/icons/large/application-x-arj.png +0 -0
  66. data/static/icons/large/application-x-bzip-compressed-tar.png +0 -0
  67. data/static/icons/large/application-x-bzip.png +0 -0
  68. data/static/icons/large/application-x-compress.png +0 -0
  69. data/static/icons/large/application-x-compressed-tar.png +0 -0
  70. data/static/icons/large/application-x-cpio-compressed.png +0 -0
  71. data/static/icons/large/application-x-cpio.png +0 -0
  72. data/static/icons/large/application-x-deb.png +0 -0
  73. data/static/icons/large/application-x-dvi.png +0 -0
  74. data/static/icons/large/application-x-executable.png +0 -0
  75. data/static/icons/large/application-x-font-afm.png +0 -0
  76. data/static/icons/large/application-x-font-bdf.png +0 -0
  77. data/static/icons/large/application-x-font-linux-psf.png +0 -0
  78. data/static/icons/large/application-x-font-pcf.png +0 -0
  79. data/static/icons/large/application-x-font-sunos-news.png +0 -0
  80. data/static/icons/large/application-x-font-ttf.png +0 -0
  81. data/static/icons/large/application-x-gnumeric.png +0 -0
  82. data/static/icons/large/application-x-gzip.png +0 -0
  83. data/static/icons/large/application-x-gzpostscript.png +0 -0
  84. data/static/icons/large/application-x-jar.png +0 -0
  85. data/static/icons/large/application-x-killustrator.png +0 -0
  86. data/static/icons/large/application-x-kpresenter.png +0 -0
  87. data/static/icons/large/application-x-kspread.png +0 -0
  88. data/static/icons/large/application-x-kword.png +0 -0
  89. data/static/icons/large/application-x-lha.png +0 -0
  90. data/static/icons/large/application-x-lhz.png +0 -0
  91. data/static/icons/large/application-x-ms-dos-executable.png +0 -0
  92. data/static/icons/large/application-x-perl.png +0 -0
  93. data/static/icons/large/application-x-python-bytecode.png +0 -0
  94. data/static/icons/large/application-x-rar.png +0 -0
  95. data/static/icons/large/application-x-rpm.png +0 -0
  96. data/static/icons/large/application-x-scribus.png +0 -0
  97. data/static/icons/large/application-x-shellscript.png +0 -0
  98. data/static/icons/large/application-x-stuffit.png +0 -0
  99. data/static/icons/large/application-x-tar.png +0 -0
  100. data/static/icons/large/application-x-tarz.png +0 -0
  101. data/static/icons/large/application-x-tex.png +0 -0
  102. data/static/icons/large/application-xhtml+xml.png +0 -0
  103. data/static/icons/large/application-zip.png +0 -0
  104. data/static/icons/large/applications-accessories.png +0 -0
  105. data/static/icons/large/applications-development.png +0 -0
  106. data/static/icons/large/applications-games.png +0 -0
  107. data/static/icons/large/applications-graphics.png +0 -0
  108. data/static/icons/large/applications-internet.png +0 -0
  109. data/static/icons/large/applications-multimedia.png +0 -0
  110. data/static/icons/large/applications-office.png +0 -0
  111. data/static/icons/large/applications-other.png +0 -0
  112. data/static/icons/large/applications-system.png +0 -0
  113. data/static/icons/large/appointment-new.png +0 -0
  114. data/static/icons/large/audio-card.png +0 -0
  115. data/static/icons/large/audio-input-microphone.png +0 -0
  116. data/static/icons/large/audio-volume-high.png +0 -0
  117. data/static/icons/large/audio-volume-low.png +0 -0
  118. data/static/icons/large/audio-volume-medium.png +0 -0
  119. data/static/icons/large/audio-volume-muted.png +0 -0
  120. data/static/icons/large/audio-x-generic.png +0 -0
  121. data/static/icons/large/audio.png +0 -0
  122. data/static/icons/large/battery-caution.png +0 -0
  123. data/static/icons/large/battery.png +0 -0
  124. data/static/icons/large/bookmark-new.png +0 -0
  125. data/static/icons/large/camera-photo.png +0 -0
  126. data/static/icons/large/camera-video.png +0 -0
  127. data/static/icons/large/computer.png +0 -0
  128. data/static/icons/large/contact-new.png +0 -0
  129. data/static/icons/large/dialog-error.png +0 -0
  130. data/static/icons/large/dialog-information.png +0 -0
  131. data/static/icons/large/dialog-warning.png +0 -0
  132. data/static/icons/large/document-new.png +0 -0
  133. data/static/icons/large/document-open.png +0 -0
  134. data/static/icons/large/document-print-preview.png +0 -0
  135. data/static/icons/large/document-print.png +0 -0
  136. data/static/icons/large/document-properties.png +0 -0
  137. data/static/icons/large/document-save-as.png +0 -0
  138. data/static/icons/large/document-save.png +0 -0
  139. data/static/icons/large/drive-harddisk.png +0 -0
  140. data/static/icons/large/drive-optical.png +0 -0
  141. data/static/icons/large/drive-removable-media.png +0 -0
  142. data/static/icons/large/edit-clear.png +0 -0
  143. data/static/icons/large/edit-copy.png +0 -0
  144. data/static/icons/large/edit-cut.png +0 -0
  145. data/static/icons/large/edit-delete.png +0 -0
  146. data/static/icons/large/edit-find-replace.png +0 -0
  147. data/static/icons/large/edit-find.png +0 -0
  148. data/static/icons/large/edit-paste.png +0 -0
  149. data/static/icons/large/edit-redo.png +0 -0
  150. data/static/icons/large/edit-select-all.png +0 -0
  151. data/static/icons/large/edit-undo.png +0 -0
  152. data/static/icons/large/emblem-favorite.png +0 -0
  153. data/static/icons/large/emblem-important.png +0 -0
  154. data/static/icons/large/emblem-photos.png +0 -0
  155. data/static/icons/large/emblem-readonly.png +0 -0
  156. data/static/icons/large/emblem-symbolic-link.png +0 -0
  157. data/static/icons/large/emblem-system.png +0 -0
  158. data/static/icons/large/emblem-unreadable.png +0 -0
  159. data/static/icons/large/face-angel.png +0 -0
  160. data/static/icons/large/face-crying.png +0 -0
  161. data/static/icons/large/face-devil-grin.png +0 -0
  162. data/static/icons/large/face-glasses.png +0 -0
  163. data/static/icons/large/face-grin.png +0 -0
  164. data/static/icons/large/face-kiss.png +0 -0
  165. data/static/icons/large/face-monkey.png +0 -0
  166. data/static/icons/large/face-plain.png +0 -0
  167. data/static/icons/large/face-sad.png +0 -0
  168. data/static/icons/large/face-smile-big.png +0 -0
  169. data/static/icons/large/face-smile.png +0 -0
  170. data/static/icons/large/face-surprise.png +0 -0
  171. data/static/icons/large/face-wink.png +0 -0
  172. data/static/icons/large/folder-drag-accept.png +0 -0
  173. data/static/icons/large/folder-new.png +0 -0
  174. data/static/icons/large/folder-open.png +0 -0
  175. data/static/icons/large/folder-remote.png +0 -0
  176. data/static/icons/large/folder-saved-search.png +0 -0
  177. data/static/icons/large/folder-visiting.png +0 -0
  178. data/static/icons/large/folder.png +0 -0
  179. data/static/icons/large/font-x-generic.png +0 -0
  180. data/static/icons/large/format-indent-less.png +0 -0
  181. data/static/icons/large/format-indent-more.png +0 -0
  182. data/static/icons/large/format-justify-center.png +0 -0
  183. data/static/icons/large/format-justify-fill.png +0 -0
  184. data/static/icons/large/format-justify-left.png +0 -0
  185. data/static/icons/large/format-justify-right.png +0 -0
  186. data/static/icons/large/format-text-bold.png +0 -0
  187. data/static/icons/large/format-text-italic.png +0 -0
  188. data/static/icons/large/format-text-strikethrough.png +0 -0
  189. data/static/icons/large/format-text-underline.png +0 -0
  190. data/static/icons/large/go-bottom.png +0 -0
  191. data/static/icons/large/go-down.png +0 -0
  192. data/static/icons/large/go-first.png +0 -0
  193. data/static/icons/large/go-home.png +0 -0
  194. data/static/icons/large/go-jump.png +0 -0
  195. data/static/icons/large/go-last.png +0 -0
  196. data/static/icons/large/go-next.png +0 -0
  197. data/static/icons/large/go-previous.png +0 -0
  198. data/static/icons/large/go-top.png +0 -0
  199. data/static/icons/large/go-up.png +0 -0
  200. data/static/icons/large/help-browser.png +0 -0
  201. data/static/icons/large/image-loading.png +0 -0
  202. data/static/icons/large/image-missing.png +0 -0
  203. data/static/icons/large/image-x-generic.png +0 -0
  204. data/static/icons/large/input-gaming.png +0 -0
  205. data/static/icons/large/input-keyboard.png +0 -0
  206. data/static/icons/large/input-mouse.png +0 -0
  207. data/static/icons/large/internet-group-chat.png +0 -0
  208. data/static/icons/large/internet-mail.png +0 -0
  209. data/static/icons/large/internet-news-reader.png +0 -0
  210. data/static/icons/large/internet-web-browser.png +0 -0
  211. data/static/icons/large/list-add.png +0 -0
  212. data/static/icons/large/list-remove.png +0 -0
  213. data/static/icons/large/mail-attachment.png +0 -0
  214. data/static/icons/large/mail-forward.png +0 -0
  215. data/static/icons/large/mail-mark-junk.png +0 -0
  216. data/static/icons/large/mail-mark-not-junk.png +0 -0
  217. data/static/icons/large/mail-message-new.png +0 -0
  218. data/static/icons/large/mail-reply-all.png +0 -0
  219. data/static/icons/large/mail-reply-sender.png +0 -0
  220. data/static/icons/large/mail-send-receive.png +0 -0
  221. data/static/icons/large/media-eject.png +0 -0
  222. data/static/icons/large/media-flash.png +0 -0
  223. data/static/icons/large/media-floppy.png +0 -0
  224. data/static/icons/large/media-optical.png +0 -0
  225. data/static/icons/large/media-playback-pause.png +0 -0
  226. data/static/icons/large/media-playback-start.png +0 -0
  227. data/static/icons/large/media-playback-stop.png +0 -0
  228. data/static/icons/large/media-record.png +0 -0
  229. data/static/icons/large/media-seek-backward.png +0 -0
  230. data/static/icons/large/media-seek-forward.png +0 -0
  231. data/static/icons/large/media-skip-backward.png +0 -0
  232. data/static/icons/large/media-skip-forward.png +0 -0
  233. data/static/icons/large/mime-application-x-php.png +0 -0
  234. data/static/icons/large/mime-application-x-shockwave-flash.png +0 -0
  235. data/static/icons/large/mime-image.png +0 -0
  236. data/static/icons/large/multimedia-player.png +0 -0
  237. data/static/icons/large/network-error.png +0 -0
  238. data/static/icons/large/network-idle.png +0 -0
  239. data/static/icons/large/network-offline.png +0 -0
  240. data/static/icons/large/network-receive.png +0 -0
  241. data/static/icons/large/network-server.png +0 -0
  242. data/static/icons/large/network-transmit-receive.png +0 -0
  243. data/static/icons/large/network-transmit.png +0 -0
  244. data/static/icons/large/network-wired.png +0 -0
  245. data/static/icons/large/network-wireless-encrypted.png +0 -0
  246. data/static/icons/large/network-wireless.png +0 -0
  247. data/static/icons/large/network-workgroup.png +0 -0
  248. data/static/icons/large/office-calendar.png +0 -0
  249. data/static/icons/large/package-x-generic.png +0 -0
  250. data/static/icons/large/preferences-desktop-accessibility.png +0 -0
  251. data/static/icons/large/preferences-desktop-assistive-technology.png +0 -0
  252. data/static/icons/large/preferences-desktop-font.png +0 -0
  253. data/static/icons/large/preferences-desktop-keyboard-shortcuts.png +0 -0
  254. data/static/icons/large/preferences-desktop-locale.png +0 -0
  255. data/static/icons/large/preferences-desktop-peripherals.png +0 -0
  256. data/static/icons/large/preferences-desktop-remote-desktop.png +0 -0
  257. data/static/icons/large/preferences-desktop-screensaver.png +0 -0
  258. data/static/icons/large/preferences-desktop-sound.png +0 -0
  259. data/static/icons/large/preferences-desktop-theme.png +0 -0
  260. data/static/icons/large/preferences-desktop-wallpaper.png +0 -0
  261. data/static/icons/large/preferences-desktop.png +0 -0
  262. data/static/icons/large/preferences-system-network-proxy.png +0 -0
  263. data/static/icons/large/preferences-system-session.png +0 -0
  264. data/static/icons/large/preferences-system-windows.png +0 -0
  265. data/static/icons/large/preferences-system.png +0 -0
  266. data/static/icons/large/printer-error.png +0 -0
  267. data/static/icons/large/printer.png +0 -0
  268. data/static/icons/large/process-stop.png +0 -0
  269. data/static/icons/large/process-working.png +0 -0
  270. data/static/icons/large/start-here.png +0 -0
  271. data/static/icons/large/system-file-manager.png +0 -0
  272. data/static/icons/large/system-installer.png +0 -0
  273. data/static/icons/large/system-lock-screen.png +0 -0
  274. data/static/icons/large/system-log-out.png +0 -0
  275. data/static/icons/large/system-search.png +0 -0
  276. data/static/icons/large/system-shutdown.png +0 -0
  277. data/static/icons/large/system-software-update.png +0 -0
  278. data/static/icons/large/system-users.png +0 -0
  279. data/static/icons/large/tab-new.png +0 -0
  280. data/static/icons/large/text-html.png +0 -0
  281. data/static/icons/large/text-vnd.wap.wml.png +0 -0
  282. data/static/icons/large/text-x-csh.png +0 -0
  283. data/static/icons/large/text-x-generic-template.png +0 -0
  284. data/static/icons/large/text-x-generic.png +0 -0
  285. data/static/icons/large/text-x-python.png +0 -0
  286. data/static/icons/large/text-x-script.png +0 -0
  287. data/static/icons/large/text-x-sh.png +0 -0
  288. data/static/icons/large/text-x-vcalendar.png +0 -0
  289. data/static/icons/large/text-x-vcard.png +0 -0
  290. data/static/icons/large/text-x-zsh.png +0 -0
  291. data/static/icons/large/text.png +0 -0
  292. data/static/icons/large/user-desktop.png +0 -0
  293. data/static/icons/large/user-home.png +0 -0
  294. data/static/icons/large/user-trash-full.png +0 -0
  295. data/static/icons/large/user-trash.png +0 -0
  296. data/static/icons/large/utilities-system-monitor.png +0 -0
  297. data/static/icons/large/utilities-terminal.png +0 -0
  298. data/static/icons/large/video-display.png +0 -0
  299. data/static/icons/large/video-x-generic.png +0 -0
  300. data/static/icons/large/video.png +0 -0
  301. data/static/icons/large/view-fullscreen.png +0 -0
  302. data/static/icons/large/view-refresh.png +0 -0
  303. data/static/icons/large/weather-clear-night.png +0 -0
  304. data/static/icons/large/weather-clear.png +0 -0
  305. data/static/icons/large/weather-few-clouds-night.png +0 -0
  306. data/static/icons/large/weather-few-clouds.png +0 -0
  307. data/static/icons/large/weather-overcast.png +0 -0
  308. data/static/icons/large/weather-severe-alert.png +0 -0
  309. data/static/icons/large/weather-showers-scattered.png +0 -0
  310. data/static/icons/large/weather-showers.png +0 -0
  311. data/static/icons/large/weather-snow.png +0 -0
  312. data/static/icons/large/weather-storm.png +0 -0
  313. data/static/icons/large/window-new.png +0 -0
  314. data/static/icons/large/x-font-afm.png +0 -0
  315. data/static/icons/large/x-office-address-book.png +0 -0
  316. data/static/icons/large/x-office-calendar.png +0 -0
  317. data/static/icons/large/x-office-document-template.png +0 -0
  318. data/static/icons/large/x-office-document.png +0 -0
  319. data/static/icons/large/x-office-drawing-template.png +0 -0
  320. data/static/icons/large/x-office-drawing.png +0 -0
  321. data/static/icons/large/x-office-presentation-template.png +0 -0
  322. data/static/icons/large/x-office-presentation.png +0 -0
  323. data/static/icons/large/x-office-spreadsheet-template.png +0 -0
  324. data/static/icons/large/x-office-spreadsheet.png +0 -0
  325. data/static/icons/small/accessories-calculator.png +0 -0
  326. data/static/icons/small/accessories-character-map.png +0 -0
  327. data/static/icons/small/accessories-text-editor.png +0 -0
  328. data/static/icons/small/address-book-new.png +0 -0
  329. data/static/icons/small/application-certificate.png +0 -0
  330. data/static/icons/small/application-magicpoint.png +0 -0
  331. data/static/icons/small/application-msword.png +0 -0
  332. data/static/icons/small/application-ogg.png +0 -0
  333. data/static/icons/small/application-pdf.png +0 -0
  334. data/static/icons/small/application-postscript.png +0 -0
  335. data/static/icons/small/application-rar.png +0 -0
  336. data/static/icons/small/application-rtf.png +0 -0
  337. data/static/icons/small/application-vnd.lotus-1-2-3.png +0 -0
  338. data/static/icons/small/application-vnd.ms-excel.png +0 -0
  339. data/static/icons/small/application-vnd.ms-powerpoint.png +0 -0
  340. data/static/icons/small/application-vnd.oasis.opendocument.chart.png +0 -0
  341. data/static/icons/small/application-vnd.oasis.opendocument.formula.png +0 -0
  342. data/static/icons/small/application-vnd.oasis.opendocument.graphics-template.png +0 -0
  343. data/static/icons/small/application-vnd.oasis.opendocument.graphics.png +0 -0
  344. data/static/icons/small/application-vnd.oasis.opendocument.image.png +0 -0
  345. data/static/icons/small/application-vnd.oasis.opendocument.presentation-template.png +0 -0
  346. data/static/icons/small/application-vnd.oasis.opendocument.presentation.png +0 -0
  347. data/static/icons/small/application-vnd.oasis.opendocument.spreadsheet-template.png +0 -0
  348. data/static/icons/small/application-vnd.oasis.opendocument.spreadsheet.png +0 -0
  349. data/static/icons/small/application-vnd.oasis.opendocument.text-template.png +0 -0
  350. data/static/icons/small/application-vnd.oasis.opendocument.text-web.png +0 -0
  351. data/static/icons/small/application-vnd.oasis.opendocument.text.png +0 -0
  352. data/static/icons/small/application-vnd.rn-realmedia-secure.png +0 -0
  353. data/static/icons/small/application-vnd.rn-realmedia-vbr.png +0 -0
  354. data/static/icons/small/application-vnd.rn-realmedia.png +0 -0
  355. data/static/icons/small/application-vnd.stardivision.calc.png +0 -0
  356. data/static/icons/small/application-vnd.stardivision.impress.png +0 -0
  357. data/static/icons/small/application-vnd.stardivision.writer.png +0 -0
  358. data/static/icons/small/application-vnd.sun.xml.calc.png +0 -0
  359. data/static/icons/small/application-vnd.sun.xml.calc.template.png +0 -0
  360. data/static/icons/small/application-vnd.sun.xml.draw.png +0 -0
  361. data/static/icons/small/application-vnd.sun.xml.draw.template.png +0 -0
  362. data/static/icons/small/application-vnd.sun.xml.impress.png +0 -0
  363. data/static/icons/small/application-vnd.sun.xml.impress.template.png +0 -0
  364. data/static/icons/small/application-vnd.sun.xml.writer.png +0 -0
  365. data/static/icons/small/application-vnd.sun.xml.writer.template.png +0 -0
  366. data/static/icons/small/application-wordperfect.png +0 -0
  367. data/static/icons/small/application-x-7z-compressed.png +0 -0
  368. data/static/icons/small/application-x-abiword.png +0 -0
  369. data/static/icons/small/application-x-applix-spreadsheet.png +0 -0
  370. data/static/icons/small/application-x-applix-word.png +0 -0
  371. data/static/icons/small/application-x-archive.png +0 -0
  372. data/static/icons/small/application-x-arj.png +0 -0
  373. data/static/icons/small/application-x-bzip-compressed-tar.png +0 -0
  374. data/static/icons/small/application-x-bzip.png +0 -0
  375. data/static/icons/small/application-x-chm.png +0 -0
  376. data/static/icons/small/application-x-compress.png +0 -0
  377. data/static/icons/small/application-x-compressed-tar.png +0 -0
  378. data/static/icons/small/application-x-cpio-compressed.png +0 -0
  379. data/static/icons/small/application-x-cpio.png +0 -0
  380. data/static/icons/small/application-x-deb.png +0 -0
  381. data/static/icons/small/application-x-debian-package.png +0 -0
  382. data/static/icons/small/application-x-dvi.png +0 -0
  383. data/static/icons/small/application-x-executable.png +0 -0
  384. data/static/icons/small/application-x-font-afm.png +0 -0
  385. data/static/icons/small/application-x-font-bdf.png +0 -0
  386. data/static/icons/small/application-x-font-linux-psf.png +0 -0
  387. data/static/icons/small/application-x-font-pcf.png +0 -0
  388. data/static/icons/small/application-x-font-sunos-news.png +0 -0
  389. data/static/icons/small/application-x-font-ttf.png +0 -0
  390. data/static/icons/small/application-x-gnumeric.png +0 -0
  391. data/static/icons/small/application-x-gtar.png +0 -0
  392. data/static/icons/small/application-x-gzip.png +0 -0
  393. data/static/icons/small/application-x-gzpostscript.png +0 -0
  394. data/static/icons/small/application-x-httpd-php.png +0 -0
  395. data/static/icons/small/application-x-iso9660-image.png +0 -0
  396. data/static/icons/small/application-x-jar.png +0 -0
  397. data/static/icons/small/application-x-javascript.png +0 -0
  398. data/static/icons/small/application-x-killustrator.png +0 -0
  399. data/static/icons/small/application-x-kpresenter.png +0 -0
  400. data/static/icons/small/application-x-kspread.png +0 -0
  401. data/static/icons/small/application-x-kword.png +0 -0
  402. data/static/icons/small/application-x-lha.png +0 -0
  403. data/static/icons/small/application-x-lhz.png +0 -0
  404. data/static/icons/small/application-x-ms-dos-executable.png +0 -0
  405. data/static/icons/small/application-x-perl.png +0 -0
  406. data/static/icons/small/application-x-python-bytecode.png +0 -0
  407. data/static/icons/small/application-x-rar.png +0 -0
  408. data/static/icons/small/application-x-redhat-package-manager.png +0 -0
  409. data/static/icons/small/application-x-rpm.png +0 -0
  410. data/static/icons/small/application-x-scribus.png +0 -0
  411. data/static/icons/small/application-x-shellscript.png +0 -0
  412. data/static/icons/small/application-x-shockwave-flash.png +0 -0
  413. data/static/icons/small/application-x-stuffit.png +0 -0
  414. data/static/icons/small/application-x-tar.png +0 -0
  415. data/static/icons/small/application-x-tarz.png +0 -0
  416. data/static/icons/small/application-x-tex.png +0 -0
  417. data/static/icons/small/application-x-xpinstall.png +0 -0
  418. data/static/icons/small/application-xhtml+xml.png +0 -0
  419. data/static/icons/small/application-xml.png +0 -0
  420. data/static/icons/small/application-zip.png +0 -0
  421. data/static/icons/small/applications-accessories.png +0 -0
  422. data/static/icons/small/applications-development.png +0 -0
  423. data/static/icons/small/applications-games.png +0 -0
  424. data/static/icons/small/applications-graphics.png +0 -0
  425. data/static/icons/small/applications-internet.png +0 -0
  426. data/static/icons/small/applications-multimedia.png +0 -0
  427. data/static/icons/small/applications-office.png +0 -0
  428. data/static/icons/small/applications-other.png +0 -0
  429. data/static/icons/small/applications-system.png +0 -0
  430. data/static/icons/small/appointment-new.png +0 -0
  431. data/static/icons/small/audio-card.png +0 -0
  432. data/static/icons/small/audio-input-microphone.png +0 -0
  433. data/static/icons/small/audio-mpeg.png +0 -0
  434. data/static/icons/small/audio-volume-high.png +0 -0
  435. data/static/icons/small/audio-volume-low.png +0 -0
  436. data/static/icons/small/audio-volume-medium.png +0 -0
  437. data/static/icons/small/audio-volume-muted.png +0 -0
  438. data/static/icons/small/audio-x-aiff.png +0 -0
  439. data/static/icons/small/audio-x-generic.png +0 -0
  440. data/static/icons/small/audio-x-ms-wma.png +0 -0
  441. data/static/icons/small/audio-x-pn-realaudio.png +0 -0
  442. data/static/icons/small/audio-x-wav.png +0 -0
  443. data/static/icons/small/audio.png +0 -0
  444. data/static/icons/small/battery-caution.png +0 -0
  445. data/static/icons/small/battery.png +0 -0
  446. data/static/icons/small/bookmark-new.png +0 -0
  447. data/static/icons/small/camera-photo.png +0 -0
  448. data/static/icons/small/camera-video.png +0 -0
  449. data/static/icons/small/chemical-x-mopac-input.png +0 -0
  450. data/static/icons/small/computer.png +0 -0
  451. data/static/icons/small/contact-new.png +0 -0
  452. data/static/icons/small/dialog-error.png +0 -0
  453. data/static/icons/small/dialog-information.png +0 -0
  454. data/static/icons/small/dialog-warning.png +0 -0
  455. data/static/icons/small/document-new.png +0 -0
  456. data/static/icons/small/document-open.png +0 -0
  457. data/static/icons/small/document-print-preview.png +0 -0
  458. data/static/icons/small/document-print.png +0 -0
  459. data/static/icons/small/document-properties.png +0 -0
  460. data/static/icons/small/document-save-as.png +0 -0
  461. data/static/icons/small/document-save.png +0 -0
  462. data/static/icons/small/drive-harddisk.png +0 -0
  463. data/static/icons/small/drive-optical.png +0 -0
  464. data/static/icons/small/drive-removable-media.png +0 -0
  465. data/static/icons/small/edit-clear.png +0 -0
  466. data/static/icons/small/edit-copy.png +0 -0
  467. data/static/icons/small/edit-cut.png +0 -0
  468. data/static/icons/small/edit-delete.png +0 -0
  469. data/static/icons/small/edit-find-replace.png +0 -0
  470. data/static/icons/small/edit-find.png +0 -0
  471. data/static/icons/small/edit-paste.png +0 -0
  472. data/static/icons/small/edit-redo.png +0 -0
  473. data/static/icons/small/edit-select-all.png +0 -0
  474. data/static/icons/small/edit-undo.png +0 -0
  475. data/static/icons/small/emblem-favorite.png +0 -0
  476. data/static/icons/small/emblem-important.png +0 -0
  477. data/static/icons/small/emblem-photos.png +0 -0
  478. data/static/icons/small/emblem-readonly.png +0 -0
  479. data/static/icons/small/emblem-symbolic-link.png +0 -0
  480. data/static/icons/small/emblem-system.png +0 -0
  481. data/static/icons/small/emblem-unreadable.png +0 -0
  482. data/static/icons/small/face-angel.png +0 -0
  483. data/static/icons/small/face-crying.png +0 -0
  484. data/static/icons/small/face-devil-grin.png +0 -0
  485. data/static/icons/small/face-glasses.png +0 -0
  486. data/static/icons/small/face-grin.png +0 -0
  487. data/static/icons/small/face-kiss.png +0 -0
  488. data/static/icons/small/face-monkey.png +0 -0
  489. data/static/icons/small/face-plain.png +0 -0
  490. data/static/icons/small/face-sad.png +0 -0
  491. data/static/icons/small/face-smile-big.png +0 -0
  492. data/static/icons/small/face-smile.png +0 -0
  493. data/static/icons/small/face-surprise.png +0 -0
  494. data/static/icons/small/face-wink.png +0 -0
  495. data/static/icons/small/folder-drag-accept.png +0 -0
  496. data/static/icons/small/folder-new.png +0 -0
  497. data/static/icons/small/folder-open.png +0 -0
  498. data/static/icons/small/folder-remote.png +0 -0
  499. data/static/icons/small/folder-saved-search.png +0 -0
  500. data/static/icons/small/folder-visiting.png +0 -0
  501. data/static/icons/small/folder.png +0 -0
  502. data/static/icons/small/font-x-generic.png +0 -0
  503. data/static/icons/small/format-indent-less.png +0 -0
  504. data/static/icons/small/format-indent-more.png +0 -0
  505. data/static/icons/small/format-justify-center.png +0 -0
  506. data/static/icons/small/format-justify-fill.png +0 -0
  507. data/static/icons/small/format-justify-left.png +0 -0
  508. data/static/icons/small/format-justify-right.png +0 -0
  509. data/static/icons/small/format-text-bold.png +0 -0
  510. data/static/icons/small/format-text-italic.png +0 -0
  511. data/static/icons/small/format-text-strikethrough.png +0 -0
  512. data/static/icons/small/format-text-underline.png +0 -0
  513. data/static/icons/small/go-bottom.png +0 -0
  514. data/static/icons/small/go-down.png +0 -0
  515. data/static/icons/small/go-first.png +0 -0
  516. data/static/icons/small/go-home.png +0 -0
  517. data/static/icons/small/go-jump.png +0 -0
  518. data/static/icons/small/go-last.png +0 -0
  519. data/static/icons/small/go-next.png +0 -0
  520. data/static/icons/small/go-previous.png +0 -0
  521. data/static/icons/small/go-top.png +0 -0
  522. data/static/icons/small/go-up.png +0 -0
  523. data/static/icons/small/help-browser.png +0 -0
  524. data/static/icons/small/image-gif.png +0 -0
  525. data/static/icons/small/image-jpeg.png +0 -0
  526. data/static/icons/small/image-loading.png +0 -0
  527. data/static/icons/small/image-missing.png +0 -0
  528. data/static/icons/small/image-png.png +0 -0
  529. data/static/icons/small/image-x-generic.png +0 -0
  530. data/static/icons/small/input-gaming.png +0 -0
  531. data/static/icons/small/input-keyboard.png +0 -0
  532. data/static/icons/small/input-mouse.png +0 -0
  533. data/static/icons/small/internet-group-chat.png +0 -0
  534. data/static/icons/small/internet-mail.png +0 -0
  535. data/static/icons/small/internet-news-reader.png +0 -0
  536. data/static/icons/small/internet-web-browser.png +0 -0
  537. data/static/icons/small/list-add.png +0 -0
  538. data/static/icons/small/list-remove.png +0 -0
  539. data/static/icons/small/locked.png +0 -0
  540. data/static/icons/small/mail-attachment.png +0 -0
  541. data/static/icons/small/mail-forward.png +0 -0
  542. data/static/icons/small/mail-mark-junk.png +0 -0
  543. data/static/icons/small/mail-mark-not-junk.png +0 -0
  544. data/static/icons/small/mail-message-new.png +0 -0
  545. data/static/icons/small/mail-reply-all.png +0 -0
  546. data/static/icons/small/mail-reply-sender.png +0 -0
  547. data/static/icons/small/mail-send-receive.png +0 -0
  548. data/static/icons/small/media-eject.png +0 -0
  549. data/static/icons/small/media-flash.png +0 -0
  550. data/static/icons/small/media-floppy.png +0 -0
  551. data/static/icons/small/media-optical.png +0 -0
  552. data/static/icons/small/media-playback-pause.png +0 -0
  553. data/static/icons/small/media-playback-start.png +0 -0
  554. data/static/icons/small/media-playback-stop.png +0 -0
  555. data/static/icons/small/media-record.png +0 -0
  556. data/static/icons/small/media-seek-backward.png +0 -0
  557. data/static/icons/small/media-seek-forward.png +0 -0
  558. data/static/icons/small/media-skip-backward.png +0 -0
  559. data/static/icons/small/media-skip-forward.png +0 -0
  560. data/static/icons/small/multimedia-player.png +0 -0
  561. data/static/icons/small/network-error.png +0 -0
  562. data/static/icons/small/network-idle.png +0 -0
  563. data/static/icons/small/network-offline.png +0 -0
  564. data/static/icons/small/network-receive.png +0 -0
  565. data/static/icons/small/network-server.png +0 -0
  566. data/static/icons/small/network-transmit-receive.png +0 -0
  567. data/static/icons/small/network-transmit.png +0 -0
  568. data/static/icons/small/network-wired.png +0 -0
  569. data/static/icons/small/network-wireless-encrypted.png +0 -0
  570. data/static/icons/small/network-wireless.png +0 -0
  571. data/static/icons/small/network-workgroup.png +0 -0
  572. data/static/icons/small/office-calendar.png +0 -0
  573. data/static/icons/small/package-x-generic.png +0 -0
  574. data/static/icons/small/preferences-desktop-accessibility.png +0 -0
  575. data/static/icons/small/preferences-desktop-assistive-technology.png +0 -0
  576. data/static/icons/small/preferences-desktop-font.png +0 -0
  577. data/static/icons/small/preferences-desktop-keyboard-shortcuts.png +0 -0
  578. data/static/icons/small/preferences-desktop-locale.png +0 -0
  579. data/static/icons/small/preferences-desktop-peripherals.png +0 -0
  580. data/static/icons/small/preferences-desktop-remote-desktop.png +0 -0
  581. data/static/icons/small/preferences-desktop-screensaver.png +0 -0
  582. data/static/icons/small/preferences-desktop-sound.png +0 -0
  583. data/static/icons/small/preferences-desktop-theme.png +0 -0
  584. data/static/icons/small/preferences-desktop-wallpaper.png +0 -0
  585. data/static/icons/small/preferences-desktop.png +0 -0
  586. data/static/icons/small/preferences-system-network-proxy.png +0 -0
  587. data/static/icons/small/preferences-system-session.png +0 -0
  588. data/static/icons/small/preferences-system-windows.png +0 -0
  589. data/static/icons/small/preferences-system.png +0 -0
  590. data/static/icons/small/printer-error.png +0 -0
  591. data/static/icons/small/printer.png +0 -0
  592. data/static/icons/small/process-stop.png +0 -0
  593. data/static/icons/small/process-working.png +0 -0
  594. data/static/icons/small/start-here.png +0 -0
  595. data/static/icons/small/system-file-manager.png +0 -0
  596. data/static/icons/small/system-installer.png +0 -0
  597. data/static/icons/small/system-lock-screen.png +0 -0
  598. data/static/icons/small/system-log-out.png +0 -0
  599. data/static/icons/small/system-search.png +0 -0
  600. data/static/icons/small/system-shutdown.png +0 -0
  601. data/static/icons/small/system-software-update.png +0 -0
  602. data/static/icons/small/system-users.png +0 -0
  603. data/static/icons/small/tab-new.png +0 -0
  604. data/static/icons/small/text-css.png +0 -0
  605. data/static/icons/small/text-html.png +0 -0
  606. data/static/icons/small/text-plain.png +0 -0
  607. data/static/icons/small/text-vnd.wap.wml.png +0 -0
  608. data/static/icons/small/text-x-c++src.png +0 -0
  609. data/static/icons/small/text-x-chdr.png +0 -0
  610. data/static/icons/small/text-x-cppsrc.png +0 -0
  611. data/static/icons/small/text-x-csh.png +0 -0
  612. data/static/icons/small/text-x-csrc.png +0 -0
  613. data/static/icons/small/text-x-generic-template.png +0 -0
  614. data/static/icons/small/text-x-generic.png +0 -0
  615. data/static/icons/small/text-x-java.png +0 -0
  616. data/static/icons/small/text-x-perl.png +0 -0
  617. data/static/icons/small/text-x-python.png +0 -0
  618. data/static/icons/small/text-x-script.png +0 -0
  619. data/static/icons/small/text-x-sh.png +0 -0
  620. data/static/icons/small/text-x-tex.png +0 -0
  621. data/static/icons/small/text-x-vcalendar.png +0 -0
  622. data/static/icons/small/text-x-vcard.png +0 -0
  623. data/static/icons/small/text-x-zsh.png +0 -0
  624. data/static/icons/small/text.png +0 -0
  625. data/static/icons/small/unlocked.png +0 -0
  626. data/static/icons/small/user-desktop.png +0 -0
  627. data/static/icons/small/user-home.png +0 -0
  628. data/static/icons/small/user-trash-full.png +0 -0
  629. data/static/icons/small/user-trash.png +0 -0
  630. data/static/icons/small/utilities-system-monitor.png +0 -0
  631. data/static/icons/small/utilities-terminal.png +0 -0
  632. data/static/icons/small/video-display.png +0 -0
  633. data/static/icons/small/video-mpeg.png +0 -0
  634. data/static/icons/small/video-quicktime.png +0 -0
  635. data/static/icons/small/video-x-generic.png +0 -0
  636. data/static/icons/small/video-x-ms-wmv.png +0 -0
  637. data/static/icons/small/video.png +0 -0
  638. data/static/icons/small/view-fullscreen.png +0 -0
  639. data/static/icons/small/view-refresh.png +0 -0
  640. data/static/icons/small/weather-clear-night.png +0 -0
  641. data/static/icons/small/weather-clear.png +0 -0
  642. data/static/icons/small/weather-few-clouds-night.png +0 -0
  643. data/static/icons/small/weather-few-clouds.png +0 -0
  644. data/static/icons/small/weather-overcast.png +0 -0
  645. data/static/icons/small/weather-severe-alert.png +0 -0
  646. data/static/icons/small/weather-showers-scattered.png +0 -0
  647. data/static/icons/small/weather-showers.png +0 -0
  648. data/static/icons/small/weather-snow.png +0 -0
  649. data/static/icons/small/weather-storm.png +0 -0
  650. data/static/icons/small/window-new.png +0 -0
  651. data/static/icons/small/x-font-afm.png +0 -0
  652. data/static/icons/small/x-office-address-book.png +0 -0
  653. data/static/icons/small/x-office-calendar.png +0 -0
  654. data/static/icons/small/x-office-document-template.png +0 -0
  655. data/static/icons/small/x-office-document.png +0 -0
  656. data/static/icons/small/x-office-drawing-template.png +0 -0
  657. data/static/icons/small/x-office-drawing.png +0 -0
  658. data/static/icons/small/x-office-presentation-template.png +0 -0
  659. data/static/icons/small/x-office-presentation.png +0 -0
  660. data/static/icons/small/x-office-spreadsheet-template.png +0 -0
  661. data/static/icons/small/x-office-spreadsheet.png +0 -0
  662. data/static/icons/tiny/blank.png +0 -0
  663. data/static/icons/tiny/go-down.png +0 -0
  664. data/static/icons/tiny/go-down.svg +199 -0
  665. data/static/icons/tiny/go-up.png +0 -0
  666. data/static/icons/tiny/go-up.svg +195 -0
  667. data/static/icons/tiny/sort-ascending.png +0 -0
  668. data/static/icons/tiny/sort-ascending.svg +308 -0
  669. data/static/icons/tiny/sort-descending.png +0 -0
  670. data/static/icons/tiny/sort-descending.svg +308 -0
  671. data/static/js/administration.js +306 -0
  672. data/static/js/engine.js +414 -0
  673. data/static/js/jquery/base64.js +133 -0
  674. data/static/js/jquery/jquery-ui.min.js +6 -0
  675. data/static/js/jquery/jquery.min.js +2 -0
  676. data/static/js/jquery/printf.js +155 -0
  677. data/static/styles/AdwaitaSans-Latin.woff2 +0 -0
  678. data/static/styles/AdwaitaSans-Regular.ttf +0 -0
  679. data/static/styles/AdwaitaSans-Regular.ttf.License +96 -0
  680. data/static/styles/CEWebS.ico +0 -0
  681. data/static/styles/content.css +757 -0
  682. data/static/styles/fullplain.css +6 -0
  683. data/static/styles/jquery-ui/custom.css +75 -0
  684. data/static/styles/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  685. data/static/styles/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  686. data/static/styles/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  687. data/static/styles/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  688. data/static/styles/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  689. data/static/styles/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  690. data/static/styles/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
  691. data/static/styles/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
  692. data/static/styles/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
  693. data/static/styles/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
  694. data/static/styles/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
  695. data/static/styles/jquery-ui/jquery-ui.css +1312 -0
  696. data/static/styles/plain.css +246 -0
  697. data/static/styles/plain_ohne.css +6 -0
  698. data/static/styles/print.css +28 -0
  699. data/static/styles/uni.compact.css +262 -0
  700. data/static/styles/uni.css +299 -0
  701. data/static/styles/uni_big.css +5 -0
  702. data/tools/cewebs-transformationengine +98 -0
  703. metadata +785 -0
@@ -0,0 +1,414 @@
1
+ // Please see the LICENSE.GPL file for copyright and distribution information
2
+ //
3
+ // index.html?t={target}&c={command}&CEWebS_{parameter}=... content of a service
4
+ // index.html?m={LOGIN|EMAIL|CHANGE|REPORT|ADMIN...} pages of the engine
5
+ var CEWebS = (function() {
6
+ // links and forms lead to index.html
7
+ if (location.pathname.endsWith('/')) history.replaceState(null, '', 'index.html' + location.search + location.hash);
8
+ // one engine for all sites, the name of a site is its path with : instead of /
9
+ var engine = '/CEWebSEngine/' + (location.pathname.split('/').slice(1, -1).join(':') || ':') + '/';
10
+ var page;
11
+ // speed of the last request (only for administrators), and when loading began
12
+ var times, began = 0;
13
+ var loaded = {};
14
+ var bundles = {
15
+ jquery: ['jquery.min', 'jquery-ui.min', 'base64', 'printf'].map(function(f) { return 'jquery/' + f + '.js'; })
16
+ };
17
+
18
+ // element, attributes starting with on are event handlers, html is markup
19
+ function el(name, attributes, children) {
20
+ var ret = document.createElement(name);
21
+ Object.entries(attributes || {}).forEach(function([key, value]) {
22
+ if (value === null || value === undefined || value === false) return;
23
+ if (key == 'html') ret.innerHTML = value;
24
+ else if (key.startsWith('on')) ret.addEventListener(key.substring(2), value);
25
+ else ret.setAttribute(key, value);
26
+ });
27
+ [].concat(children === undefined ? [] : children).forEach(function(c) { if (c !== null) ret.append(c); });
28
+ return ret;
29
+ }
30
+ function id(name) { return document.getElementById(name); }
31
+ function value(node, path) {
32
+ var ret = node.querySelector(':scope > ' + path);
33
+ return ret ? ret.textContent : '';
34
+ }
35
+ function all(node, path) { return Array.from(node.querySelectorAll(':scope > ' + path)); }
36
+ function string(name) { return value(page, 'strings > ' + name); }
37
+ // for buttons and attributes
38
+ function plain(markup) { return new DOMParser().parseFromString(markup, 'text/html').body.textContent; }
39
+ function text(name) { return plain(string(name)); }
40
+
41
+ // data is FormData or an object, errors have a status. started is a fetch that is already running
42
+ async function request(method, path, data, started) {
43
+ var options = { method: method, credentials: 'same-origin' };
44
+ if (data) options.body = data instanceof FormData || data instanceof URLSearchParams ? data : new URLSearchParams(data);
45
+ var response = await (started || fetch(engine + path, options));
46
+ var body = await response.text();
47
+ times = response.headers.get('Server-Timing');
48
+ if (!response.ok) throw Object.assign(new Error(response.status == 429 ? text('blocked') : body), { status: response.status });
49
+ if (!(response.headers.get('Content-Type') || '').startsWith('text/xml')) return body;
50
+ return new DOMParser().parseFromString(body, 'text/xml').documentElement;
51
+ }
52
+
53
+ function show(children, title) {
54
+ id('content').replaceChildren.apply(id('content'), [].concat(title ? el('h1', { html: title }) : [], children));
55
+ }
56
+ function error(e) { show(el('div', { class: 'urgent' }, e.message)); }
57
+
58
+ /* ---- layout ---- */
59
+
60
+ function peg(href, label, title, post) { return ['[', el('a', { href: href, title: title, 'data-post': post, html: label }), '] ']; }
61
+
62
+ // the body is hidden until its stylesheet is loaded
63
+ async function layout() {
64
+ await new Promise(function(done) {
65
+ document.head.append(el('link', { rel: 'stylesheet', media: 'screen', href: 'static/styles/' + value(page, 'style') + '.css', onload: done, onerror: done }));
66
+ });
67
+ document.body.hidden = false;
68
+ document.title = text('name');
69
+ // %Y is the current year
70
+ ['title1', 'title2', 'youarehere', 'contact'].forEach(function(n) { id(n).innerHTML = string(n).replace('%Y', new Date().getFullYear()); });
71
+ var user = page.querySelector(':scope > user');
72
+ var nav = [];
73
+ if (user) {
74
+ var role = value(user, 'role');
75
+ if (role == 'true' || role == 'limited') nav.push(peg('?m=REPORT', string('report')));
76
+ if (role == 'true') nav.push(peg('?m=ADMIN', string('administration')));
77
+ nav.push(peg('?m=CHANGE', string('change')));
78
+ nav.push(['[', el('a', { href: '#', title: value(user, 'name'), html: string('logout'), onclick: logout }), ']']);
79
+ } else {
80
+ nav.push(peg('?m=LOGIN', string('login')));
81
+ }
82
+ id('hnav').append.apply(id('hnav'), nav.flat());
83
+ document.querySelector('#header .search').replaceChildren(el('form', { action: 'index.html' }, [
84
+ el('input', { type: 'hidden', name: 'm', value: 'SEARCH' }),
85
+ el('input', { type: 'text', name: 'search', placeholder: text('search'), value: new URLSearchParams(location.search).get('search') })
86
+ ]));
87
+ }
88
+
89
+ // a service that is opened directly belongs to the last menu point, mode is a page of the engine
90
+ function menu(target, mode) {
91
+ var key = 'cewebs_active' + location.pathname;
92
+ var points = Array.from(page.querySelectorAll('menu point'));
93
+ function find(name) { return points.find(function(p) { return p.getAttribute('name') == name; }); }
94
+ if (find(target)) sessionStorage.setItem(key, target);
95
+ var active = sessionStorage.getItem(key);
96
+ var visible = !mode && target != 'CEWebSInternalReport';
97
+ function build(points) {
98
+ return points.map(function(p) {
99
+ var name = p.getAttribute('name');
100
+ var service = p.getAttribute('service');
101
+ if (service == 'spacer') return el('li', { class: 'spacer' }, ' ');
102
+ var label = value(p, 'text');
103
+ var href = service == 'hyperlink' ? value(p, 'command') : '?t=' + name;
104
+ var children = all(p, 'point');
105
+ var cls = ['menu'];
106
+ if (visible && name == active) cls.push('theActiveMenuPoint');
107
+ if (visible && children.some(function(c) { return c.getAttribute('name') == active; })) cls.push('theParentActiveMenuPoint');
108
+ return el('li', { class: cls.join(' ') }, [
109
+ service == 'plain' ? label : el('a', { href: href, target: service == 'hyperlink' ? '_blank' : null }, label),
110
+ children.length > 0 ? el('ul', {}, build(children)) : null
111
+ ]);
112
+ });
113
+ }
114
+ id('points').replaceChildren.apply(id('points'), build(all(page, 'menu > point')));
115
+
116
+ var point = find(active);
117
+ document.title = text('name') + (point ? ' - ' + value(point, 'text') : '');
118
+ var crumbs = [];
119
+ if (/^ADMIN/.test(mode) || target == 'CEWebSInternalAdministration') {
120
+ crumbs.push(el('a', { href: '?m=ADMIN', html: string('administration') }));
121
+ } else if (mode == 'REPORT' || target == 'CEWebSInternalReport') {
122
+ crumbs.push(el('a', { href: '?m=REPORT', html: string('report') }));
123
+ } else if (!mode && !find(target) && value(page, 'target > description')) {
124
+ crumbs.push(value(page, 'target > description'));
125
+ } else {
126
+ for (var p = point; p && p.nodeName == 'point'; p = p.parentNode) {
127
+ var label = value(p, 'text');
128
+ crumbs.unshift(p.getAttribute('service') == 'plain' ? label : el('a', { href: '?t=' + p.getAttribute('name') }, label));
129
+ }
130
+ }
131
+ id('bread').replaceChildren.apply(id('bread'), crumbs.flatMap(function(c, i) { return i == 0 ? [c] : [' » ', c]; }));
132
+ }
133
+
134
+ /* ---- content of services ---- */
135
+
136
+ // loaded at the same time, executed in order
137
+ function load(src) {
138
+ return new Promise(function(resolve, reject) {
139
+ var script = el('script', { src: src, onload: resolve, onerror: reject });
140
+ script.async = false;
141
+ document.head.append(script);
142
+ });
143
+ }
144
+ // only for pages that need it
145
+ function bundle(name) {
146
+ if (!bundles[name]) return Promise.resolve();
147
+ if (!loaded[name]) {
148
+ if (name == 'jquery') {
149
+ document.head.append(el('link', { rel: 'stylesheet', href: 'static/styles/jquery-ui/jquery-ui.css' }));
150
+ document.head.append(el('link', { rel: 'stylesheet', href: 'static/styles/jquery-ui/custom.css' }));
151
+ }
152
+ loaded[name] = Promise.all(bundles[name].map(function(f) { return load('static/js/' + f); }));
153
+ }
154
+ return loaded[name];
155
+ }
156
+
157
+ // the time the engine needed, details are in the tooltip
158
+ function speed(times) {
159
+ var ms = {};
160
+ times.split(', ').forEach(function(t) { var parts = t.split(';dur='); ms[parts[0]] = Math.round(parts[1]); });
161
+ var lines = ['prepare', 'document', 'engine'].map(function(n) { return n + ': ' + ms[n] + 'ms' + (n == 'document' && 'cache' in ms ? ' (from cache)' : ''); });
162
+ lines.push('browser, total: ' + Math.round(performance.now() - began) + 'ms');
163
+ return el('span', { id: 'speed', title: lines.join('\n') }, '(' + ms.total + 'ms)');
164
+ }
165
+
166
+ async function display(doc) {
167
+ var measured = times;
168
+ var to = all(doc, 'headers').find(function(h) { return value(h, 'name') == 'Location'; });
169
+ if (to) {
170
+ var url = new URL(value(to, 'value'), location.href);
171
+ if (url.href == location.href) location.reload(); else location.assign(url);
172
+ return;
173
+ }
174
+ all(doc, 'links').forEach(function(l) {
175
+ document.head.append(el('link', { rel: value(l, 'rel'), type: value(l, 'type'), href: plain(value(l, 'href')) }));
176
+ });
177
+ var crumbs = all(doc, 'breadcrumbs');
178
+ crumbs.forEach(function(b) { id('bread').append(' » ', el('a', { href: plain(value(b, 'href')) }, value(b, 'text'))); });
179
+ var access = all(doc, 'access').flatMap(function(a) { return peg(plain(value(a, 'href')), el('span', {}, value(a, 'text')).innerHTML, null, value(a, 'post') || null); });
180
+ id('access').replaceChildren.apply(id('access'), access.length > 0 ? [el('span', {}, 'Quick Access:'), ' '].concat(access) : []);
181
+ id('content').innerHTML = value(doc, 'content');
182
+ // the content is already visible while its libraries are loaded
183
+ var scripts = id('content').querySelectorAll('script');
184
+ await bundle(value(doc, 'js'));
185
+ // scripts that are added as markup are not executed
186
+ scripts.forEach(function(old) {
187
+ var script = document.createElement('script');
188
+ Array.from(old.attributes).forEach(function(a) { script.setAttribute(a.name, a.value); });
189
+ script.textContent = old.textContent;
190
+ old.replaceWith(script);
191
+ });
192
+ id('contentcontainer').scrollTop = 0;
193
+ if (location.hash) {
194
+ var anchor = id(decodeURIComponent(location.hash.substring(1)));
195
+ if (anchor) anchor.scrollIntoView();
196
+ }
197
+ if (measured) id('access').append(speed(measured));
198
+ }
199
+
200
+ // requested while the layout is still loading, ready is when it can be shown
201
+ async function content(parameters, ready) {
202
+ var target = page.querySelector(':scope > target');
203
+ if (!target) {
204
+ await ready;
205
+ return show(el('div', {}, text('error')));
206
+ }
207
+ var command = parameters.get('c');
208
+ var query = new URLSearchParams(parameters);
209
+ if (!query.get('t')) query.set('t', value(target, 'name'));
210
+ if (!command) {
211
+ command = value(target, 'command');
212
+ new URLSearchParams(plain(value(target, 'parameters'))).forEach(function(v, k) { query.append(k, v); });
213
+ }
214
+ query.delete('c');
215
+ try {
216
+ var doc = await request('GET', 'content/document/' + encodeURIComponent(command) + '?' + query);
217
+ await ready;
218
+ await display(doc);
219
+ } catch (e) {
220
+ await ready;
221
+ if (e.status == 401) ask(login(function() { location.reload(); })); else error(e);
222
+ }
223
+ }
224
+
225
+ // forms that lead to a page are sent in the background
226
+ function intercept(form, submitter) {
227
+ var method = (form.getAttribute('method') || 'get').toLowerCase();
228
+ var url = new URL(form.getAttribute('action') || '', location.href);
229
+ if (method != 'post' || url.pathname != location.pathname || !url.searchParams.get('c')) return false;
230
+ var data = new FormData(form, submitter || undefined);
231
+ if (form.getAttribute('enctype') != 'multipart/form-data') data = new URLSearchParams(data);
232
+ var query = new URLSearchParams(url.search);
233
+ query.delete('c');
234
+ function send() {
235
+ began = performance.now();
236
+ return request('POST', 'content/document/' + encodeURIComponent(url.searchParams.get('c')) + '?' + query, data).then(function(doc) {
237
+ menu(url.searchParams.get('t'));
238
+ return display(doc);
239
+ }).catch(function(e) {
240
+ // keep what has been entered
241
+ if (e.status != 401) return alert(e.message);
242
+ var box = login(function() { box.remove(); send(); });
243
+ id('content').prepend(box);
244
+ box.scrollIntoView();
245
+ });
246
+ }
247
+ send();
248
+ return true;
249
+ }
250
+ var submit = HTMLFormElement.prototype.submit;
251
+ HTMLFormElement.prototype.submit = function() { if (!intercept(this)) submit.call(this); };
252
+ // after the handlers of the form itself
253
+ window.addEventListener('submit', function(event) {
254
+ if (!event.defaultPrevented && intercept(event.target, event.submitter)) event.preventDefault();
255
+ });
256
+ // links that change something are sent like forms
257
+ window.addEventListener('click', function(event) {
258
+ var link = event.target.closest('a[data-post]');
259
+ if (!link || event.defaultPrevented) return;
260
+ event.preventDefault();
261
+ intercept(el('form', { method: 'post', action: link.getAttribute('href') }));
262
+ });
263
+
264
+ /* ---- users ---- */
265
+
266
+ // the last field of a form has a button
267
+ function field(label, name, type, size, button) {
268
+ return el('tr', {}, [
269
+ el('td', { class: 'margin-right-huge align-vertical-center', html: label + ':' }),
270
+ el('td', { class: 'margin-right-huge' }, el('input', { name: name, type: type, size: size, maxlength: 50 })),
271
+ button ? el('td', {}, el('input', { type: 'submit', value: text(button) })) : null
272
+ ]);
273
+ }
274
+ function choice(name, value, label, checked) {
275
+ return el('tr', {}, [
276
+ el('td', { class: 'margin-right-huge align-vertical-center' }, el('input', { name: name, type: 'radio', value: value, checked: checked })),
277
+ el('td', { class: 'align-vertical-center', html: label })
278
+ ]);
279
+ }
280
+ // form that is processed by a function, which returns a message
281
+ function form(children, process) {
282
+ var message = el('div', { class: 'urgent' });
283
+ return el('form', {
284
+ onsubmit: async function(event) {
285
+ event.preventDefault();
286
+ message.innerHTML = await process(new FormData(event.target)) || '';
287
+ }
288
+ }, [message].concat(children));
289
+ }
290
+ function ask(children) {
291
+ show(children);
292
+ id('content').querySelector('input').focus();
293
+ }
294
+
295
+ function login(success) {
296
+ return el('div', {}, [
297
+ el('div', { class: 'margin-bottom-huge', html: string('info') }),
298
+ form([
299
+ el('table', { class: 'margin-bottom-huge' }, [field(string('username'), 'user', 'text', 30), field(string('password'), 'password', 'password', 30, 'identify')]),
300
+ el('table', {}, [choice('permanent', 'false', string('public'), 'checked'), choice('permanent', 'true', string('home'))])
301
+ ], async function(data) {
302
+ try {
303
+ await request('POST', 'session', { user: data.get('user'), password: data.get('password'), permanent: data.get('permanent') });
304
+ success();
305
+ } catch (e) {
306
+ return e.status == 403 ? string('failed') : e.message;
307
+ }
308
+ })
309
+ ]);
310
+ }
311
+ async function logout(event) {
312
+ event.preventDefault();
313
+ await request('DELETE', 'session');
314
+ location.assign('index.html');
315
+ }
316
+
317
+ var pages = {
318
+ LOGIN: function() { ask(login(function() { location.assign('index.html'); })); },
319
+ EMAIL: function() {
320
+ ask([
321
+ el('div', { class: 'margin-bottom-huge', html: string('sendinfo') }),
322
+ form(el('table', {}, field(string('username'), 'user', 'text', 20, 'send')), async function(data) {
323
+ if (!data.get('user').trim()) return alert(text('fieldsemptyerror'));
324
+ try {
325
+ await request('POST', 'password', { user: data.get('user') });
326
+ show(el('div', { html: string('sendthanks') }));
327
+ } catch (e) {
328
+ return e.status == 404 ? string('sendnotfound') : e.message;
329
+ }
330
+ })
331
+ ]);
332
+ },
333
+ // the link in the email
334
+ RESET: function() {
335
+ ask(form(el('table', {}, [
336
+ field(string('newpassword'), 'new', 'password', 20),
337
+ field(string('repeatpassword'), 'repeat', 'password', 20, 'identify')
338
+ ]), async function(data) {
339
+ if (['new', 'repeat'].some(function(n) { return !data.get(n).trim(); })) return alert(text('fieldsemptyerror'));
340
+ if (data.get('new') != data.get('repeat')) return alert(text('notthesamepasserror'));
341
+ try {
342
+ await request('PUT', 'reset', { token: location.hash.substring(1), 'new': data.get('new') });
343
+ show(el('div', { html: string('passchangethanks') }));
344
+ } catch (e) {
345
+ return e.status == 403 ? string('sendinvalid') : e.message;
346
+ }
347
+ }));
348
+ },
349
+ CHANGE: function() {
350
+ ask([
351
+ el('div', { class: 'margin-bottom-huge', html: string('passchangeinfo') }),
352
+ form(el('table', { class: 'margin-bottom-huge' }, [
353
+ field(string('oldpassword'), 'old', 'password', 20),
354
+ field(string('newpassword'), 'new', 'password', 20),
355
+ field(string('repeatpassword'), 'repeat', 'password', 20, 'identify')
356
+ ]), async function(data) {
357
+ if (['old', 'new', 'repeat'].some(function(n) { return !data.get(n).trim(); })) return alert(text('fieldsemptyerror'));
358
+ if (data.get('new') != data.get('repeat')) return alert(text('notthesamepasserror'));
359
+ try {
360
+ await request('PUT', 'password', { old: data.get('old'), 'new': data.get('new') });
361
+ show(el('div', { html: string('passchangethanks') }));
362
+ } catch (e) {
363
+ return e.status == 403 ? string('passchangeerror') : e.message;
364
+ }
365
+ })
366
+ ]);
367
+ },
368
+ SEARCH: async function() {
369
+ var search = new URLSearchParams(location.search).get('search') || '';
370
+ var hits = all(await request('GET', 'search?' + new URLSearchParams({ q: search })), 'item');
371
+ show([
372
+ el('h1', {}, text('searchresults').replace('%s', function() { return search; })),
373
+ hits.length == 0 ? el('em', { html: string('nosearchresults') }) : el('ol', { style: 'counter-reset: item 0;' }, hits.map(function(h) {
374
+ return el('li', { style: 'counter-increment: item 1;' }, [el('strong', {}, value(h, 'service')), ': ', el('a', { href: value(h, 'href') }, value(h, 'description'))]);
375
+ }))
376
+ ]);
377
+ },
378
+ REPORT: async function() {
379
+ var services = all(await request('GET', 'reports'), 'service');
380
+ show([
381
+ el('p', { html: string('reports_desc') }),
382
+ el('ul', {}, services.map(function(s) {
383
+ return el('li', {}, [
384
+ el('span', { html: string('reportsfor') }), ' ',
385
+ el('a', { href: '?t=CEWebSInternalReport&c=show&CEWebS_t=' + s.getAttribute('name') }, value(s, 'comment'))
386
+ ]);
387
+ }))
388
+ ], string('reports'));
389
+ }
390
+ };
391
+
392
+ async function start() {
393
+ var parameters = new URLSearchParams(location.search);
394
+ var target = parameters.get('t') || '';
395
+ try {
396
+ page = await request('GET', 'page?' + new URLSearchParams({ t: target }), null, window.CEWebS_page);
397
+ var name = parameters.get('m');
398
+ var mode = pages[name] || CEWebS_Administration[name];
399
+ var ready = layout().then(function() { menu(mode ? '' : target || value(page, 'target > name'), mode ? name : ''); });
400
+ if (mode) {
401
+ await ready;
402
+ await mode(CEWebS);
403
+ } else {
404
+ await content(parameters, ready);
405
+ }
406
+ } catch (e) {
407
+ document.body.hidden = false;
408
+ if (page && e.status == 401) ask(login(function() { location.reload(); })); else error(e);
409
+ }
410
+ }
411
+ document.addEventListener('DOMContentLoaded', start);
412
+
413
+ return { el: el, all: all, value: value, string: string, text: text, plain: plain, request: request, show: show, bundle: bundle };
414
+ })();
@@ -0,0 +1,133 @@
1
+ var Base64 = {
2
+ // private property
3
+ _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
4
+
5
+ // public method for encoding
6
+ encode : function (input) {
7
+ var output = "";
8
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
9
+ var i = 0;
10
+
11
+ input = Base64._utf8_encode(input);
12
+
13
+ while (i < input.length) {
14
+
15
+ chr1 = input.charCodeAt(i++);
16
+ chr2 = input.charCodeAt(i++);
17
+ chr3 = input.charCodeAt(i++);
18
+
19
+ enc1 = chr1 >> 2;
20
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
21
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
22
+ enc4 = chr3 & 63;
23
+
24
+ if (isNaN(chr2)) {
25
+ enc3 = enc4 = 64;
26
+ } else if (isNaN(chr3)) {
27
+ enc4 = 64;
28
+ }
29
+
30
+ output = output +
31
+ this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
32
+ this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
33
+
34
+ }
35
+
36
+ return output;
37
+ },
38
+
39
+ // public method for decoding
40
+ decode : function (input) {
41
+ var output = "";
42
+ var chr1, chr2, chr3;
43
+ var enc1, enc2, enc3, enc4;
44
+ var i = 0;
45
+
46
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
47
+
48
+ while (i < input.length) {
49
+
50
+ enc1 = this._keyStr.indexOf(input.charAt(i++));
51
+ enc2 = this._keyStr.indexOf(input.charAt(i++));
52
+ enc3 = this._keyStr.indexOf(input.charAt(i++));
53
+ enc4 = this._keyStr.indexOf(input.charAt(i++));
54
+
55
+ chr1 = (enc1 << 2) | (enc2 >> 4);
56
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
57
+ chr3 = ((enc3 & 3) << 6) | enc4;
58
+
59
+ output = output + String.fromCharCode(chr1);
60
+
61
+ if (enc3 != 64) {
62
+ output = output + String.fromCharCode(chr2);
63
+ }
64
+ if (enc4 != 64) {
65
+ output = output + String.fromCharCode(chr3);
66
+ }
67
+
68
+ }
69
+
70
+ output = Base64._utf8_decode(output);
71
+
72
+ return output;
73
+
74
+ },
75
+
76
+ // private method for UTF-8 encoding
77
+ _utf8_encode : function (string) {
78
+ string = string.replace(/\r\n/g,"\n");
79
+ var utftext = "";
80
+
81
+ for (var n = 0; n < string.length; n++) {
82
+
83
+ var c = string.charCodeAt(n);
84
+
85
+ if (c < 128) {
86
+ utftext += String.fromCharCode(c);
87
+ }
88
+ else if((c > 127) && (c < 2048)) {
89
+ utftext += String.fromCharCode((c >> 6) | 192);
90
+ utftext += String.fromCharCode((c & 63) | 128);
91
+ }
92
+ else {
93
+ utftext += String.fromCharCode((c >> 12) | 224);
94
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
95
+ utftext += String.fromCharCode((c & 63) | 128);
96
+ }
97
+
98
+ }
99
+
100
+ return utftext;
101
+ },
102
+
103
+ // private method for UTF-8 decoding
104
+ _utf8_decode : function (utftext) {
105
+ var string = "";
106
+ var i = 0;
107
+ var c = c1 = c2 = 0;
108
+
109
+ while ( i < utftext.length ) {
110
+
111
+ c = utftext.charCodeAt(i);
112
+
113
+ if (c < 128) {
114
+ string += String.fromCharCode(c);
115
+ i++;
116
+ }
117
+ else if((c > 191) && (c < 224)) {
118
+ c2 = utftext.charCodeAt(i+1);
119
+ string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
120
+ i += 2;
121
+ }
122
+ else {
123
+ c2 = utftext.charCodeAt(i+1);
124
+ c3 = utftext.charCodeAt(i+2);
125
+ string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
126
+ i += 3;
127
+ }
128
+
129
+ }
130
+
131
+ return string;
132
+ }
133
+ }