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