forked from 0x2620/pandora
use Ox.$(document|body) instead of pandora.$ui.(document|body)
This commit is contained in:
parent
390595a261
commit
58999918f7
10 changed files with 27 additions and 31 deletions
|
@ -20,16 +20,16 @@ pandora.ui.appPanel = function() {
|
|||
// fixme: move animation into Ox.App
|
||||
var animate = $('.OxScreen').length == 0;
|
||||
Ox.Log('', 'ANIMATE?', animate)
|
||||
animate && pandora.$ui.body.css({opacity: 0});
|
||||
that.appendTo(pandora.$ui.body);
|
||||
animate && pandora.$ui.body.animate({opacity: 1}, 1000);
|
||||
animate && Ox.$body.css({opacity: 0});
|
||||
that.appendTo(Ox.$body);
|
||||
animate && Ox.$body.animate({opacity: 1}, 1000);
|
||||
return that;
|
||||
};
|
||||
that.reload = function() {
|
||||
Ox.Request.cancel();
|
||||
Ox.Request.clearCache();
|
||||
pandora.$ui.appPanel.remove();
|
||||
pandora.$ui.appPanel = pandora.ui.appPanel().appendTo(pandora.$ui.body);
|
||||
pandora.$ui.appPanel = pandora.ui.appPanel().appendTo(Ox.$body);
|
||||
return that;
|
||||
};
|
||||
that.bindEvent({
|
||||
|
|
|
@ -152,7 +152,7 @@ pandora.ui.editPanel = function(isEmbed) {
|
|||
timelineTooltip: Ox._('timeline') + ' <span class="OxBright">' + Ox.SYMBOLS.shift + 'T</span>',
|
||||
video: getVideos(),
|
||||
volume: ui.videoVolume,
|
||||
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
width: Ox.$document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
})
|
||||
.bindEvent({
|
||||
copy: function(data) {
|
||||
|
@ -479,7 +479,7 @@ pandora.ui.editPanel = function(isEmbed) {
|
|||
enableSubtitles: ui.videoSubtitles,
|
||||
enableTimeline: true,
|
||||
enableVolume: true,
|
||||
height: pandora.$ui.document.height(),
|
||||
height: Ox.$document.height(),
|
||||
paused: true,
|
||||
showIconOnLoad: true,
|
||||
subtitles: getSubtitles(edit.clips),
|
||||
|
@ -488,7 +488,7 @@ pandora.ui.editPanel = function(isEmbed) {
|
|||
timeline: getSmallTimelineURL(),
|
||||
video: getVideos(),
|
||||
volume: ui.videoVolume,
|
||||
width: pandora.$ui.document.width()
|
||||
width: Ox.$document.width()
|
||||
}).bindEvent({
|
||||
fullscreen: function(data) {
|
||||
Ox.Fullscreen.toggle();
|
||||
|
|
|
@ -105,7 +105,7 @@ pandora.ui.editor = function(data) {
|
|||
videoRatio: data.videoRatio,
|
||||
videoSize: ui.videoSize,
|
||||
volume: ui.videoVolume,
|
||||
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
width: Ox.$document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
}).bindEvent({
|
||||
addannotation: function(data) {
|
||||
Ox.Log('', 'addAnnotation', data);
|
||||
|
|
|
@ -48,9 +48,9 @@ pandora.ui.embedPanel = function() {
|
|||
// fixme: move animation into Ox.App
|
||||
var animate = $('.OxScreen').length == 0;
|
||||
Ox.Log('', 'ANIMATE?', animate)
|
||||
animate && pandora.$ui.body.css({opacity: 0});
|
||||
that.appendTo(pandora.$ui.body);
|
||||
animate && pandora.$ui.body.animate({opacity: 1}, 1000);
|
||||
animate && Ox.$body.css({opacity: 0});
|
||||
that.appendTo(Ox.$body);
|
||||
animate && Ox.$body.animate({opacity: 1}, 1000);
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
pandora.ui.filter = function(id) {
|
||||
var i = Ox.getIndexById(pandora.user.ui.filters, id),
|
||||
filter = Ox.getObjectById(pandora.site.filters, id),
|
||||
panelWidth = pandora.$ui.document.width() - (pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize) - 1,
|
||||
panelWidth = Ox.$document.width() - (pandora.user.ui.showSidebar * pandora.user.ui.sidebarSize) - 1,
|
||||
title = Ox._(Ox.getObjectById(pandora.site.filters, id).title),
|
||||
//width = pandora.getFilterWidth(i, panelWidth),
|
||||
that = Ox.TableList({
|
||||
|
|
|
@ -278,17 +278,13 @@ appPanel
|
|||
function initPandora(data) {
|
||||
|
||||
Ox.Log('', 'Ox.App load', data);
|
||||
Ox.$window.on({
|
||||
beforeunload: pandora.beforeUnloadWindow,
|
||||
resize: pandora.resizeWindow,
|
||||
unload: pandora.unloadWindow
|
||||
})
|
||||
Ox.extend(pandora, {
|
||||
$ui: {
|
||||
body: $('body'),
|
||||
document: $(document),
|
||||
window: $(window)
|
||||
.on({
|
||||
beforeunload: pandora.beforeUnloadWindow,
|
||||
resize: pandora.resizeWindow,
|
||||
unload: pandora.unloadWindow
|
||||
})
|
||||
},
|
||||
$ui: {},
|
||||
site: data.site,
|
||||
user: data.user
|
||||
});
|
||||
|
|
|
@ -57,7 +57,7 @@ pandora.ui.player = function(data) {
|
|||
timelineTooltip: Ox._('timeline') + ' <span class="OxBright">' + Ox.SYMBOLS.shift + 'T</span>',
|
||||
video: data.video,
|
||||
volume: ui.videoVolume,
|
||||
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
width: Ox.$document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
}).bindEvent({
|
||||
annotationsrange: function(data) {
|
||||
pandora.UI.set({annotationsRange: data.range});
|
||||
|
|
|
@ -112,9 +112,9 @@ pandora.ui.printView = function(data) {
|
|||
// fixme: move animation into Ox.App
|
||||
var animate = $('.OxScreen').length == 0;
|
||||
Ox.Log('', 'ANIMATE?', animate)
|
||||
animate && pandora.$ui.body.css({opacity: 0});
|
||||
that.appendTo(pandora.$ui.body);
|
||||
animate && pandora.$ui.body.animate({opacity: 1}, 1000);
|
||||
animate && Ox.$body.css({opacity: 0});
|
||||
that.appendTo(Ox.$body);
|
||||
animate && Ox.$body.animate({opacity: 1}, 1000);
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ pandora.ui.timeline = function(data) {
|
|||
video: data.video,
|
||||
videoRatio: data.videoRatio,
|
||||
volume: ui.videoVolume,
|
||||
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
width: Ox.$document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
})
|
||||
.bindEvent({
|
||||
annotationsrange: function(data) {
|
||||
|
|
|
@ -2736,21 +2736,21 @@ pandora.resizeWindow = function() {
|
|||
pandora.$ui.timeline && pandora.$ui.timeline.options({
|
||||
// fixme: duplicated
|
||||
height: pandora.$ui.contentPanel.size(1),
|
||||
width: pandora.$ui.document.width()
|
||||
width: Ox.$document.width()
|
||||
- pandora.$ui.mainPanel.size(0) - 1
|
||||
});
|
||||
} else if (pandora.user.ui.itemView == 'player') {
|
||||
pandora.$ui.player && pandora.$ui.player.options({
|
||||
// fixme: duplicated
|
||||
height: pandora.$ui.contentPanel.size(1),
|
||||
width: pandora.$ui.document.width()
|
||||
width: Ox.$document.width()
|
||||
- pandora.$ui.mainPanel.size(0) - 1
|
||||
});
|
||||
} else if (pandora.user.ui.itemView == 'editor') {
|
||||
pandora.$ui.editor && pandora.$ui.editor.options({
|
||||
// fixme: duplicated
|
||||
height: pandora.$ui.contentPanel.size(1),
|
||||
width: pandora.$ui.document.width()
|
||||
width: Ox.$document.width()
|
||||
- pandora.$ui.mainPanel.size(0) - 1
|
||||
});
|
||||
} else if (pandora.user.ui.itemView == 'map') {
|
||||
|
@ -2771,7 +2771,7 @@ pandora.resizeWindow = function() {
|
|||
} else {
|
||||
pandora.$ui.editPanel && pandora.$ui.editPanel.options({
|
||||
height: pandora.$ui.appPanel.size(1),
|
||||
width: pandora.$ui.document.width()
|
||||
width: Ox.$document.width()
|
||||
- pandora.$ui.mainPanel.size(0) - 1
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue