load featured items(again)
This commit is contained in:
parent
c1ff4185a8
commit
cb4d10d5be
1 changed files with 29 additions and 3 deletions
|
|
@ -186,7 +186,6 @@ pandora.ui.home = function() {
|
||||||
operator: '+'
|
operator: '+'
|
||||||
}]
|
}]
|
||||||
}, result => {
|
}, result => {
|
||||||
console.log('!!', result)
|
|
||||||
edit.clips.forEach(function(clip) {
|
edit.clips.forEach(function(clip) {
|
||||||
clip.sort = result.data.clips.indexOf(clip.id);
|
clip.sort = result.data.clips.indexOf(clip.id);
|
||||||
});
|
});
|
||||||
|
|
@ -225,8 +224,35 @@ pandora.ui.home = function() {
|
||||||
loadEdit()
|
loadEdit()
|
||||||
|
|
||||||
function showFeatures() {
|
function showFeatures() {
|
||||||
$features.append($footer);
|
pandora.api.getHomeItems({active: true}, function(result) {
|
||||||
$features.animate({opacity: 1}, 250);
|
var items = result.data.items.filter(pandora.isCompleteHomeItem),
|
||||||
|
$texts;
|
||||||
|
$features.empty();
|
||||||
|
if (items.length) {
|
||||||
|
$texts = Ox.Element().appendTo($features);
|
||||||
|
items.forEach(function(item) {
|
||||||
|
var $item = pandora.renderHomeItem({
|
||||||
|
data: item
|
||||||
|
}).css({
|
||||||
|
minHeight: "128px",
|
||||||
|
borderRadius: "16px",
|
||||||
|
background: "rgba(0,0,0,0.2)",
|
||||||
|
border: "5px rgba(0,0,0, 0.01) solid"
|
||||||
|
}).appendTo($texts);
|
||||||
|
$item.find('.OxEditableContent').css({
|
||||||
|
color: "rgb(240, 240, 240)",
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$features.css({
|
||||||
|
top: '132px'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$features.append($footer);
|
||||||
|
$features.animate({opacity: 1}, 250);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
that.fadeInScreen = function() {
|
that.fadeInScreen = function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue