use Ox.$parent

This commit is contained in:
j 2014-09-25 21:54:40 +02:00
parent 4c01423d65
commit 4fc5fc53de

View file

@ -8,12 +8,12 @@ Ox.load({
var page = evt.pageNumber; var page = evt.pageNumber;
if (page && page != currentPage) { if (page && page != currentPage) {
currentPage = page; currentPage = page;
Ox.parent.postMessage('page', { Ox.$parent.postMessage('page', {
page: Math.round(page) page: Math.round(page)
}); });
} }
}); });
Ox.parent.bindMessage({ Ox.$parent.bindMessage({
page: function(data) { page: function(data) {
if (data.page != PDFView.page) { if (data.page != PDFView.page) {
PDFView.page = data.page; PDFView.page = data.page;
@ -75,7 +75,7 @@ function getVideoOverlay(page) {
enableVideoUI(); enableVideoUI();
} }
this.div.appendChild($interface[0]); this.div.appendChild($interface[0]);
Ox.parent.bindMessage('update', function(data) { Ox.$parent.bindMessage('update', function(data) {
if (video && data.id == video.id && data.page == video.page) { if (video && data.id == video.id && data.page == video.page) {
video.src = data.src; video.src = data.src;
video.src !== '' ? enableVideoUI() : disableVideoUI(); video.src !== '' ? enableVideoUI() : disableVideoUI();
@ -123,7 +123,7 @@ function getVideoOverlay(page) {
src: '', src: '',
type: 'inline' type: 'inline'
}; };
Ox.parent.postMessage('edit', video); Ox.$parent.postMessage('edit', video);
return false; return false;
} }
function enableVideoUI() { function enableVideoUI() {