js/ui.js : Added error message when the parent element is not found in ui_create()

This commit is contained in:
kevin 2022-05-21 09:27:42 -04:00
parent 7c567ff1c8
commit 1557b65072

View File

@ -467,7 +467,9 @@ function ui_create_check( parent_ele, d )
ele.onclick = function() { ui_send_bool_value(this,dom_get_checkbox(this.id)); } ele.onclick = function() { ui_send_bool_value(this,dom_get_checkbox(this.id)); }
if( !d.hasOwnProperty('value') ) if( !d.hasOwnProperty('value') )
{
ui_send_echo(ele) ui_send_echo(ele)
}
else else
{ {
dom_set_checkbox(ele.id, d.value ); dom_set_checkbox(ele.id, d.value );
@ -870,8 +872,6 @@ function ui_create_list( parent_ele, d )
function ui_set_value( d ) function ui_set_value( d )
{ {
//console.log(d)
var eleId = d.uuId.toString() var eleId = d.uuId.toString()
var ele = dom_id_to_ele(eleId) var ele = dom_id_to_ele(eleId)
@ -1089,7 +1089,9 @@ function ui_create( d )
var parent_ele = ui_get_parent(d.parentUuId); var parent_ele = ui_get_parent(d.parentUuId);
var ele = null; var ele = null;
if( parent_ele != null ) if( parent_ele == null )
console.log("Parent ele not found.",d)
else
{ {
switch( d.type ) switch( d.type )
{ {