update geo module
This commit is contained in:
parent
21b505b4c8
commit
1503901e81
39 changed files with 3945 additions and 1685 deletions
41
demos/countries/js/countries.js
Normal file
41
demos/countries/js/countries.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
Ox.load({UI: {}, Geo: {}}, function() {
|
||||
|
||||
var $list = Ox.IconList({
|
||||
//borderRadius: 32,
|
||||
item: function(data, sort, size) {
|
||||
return {
|
||||
height: size,
|
||||
id: data.code,
|
||||
info: data.code,
|
||||
title: data.name,
|
||||
url: Ox.getImageByGeoname('icon', 256, data.name),
|
||||
width: size
|
||||
}
|
||||
},
|
||||
items: Ox.COUNTRIES.sort(function(a, b) {
|
||||
return a.code < b.code ? -1 : a.code > b.code ? 1 : 0;
|
||||
}),
|
||||
sort: [{key: 'code', operator: '+'}]
|
||||
});
|
||||
|
||||
Ox.SplitPanel({
|
||||
elements: [
|
||||
{
|
||||
element: Ox.Bar(),
|
||||
size: 24
|
||||
},
|
||||
{
|
||||
element: $list
|
||||
}
|
||||
],
|
||||
orientation: 'vertical'
|
||||
})
|
||||
.appendTo(Ox.UI.$body)
|
||||
|
||||
/*
|
||||
Ox.UI.$window.resize(function() {
|
||||
$list.size();
|
||||
});
|
||||
*/
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue