user.ui.texts.id.position shoul always be int

This commit is contained in:
j 2013-09-18 15:41:45 +00:00
parent 14d147013d
commit 01a6faed0d
2 changed files with 4 additions and 4 deletions

View file

@ -69,7 +69,7 @@ pandora.URL = (function() {
? pandora.user.ui.texts[state.item].position ? pandora.user.ui.texts[state.item].position
: 0; : 0;
if (position) { if (position) {
state.span = position; state.span = [position];
} }
} }
@ -217,7 +217,7 @@ pandora.URL = (function() {
} else if (state.type == 'texts') { } else if (state.type == 'texts') {
if (state.span) { if (state.span) {
set['texts.' + pandora.UI.encode(state.item) + '.position'] = state.span; set['texts.' + pandora.UI.encode(state.item) + '.position'] = state.span[0];
} }
} }

View file

@ -222,7 +222,7 @@ pandora.ui.textHTML = function(text) {
if (position != pandora.user.ui.texts[pandora.user.ui.text].position) { if (position != pandora.user.ui.texts[pandora.user.ui.text].position) {
pandora.UI.set( pandora.UI.set(
'texts.' + pandora.UI.encode(pandora.user.ui.text) + '.position', 'texts.' + pandora.UI.encode(pandora.user.ui.text) + '.position',
position ? [position] : 0 position ? position : 0
); );
} }
} }
@ -384,7 +384,7 @@ pandora.ui.textPDF = function(text) {
}); });
}).open(); }).open();
} else if (event == 'page') { } else if (event == 'page') {
pandora.UI.set('texts.' + pandora.UI.encode(pandora.user.ui.text) + '.position', [data.page]); pandora.UI.set('texts.' + pandora.UI.encode(pandora.user.ui.text) + '.position', data.page);
} }
}) })
.appendTo(that); .appendTo(that);