forked from 0x2620/oxjs
fix margins of static icon lists
This commit is contained in:
parent
4d13b8444b
commit
2698bec700
5 changed files with 24 additions and 14 deletions
|
|
@ -192,6 +192,13 @@ Ox.List = function(options, self) {
|
|||
}
|
||||
|
||||
if (!self.isAsync) {
|
||||
self.$page = Ox.Element()
|
||||
.addClass('OxPage')
|
||||
.css({
|
||||
left: self.listMargin / 2 + 'px',
|
||||
top: self.listMargin / 2 + 'px'
|
||||
})
|
||||
.appendTo(that.$content);
|
||||
self.listLength = self.options.items.length;
|
||||
loadItems();
|
||||
} else {
|
||||
|
|
@ -678,7 +685,7 @@ Ox.List = function(options, self) {
|
|||
}
|
||||
|
||||
function loadItems() {
|
||||
that.$content.empty();
|
||||
self.$page.empty();
|
||||
self.$items = [];
|
||||
self.options.items.forEach(function(item, pos) {
|
||||
// fixme: duplicated
|
||||
|
|
@ -689,7 +696,7 @@ Ox.List = function(options, self) {
|
|||
unique: self.options.unique
|
||||
});
|
||||
isSelected(pos) && self.$items[pos].addClass('OxSelected');
|
||||
self.$items[pos].appendTo(that.$content);
|
||||
self.$items[pos].appendTo(self.$page);
|
||||
});
|
||||
self.selected.length && scrollToPosition(self.selected[0]);
|
||||
// that.triggerEvent('init', {items: self.options.items.length});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue