oxjs/demos/countries/js/countries.js

42 lines
1.1 KiB
JavaScript
Raw Normal View History

2011-11-23 14:53:17 +00:00
Ox.load({UI: {theme: 'modern'}, Geo: {}}, function() {
2011-11-17 01:15:03 +00:00
var $list = Ox.IconList({
//borderRadius: 32,
item: function(data, sort, size) {
return {
height: size,
id: data.code,
2011-11-23 14:53:17 +00:00
info: data.region,
title: data.name + ' (' + data.code + ')',
url: Ox.getFlagByGeoname(data.name, 256),
//url: '../../tools/_geo3/svg/icons/' + data.code + '.svg',
2011-11-17 01:15:03 +00:00
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'
})
2011-11-23 14:53:17 +00:00
.appendTo(Ox.UI.$body);
2011-11-17 01:15:03 +00:00
/*
Ox.UI.$window.resize(function() {
$list.size();
});
*/
});