diff --git a/etemplate/js/et2_core_baseWidget.js b/etemplate/js/et2_core_baseWidget.js index b8d5ae948f..786942f3b3 100644 --- a/etemplate/js/et2_core_baseWidget.js +++ b/etemplate/js/et2_core_baseWidget.js @@ -43,6 +43,7 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, "onclick": { "name": "onclick", "type": "js", + "default": et2_no_init, "description": "JS code which is executed when the element is clicked." } }, diff --git a/etemplate/js/et2_core_common.js b/etemplate/js/et2_core_common.js index 970fd48ed2..35a0486b7e 100644 --- a/etemplate/js/et2_core_common.js +++ b/etemplate/js/et2_core_common.js @@ -254,7 +254,7 @@ function et2_checkType(_val, _type, _attr, _widget) } // We should never come here - throw("Invalid type identifier '" + _attr + ": " + _type); + throw("Invalid type identifier '" + _attr + "': '" + _type+"'"); } /** diff --git a/etemplate/js/et2_core_inputWidget.js b/etemplate/js/et2_core_inputWidget.js index 23ec3110be..5b85e7ae6b 100644 --- a/etemplate/js/et2_core_inputWidget.js +++ b/etemplate/js/et2_core_inputWidget.js @@ -37,11 +37,13 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], "onchange": { "name": "onchange", "type": "js", + "default": et2_no_init, "description": "JS code which is executed when the value changes." }, "onfocus": { "name": "onfocus", "type": "js", + "default": et2_no_init, "description": "JS code which get executed when wiget receives focus." }, "validation_error": { diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 41bd8f2134..70e565d0a6 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -95,11 +95,13 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], "onselect": { "name": "onselect", "type": "js", + "default": et2_no_init, "description": "JS code which gets executed when rows are selected. Can also be a app.appname.func(selected) style method" }, "onfiledrop": { "name": "onFileDrop", "type": "js", + "default": et2_no_init, "description": "JS code that gets executed when a _file_ is dropped on a row. Other drop interactions are handled by the action system. Return false to prevent the default link action." }, "settings": { diff --git a/etemplate/js/et2_widget_button.js b/etemplate/js/et2_widget_button.js index dd7734ac1a..5e8cdb9d22 100644 --- a/etemplate/js/et2_widget_button.js +++ b/etemplate/js/et2_widget_button.js @@ -42,8 +42,6 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], "description": "Use this icon instead of hiding for read-only" }, "onclick": { - "name": "onclick", - "type": "js", "description": "JS code which gets executed when the button is clicked" }, "accesskey": { diff --git a/etemplate/js/et2_widget_dropdown_button.js b/etemplate/js/et2_widget_dropdown_button.js index 9e3bc59f5e..067b640fa7 100644 --- a/etemplate/js/et2_widget_dropdown_button.js +++ b/etemplate/js/et2_widget_dropdown_button.js @@ -59,8 +59,6 @@ var et2_dropdown_button = et2_inputWidget.extend( "description": "Use this icon instead of hiding for read-only" }, "onclick": { - "name": "onclick", - "type": "js", "description": "JS code which gets executed when the button is clicked" }, "select_options": { diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index 0923094e94..947ec4dec0 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -69,15 +69,9 @@ var et2_taglist = et2_selectbox.extend( }, "onchange": { - "name": "onChange", - "type": "js", - "default": et2_no_init, "description": "Callback when tags are changed. Argument is the new selection.", }, "onclick": { - "name": "onClick", - "type": "js", - "default": et2_no_init, "description": "Callback when a tag is clicked. The clicked tag is passed." }, "tagRenderer": { diff --git a/etemplate/js/et2_widget_tree.js b/etemplate/js/et2_widget_tree.js index 53b280d29b..2ba9ab30af 100644 --- a/etemplate/js/et2_widget_tree.js +++ b/etemplate/js/et2_widget_tree.js @@ -47,18 +47,18 @@ var et2_tree = et2_inputWidget.extend( "description": "Used to set the tree options." }, "onclick": { - "name": "onClick", - "type": "js", "description": "JS code which gets executed when clicks on text of a node" }, "onselect": { "name": "onSelect", "type": "js", + "default": et2_no_init, "description": "Javascript executed when user selects a node" }, "oncheck": { "name": "onCheck", "type": "js", + "default": et2_no_init, "description": "Javascript executed when user checks a node" }, // onChange event is mapped depending on multiple to onCheck or onSelect