text panel: textPositions -> text; encode ui.text

This commit is contained in:
rolux 2013-08-07 14:44:27 +00:00
parent 4e0a702cd5
commit f55ee96871

View file

@ -327,8 +327,8 @@ pandora.ui.textPDF = function(text) {
var that = Ox.Element(), var that = Ox.Element(),
$iframe, $iframe,
page = pandora.user.ui.textPositions[pandora.user.ui.text] ? page = pandora.user.ui.texts[pandora.user.ui.text].position ?
pandora.user.ui.textPositions[pandora.user.ui.text][0] : 1, pandora.user.ui.texts[pandora.user.ui.text].position[0] : 1,
url = '/texts/' + pandora.user.ui.text + '/text.pdf.html#page=' + page; url = '/texts/' + pandora.user.ui.text + '/text.pdf.html#page=' + page;
if (text.uploaded) { if (text.uploaded) {
$iframe = Ox.Element('<iframe>') $iframe = Ox.Element('<iframe>')
@ -361,7 +361,7 @@ pandora.ui.textPDF = function(text) {
}); });
}).open(); }).open();
} else if (event == 'page') { } else if (event == 'page') {
pandora.UI.set('textPositions.' + pandora.user.ui.text, [data.page]); pandora.UI.set('texts.' + pandora.user.ui.text.replace(/\./g, '\\.') + '.position', [data.page]);
} }
}) })
.appendTo(that); .appendTo(that);