From 5ab4d368305b0d3a13bd11d018ccb36fbf844f1f Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 12 Feb 2020 14:06:09 -0700 Subject: [PATCH] Fix button onclick attribute was not parsed into javascript --- api/js/etemplate/et2_widget_button.js | 3 ++- api/js/etemplate/et2_widget_button.ts | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/api/js/etemplate/et2_widget_button.js b/api/js/etemplate/et2_widget_button.js index 99370d07be..13fe2a5808 100644 --- a/api/js/etemplate/et2_widget_button.js +++ b/api/js/etemplate/et2_widget_button.js @@ -325,7 +325,8 @@ var et2_button = /** @class */ (function (_super) { "description": "Use this icon instead of hiding for read-only" }, "onclick": { - "description": "JS code which gets executed when the button is clicked" + "description": "JS code which gets executed when the button is clicked", + "type": "js" }, "accesskey": { "name": "Access Key", diff --git a/api/js/etemplate/et2_widget_button.ts b/api/js/etemplate/et2_widget_button.ts index eeb2224450..ca87766c94 100644 --- a/api/js/etemplate/et2_widget_button.ts +++ b/api/js/etemplate/et2_widget_button.ts @@ -15,10 +15,9 @@ */ import './et2_core_common'; -import { ClassWithAttributes } from "./et2_core_inheritance"; -import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget"; -import { et2_DOMWidget } from './et2_core_DOMWidget' -import { et2_baseWidget } from './et2_core_baseWidget' +import {ClassWithAttributes} from "./et2_core_inheritance"; +import {et2_createWidget, et2_register_widget, WidgetConfig} from "./et2_core_widget"; +import {et2_baseWidget} from './et2_core_baseWidget' import './et2_types'; /** @@ -44,7 +43,8 @@ export class et2_button extends et2_baseWidget implements et2_IInput, et2_IDetac "description": "Use this icon instead of hiding for read-only" }, "onclick": { - "description": "JS code which gets executed when the button is clicked" + "description": "JS code which gets executed when the button is clicked", + "type": "js" }, "accesskey": { "name": "Access Key",