it/itf/static/js/itf/box_types.js
2011-04-11 02:47:19 +05:30

39 lines
817 B
JavaScript

ItfBoxTypes = {
'StaticBox': {
'buttons': [],
'render': function(data) {
var id = data.itfId + "Content";
return new Ox.Element({'id': id}).html(data.html);
}
},
'ModelsBox': {
'buttons': [
{
'type': 'search',
'icon': 'find',
'mouseover': 'Search'
},
{
'type': 'info',
'icon': 'info',
'mouseover': 'More about..'
}
],
'render': function(data) {
var id = data.itfId + "Content";
var that = new Ox.Element({
'id': id
});
that.updateView = function(model) {
var $list = new Ox.ItfList(model, data);
that.empty();
that.append($list);
that.$list = $list;
}
that.updateView(data.default_model);
return that;
}
}
}