|
|
|
@ -144,3 +144,37 @@ func GetCheckedRadioOrCheckbox(jsObject js.Value) (id, name, value string) {
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetStatusFromBulkOfIds(dombase js.Value, ids []string) (result []struct {
|
|
|
|
|
id, name string
|
|
|
|
|
checked, disabled, readonly bool
|
|
|
|
|
value string
|
|
|
|
|
}) {
|
|
|
|
|
|
|
|
|
|
for _, id := range ids {
|
|
|
|
|
tmpObject := dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementById, id)
|
|
|
|
|
result = append(result, struct {
|
|
|
|
|
id, name string
|
|
|
|
|
checked, disabled, readonly bool
|
|
|
|
|
value string
|
|
|
|
|
}{
|
|
|
|
|
id: id,
|
|
|
|
|
name: tmpObject.Get("name").String(),
|
|
|
|
|
checked: tmpObject.Get("checked").Bool(),
|
|
|
|
|
disabled: tmpObject.Get("disabled").Bool(),
|
|
|
|
|
readonly: tmpObject.Get("readonly").Bool(),
|
|
|
|
|
value: tmpObject.Get("value").String()})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
func IsDefined(o js.Value, attribute string) bool {
|
|
|
|
|
if o.Get(attribute).IsUndefined() {
|
|
|
|
|
return false
|
|
|
|
|
} else {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|