diff --git a/pandora/itemlist/views.py b/pandora/itemlist/views.py index f9f8b46f..35235545 100644 --- a/pandora/itemlist/views.py +++ b/pandora/itemlist/views.py @@ -95,7 +95,7 @@ def findLists(request): def is_featured_condition(x): return x['key'] == 'status' and \ x['value'] == 'featured' and \ - x['operator'] == '=' + x['operator'] in ('=', '==') is_featured = len(filter(is_featured_condition, data['query'].get('conditions', []))) > 0 if is_section_request: diff --git a/static/js/pandora.js b/static/js/pandora.js index e3582c62..b76eefd4 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -52,42 +52,45 @@ appPanel var images = {}; images.logo = document.createElement('img'); images.logo.onload = function() { + var ratio = images.logo.width / images.logo.height, + width = 320, + height = width / ratio; + images.logo.style.position = 'absolute'; + images.logo.style.left = 0; + images.logo.style.top = 0; + images.logo.style.right = 0; + images.logo.style.bottom = height + 'px'; + images.logo.style.width = width + 'px'; + images.logo.style.height = height + 'px'; + images.logo.style.margin = 'auto'; + images.reflection = document.createElement('img'); + images.reflection.style.position = 'absolute'; + images.reflection.style.left = 0; + images.reflection.style.top = height + 'px'; + images.reflection.style.right = 0; + images.reflection.style.bottom = 0; + images.reflection.style.width = width + 'px'; + images.reflection.style.height = height + 'px'; + images.reflection.style.margin = 'auto'; + images.reflection.style.MozTransform = 'scaleY(-1)'; + images.reflection.style.OTransform = 'scaleY(-1)'; + images.reflection.style.WebkitTransform = 'scaleY(-1)'; + images.reflection.src = '/static/png/logo256.png'; + images.loadingIcon = document.createElement('img'); + images.loadingIcon.setAttribute('id', 'loadingIcon'); + images.loadingIcon.style.position = 'absolute'; + images.loadingIcon.style.left = 0; + images.loadingIcon.style.top = '80px'; + images.loadingIcon.style.right = 0; + images.loadingIcon.style.bottom = 0; + images.loadingIcon.style.width = '32px'; + images.loadingIcon.style.height = '32px'; + images.loadingIcon.style.margin = 'auto'; + images.loadingIcon.src = '/static/oxjs/' + (debug ? 'dev' : 'build') + + '/Ox.UI/themes/' + theme + '/svg/symbolLoadingAnimated.svg'; callback(images); }; - images.logo.style.position = 'absolute'; - images.logo.style.left = 0; - images.logo.style.top = 0; - images.logo.style.right = 0; - images.logo.style.bottom = '160px'; - images.logo.style.width = '320px'; - images.logo.style.height = '160px'; - images.logo.style.margin = 'auto'; images.logo.src = '/static/png/logo256.png'; - images.reflection = document.createElement('img'); - images.reflection.style.position = 'absolute'; - images.reflection.style.left = 0; - images.reflection.style.top = '160px'; - images.reflection.style.right = 0; - images.reflection.style.bottom = 0; - images.reflection.style.width = '320px'; - images.reflection.style.height = '160px'; - images.reflection.style.margin = 'auto'; - images.reflection.style.MozTransform = 'scaleY(-1)'; - images.reflection.style.OTransform = 'scaleY(-1)'; - images.reflection.style.WebkitTransform = 'scaleY(-1)'; - images.reflection.src = '/static/png/logo256.png'; - images.loadingIcon = document.createElement('img'); - images.loadingIcon.setAttribute('id', 'loadingIcon'); - images.loadingIcon.style.position = 'absolute'; - images.loadingIcon.style.left = 0; - images.loadingIcon.style.top = '80px'; - images.loadingIcon.style.right = 0; - images.loadingIcon.style.bottom = 0; - images.loadingIcon.style.width = '32px'; - images.loadingIcon.style.height = '32px'; - images.loadingIcon.style.margin = 'auto'; - images.loadingIcon.src = '/static/oxjs/' + (debug ? 'dev' : 'build') - + '/Ox.UI/themes/' + theme + '/svg/symbolLoadingAnimated.svg'; } function loadScreen(images) { @@ -136,9 +139,7 @@ appPanel function loadOxUI(callback) { Ox.load({ - UI: { - theme: theme - }, + UI: {theme: theme}, Geo: {} }, callback); } diff --git a/static/js/pandora/embedDialog.js b/static/js/pandora/embedDialog.js index 99667320..b63a088f 100644 --- a/static/js/pandora/embedDialog.js +++ b/static/js/pandora/embedDialog.js @@ -18,15 +18,14 @@ pandora.ui.embedDialog = function(data) { ], closeButton: true, content: content, - height: height, + height: 120, keys: { 'escape': 'close' }, maximizeButton: true, - minHeight: height, - minWidth: width, + removeOnClose: true, title: 'Embed Video', - width: width + width: 600 }) .bindEvent({ close: function(data) { @@ -45,7 +44,24 @@ pandora.ui.embedDialog = function(data) { }); return url + query.join('&'); } - content.html('To embed this video you need unicorns... or try this code:
'); - content.append($('