forked from 0x2620/pandora
make context browser react to listsort event
This commit is contained in:
parent
2f44846044
commit
42894917fa
1 changed files with 8 additions and 2 deletions
|
@ -115,8 +115,7 @@ pandora.ui.browser = function() {
|
||||||
pageLength: 32,
|
pageLength: 32,
|
||||||
selected: [pandora.user.ui.item],
|
selected: [pandora.user.ui.item],
|
||||||
size: 64,
|
size: 64,
|
||||||
sort: ['text', 'position'].indexOf(pandora.user.ui.listSort[0].key) > -1
|
sort: getSort(),
|
||||||
? pandora.site.user.ui.listSort: pandora.user.ui.listSort,
|
|
||||||
unique: 'id'
|
unique: 'id'
|
||||||
})
|
})
|
||||||
.addClass('OxMedia')
|
.addClass('OxMedia')
|
||||||
|
@ -162,6 +161,9 @@ pandora.ui.browser = function() {
|
||||||
pandora_item: function(data) {
|
pandora_item: function(data) {
|
||||||
that.options({selected: [data.value]});
|
that.options({selected: [data.value]});
|
||||||
},
|
},
|
||||||
|
pandora_listsort: function() {
|
||||||
|
that.options({sort: getSort()})
|
||||||
|
},
|
||||||
pandora_showsiteposters: function() {
|
pandora_showsiteposters: function() {
|
||||||
pandora.user.ui.icons == 'posters' && that.reloadList(true);
|
pandora.user.ui.icons == 'posters' && that.reloadList(true);
|
||||||
}
|
}
|
||||||
|
@ -181,6 +183,10 @@ pandora.ui.browser = function() {
|
||||||
that.css({overflowY: 'hidden'}); // this fixes a bug in firefox
|
that.css({overflowY: 'hidden'}); // this fixes a bug in firefox
|
||||||
pandora.enableDragAndDrop(that, false);
|
pandora.enableDragAndDrop(that, false);
|
||||||
}
|
}
|
||||||
|
function getSort() {
|
||||||
|
return ['text', 'position'].indexOf(pandora.user.ui.listSort[0].key) > -1
|
||||||
|
? pandora.site.user.ui.listSort: pandora.user.ui.listSort
|
||||||
|
}
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue