page is stored in position now

This commit is contained in:
j 2015-02-05 06:30:22 +00:00
parent 6bb5b4b5ce
commit ae1160b6c4

View file

@ -144,7 +144,7 @@ pandora.ui.documentDialog = function(options) {
function getSettings() { function getSettings() {
return Ox.extend(item.extension == 'pdf' ? { return Ox.extend(item.extension == 'pdf' ? {
page: 1, position: 1,
zoom: 'fit' zoom: 'fit'
} : { } : {
center: 'auto', center: 'auto',
@ -158,7 +158,7 @@ pandora.ui.documentDialog = function(options) {
item.extension == 'pdf' item.extension == 'pdf'
? Ox.PDFViewer({ ? Ox.PDFViewer({
height: dialogHeight, height: dialogHeight,
page: settings.page, page: settings.position,
url: '/documents/' + item.id + '/' url: '/documents/' + item.id + '/'
+ item.name + '.' + item.extension, + item.name + '.' + item.extension,
width: dialogWidth, width: dialogWidth,
@ -187,7 +187,7 @@ pandora.ui.documentDialog = function(options) {
}, },
page: function(data) { page: function(data) {
pandora.UI.set('documents.' + item.id, Ox.extend(settings, { pandora.UI.set('documents.' + item.id, Ox.extend(settings, {
page: data.page position: data.page
})); }));
}, },
zoom: function(data) { zoom: function(data) {