forked from 0x2620/pandora
user.ui.texts.id.position shoul always be int
This commit is contained in:
parent
14d147013d
commit
01a6faed0d
2 changed files with 4 additions and 4 deletions
|
@ -69,7 +69,7 @@ pandora.URL = (function() {
|
|||
? pandora.user.ui.texts[state.item].position
|
||||
: 0;
|
||||
if (position) {
|
||||
state.span = position;
|
||||
state.span = [position];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ pandora.URL = (function() {
|
|||
} else if (state.type == 'texts') {
|
||||
|
||||
if (state.span) {
|
||||
set['texts.' + pandora.UI.encode(state.item) + '.position'] = state.span;
|
||||
set['texts.' + pandora.UI.encode(state.item) + '.position'] = state.span[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ pandora.ui.textHTML = function(text) {
|
|||
if (position != pandora.user.ui.texts[pandora.user.ui.text].position) {
|
||||
pandora.UI.set(
|
||||
'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();
|
||||
} 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);
|
||||
|
|
Loading…
Reference in a new issue