From 582793d52b0571f260632d45634f2feab7f8733b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 3 Sep 2021 11:28:22 +0200 Subject: [PATCH] Revert "Bring web-component work into master branch" To many things are not working :( - addressbook, infolog, even timesheet index lacks at least r/o textbox and problably other widgets - smallPART (with many extra widgets) is completly unusable - *box widget seems not to skip empty boxes --> we need more testing and progress, before we can merge that This reverts commit 9cee681b944c3faaba0683b02c906be2354bdc74. --- api/etemplate.php | 123 - api/js/etemplate/Et2Box/Et2Box.ts | 97 - api/js/etemplate/Et2Box/test/Et2Box.test.ts | 32 - api/js/etemplate/Et2Button/Et2Button.ts | 183 - .../Et2Button/test/Et2Button.test.ts | 69 - .../Et2Colorpicker/Et2Colorpicker.ts | 40 - api/js/etemplate/Et2Date/Et2Date.ts | 187 - .../Et2InputWidget/Et2InputWidget.ts | 146 - .../Et2InputWidget/test/InputBase.test.ts | 39 - api/js/etemplate/Et2Textarea/Et2Textarea.ts | 83 - api/js/etemplate/Et2Textbox/Et2Textbox.ts | 49 - .../Et2Textbox/test/Et2Textbox.test.ts | 32 - .../Et2Textbox/test/Et2TextboxValues.test.ts | 34 - api/js/etemplate/Et2Widget/Et2Widget.ts | 910 --- api/js/etemplate/et2-button.ts | 21 + api/js/etemplate/et2_core_inheritance.ts | 486 +- api/js/etemplate/et2_core_inputWidget.ts | 72 +- api/js/etemplate/et2_core_widget.ts | 396 +- api/js/etemplate/et2_widget_description.ts | 8 +- api/js/etemplate/et2_widget_grid.ts | 329 +- api/js/etemplate/etemplate2.ts | 114 +- api/js/jsapi/egw_tooltip.js | 5 +- api/src/Etemplate/Widget/Button.php | 2 +- api/src/Etemplate/Widget/Date.php | 95 +- api/src/Etemplate/Widget/Template.php | 22 +- api/src/Etemplate/Widget/Textbox.php | 4 +- infolog/templates/default/edit.xet | 24 +- lit/index.html | 47 + lit/js/app.js | 11 + package-lock.json | 6178 +++++++---------- package.json | 18 +- rollup.config.js | 27 +- web-test-runner.config.mjs | 73 - 33 files changed, 3223 insertions(+), 6733 deletions(-) delete mode 100644 api/etemplate.php delete mode 100644 api/js/etemplate/Et2Box/Et2Box.ts delete mode 100644 api/js/etemplate/Et2Box/test/Et2Box.test.ts delete mode 100644 api/js/etemplate/Et2Button/Et2Button.ts delete mode 100644 api/js/etemplate/Et2Button/test/Et2Button.test.ts delete mode 100644 api/js/etemplate/Et2Colorpicker/Et2Colorpicker.ts delete mode 100644 api/js/etemplate/Et2Date/Et2Date.ts delete mode 100644 api/js/etemplate/Et2InputWidget/Et2InputWidget.ts delete mode 100644 api/js/etemplate/Et2InputWidget/test/InputBase.test.ts delete mode 100644 api/js/etemplate/Et2Textarea/Et2Textarea.ts delete mode 100644 api/js/etemplate/Et2Textbox/Et2Textbox.ts delete mode 100644 api/js/etemplate/Et2Textbox/test/Et2Textbox.test.ts delete mode 100644 api/js/etemplate/Et2Textbox/test/Et2TextboxValues.test.ts delete mode 100644 api/js/etemplate/Et2Widget/Et2Widget.ts create mode 100644 api/js/etemplate/et2-button.ts create mode 100644 lit/index.html create mode 100644 lit/js/app.js delete mode 100644 web-test-runner.config.mjs diff --git a/api/etemplate.php b/api/etemplate.php deleted file mode 100644 index c5dd4ac56a..0000000000 --- a/api/etemplate.php +++ /dev/null @@ -1,123 +0,0 @@ -/templates/default/.xet - * - * @link https://www.egroupware.org - * @author Ralf Becker - * @package api - * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License - */ - -use EGroupware\Api; - -// add et2- prefix to following widgets/tags -const ADD_ET2_PREFIX_REGEXP = '#<((/?)([vh]?box|textbox|textarea|button))(/?|\s[^>]*)>#m'; - -// switch evtl. set output-compression off, as we cant calculate a Content-Length header with transparent compression -ini_set('zlib.output_compression', 0); - -$GLOBALS['egw_info'] = array( - 'flags' => array( - 'currentapp' => 'api', - 'noheader' => true, - // miss-use session creation callback to send the template, in case we have no session - 'autocreate_session_callback' => 'send_template', - 'nocachecontrol' => true, - ) -); - -$start = microtime(true); -include '../header.inc.php'; - -send_template(); - -function send_template() -{ - $header_include = microtime(true); - - // release session, as we don't need it and it blocks parallel requests - $GLOBALS['egw']->session->commit_session(); - - header('Content-Type: application/xml; charset=UTF-8'); - - //$path = EGW_SERVER_ROOT.$_SERVER['PATH_INFO']; - // check for customized template in VFS - list(, $app, , $template, $name) = explode('/', $_SERVER['PATH_INFO']); - $path = Api\Etemplate::rel2path(Api\Etemplate::relPath($app . '.' . basename($name, '.xet'), $template)); - if(empty($path) || !file_exists($path) || !is_readable($path)) - { - http_response_code(404); - exit; - } - /* disable caching for now, as you need to delete the cache, once you change ADD_ET2_PREFIX_REGEXP - $cache = $GLOBALS['egw_info']['server']['temp_dir'].'/egw_cache/eT2-Cache-'.$GLOBALS['egw_info']['server']['install_id'].$_SERVER['PATH_INFO']; - if (file_exists($cache) && filemtime($cache) > filemtime($path) && - ($str = file_get_contents($cache)) !== false) - { - $cache_read = microtime(true); - } - else*/ - if(($str = file_get_contents($path)) !== false) - { - // fix -->