simple home page
This commit is contained in:
parent
4c18f681af
commit
c1ff4185a8
1 changed files with 9 additions and 169 deletions
|
|
@ -27,40 +27,6 @@ pandora.ui.home = function() {
|
|||
margin: '0 auto 0 auto'
|
||||
})
|
||||
.appendTo(that);
|
||||
/*
|
||||
|
||||
$reflectionImage = $('<img>')
|
||||
.attr({src: '/static/png/logo.png'})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: '80px',
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
width: '320px',
|
||||
height: 'auto',
|
||||
margin: '0 auto 0 auto',
|
||||
MozTransform: 'scaleY(-1)',
|
||||
MsTransform: 'scaleY(-1)',
|
||||
OTransform: 'scaleY(-1)',
|
||||
WebkitTransform: 'scaleY(-1)'
|
||||
})
|
||||
.appendTo($box),
|
||||
|
||||
$reflectionGradient = $('<div>')
|
||||
.addClass('OxReflection')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: '80px',
|
||||
right: 0,
|
||||
width: '320px',
|
||||
height: '160px',
|
||||
margin: '0 auto 0 auto',
|
||||
})
|
||||
.appendTo($box),
|
||||
*/
|
||||
|
||||
var $logo = Ox.Element({
|
||||
element: '<img>',
|
||||
tooltip: function() {
|
||||
|
|
@ -87,98 +53,10 @@ pandora.ui.home = function() {
|
|||
})
|
||||
.appendTo($box),
|
||||
|
||||
$findInput = Ox.Input({
|
||||
width: 252
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: '104px',
|
||||
right: '260px',
|
||||
bottom: 0,
|
||||
margin: '0 auto 0 auto',
|
||||
opacity: 0
|
||||
})
|
||||
.on({
|
||||
click: function(e) {
|
||||
// fixme: why?
|
||||
e.stopPropagation();
|
||||
}
|
||||
})
|
||||
.bindEvent({
|
||||
submit: function(data) {
|
||||
if (data.value) {
|
||||
$findButton.triggerEvent('click');
|
||||
} else {
|
||||
$browseButton.triggerEvent('click');
|
||||
}
|
||||
}
|
||||
})
|
||||
.appendTo($box),
|
||||
|
||||
$findButton = Ox.Button({
|
||||
title: Ox._('Find'),
|
||||
width: 122
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: '130px',
|
||||
top: '104px',
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
margin: '0 auto 0 auto',
|
||||
opacity: 0
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
var folder = pandora.getListData().folder,
|
||||
value = $findInput.value();
|
||||
folder && pandora.$ui.folderList[folder].options({selected: []});
|
||||
that.fadeOutScreen();
|
||||
pandora.UI.set({
|
||||
page: '',
|
||||
find: {
|
||||
conditions: value === ''
|
||||
? []
|
||||
: [{key: '*', value: value, operator: '='}],
|
||||
operator: '&'
|
||||
},
|
||||
section: 'items'
|
||||
});
|
||||
pandora.$ui.findSelect && pandora.$ui.findSelect.value('*');
|
||||
pandora.$ui.findInput && pandora.$ui.findInput.value(value);
|
||||
}
|
||||
})
|
||||
.appendTo($box),
|
||||
|
||||
$browseButton = Ox.Button({
|
||||
title: Ox._('Browse'),
|
||||
width: 122
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: '390px',
|
||||
top: '104px',
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
margin: '0 auto 0 auto',
|
||||
opacity: 0
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
pandora.UI.set({
|
||||
page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page,
|
||||
section: 'items'
|
||||
});
|
||||
that.fadeOutScreen();
|
||||
}
|
||||
})
|
||||
.appendTo($box),
|
||||
|
||||
$footer = Ox.Element().css({
|
||||
clear: 'both',
|
||||
height: '64px',
|
||||
paddingTop: '12px'
|
||||
textAlign: 'center'
|
||||
}),
|
||||
|
||||
$signupButton = Ox.Button({
|
||||
|
|
@ -210,7 +88,7 @@ pandora.ui.home = function() {
|
|||
|
||||
$preferencesButton = Ox.Button({
|
||||
title: Ox._('Türkçe'),
|
||||
width: 252
|
||||
width: 128
|
||||
})
|
||||
.css({
|
||||
})
|
||||
|
|
@ -221,9 +99,7 @@ pandora.ui.home = function() {
|
|||
locale: value,
|
||||
page: '',
|
||||
find: {
|
||||
conditions: value === ''
|
||||
? []
|
||||
: [{key: '*', value: value, operator: '='}],
|
||||
conditions: [],
|
||||
operator: '&'
|
||||
},
|
||||
section: 'items'
|
||||
|
|
@ -237,7 +113,7 @@ pandora.ui.home = function() {
|
|||
|
||||
$aboutButton = Ox.Button({
|
||||
title: Ox._('English'),
|
||||
width: 252
|
||||
width: 128
|
||||
})
|
||||
.css({
|
||||
marginLeft: '8px'
|
||||
|
|
@ -249,9 +125,7 @@ pandora.ui.home = function() {
|
|||
locale: value,
|
||||
page: '',
|
||||
find: {
|
||||
conditions: value === ''
|
||||
? []
|
||||
: [{key: '*', value: value, operator: '='}],
|
||||
conditions: [],
|
||||
operator: '&'
|
||||
},
|
||||
section: 'items'
|
||||
|
|
@ -268,7 +142,7 @@ pandora.ui.home = function() {
|
|||
.css({
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: '152px',
|
||||
top: '100px',
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
width: '512px',
|
||||
|
|
@ -285,12 +159,7 @@ pandora.ui.home = function() {
|
|||
$('<div>').html('“Bu websitesi Sivil Düşün AB Programı Aktivist Desteği kapsamında Avrupa Birliği desteği ile hazırlanmıştır.” “Bu websitesi içeriğinin sorumluluğu tamamıyla Koza Görsel Kültür ve Sanat Derneği\'ne aittir ve AB\'nin görüşlerini yansıtmamaktadır.”')
|
||||
);
|
||||
|
||||
if (pandora.user.level == 'guest') {
|
||||
$signupButton.appendTo($footer);
|
||||
$signinButton.appendTo($footer);
|
||||
} else {
|
||||
$preferencesButton.appendTo($footer);
|
||||
}
|
||||
$preferencesButton.appendTo($footer);
|
||||
$aboutButton.appendTo($footer);
|
||||
|
||||
function getVideos(clips, resolution) {
|
||||
|
|
@ -356,41 +225,13 @@ pandora.ui.home = function() {
|
|||
loadEdit()
|
||||
|
||||
function showFeatures() {
|
||||
pandora.api.getHomeItems({active: true}, function(result) {
|
||||
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.append($support);
|
||||
$features.animate({opacity: 1}, 250);
|
||||
});
|
||||
$features.append($footer);
|
||||
$features.animate({opacity: 1}, 250);
|
||||
}
|
||||
|
||||
that.fadeInScreen = function() {
|
||||
that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() {
|
||||
that.find('*').animate({opacity: 1}, 250, function() {
|
||||
$findInput.focusInput(true);
|
||||
showFeatures();
|
||||
});
|
||||
});
|
||||
|
|
@ -411,7 +252,6 @@ pandora.ui.home = function() {
|
|||
var $elements = that.find('*'), count = 0;
|
||||
$box.css({top: window.innerHeight / 2 - 80 + 'px'});
|
||||
that.css({opacity: 1}).appendTo(Ox.$body);
|
||||
$findInput.focusInput(true);
|
||||
$box.animate({top: '80px'}, 500, function() {
|
||||
$elements.animate({opacity: 1}, 250, function() {
|
||||
if (++count == $elements.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue