![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/formeditor/v0.0.3/ |
Upload File : |
<!DOCTYPE html> <html> <head> <meta charset="UTF8" /> <title>FormEditor</title> <link rel="stylesheet" href="//cdn.materialdesignicons.com/4.4.95/css/materialdesignicons.min.css"> <style> html, body, :root { padding: 0; margin: 0; /* height: 100%; */ height: 99.1%; width: 100%; border: none; } .form-editor-container { margin: 10px; width: calc(100% - 20px); height: calc(100% - 20px); box-sizing: border-box; } .form-editor-container>.as-form-editor { width: 100%; height: 100%; } </style> </head> <body> <script src="./absol/absol_form.js?"></script> <div class="form-editor-container"></div> <script> //\"([^\s]+)\"\s*: //\n$1 : var data = false && JSON.parse(localStorage.getItem('form-data') || 'false'); if (!data) { data = { tag: "RelativeLayout", style: { left: 0, right: 0, top: 0, bottom: 0, height: 800, width: 900, vAlign: "top", hAlign: "left" }, children: [ { tag: "CheckBox", style: { top: 5, left: 5 }, }, { tag: "CheckBox", style: { top: 25, left: 5 }, attributes: { checked: true } }, { tag: "Radio", style: { top: 5, left: 25 }, }, { tag: "Radio", style: { top: 25, left: 25 }, attributes: { checked: true } }, { tag: "TextInput", attributes: { value: "align: left, top" }, style: { left: 95, right: 0, top: 10, bottom: 0, height: 30, width: 252, hAlign: "left" } }, { tag: "Label", attributes: { text: "label-text" }, style: { left: 23, top: 19, bottom: 0, vAlign: 'top', hAlign: 'left', textHAlign: "center", textVAlign: 'center' } }, { tag: "Label", attributes: { text: "label-text-center" }, style: { left: 400, right: 0, top: 28, bottom: 0, hAlign: "center" } }, { tag: "NumberInput", attributes: { value: 9911 }, style: { left: 26, right: 0, top: 65, bottom: 0, height: 40, width: 312, hAlign: "left" } }, { tag: "ComboBox", attributes: { value: "align: right, top" }, style: { left: 0, right: 36, top: 23, bottom: 0, height: 36, width: 332, hAlign: "right", vAlign: "top" }, attributes: { list:Array(10).fill(0).map(function(u, i){ return {text:'item '+ i, value:i}}), value: 3 } }, { tag: "TextArea", attributes: { value: "fixed parent's width, height" }, style: { left: 66, right: 104, top: 158, bottom: 550, height: 30, width: 69, hAlign: "fixed", vAlign: "fixed" } }, { tag: "Text", attributes: { text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." }, style: { left: 132, right: 167, top: 0, bottom: 10, height: 129, width: 69, hAlign: "fixed", vAlign: "bottom" } }, { tag: "TextInput", attributes: { value: "align: right, bottom" }, style: { left: 0, right: 20, top: 0, bottom: 304, height: 196, width: 304, hAlign: "right", vAlign: "bottom" } }, { tag: "DateInput", attributes: { value: "2019-10-19T17:00:00.000Z" }, style: { left: 0, right: 0, top: 100, bottom: 0, height: 30, width: 200, vAlign: "top", hAlign: "center" } }, { tag: "TextInput", attributes: { value: "align: center, center" }, style: { left: 0, right: 0, top: 0, bottom: 0, height: 200, width: 200, vAlign: "center", hAlign: "center" } }] }; } var mFormEditor = new absol.form.FormEditor(); mFormEditor.getView().addTo(absol.$('.form-editor-container')); mFormEditor.start(); mFormEditor.setData(data); mFormEditor.on('change', function () { localStorage.setItem('form-data', JSON.stringify(this.getData())); }); </script> </body> </html>