This commit is contained in:
yumoqing 2024-03-14 21:40:25 +08:00
parent 7f4f61b250
commit 5b0d056f05
38 changed files with 0 additions and 1300 deletions

View File

@ -1,33 +0,0 @@
{
"widgettype":"Accordion",
"options":{
"item_size":'28px',
"items":[
{
"name":"test1",
"icon":"/imgs/t.png",
"text":"accordion 1 test",
"content":{
"widgettype":"Text",
"options":{
"text":"text content 1",
"i81n":true
}
}
},
{
"name":"test2",
"icon":"/imgs/t.png",
"text":"accordion 2 test",
"content":{
"widgettype":"Text",
"options":{
"text":"text content 2",
"i81n":true
}
}
}
]
}
}

View File

@ -1,67 +0,0 @@
{
"widgettype":"VBox",
"options":{
"width":"100%",
"height":"100%"
},
"subwidgets":[
{
"widgettype":"HBox",
"options":{
"height":"40px"
},
"subwidgets":[
{
"id":"insert",
"widgettype":"Button",
"options":{
"width":"80px",
"i18n":true,
"label":"insert"
}
},
{
"id":"append",
"widgettype":"Button",
"options":{
"width":"80px",
"i18n":true,
"label":"append"
}
}
]
},
{
"id":"main",
"widgettype":"Filler"
}
],
"binds":[
{
"wid":"insert",
"event":"click",
"actiontype":"urlwidget",
"target":"main",
"options":{
"url":"{{entire_url('subtext.ui')}}",
"params":{
"text":"Insert before"
}
},
"mode":"insert"
},
{
"wid":"append",
"event":"click",
"actiontype":"urlwidget",
"target":"main",
"options":{
"url":"{{entire_url('subtext.ui')}}",
"params":{
"text":"Append After"
}
},
"mode":"append"
}
]
}

View File

@ -1,9 +0,0 @@
{
"id":"audioplayer",
"widgettype":"AudioPlayer",
"options":{
"autoplay":true,
"url":"http://kimird.com/songs/sample-mp3-file.mp3"
}
}

View File

@ -1,40 +0,0 @@
{
"widgettype":"HBox",
"options":{
"height":"auto",
"width":"100%"
},
"subwidgets":[
{
"widgettype":"Button",
"options":{
"name":"test",
"icon":"/bricks/imgs/submit.png",
"label":"test once",
"tooltip":"This is a joke too",
"nonepack":true,
"orientation":"horizontal"
}
},
{
"widgettype":"Button",
"options":{
"name":"test",
"icon":"/bricks/imgs/reset.png",
"tooltip":"This is a joke",
"label":"test twice",
"nonepack":true,
"orientation":"horizontal"
}
}
],
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"script":"alert('HBox clicked');"
}
]
}

View File

@ -1,64 +0,0 @@
{
"widgettype":"DynamicAccordion",
"options":{
"data_url":"{{entire_url('./channels.dspy')}}",
"content_url":"{{entire_url('play_channel.dspy')}}",
"content_view":{
"widgettype":"VBox",
"options":{
"overflow":"auto",
"width":"90%",
"height":"500px"
},
"subwidgets":[
{
"id":"toolbar",
"widgettype":"Toolbar",
"options":{
"orientation":"horizontal",
"tool_margin":"15px",
"tools":[
{
"name":"blocked",
"label":"Blocked it"
}
]
}
},
{
"id":"videoplayer",
"widgettype":"Video",
"options":{
"type":"application/x-mpegURL",
"url":"${url}"
}
}
]
},
"record_view":{
"widgettype":"HBox",
"options":{
"height":"100%",
"width":"100%"
},
"subwidgets":[
{
"widgettype":"Icon",
"options":{
"rate":2,
"url":"${logo_url}"
}
},
{
"widgettype":"Text",
"options":{
"text":"${title}"
}
}
]
},
"page_rows":800,
"cache_limit":5
}
}

View File

@ -1,7 +0,0 @@
{
"widgettype":"urlwidget",
"options":{
"url":"users.bcrud"
}
}

10
dist/examples/docs.ui vendored
View File

@ -1,10 +0,0 @@
{
"widgettype":"MarkdownViewer",
"options":{
"width":"100%",
"height":"100%",
"navigator":true,
"md_url":"../docs/README.md"
}
}

View File

@ -1,40 +0,0 @@
{
"widgettype":"DynamicAccordion",
"options":{
"data_url":"{{entire_url('./channels.dspy')}}",
"content_url":"{{entire_url('play_channel.dspy')}}",
"content_view":{
"id":"videoplayer",
"widgettype":"Iframe",
"options":{
"width":"100%",
"url":"${url}"
}
},
"record_view":{
"widgettype":"HBox",
"options":{
"height":"100%",
"width":"100%"
},
"subwidgets":[
{
"widgettype":"Icon",
"options":{
"rate":2,
"url":"${logo_url}"
}
},
{
"widgettype":"Text",
"options":{
"text":"${title}"
}
}
]
},
"page_rows":800,
"cache_limit":5
}
}

View File

@ -1,7 +0,0 @@
{
"widgettype":"urlwidget",
"options":{
"url":"editabletree.json"
}
}

View File

@ -1,83 +0,0 @@
{
"widgettype":"Tree",
"options":{
"idField":"id",
"textField":"text",
"data":[
{
"id":1,
"text":"node1",
"is_leaf":false,
"children":[
{
"id":11,
"text":"node11",
"is_leaf":false,
"children":[
{
"id":112,
"text":"node.12",
"is_leaf":false,
"children":[
{
"id":1112,
"text":"node1112",
"is_leaf":true
},
{
"id":1113,
"text":"node113",
"is_leaf":true
}
]
},
{
"id":113,
"text":"node113",
"is_leaf":true
}
]
},
{
"id":12,
"text":"node12",
"is_leaf":true
},
{
"id":13,
"text":"node13",
"is_leaf":true
}
]
},
{
"id":2,
"text":"node2",
"is_leaf":false,
"children":[
{
"id":21,
"text":"node21",
"is_leaf":true
},
{
"id":22,
"text":"node22",
"is_leaf":true
},
{
"id":23,
"text":"node23",
"is_leaf":true
}
]
},
{
"id":3,
"text":"node3",
"is_leaf":true
}
]
}
}

View File

@ -1,32 +0,0 @@
{
"widgettype":"VBox",
"options":{
},
"subwidgets":[
{
"id":"file1",
"widgettype":"UtFile",
"options":{
"name":"file1",
"label":"File 1"
}
},
{
"widgettype":"Text",
"options":{
"text":"upload"
},
}
],
"binds":[
{
"wid":"self",
"event":"clcik",
"action":{
"rfname":"do_upload"
}
}
]
}

View File

@ -1,18 +0,0 @@
{
"widgettype":"FloatIconBar",
"options":{
"tools":[
{
"icon":"{{entire_url('../imgs/add.png')}}",
"name":"add",
"rate":1.5,
"tip":"add a record"
},
{
"icon":"{{entire_url('../imgs/delete.png')}}",
"name":"delete",
"tip":"delete a record"
}],
}
}

View File

@ -1,19 +0,0 @@
{
"widgettype":"FloatIconTextBar",
"options":{
"tools":[
{
"name":"add",
"icon":"{{entire_url('../imgs/add.png')}}",
"label":"add",
"tip":"add a record"
},
{
"icon":"{{entire_url('../imgs/delete.png')}}",
"name":"delete",
"label":"delete",
"tip":"delete a record"
}],
}
}

View File

@ -1,6 +0,0 @@
{
"widgettype":"Text",
"options":{
"text":"Bricks module, make front end coding easier"
}
}

157
dist/examples/form.ui vendored
View File

@ -1,157 +0,0 @@
{
"widgettype":"VBox",
"options":{"height":"100%", "width":"100%"},
"subwidgets":[
{
"widgettype":"HBox",
"options":{"height":"auto"},
"subwidgets":[
{
"widgettype":"Text",
"options":{
"otext":"Please change Font size",
"i18n":true
}
},
{
"widgettype":"Button",
"options":{
"label":"A",
"width":"auto",
"item_rate":1.4
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"target":"app",
"script":"bricks.app.textsize_bigger()"
}
]
},
{
"widgettype":"Button",
"options":{
"label":"A",
"width":"auto",
"item_rate":0.8
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"target":"app",
"script":"bricks.app.textsize_smaller()"
}
]
}
]
},
{
"widgettype":"Filler",
"options":{"overflow":"auto"},
"subwidgets":[
{
"widgettype":"Form",
"options":{
"submit_url":"/ttt/ttt.dspy",
"title":"Test hahah Form",
"description":"test input implemented",
"fields":[
{
"uitype":"email",
"name":"email",
"label":"Email",
'required':true
},
{
"uitype":"tel",
"name":"tel",
"pattern":"{\d}3-{\d}4-{\d}4",
"label":"Tel",
'required':true
},
{
"uitype":"file",
"name":"file",
"label":"File",
'required':true
},
{
"uitype":"str",
"minlength":3,
"length":30,
"value":"tlegre",
"name":"name",
"label":"Name",
'required':true
},
{
"uitype":"int",
"minlength":3,
"length":30,
"value":12432,
"name":"integer",
"label":"Integer",
'required':true
},
{
"uitype":"float",
"dec_length":3,
"length":25,
"name":"float",
"label":"Float"
},
{
"uitype":"date",
"name":"date",
"label":"Date",
'required':true
},
{
"uitype":"password",
"minlength":3,
"length":30,
"name":"password",
"label":"Password",
'required':true
},
{
"uitype":"checkbox",
"name":"checkbox",
"label":"CheckBox",
"value":2,
"dataurl":"test_code.json",
'required':true
},
{
"uitype":"audio",
"name":"audio",
"label":"Audio",
'required':true
},
{
"uitype":"code",
"name":"code",
"label":"Code",
"value":2,
"dataurl":"test_code.json",
'required':true
},
{
"uitype":"text",
"name":"text",
"value":"This is a test",
"label":"Text",
'required':true
}
]
}
}
]
}
]
}

50
dist/examples/hbox.ui vendored
View File

@ -1,50 +0,0 @@
{
"widgettype":"HBox",
"options":{
},
"subwidgets":[
{
"widgettype":"Title1",
"options":{
"text":"Pic Viewer",
"i18n":true
},
"binds":[
{
"wid":"self",
"target":"self",
"event":"click",
"actiontype":"script",
"script":"alert('hahahahahah');"
}
]
},
{
"widgettype":"urlwidget",
"options":{
"url":"/bricks/image.tmpl",
"i18n":true
}
},
{
"id":"mymodal",
"widgettype":"Modal",
"options":{
"auto_close":true,
"auto_open":false,
"width":"700px",
"height":"400px",
"archor":"cl",
},
"subwidgets":[
{
"widgettype":"Text",
"options":{
"text":"This is a test"
}
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"widgettype":"IconBar",
"options":{
"tools":[
{
"icon":"{{entire_url('../imgs/add.png')}}",
"name":"add",
"rate":1.5,
"label":"add",
"tip":"add a record"
},
{
"icon":"{{entire_url('../imgs/delete.png')}}",
"name":"delete",
"label":"delete",
"tip":"delete a record"
}],
}
}

View File

@ -1,20 +0,0 @@
{
"widgettype":"IconTextBar",
"options":{
"tools":[
{
"icon":"{{entire_url('../imgs/add.png')}}",
"name":"add",
"rate":1.5,
"label":"add",
"tip":"add a record"
},
{
"icon":"{{entire_url('../imgs/delete.png')}}",
"name":"delete",
"label":"delete",
"tip":"delete a record"
}],
}
}

View File

@ -1,8 +0,0 @@
{
"id":"videoplayer",
"widgettype":"Iframe",
"options":{
"width":"100%",
"url":"{{params_kw.url}}"
}
}

View File

@ -1,9 +0,0 @@
{
"widgettype":"Image",
"options":{
"url":"https://cdn.pixabay.com/photo/2018/04/26/16/31/marine-3352341_960_720.jpg",
"height":"100%",
"width":"100%"
}
}

10
dist/examples/m3u8.ui vendored
View File

@ -1,10 +0,0 @@
{
"id":"videoplayer",
"widgettype":"VideoPlayer",
"options":{
"autoplay":true,
"url":"{{params_kw.get('url')}}",
"type":"hls"
}
}

View File

@ -1,21 +0,0 @@
{
"widgettype":"VBox",
"options":{
},
"subwidgets":[
{
"widgettype":"Title1",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"MarkdownViewer",
"options":{
"md_url":"test1.md"
}
}
]
}

View File

@ -1,83 +0,0 @@
{
"widgettype":"Tree",
"options":{
"idField":"id",
"textField":"text",
"data":[
{
"id":1,
"text":"node1",
"is_leaf":false,
"children":[
{
"id":11,
"text":"node11",
"is_leaf":false,
"children":[
{
"id":112,
"text":"node.12",
"is_leaf":false,
"children":[
{
"id":1112,
"text":"node1112",
"is_leaf":true
},
{
"id":1113,
"text":"node113",
"is_leaf":true
}
]
},
{
"id":113,
"text":"node113",
"is_leaf":true
}
]
},
{
"id":12,
"text":"node12",
"is_leaf":true
},
{
"id":13,
"text":"node13",
"is_leaf":true
}
]
},
{
"id":2,
"text":"node2",
"is_leaf":false,
"children":[
{
"id":21,
"text":"node21",
"is_leaf":true
},
{
"id":22,
"text":"node22",
"is_leaf":true
},
{
"id":23,
"text":"node23",
"is_leaf":true
}
]
},
{
"id":3,
"text":"node3",
"is_leaf":true
}
]
}
}

View File

@ -1,7 +0,0 @@
{
"widgettype":"urlwidget",
"options":{
"url":"miniform.json"
}
}

View File

@ -1,7 +0,0 @@
{
"widgettype":"urlwidget",
"options":{
"url":"modal.json"
}
}

View File

@ -1,17 +0,0 @@
{
"id":"recorder",
"widgettype":"AudioRecorder",
"options":{
"height":"40px",
"upload_url":"{{entire_url('stt.dspy')}}",
"start_icon":"/bricks/imgs/start_recording.png"
},
"binds":[
{
"wid":"self",
"event":"uploaded",
"actiontype":"script",
"script":"alert('kwargs', kwargs, args)"
}
]
}

View File

@ -1,27 +0,0 @@
{
"widgettype":"VBox",
"options":{
"width":"100%",
"height":"100%"
},
"subwidgets":[
{
"widgettype":"Title3",
"options":{
"text":"Scroll Widget"
}
},
{
"widgettype":"urlwidget",
"options":{
"url":"{{entire_url('scroll.json')}}"
}
},
{
"widgettype":"urlwidget",
"options":{
"url":"{{entire_url('footer.ui')}}"
}
}
]
}

View File

@ -1,6 +0,0 @@
{
"widgettype":"Text",
"options":{
"text":"{{params_kw.get('text') or 'default text'}}"
}
}

33
dist/examples/t.ui vendored
View File

@ -1,33 +0,0 @@
{
"widgettype":"VBox",
"options":{
"width":"100%"
},
"subwidgets":[
{
"widgettype":"Title3",
"options":{
"height":"auto",
"text":"Header information"
}
},
{
"widgettype":"Filler",
"options":{},
"subwidgets":[
{
"widgettype":"urlwidget",
"options":{
"url":"{{entire_url('channels.ui')}}"
}
}
]
},
{
"widgettype":"Text",
"options":{
"text":"Footer information"
}
}
]
}

59
dist/examples/tab.ui vendored
View File

@ -1,59 +0,0 @@
{
"widgettype":"TabPanel",
"options":{
"tab_wide":"auto",
"height":"100%",
"width":"100%",
"tab_long":"70%",
"tab_pos":"top",
"items":[
{
"name":"c",
"label":"C",
"content":{
"widgettype":"Text",
"options":{
"text":"This is a C language documents"
}
},
"icon":null
},
{
"name":"javascript",
"removable":true,
"label":"JavaScript",
"content":{
"widgettype":"Text",
"options":{
"text":"This is JavaScript language documents"
}
},
"icon":null
},
{
"name":"php",
"label":"PHP",
"content":{
"widgettype":"Text",
"options":{
"text":"This is PHP language documents"
}
},
"icon":null
},
{
"name":"python",
"label":"Python",
"content":{
"widgettype":"Text",
"options":{
"text":"This is Python language documents"
}
},
"icon":null
},
]
}
}

View File

@ -1,7 +0,0 @@
{
"widgettype":"urlwidget",
"options":{
"url":"tables.json"
}
}

104
dist/examples/text.ui vendored
View File

@ -1,104 +0,0 @@
{
"widgettype":"VBox",
"options":{
},
"subwidgets":[
{
"widgettype":"Title1",
"options":{
"text":"Pic Viewer",
"dynsize":true,
"i18n":true
}
},
{
"widgettype":"Title2",
"options":{
"text":"Pic Viewer",
"dynsize":true,
"i18n":true
}
},
{
"widgettype":"Title3",
"options":{
"text":"Pic Viewer",
"dynsize":true,
"i18n":true
}
},
{
"widgettype":"Title4",
"options":{
"text":"Pic Viewer",
"dynsize":true,
"i18n":true
}
},
{
"widgettype":"Title5",
"options":{
"text":"Pic Viewer",
"dynsize":true,
"i18n":true
}
},
{
"widgettype":"Title6",
"options":{
"text":"Pic Viewer",
"dynsize":true,
"i18n":true
}
},
{
"widgettype":"Text",
"options":{
"text":"Pic Viewer",
"dynsize":true,
"i18n":true
}
},
{
"widgettype":"HBox",
"options":{
},
"subwidgets":[
{
"widgettype":"Button",
"options":{
"label":"A",
"item_rate":1.4
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"target":"app",
"script":"bricks.app.textsize_bigger()"
}
]
},
{
"widgettype":"Button",
"options":{
"label":"A",
"item_rate":0.7,
"item_size":"20px"
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"target":"app",
"script":"bricks.app.textsize_smaller()"
}
]
}
]
}
]
}

View File

@ -1,31 +0,0 @@
{
"widgettype":"Toolbar",
"options":{
"target":null,
"orientation":"horizontal",
"tool_margin":"15px",
"tools":[
{
"name":"c",
"label":"C",
"icon":null
},
{
"name":"javascript",
"label":"JavaScript",
"icon":null
},
{
"name":"php",
"label":"PHP",
"icon":null
},
{
"name":"python",
"label":"Python",
"icon":null
},
]
}
}

View File

@ -1,7 +0,0 @@
{
"widgettype":"urlwidget",
"options":{
"url":"tree.json"
}
}

View File

@ -1,35 +0,0 @@
{
"widgettype":"VBox",
"options":{
"height":"100%",
"width":"100%"
},
"subwidgets":[
{
"widgettype":"Title3",
"options":{
"height":"auto",
"text":"This is a tree"
}
},
{
"widgettype":"Filler",
"options":{},
"subwidgets":[
{
"widgettype":"urlwidget",
"options":{
"url":"{{entire_url('tree.ui')}}"
}
}
]
},
{
"widgettype":"Text",
"options":{
"height":"auto",
"text":"This is footer message"
}
}
]
}

97
dist/examples/vbox.ui vendored
View File

@ -1,97 +0,0 @@
{
"widgettype":"VBox",
"options":{
},
"subwidgets":[
{
"widgettype":"Title1",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"Title2",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"Title3",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"Title4",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"Title5",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"Title6",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"Text",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"HBox",
"options":{
},
"subwidgets":[
{
"widgettype":"Button",
"options":{
"label":"A",
"item_rate":1.4
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"target":"app",
"script":"bricks_app.textsize_bigger()"
}
]
},
{
"widgettype":"Button",
"options":{
"label":"A",
"item_rate":0.7,
"item_size":"20px"
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"target":"app",
"script":"bricks_app.textsize_smaller()"
}
]
}
]
}
]
}

View File

@ -1,40 +0,0 @@
{
"widgettype":"VBox",
"options":{
},
"subwidgets":[
{
"widgettype":"Title1",
"options":{
"text":"Pic Viewer",
"i18n":true
}
},
{
"widgettype":"urlwidget",
"options":{
"url":"/bricks/image.tmpl"
}
},
{
"id":"mymodal",
"widgettype":"Modal",
"options":{
"auto_close":true,
"auto_open":false,
"width":"700px",
"height":"400px",
"archor":"cl",
},
"subwidgets":[
{
"widgettype":"Text",
"options":{
"text":"This is a test"
}
}
]
}
]
}

View File

@ -1,10 +0,0 @@
{
"id":"videoplayer",
"widgettype":"Video",
"options":{
"autoplay":true,
"url":"http://kimird.com/video/sample-mp4-file.mp4",
"type":"video/mp4"
}
}