added et2-date-timeonly_ro widget

This commit is contained in:
ralf 2022-02-24 19:44:30 +02:00
parent 045d034891
commit c83b281aa9
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,27 @@
/**
* EGroupware eTemplate2 - Readonly date+time WebComponent
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api
* @link https://www.egroupware.org
* @author Nathan Gray
*/
import {formatTime, parseDateTime} from "./Et2Date";
import {Et2DateReadonly} from "./Et2DateReadonly";
/**
* This is a stripped-down read-only widget used in nextmatch
*/
export class Et2DateTimeOnlyReadonly extends Et2DateReadonly
{
constructor()
{
super();
this.parser = parseDateTime;
this.formatter = formatTime;
}
}
// @ts-ignore TypeScript is not recognizing that Et2Date is a LitElement
customElements.define("et2-date-timeonly_ro", Et2DateTimeOnlyReadonly);

View File

@ -32,6 +32,7 @@ import './Et2Date/Et2DateReadonly';
import './Et2Date/Et2DateSinceReadonly';
import './Et2Date/Et2DateTime';
import './Et2Date/Et2DateTimeOnly';
import './Et2Date/Et2DateTimeOnlyReadonly';
import './Et2Date/Et2DateTimeReadonly';
import './Et2Date/Et2DateTimeToday';
import './Et2Description/Et2Description';
@ -1568,4 +1569,4 @@ if(typeof window.etemplate2 === 'undefined')
// Calls etemplate2_handle_response in the context of the object which
// requested the response from the server
egw(window).registerJSONPlugin(etemplate2.handle_load, null, 'et2_load');
egw(window).registerJSONPlugin(etemplate2.handle_validation_error, null, 'et2_validation_error');
egw(window).registerJSONPlugin(etemplate2.handle_validation_error, null, 'et2_validation_error');