self-closing xml should not be used in scheme

This commit is contained in:
lxsang
2021-03-15 13:17:09 +01:00
parent b243751aa0
commit 06a142ddc5
13 changed files with 93 additions and 73 deletions

View File

@ -1,47 +1,47 @@
<afx-app-window data-id="example-show-case" apptitle="AntOS GUI widgets" width="650" height="500">
<afx-vbox>
<afx-menu data-height="30" data-id="menu" />
<afx-menu data-height="30" data-id="menu" ></afx-menu>
<afx-tab-container data-id="tabctn" dir = "column" tabbarheight= "30">
<afx-hbox tabname="Widgets">
<afx-vbox data-width="150">
<afx-tree-view data-id="tree" dragndrop="true" />
<afx-slider data-id="slider" data-height="30" value="50"/>
<afx-tree-view data-id="tree" dragndrop="true" ></afx-tree-view>
<afx-slider data-id="slider" data-height="30" value="50"></afx-slider>
</afx-vbox>
<afx-resizer data-width="5" />
<afx-resizer data-width="5" ></afx-resizer>
<afx-vbox data-width="grow">
<afx-hbox min-height="50">
<afx-switch data-id="switch" />
<afx-switch data-id="switch" ></afx-switch>
<afx-button text="__(This is the label)"
data-id="bttest"
iconclass="fa fa-camera-retro fa-lg"
icon="os://packages/DummyApp/icon.png"/>
<afx-nspinner data-id="spin" value="10" step="2" />
icon="os://packages/DummyApp/icon.png"></afx-button>
<afx-nspinner data-id="spin" value="10" step="2" ></afx-nspinner>
</afx-hbox>
<afx-resizer data-height="5" />
<afx-resizer data-height="5" ></afx-resizer>
<afx-hbox>
<afx-list-view data-id="list" dropdown="false" multiselect="true" />
<afx-list-view data-id="list" dropdown="false" multiselect="true" ></afx-list-view>
</afx-hbox>
<afx-hbox data-height="150">
<afx-grid-view data-id="grid" multiselect="false" />
<afx-grid-view data-id="grid" multiselect="false" ></afx-grid-view>
</afx-hbox>
</afx-vbox>
</afx-hbox>
<afx-hbox tabname="Calendar & color picker">
<afx-calendar-view data-id = "cal"/>
<afx-color-picker data-id = "cpk"/>
<afx-calendar-view data-id = "cal"></afx-calendar-view>
<afx-color-picker data-id = "cpk"></afx-color-picker>
</afx-hbox>
<afx-hbox tabname="File view">
<afx-vbox>
<afx-file-view data-id = "fileview" view="icon" />
<afx-list-view data-id = "viewoption" data-height="30" dropdown="true" />
<afx-file-view data-id = "fileview" view="icon" ></afx-file-view>
<afx-list-view data-id = "viewoption" data-height="30" dropdown="true" ></afx-list-view>
</afx-vbox>
</afx-hbox>
<afx-hbox tabname="Dialogs">
<afx-vbox>
<afx-list-view data-id = "dialoglist"/>
<afx-button data-id = "btrundia" text="Run dialog" data-height="30"/>
<afx-list-view data-id = "dialoglist"></afx-list-view>
<afx-button data-id = "btrundia" text="Run dialog" data-height="30"></afx-button>
</afx-vbox>
</afx-hbox>

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"email": "xsang.le@gmail.com",
"licences": "GPLv3"
},
"version":"0.0.4-a",
"version":"0.0.5-a",
"category":"Other",
"mimes":["none"],
"iconclass": "fa fa-delicious",

View File

@ -1,47 +1,47 @@
<afx-app-window data-id="example-show-case" apptitle="AntOS GUI widgets" width="650" height="500">
<afx-vbox>
<afx-menu data-height="30" data-id="menu" />
<afx-menu data-height="30" data-id="menu" ></afx-menu>
<afx-tab-container data-id="tabctn" dir = "column" tabbarheight= "30">
<afx-hbox tabname="Widgets">
<afx-vbox data-width="150">
<afx-tree-view data-id="tree" dragndrop="true" />
<afx-slider data-id="slider" data-height="30" value="50"/>
<afx-tree-view data-id="tree" dragndrop="true" ></afx-tree-view>
<afx-slider data-id="slider" data-height="30" value="50"></afx-slider>
</afx-vbox>
<afx-resizer data-width="5" />
<afx-resizer data-width="5" ></afx-resizer>
<afx-vbox data-width="grow">
<afx-hbox min-height="50">
<afx-switch data-id="switch" />
<afx-switch data-id="switch" ></afx-switch>
<afx-button text="__(This is the label)"
data-id="bttest"
iconclass="fa fa-camera-retro fa-lg"
icon="os://packages/DummyApp/icon.png"/>
<afx-nspinner data-id="spin" value="10" step="2" />
icon="os://packages/DummyApp/icon.png" ></afx-button>
<afx-nspinner data-id="spin" value="10" step="2" ></afx-nspinner>
</afx-hbox>
<afx-resizer data-height="5" />
<afx-resizer data-height="5" ></afx-resizer>
<afx-hbox>
<afx-list-view data-id="list" dropdown="false" multiselect="true" />
<afx-list-view data-id="list" dropdown="false" multiselect="true" ></afx-list-view>
</afx-hbox>
<afx-hbox data-height="150">
<afx-grid-view data-id="grid" multiselect="false" />
<afx-grid-view data-id="grid" multiselect="false" ></afx-grid-view>
</afx-hbox>
</afx-vbox>
</afx-hbox>
<afx-hbox tabname="Calendar & color picker">
<afx-calendar-view data-id = "cal"/>
<afx-color-picker data-id = "cpk"/>
<afx-calendar-view data-id = "cal"></afx-calendar-view>
<afx-color-picker data-id = "cpk"></afx-color-picker>
</afx-hbox>
<afx-hbox tabname="File view">
<afx-vbox>
<afx-file-view data-id = "fileview" view="icon" />
<afx-list-view data-id = "viewoption" data-height="30" dropdown="true" />
<afx-file-view data-id = "fileview" view="icon" ></afx-file-view>
<afx-list-view data-id = "viewoption" data-height="30" dropdown="true" ></afx-list-view>
</afx-vbox>
</afx-hbox>
<afx-hbox tabname="Dialogs">
<afx-vbox>
<afx-list-view data-id = "dialoglist"/>
<afx-button data-id = "btrundia" text="Run dialog" data-height="30"/>
<afx-list-view data-id = "dialoglist"></afx-list-view>
<afx-button data-id = "btrundia" text="Run dialog" data-height="30"></afx-button>
</afx-vbox>
</afx-hbox>

Binary file not shown.

View File

@ -9,7 +9,9 @@ class ShowCase extends this.OS.application.BaseApplication
@observable.on "btclick", (e) =>
@notify "button clicked"
@bindKey("CTRL-SHIFT-P", (e) => @notify("CTRL-SHIFT-P shortcut executed"))
list = @find 'list'
list.data = [
@ -137,7 +139,8 @@ class ShowCase extends this.OS.application.BaseApplication
{ text: "Selection dialog", id: "selection" },
{ text: "About dialog", id: "about" },
{ text: "File dialog", id: "file" },
{ text: "Text dialog", id: "text" }
{ text: "Text dialog", id: "text" },
{ text: "Multi-input dialog", id: "minputs" }
]
btrun.onbtclick = (e) =>
@ -208,6 +211,23 @@ class ShowCase extends this.OS.application.BaseApplication
})
.then (d) =>
@notify d
when "minputs"
@openDialog("MultiInputDialog", {
title: "Multi-inputs",
model: {
name: "Your name",
email: "Your email",
where: "Your address"
},
allow_empty: false,
data: {
name: "John Doe",
email: "jd@mail.com",
where: "Anywhere on Earth"
}
})
.then (d) =>
@notify JSON.stringify(d)
else return

View File

@ -7,7 +7,7 @@
"email": "xsang.le@gmail.com",
"licences": "GPLv3"
},
"version":"0.0.4-a",
"version":"0.0.5-a",
"category":"Other",
"mimes":["none"],
"iconclass": "fa fa-delicious",