kivyblocks/test/script/scripts/input_url.ui

65 lines
1.0 KiB
Plaintext
Raw Normal View History

2022-11-13 08:55:49 +08:00
{
"widgettype":"Modal",
"options":{
"auto_open":true,
"position":"tl",
"csscls":"modal_panel",
"size_hint":[0.7,0.7],
"content":{
"id":"url_form",
"widgettype":"Form",
"options":{
"cols":1,
"labelwidth":0.3,
"inputheight":2,
"fields":[
{
"name":"url",
"label":"Url",
"required":true,
"datatype":"str"
},
{
"name":"urltype",
"label":"urltype",
"datatype":"str",
"uitype":"code",
"uiparams":{
"valueField":"ut",
"textField":"ut",
"data":[
{
"ut":"video"
},
{
"ut":"m3u"
},
{
"ut":"ebook"
}
]
}
}
]
}
}
},
"binds":[
{
"wid":"url_form",
"event":"on_submit",
"actiontype":"script",
"target":"self",
"script":"self.dismiss()"
},
{
"wid":"url_form",
"event":"on_submit",
"actiontype":"script",
"datawidget":"url_form",
"target":"app",
"script":"self.open_url(**kwargs)"
}
]
}