list
This commit is contained in:
parent
7a40236189
commit
189c19b097
|
@ -87,11 +87,11 @@ class ItfModel(models.Model):
|
|||
search = options['search']
|
||||
if search != '':
|
||||
qset = kls.fts(qset, search)
|
||||
|
||||
'''
|
||||
sort = options['sort']
|
||||
if sort != []:
|
||||
qset = qset.order_by(sort[0]) #FIXME: Do Sort!
|
||||
|
||||
'''
|
||||
r0 = options['range'][0]
|
||||
r1 = options['range'][1]
|
||||
results = qset[r0:r1]
|
||||
|
|
|
@ -700,6 +700,7 @@ Ox.ItfBox = function(options, self) {
|
|||
.html(title/*.toUpperCase()*/)
|
||||
.appendTo($titlebar);
|
||||
|
||||
|
||||
var $search = new Ox.Input({
|
||||
'placeholder': 'Search',
|
||||
})
|
||||
|
@ -786,11 +787,15 @@ Ox.ItfBox = function(options, self) {
|
|||
});
|
||||
}
|
||||
|
||||
var $list = new Ox.List({
|
||||
var $listContainer = new Ox.Element()
|
||||
.appendTo(that)
|
||||
.css({position: 'relative', height: '100%'});
|
||||
|
||||
var $list = new Ox.TextList({
|
||||
'width': 256,
|
||||
'itemHeight': 16,
|
||||
'itemWidth': 250,
|
||||
'orientation': 'horizontal',
|
||||
// 'itemHeight': 16,
|
||||
// 'itemWidth': 250,
|
||||
// 'orientation': 'horizontal',
|
||||
'request': function(data, callback) {
|
||||
return app.api.find(getQueryParams(data), callback)
|
||||
},
|
||||
|
@ -799,10 +804,33 @@ Ox.ItfBox = function(options, self) {
|
|||
var $a = $('<a />').attr("href", "/" + options.module.toLowerCase() + "/" + data.id).text(data.title);
|
||||
var $item = $('<div />').addClass('OxTarget').append($a);
|
||||
return $item;
|
||||
}
|
||||
},
|
||||
'max': 1,
|
||||
'columns': [
|
||||
{
|
||||
align: 'left',
|
||||
id: 'title',
|
||||
operator: '-',
|
||||
unique: false,
|
||||
visible: true,
|
||||
width: 230
|
||||
},
|
||||
{
|
||||
id: 'id',
|
||||
visible: false,
|
||||
unique: true
|
||||
}
|
||||
],
|
||||
'sort': [{
|
||||
key: 'title',
|
||||
operator: '-'
|
||||
}]
|
||||
})
|
||||
.css({'overflow-x': 'hidden'})
|
||||
.appendTo(that);
|
||||
// .css({position: 'relative', height: '100%'})
|
||||
.appendTo($listContainer)
|
||||
.bindEvent("select", function(e, data) {
|
||||
alert(JSON.stringify(data));
|
||||
});
|
||||
|
||||
|
||||
// $buttons = new Ox.
|
||||
|
|
Loading…
Reference in New Issue
Block a user