From a7b57c5f03001aacb241b75175c847b9c6b849b3 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 14 Mar 2024 21:32:31 +0800 Subject: [PATCH] bugfix --- dist/examples/accordion.ui | 33 +++++++ dist/examples/add_widget.ui | 67 +++++++++++++ dist/examples/audio.ui | 9 ++ dist/examples/button.ui | 40 ++++++++ dist/examples/channels.ui | 64 ++++++++++++ dist/examples/datagrid.ui | 7 ++ dist/examples/docs.ui | 10 ++ dist/examples/dynamicaccordion.ui | 40 ++++++++ dist/examples/editabletree.ui | 7 ++ dist/examples/error.ui | 83 ++++++++++++++++ dist/examples/fileupload.ui | 32 ++++++ dist/examples/floaticonbar.ui | 18 ++++ dist/examples/floaticontextbar.ui | 19 ++++ dist/examples/footer.ui | 6 ++ dist/examples/form.ui | 157 ++++++++++++++++++++++++++++++ dist/examples/hbox.ui | 50 ++++++++++ dist/examples/iconbar.ui | 20 ++++ dist/examples/icontextbar.ui | 20 ++++ dist/examples/iframe.ui | 8 ++ dist/examples/image.ui | 9 ++ dist/examples/m3u8.ui | 10 ++ dist/examples/markdown.ui | 21 ++++ dist/examples/message.ui | 83 ++++++++++++++++ dist/examples/miniform.ui | 7 ++ dist/examples/model.ui | 7 ++ dist/examples/recorder.ui | 17 ++++ dist/examples/scroll.ui | 27 +++++ dist/examples/subtext.ui | 6 ++ dist/examples/t.ui | 33 +++++++ dist/examples/tab.ui | 59 +++++++++++ dist/examples/table.ui | 7 ++ dist/examples/text.ui | 104 ++++++++++++++++++++ dist/examples/toolbar.ui | 31 ++++++ dist/examples/tree.ui | 7 ++ dist/examples/tree_t.ui | 35 +++++++ dist/examples/vbox.ui | 97 ++++++++++++++++++ dist/examples/vbox1.ui | 40 ++++++++ dist/examples/video.ui | 10 ++ 38 files changed, 1300 insertions(+) create mode 100644 dist/examples/accordion.ui create mode 100644 dist/examples/add_widget.ui create mode 100644 dist/examples/audio.ui create mode 100644 dist/examples/button.ui create mode 100644 dist/examples/channels.ui create mode 100644 dist/examples/datagrid.ui create mode 100644 dist/examples/docs.ui create mode 100644 dist/examples/dynamicaccordion.ui create mode 100644 dist/examples/editabletree.ui create mode 100644 dist/examples/error.ui create mode 100644 dist/examples/fileupload.ui create mode 100644 dist/examples/floaticonbar.ui create mode 100644 dist/examples/floaticontextbar.ui create mode 100644 dist/examples/footer.ui create mode 100644 dist/examples/form.ui create mode 100644 dist/examples/hbox.ui create mode 100644 dist/examples/iconbar.ui create mode 100644 dist/examples/icontextbar.ui create mode 100644 dist/examples/iframe.ui create mode 100644 dist/examples/image.ui create mode 100644 dist/examples/m3u8.ui create mode 100644 dist/examples/markdown.ui create mode 100644 dist/examples/message.ui create mode 100644 dist/examples/miniform.ui create mode 100644 dist/examples/model.ui create mode 100644 dist/examples/recorder.ui create mode 100644 dist/examples/scroll.ui create mode 100644 dist/examples/subtext.ui create mode 100644 dist/examples/t.ui create mode 100644 dist/examples/tab.ui create mode 100644 dist/examples/table.ui create mode 100644 dist/examples/text.ui create mode 100644 dist/examples/toolbar.ui create mode 100644 dist/examples/tree.ui create mode 100644 dist/examples/tree_t.ui create mode 100644 dist/examples/vbox.ui create mode 100644 dist/examples/vbox1.ui create mode 100644 dist/examples/video.ui diff --git a/dist/examples/accordion.ui b/dist/examples/accordion.ui new file mode 100644 index 0000000..12e6b74 --- /dev/null +++ b/dist/examples/accordion.ui @@ -0,0 +1,33 @@ + +{ + "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 + } + } + } + ] + } +} diff --git a/dist/examples/add_widget.ui b/dist/examples/add_widget.ui new file mode 100644 index 0000000..5faf982 --- /dev/null +++ b/dist/examples/add_widget.ui @@ -0,0 +1,67 @@ +{ + "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" + } + ] +} diff --git a/dist/examples/audio.ui b/dist/examples/audio.ui new file mode 100644 index 0000000..ae37486 --- /dev/null +++ b/dist/examples/audio.ui @@ -0,0 +1,9 @@ + +{ + "id":"audioplayer", + "widgettype":"AudioPlayer", + "options":{ + "autoplay":true, + "url":"http://kimird.com/songs/sample-mp3-file.mp3" + } +} diff --git a/dist/examples/button.ui b/dist/examples/button.ui new file mode 100644 index 0000000..5923b10 --- /dev/null +++ b/dist/examples/button.ui @@ -0,0 +1,40 @@ + +{ + "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');" + } + ] +} diff --git a/dist/examples/channels.ui b/dist/examples/channels.ui new file mode 100644 index 0000000..db1ace4 --- /dev/null +++ b/dist/examples/channels.ui @@ -0,0 +1,64 @@ +{ + "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 + } +} diff --git a/dist/examples/datagrid.ui b/dist/examples/datagrid.ui new file mode 100644 index 0000000..c60417f --- /dev/null +++ b/dist/examples/datagrid.ui @@ -0,0 +1,7 @@ + +{ + "widgettype":"urlwidget", + "options":{ + "url":"users.bcrud" + } +} diff --git a/dist/examples/docs.ui b/dist/examples/docs.ui new file mode 100644 index 0000000..4780b59 --- /dev/null +++ b/dist/examples/docs.ui @@ -0,0 +1,10 @@ + +{ + "widgettype":"MarkdownViewer", + "options":{ + "width":"100%", + "height":"100%", + "navigator":true, + "md_url":"../docs/README.md" + } +} diff --git a/dist/examples/dynamicaccordion.ui b/dist/examples/dynamicaccordion.ui new file mode 100644 index 0000000..3eb4ca6 --- /dev/null +++ b/dist/examples/dynamicaccordion.ui @@ -0,0 +1,40 @@ +{ + "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 + } +} diff --git a/dist/examples/editabletree.ui b/dist/examples/editabletree.ui new file mode 100644 index 0000000..cc19f0b --- /dev/null +++ b/dist/examples/editabletree.ui @@ -0,0 +1,7 @@ + +{ + "widgettype":"urlwidget", + "options":{ + "url":"editabletree.json" + } +} diff --git a/dist/examples/error.ui b/dist/examples/error.ui new file mode 100644 index 0000000..cebeeeb --- /dev/null +++ b/dist/examples/error.ui @@ -0,0 +1,83 @@ + +{ + "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 + } + ] + } +} diff --git a/dist/examples/fileupload.ui b/dist/examples/fileupload.ui new file mode 100644 index 0000000..7e316cf --- /dev/null +++ b/dist/examples/fileupload.ui @@ -0,0 +1,32 @@ + +{ + "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" + } + } + ] +} diff --git a/dist/examples/floaticonbar.ui b/dist/examples/floaticonbar.ui new file mode 100644 index 0000000..50162de --- /dev/null +++ b/dist/examples/floaticonbar.ui @@ -0,0 +1,18 @@ +{ + "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" + }], + } +} + diff --git a/dist/examples/floaticontextbar.ui b/dist/examples/floaticontextbar.ui new file mode 100644 index 0000000..0adc782 --- /dev/null +++ b/dist/examples/floaticontextbar.ui @@ -0,0 +1,19 @@ +{ + "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" + }], + } +} + diff --git a/dist/examples/footer.ui b/dist/examples/footer.ui new file mode 100644 index 0000000..968376e --- /dev/null +++ b/dist/examples/footer.ui @@ -0,0 +1,6 @@ +{ + "widgettype":"Text", + "options":{ + "text":"Bricks module, make front end coding easier" + } +} diff --git a/dist/examples/form.ui b/dist/examples/form.ui new file mode 100644 index 0000000..cc3ab73 --- /dev/null +++ b/dist/examples/form.ui @@ -0,0 +1,157 @@ + +{ + "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 + } + ] + } + } + ] + } + ] +} diff --git a/dist/examples/hbox.ui b/dist/examples/hbox.ui new file mode 100644 index 0000000..de1835f --- /dev/null +++ b/dist/examples/hbox.ui @@ -0,0 +1,50 @@ + +{ + "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" + } + } + ] + } + ] +} diff --git a/dist/examples/iconbar.ui b/dist/examples/iconbar.ui new file mode 100644 index 0000000..977a57e --- /dev/null +++ b/dist/examples/iconbar.ui @@ -0,0 +1,20 @@ +{ + "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" + }], + } +} + diff --git a/dist/examples/icontextbar.ui b/dist/examples/icontextbar.ui new file mode 100644 index 0000000..f4754c9 --- /dev/null +++ b/dist/examples/icontextbar.ui @@ -0,0 +1,20 @@ +{ + "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" + }], + } +} + diff --git a/dist/examples/iframe.ui b/dist/examples/iframe.ui new file mode 100644 index 0000000..7ec0576 --- /dev/null +++ b/dist/examples/iframe.ui @@ -0,0 +1,8 @@ +{ + "id":"videoplayer", + "widgettype":"Iframe", + "options":{ + "width":"100%", + "url":"{{params_kw.url}}" + } +} diff --git a/dist/examples/image.ui b/dist/examples/image.ui new file mode 100644 index 0000000..2ef10de --- /dev/null +++ b/dist/examples/image.ui @@ -0,0 +1,9 @@ + +{ + "widgettype":"Image", + "options":{ + "url":"https://cdn.pixabay.com/photo/2018/04/26/16/31/marine-3352341_960_720.jpg", + "height":"100%", + "width":"100%" + } +} diff --git a/dist/examples/m3u8.ui b/dist/examples/m3u8.ui new file mode 100644 index 0000000..7bb61cd --- /dev/null +++ b/dist/examples/m3u8.ui @@ -0,0 +1,10 @@ + +{ + "id":"videoplayer", + "widgettype":"VideoPlayer", + "options":{ + "autoplay":true, + "url":"{{params_kw.get('url')}}", + "type":"hls" + } +} diff --git a/dist/examples/markdown.ui b/dist/examples/markdown.ui new file mode 100644 index 0000000..68e6439 --- /dev/null +++ b/dist/examples/markdown.ui @@ -0,0 +1,21 @@ + +{ + "widgettype":"VBox", + "options":{ + }, + "subwidgets":[ + { + "widgettype":"Title1", + "options":{ + "text":"Pic Viewer", + "i18n":true + } + }, + { + "widgettype":"MarkdownViewer", + "options":{ + "md_url":"test1.md" + } + } + ] +} diff --git a/dist/examples/message.ui b/dist/examples/message.ui new file mode 100644 index 0000000..cebeeeb --- /dev/null +++ b/dist/examples/message.ui @@ -0,0 +1,83 @@ + +{ + "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 + } + ] + } +} diff --git a/dist/examples/miniform.ui b/dist/examples/miniform.ui new file mode 100644 index 0000000..2414d43 --- /dev/null +++ b/dist/examples/miniform.ui @@ -0,0 +1,7 @@ + +{ + "widgettype":"urlwidget", + "options":{ + "url":"miniform.json" + } +} diff --git a/dist/examples/model.ui b/dist/examples/model.ui new file mode 100644 index 0000000..d1794df --- /dev/null +++ b/dist/examples/model.ui @@ -0,0 +1,7 @@ + +{ + "widgettype":"urlwidget", + "options":{ + "url":"modal.json" + } +} diff --git a/dist/examples/recorder.ui b/dist/examples/recorder.ui new file mode 100644 index 0000000..d1c0614 --- /dev/null +++ b/dist/examples/recorder.ui @@ -0,0 +1,17 @@ +{ + "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)" + } + ] +} diff --git a/dist/examples/scroll.ui b/dist/examples/scroll.ui new file mode 100644 index 0000000..cfef7ad --- /dev/null +++ b/dist/examples/scroll.ui @@ -0,0 +1,27 @@ +{ + "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')}}" + } + } + ] +} diff --git a/dist/examples/subtext.ui b/dist/examples/subtext.ui new file mode 100644 index 0000000..527c266 --- /dev/null +++ b/dist/examples/subtext.ui @@ -0,0 +1,6 @@ +{ + "widgettype":"Text", + "options":{ + "text":"{{params_kw.get('text') or 'default text'}}" + } +} diff --git a/dist/examples/t.ui b/dist/examples/t.ui new file mode 100644 index 0000000..c427f8d --- /dev/null +++ b/dist/examples/t.ui @@ -0,0 +1,33 @@ +{ + "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" + } + } + ] +} diff --git a/dist/examples/tab.ui b/dist/examples/tab.ui new file mode 100644 index 0000000..6ffedee --- /dev/null +++ b/dist/examples/tab.ui @@ -0,0 +1,59 @@ + +{ + "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 + }, + ] + } +} diff --git a/dist/examples/table.ui b/dist/examples/table.ui new file mode 100644 index 0000000..236ebee --- /dev/null +++ b/dist/examples/table.ui @@ -0,0 +1,7 @@ + +{ + "widgettype":"urlwidget", + "options":{ + "url":"tables.json" + } +} diff --git a/dist/examples/text.ui b/dist/examples/text.ui new file mode 100644 index 0000000..21731b4 --- /dev/null +++ b/dist/examples/text.ui @@ -0,0 +1,104 @@ + +{ + "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()" + } + ] + } + ] + } + ] +} diff --git a/dist/examples/toolbar.ui b/dist/examples/toolbar.ui new file mode 100644 index 0000000..56b6996 --- /dev/null +++ b/dist/examples/toolbar.ui @@ -0,0 +1,31 @@ + +{ + "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 + }, + ] + } +} diff --git a/dist/examples/tree.ui b/dist/examples/tree.ui new file mode 100644 index 0000000..54c6615 --- /dev/null +++ b/dist/examples/tree.ui @@ -0,0 +1,7 @@ + +{ + "widgettype":"urlwidget", + "options":{ + "url":"tree.json" + } +} diff --git a/dist/examples/tree_t.ui b/dist/examples/tree_t.ui new file mode 100644 index 0000000..024dc5c --- /dev/null +++ b/dist/examples/tree_t.ui @@ -0,0 +1,35 @@ +{ + "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" + } + } + ] +} diff --git a/dist/examples/vbox.ui b/dist/examples/vbox.ui new file mode 100644 index 0000000..ba251b6 --- /dev/null +++ b/dist/examples/vbox.ui @@ -0,0 +1,97 @@ + +{ + "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()" + } + ] + } + ] + } + ] +} diff --git a/dist/examples/vbox1.ui b/dist/examples/vbox1.ui new file mode 100644 index 0000000..3c67e98 --- /dev/null +++ b/dist/examples/vbox1.ui @@ -0,0 +1,40 @@ + +{ + "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" + } + } + ] + } + ] +} diff --git a/dist/examples/video.ui b/dist/examples/video.ui new file mode 100644 index 0000000..7db1416 --- /dev/null +++ b/dist/examples/video.ui @@ -0,0 +1,10 @@ + +{ + "id":"videoplayer", + "widgettype":"Video", + "options":{ + "autoplay":true, + "url":"http://kimird.com/video/sample-mp4-file.mp4", + "type":"video/mp4" + } +}