set/get per document settings

This commit is contained in:
j 2014-01-16 13:51:10 +00:00
parent f522ba52f6
commit fdbd17fdc1

View file

@ -14,7 +14,7 @@ pandora.ui.documentDialog = function(options) {
} : { } : {
center: 'auto', center: 'auto',
zoom: 'fit' zoom: 'fit'
}, pandora.user.ui.document[item.id] || {}), }, pandora.user.ui.documents[item.id] || {}),
$content = Ox.Element(), $content = Ox.Element(),
@ -116,7 +116,7 @@ pandora.ui.documentDialog = function(options) {
) )
.bindEvent({ .bindEvent({
center: function(data) { center: function(data) {
pandora.UI.set('document.' + item.id, Ox.extend(settings, { pandora.UI.set('documents.' + item.id, Ox.extend(settings, {
center: data.center center: data.center
})); }));
}, },
@ -124,12 +124,12 @@ pandora.ui.documentDialog = function(options) {
pandora.$ui.documentDialog.close(); pandora.$ui.documentDialog.close();
}, },
page: function(data) { page: function(data) {
pandora.UI.set('document.' + item.id, Ox.extend(settings, { pandora.UI.set('documents.' + item.id, Ox.extend(settings, {
page: data.page page: data.page
})); }));
}, },
zoom: function(data) { zoom: function(data) {
pandora.UI.set('document.' + item.id, Ox.extend(settings, { pandora.UI.set('documents.' + item.id, Ox.extend(settings, {
zoom: data.zoom zoom: data.zoom
})); }));
} }